You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

v1_json.tmpl 390 kB

API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Add Organization Wide Labels (#10814) * Add organization wide labels Implement organization wide labels similar to organization wide webhooks. This lets you create individual labels for organizations that can be used for all repos under that organization (so being able to reuse the same label across multiple repos). This makes it possible for small organizations with many repos to use labels effectively. Fixes #7406 * Add migration * remove comments * fix tests * Update options/locale/locale_en-US.ini Removed unused translation string * show org labels in issue search label filter * Use more clear var name * rename migration after merge from master * comment typo * update migration again after rebase with master * check for orgID <=0 per guillep2k review * fmt * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * remove unused code * Make sure RepoID is 0 when searching orgID per code review * more changes/code review requests * More descriptive translation var per code review * func description/delete comment when issue label deleted instead of hiding it * remove comment * only use issues in that repo when calculating number of open issues for org label on repo label page * Add integration test for IssuesSearch API with labels * remove unused function * Update models/issue_label.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Use subquery in GetLabelIDsInReposByNames * Fix tests to use correct orgID * fix more tests * IssuesSearch api now uses new BuildLabelNamesIssueIDsCondition. Add a few more tests as well * update comment for clarity * Revert previous code change now that we can use the new BuildLabelNamesIssueIDsCondition * Don't sort repos by date in IssuesSearch API After much debugging I've found a strange issue where in some cases MySQL will return a different result than other enigines if a query is sorted by a null collumn. For example with our integration test data where we don't set updated_unix in repository fixtures: SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 45 Returns different results for MySQL than other engines. However, the similar query: SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 30 Returns the same results. This causes integration tests to fail on MySQL in certain cases but would never show up in a real installation. Since this API call always returns issues based on the optionally provided repo_priority_id or the issueID itself, there is no change to results by changing the repo sorting method used to get ids earlier in the function. * linter is back! * code review * remove now unused option * Fix newline at end of files * more unused code * update to master * check for matching ids before query * Update models/issue_label.go Co-Authored-By: 6543 <6543@obermui.de> * Update models/issue_label.go * update comments * Update routers/org/setting.go Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
5 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
5 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
5 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
5 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
5 years ago
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
5 years ago
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
5 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
5 years ago
Repository avatars (#6986) * Repository avatars - first variant of code from old work for gogs - add migration 87 - add new option in app.ini - add en-US locale string - add new class in repository.less * Add changed index.css, remove unused template name * Update en-us doc about configuration options * Add comments to new functions, add new option to docker app.ini * Add comment for lint * Remove variable, not needed * Fix formatting * Update swagger api template * Check if avatar exists * Fix avatar link/path checks * Typo * TEXT column can't have a default value * Fixes: - remove old avatar file on upload - use ID in name of avatar file - users may upload same files - add simple tests * Fix fmt check * Generate PNG instead of "static" GIF * More informative comment * Fix error message * Update avatar upload checks: - add file size check - add new option - update config docs - add new string to en-us locale * Fixes: - use FileHEader field for check file size - add new test - upload big image * Fix formatting * Update comments * Update log message * Removed wrong style - not needed * Use Sync2 to migrate * Update repos list view - bigger avatar - fix html blocks alignment * A little adjust avatar size * Use small icons for explore/repo list * Use new cool avatar preparation func by @lafriks * Missing changes for new function * Remove unused import, move imports * Missed new option definition in app.ini Add file size check in user/profile avatar upload * Use smaller field length for Avatar * Use session to update repo DB data, update DeleteAvatar - use session too * Fix err variable definition * As suggested @lafriks - return as soon as possible, code readability
6 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
5 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
5 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
5 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
5 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188
  1. {
  2. "consumes": [
  3. "application/json",
  4. "text/plain"
  5. ],
  6. "produces": [
  7. "application/json",
  8. "text/html"
  9. ],
  10. "schemes": [
  11. "http",
  12. "https"
  13. ],
  14. "swagger": "2.0",
  15. "info": {
  16. "description": "This documentation describes the OpenI API.",
  17. "title": "OpenI API.",
  18. "license": {
  19. "name": "MIT",
  20. "url": "http://opensource.org/licenses/MIT"
  21. },
  22. "version": "1.1.1"
  23. },
  24. "basePath": "{{AppSubUrl}}/api/v1",
  25. "paths": {
  26. "/admin/orgs": {
  27. "get": {
  28. "produces": [
  29. "application/json"
  30. ],
  31. "tags": [
  32. "admin"
  33. ],
  34. "summary": "List all organizations",
  35. "operationId": "adminGetAllOrgs",
  36. "parameters": [
  37. {
  38. "type": "integer",
  39. "description": "page number of results to return (1-based)",
  40. "name": "page",
  41. "in": "query"
  42. },
  43. {
  44. "type": "integer",
  45. "description": "page size of results, maximum page size is 50",
  46. "name": "limit",
  47. "in": "query"
  48. }
  49. ],
  50. "responses": {
  51. "200": {
  52. "$ref": "#/responses/OrganizationList"
  53. },
  54. "403": {
  55. "$ref": "#/responses/forbidden"
  56. }
  57. }
  58. }
  59. },
  60. "/admin/users": {
  61. "get": {
  62. "produces": [
  63. "application/json"
  64. ],
  65. "tags": [
  66. "admin"
  67. ],
  68. "summary": "List all users",
  69. "operationId": "adminGetAllUsers",
  70. "parameters": [
  71. {
  72. "type": "integer",
  73. "description": "page number of results to return (1-based)",
  74. "name": "page",
  75. "in": "query"
  76. },
  77. {
  78. "type": "integer",
  79. "description": "page size of results, maximum page size is 50",
  80. "name": "limit",
  81. "in": "query"
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "$ref": "#/responses/UserList"
  87. },
  88. "403": {
  89. "$ref": "#/responses/forbidden"
  90. }
  91. }
  92. },
  93. "post": {
  94. "consumes": [
  95. "application/json"
  96. ],
  97. "produces": [
  98. "application/json"
  99. ],
  100. "tags": [
  101. "admin"
  102. ],
  103. "summary": "Create a user",
  104. "operationId": "adminCreateUser",
  105. "parameters": [
  106. {
  107. "name": "body",
  108. "in": "body",
  109. "schema": {
  110. "$ref": "#/definitions/CreateUserOption"
  111. }
  112. }
  113. ],
  114. "responses": {
  115. "201": {
  116. "$ref": "#/responses/User"
  117. },
  118. "400": {
  119. "$ref": "#/responses/error"
  120. },
  121. "403": {
  122. "$ref": "#/responses/forbidden"
  123. },
  124. "422": {
  125. "$ref": "#/responses/validationError"
  126. }
  127. }
  128. }
  129. },
  130. "/admin/users/{username}": {
  131. "delete": {
  132. "produces": [
  133. "application/json"
  134. ],
  135. "tags": [
  136. "admin"
  137. ],
  138. "summary": "Delete a user",
  139. "operationId": "adminDeleteUser",
  140. "parameters": [
  141. {
  142. "type": "string",
  143. "description": "username of user to delete",
  144. "name": "username",
  145. "in": "path",
  146. "required": true
  147. }
  148. ],
  149. "responses": {
  150. "204": {
  151. "$ref": "#/responses/empty"
  152. },
  153. "403": {
  154. "$ref": "#/responses/forbidden"
  155. },
  156. "422": {
  157. "$ref": "#/responses/validationError"
  158. }
  159. }
  160. },
  161. "patch": {
  162. "consumes": [
  163. "application/json"
  164. ],
  165. "produces": [
  166. "application/json"
  167. ],
  168. "tags": [
  169. "admin"
  170. ],
  171. "summary": "Edit an existing user",
  172. "operationId": "adminEditUser",
  173. "parameters": [
  174. {
  175. "type": "string",
  176. "description": "username of user to edit",
  177. "name": "username",
  178. "in": "path",
  179. "required": true
  180. },
  181. {
  182. "name": "body",
  183. "in": "body",
  184. "schema": {
  185. "$ref": "#/definitions/EditUserOption"
  186. }
  187. }
  188. ],
  189. "responses": {
  190. "200": {
  191. "$ref": "#/responses/User"
  192. },
  193. "403": {
  194. "$ref": "#/responses/forbidden"
  195. },
  196. "422": {
  197. "$ref": "#/responses/validationError"
  198. }
  199. }
  200. }
  201. },
  202. "/admin/users/{username}/keys": {
  203. "post": {
  204. "consumes": [
  205. "application/json"
  206. ],
  207. "produces": [
  208. "application/json"
  209. ],
  210. "tags": [
  211. "admin"
  212. ],
  213. "summary": "Add a public key on behalf of a user",
  214. "operationId": "adminCreatePublicKey",
  215. "parameters": [
  216. {
  217. "type": "string",
  218. "description": "username of the user",
  219. "name": "username",
  220. "in": "path",
  221. "required": true
  222. },
  223. {
  224. "name": "key",
  225. "in": "body",
  226. "schema": {
  227. "$ref": "#/definitions/CreateKeyOption"
  228. }
  229. }
  230. ],
  231. "responses": {
  232. "201": {
  233. "$ref": "#/responses/PublicKey"
  234. },
  235. "403": {
  236. "$ref": "#/responses/forbidden"
  237. },
  238. "422": {
  239. "$ref": "#/responses/validationError"
  240. }
  241. }
  242. }
  243. },
  244. "/admin/users/{username}/keys/{id}": {
  245. "delete": {
  246. "produces": [
  247. "application/json"
  248. ],
  249. "tags": [
  250. "admin"
  251. ],
  252. "summary": "Delete a user's public key",
  253. "operationId": "adminDeleteUserPublicKey",
  254. "parameters": [
  255. {
  256. "type": "string",
  257. "description": "username of user",
  258. "name": "username",
  259. "in": "path",
  260. "required": true
  261. },
  262. {
  263. "type": "integer",
  264. "format": "int64",
  265. "description": "id of the key to delete",
  266. "name": "id",
  267. "in": "path",
  268. "required": true
  269. }
  270. ],
  271. "responses": {
  272. "204": {
  273. "$ref": "#/responses/empty"
  274. },
  275. "403": {
  276. "$ref": "#/responses/forbidden"
  277. },
  278. "404": {
  279. "$ref": "#/responses/notFound"
  280. }
  281. }
  282. }
  283. },
  284. "/admin/users/{username}/orgs": {
  285. "post": {
  286. "consumes": [
  287. "application/json"
  288. ],
  289. "produces": [
  290. "application/json"
  291. ],
  292. "tags": [
  293. "admin"
  294. ],
  295. "summary": "Create an organization",
  296. "operationId": "adminCreateOrg",
  297. "parameters": [
  298. {
  299. "type": "string",
  300. "description": "username of the user that will own the created organization",
  301. "name": "username",
  302. "in": "path",
  303. "required": true
  304. },
  305. {
  306. "name": "organization",
  307. "in": "body",
  308. "required": true,
  309. "schema": {
  310. "$ref": "#/definitions/CreateOrgOption"
  311. }
  312. }
  313. ],
  314. "responses": {
  315. "201": {
  316. "$ref": "#/responses/Organization"
  317. },
  318. "403": {
  319. "$ref": "#/responses/forbidden"
  320. },
  321. "422": {
  322. "$ref": "#/responses/validationError"
  323. }
  324. }
  325. }
  326. },
  327. "/admin/users/{username}/repos": {
  328. "post": {
  329. "consumes": [
  330. "application/json"
  331. ],
  332. "produces": [
  333. "application/json"
  334. ],
  335. "tags": [
  336. "admin"
  337. ],
  338. "summary": "Create a repository on behalf of a user",
  339. "operationId": "adminCreateRepo",
  340. "parameters": [
  341. {
  342. "type": "string",
  343. "description": "username of the user. This user will own the created repository",
  344. "name": "username",
  345. "in": "path",
  346. "required": true
  347. },
  348. {
  349. "name": "repository",
  350. "in": "body",
  351. "required": true,
  352. "schema": {
  353. "$ref": "#/definitions/CreateRepoOption"
  354. }
  355. }
  356. ],
  357. "responses": {
  358. "201": {
  359. "$ref": "#/responses/Repository"
  360. },
  361. "403": {
  362. "$ref": "#/responses/forbidden"
  363. },
  364. "404": {
  365. "$ref": "#/responses/notFound"
  366. },
  367. "409": {
  368. "$ref": "#/responses/error"
  369. },
  370. "422": {
  371. "$ref": "#/responses/validationError"
  372. }
  373. }
  374. }
  375. },
  376. "/markdown": {
  377. "post": {
  378. "consumes": [
  379. "application/json"
  380. ],
  381. "produces": [
  382. "text/html"
  383. ],
  384. "tags": [
  385. "miscellaneous"
  386. ],
  387. "summary": "Render a markdown document as HTML",
  388. "operationId": "renderMarkdown",
  389. "parameters": [
  390. {
  391. "name": "body",
  392. "in": "body",
  393. "schema": {
  394. "$ref": "#/definitions/MarkdownOption"
  395. }
  396. }
  397. ],
  398. "responses": {
  399. "200": {
  400. "$ref": "#/responses/MarkdownRender"
  401. },
  402. "422": {
  403. "$ref": "#/responses/validationError"
  404. }
  405. }
  406. }
  407. },
  408. "/markdown/raw": {
  409. "post": {
  410. "consumes": [
  411. "text/plain"
  412. ],
  413. "produces": [
  414. "text/html"
  415. ],
  416. "tags": [
  417. "miscellaneous"
  418. ],
  419. "summary": "Render raw markdown as HTML",
  420. "operationId": "renderMarkdownRaw",
  421. "parameters": [
  422. {
  423. "description": "Request body to render",
  424. "name": "body",
  425. "in": "body",
  426. "required": true,
  427. "schema": {
  428. "type": "string"
  429. }
  430. }
  431. ],
  432. "responses": {
  433. "200": {
  434. "$ref": "#/responses/MarkdownRender"
  435. },
  436. "422": {
  437. "$ref": "#/responses/validationError"
  438. }
  439. }
  440. }
  441. },
  442. "/notifications": {
  443. "get": {
  444. "consumes": [
  445. "application/json"
  446. ],
  447. "produces": [
  448. "application/json"
  449. ],
  450. "tags": [
  451. "notification"
  452. ],
  453. "summary": "List users's notification threads",
  454. "operationId": "notifyGetList",
  455. "parameters": [
  456. {
  457. "type": "string",
  458. "description": "If true, show notifications marked as read. Default value is false",
  459. "name": "all",
  460. "in": "query"
  461. },
  462. {
  463. "type": "string",
  464. "format": "date-time",
  465. "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
  466. "name": "since",
  467. "in": "query"
  468. },
  469. {
  470. "type": "string",
  471. "format": "date-time",
  472. "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
  473. "name": "before",
  474. "in": "query"
  475. },
  476. {
  477. "type": "integer",
  478. "description": "page number of results to return (1-based)",
  479. "name": "page",
  480. "in": "query"
  481. },
  482. {
  483. "type": "integer",
  484. "description": "page size of results, maximum page size is 50",
  485. "name": "limit",
  486. "in": "query"
  487. }
  488. ],
  489. "responses": {
  490. "200": {
  491. "$ref": "#/responses/NotificationThreadList"
  492. }
  493. }
  494. },
  495. "put": {
  496. "consumes": [
  497. "application/json"
  498. ],
  499. "produces": [
  500. "application/json"
  501. ],
  502. "tags": [
  503. "notification"
  504. ],
  505. "summary": "Mark notification threads as read",
  506. "operationId": "notifyReadList",
  507. "parameters": [
  508. {
  509. "type": "string",
  510. "format": "date-time",
  511. "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
  512. "name": "last_read_at",
  513. "in": "query"
  514. }
  515. ],
  516. "responses": {
  517. "205": {
  518. "$ref": "#/responses/empty"
  519. }
  520. }
  521. }
  522. },
  523. "/notifications/new": {
  524. "get": {
  525. "tags": [
  526. "notification"
  527. ],
  528. "summary": "Check if unread notifications exist",
  529. "operationId": "notifyNewAvailable",
  530. "responses": {
  531. "200": {
  532. "$ref": "#/responses/NotificationCount"
  533. }
  534. }
  535. }
  536. },
  537. "/notifications/threads/{id}": {
  538. "get": {
  539. "consumes": [
  540. "application/json"
  541. ],
  542. "produces": [
  543. "application/json"
  544. ],
  545. "tags": [
  546. "notification"
  547. ],
  548. "summary": "Get notification thread by ID",
  549. "operationId": "notifyGetThread",
  550. "parameters": [
  551. {
  552. "type": "string",
  553. "description": "id of notification thread",
  554. "name": "id",
  555. "in": "path",
  556. "required": true
  557. }
  558. ],
  559. "responses": {
  560. "200": {
  561. "$ref": "#/responses/NotificationThread"
  562. },
  563. "403": {
  564. "$ref": "#/responses/forbidden"
  565. },
  566. "404": {
  567. "$ref": "#/responses/notFound"
  568. }
  569. }
  570. },
  571. "patch": {
  572. "consumes": [
  573. "application/json"
  574. ],
  575. "produces": [
  576. "application/json"
  577. ],
  578. "tags": [
  579. "notification"
  580. ],
  581. "summary": "Mark notification thread as read by ID",
  582. "operationId": "notifyReadThread",
  583. "parameters": [
  584. {
  585. "type": "string",
  586. "description": "id of notification thread",
  587. "name": "id",
  588. "in": "path",
  589. "required": true
  590. }
  591. ],
  592. "responses": {
  593. "205": {
  594. "$ref": "#/responses/empty"
  595. },
  596. "403": {
  597. "$ref": "#/responses/forbidden"
  598. },
  599. "404": {
  600. "$ref": "#/responses/notFound"
  601. }
  602. }
  603. }
  604. },
  605. "/org/{org}/repos": {
  606. "post": {
  607. "consumes": [
  608. "application/json"
  609. ],
  610. "produces": [
  611. "application/json"
  612. ],
  613. "tags": [
  614. "organization"
  615. ],
  616. "summary": "Create a repository in an organization",
  617. "operationId": "createOrgRepoDeprecated",
  618. "deprecated": true,
  619. "parameters": [
  620. {
  621. "type": "string",
  622. "description": "name of organization",
  623. "name": "org",
  624. "in": "path",
  625. "required": true
  626. },
  627. {
  628. "name": "body",
  629. "in": "body",
  630. "schema": {
  631. "$ref": "#/definitions/CreateRepoOption"
  632. }
  633. }
  634. ],
  635. "responses": {
  636. "201": {
  637. "$ref": "#/responses/Repository"
  638. },
  639. "403": {
  640. "$ref": "#/responses/forbidden"
  641. },
  642. "422": {
  643. "$ref": "#/responses/validationError"
  644. }
  645. }
  646. }
  647. },
  648. "/orgs": {
  649. "get": {
  650. "produces": [
  651. "application/json"
  652. ],
  653. "tags": [
  654. "organization"
  655. ],
  656. "summary": "Get list of organizations",
  657. "operationId": "orgGetAll",
  658. "parameters": [
  659. {
  660. "type": "integer",
  661. "description": "page number of results to return (1-based)",
  662. "name": "page",
  663. "in": "query"
  664. },
  665. {
  666. "type": "integer",
  667. "description": "page size of results, maximum page size is 50",
  668. "name": "limit",
  669. "in": "query"
  670. }
  671. ],
  672. "responses": {
  673. "200": {
  674. "$ref": "#/responses/OrganizationList"
  675. }
  676. }
  677. },
  678. "post": {
  679. "consumes": [
  680. "application/json"
  681. ],
  682. "produces": [
  683. "application/json"
  684. ],
  685. "tags": [
  686. "organization"
  687. ],
  688. "summary": "Create an organization",
  689. "operationId": "orgCreate",
  690. "parameters": [
  691. {
  692. "name": "organization",
  693. "in": "body",
  694. "required": true,
  695. "schema": {
  696. "$ref": "#/definitions/CreateOrgOption"
  697. }
  698. }
  699. ],
  700. "responses": {
  701. "201": {
  702. "$ref": "#/responses/Organization"
  703. },
  704. "403": {
  705. "$ref": "#/responses/forbidden"
  706. },
  707. "422": {
  708. "$ref": "#/responses/validationError"
  709. }
  710. }
  711. }
  712. },
  713. "/orgs/{org}": {
  714. "get": {
  715. "produces": [
  716. "application/json"
  717. ],
  718. "tags": [
  719. "organization"
  720. ],
  721. "summary": "Get an organization",
  722. "operationId": "orgGet",
  723. "parameters": [
  724. {
  725. "type": "string",
  726. "description": "name of the organization to get",
  727. "name": "org",
  728. "in": "path",
  729. "required": true
  730. }
  731. ],
  732. "responses": {
  733. "200": {
  734. "$ref": "#/responses/Organization"
  735. }
  736. }
  737. },
  738. "delete": {
  739. "produces": [
  740. "application/json"
  741. ],
  742. "tags": [
  743. "organization"
  744. ],
  745. "summary": "Delete an organization",
  746. "operationId": "orgDelete",
  747. "parameters": [
  748. {
  749. "type": "string",
  750. "description": "organization that is to be deleted",
  751. "name": "org",
  752. "in": "path",
  753. "required": true
  754. }
  755. ],
  756. "responses": {
  757. "204": {
  758. "$ref": "#/responses/empty"
  759. }
  760. }
  761. },
  762. "patch": {
  763. "consumes": [
  764. "application/json"
  765. ],
  766. "produces": [
  767. "application/json"
  768. ],
  769. "tags": [
  770. "organization"
  771. ],
  772. "summary": "Edit an organization",
  773. "operationId": "orgEdit",
  774. "parameters": [
  775. {
  776. "type": "string",
  777. "description": "name of the organization to edit",
  778. "name": "org",
  779. "in": "path",
  780. "required": true
  781. },
  782. {
  783. "name": "body",
  784. "in": "body",
  785. "required": true,
  786. "schema": {
  787. "$ref": "#/definitions/EditOrgOption"
  788. }
  789. }
  790. ],
  791. "responses": {
  792. "200": {
  793. "$ref": "#/responses/Organization"
  794. }
  795. }
  796. }
  797. },
  798. "/orgs/{org}/hooks": {
  799. "get": {
  800. "produces": [
  801. "application/json"
  802. ],
  803. "tags": [
  804. "organization"
  805. ],
  806. "summary": "List an organization's webhooks",
  807. "operationId": "orgListHooks",
  808. "parameters": [
  809. {
  810. "type": "string",
  811. "description": "name of the organization",
  812. "name": "org",
  813. "in": "path",
  814. "required": true
  815. },
  816. {
  817. "type": "integer",
  818. "description": "page number of results to return (1-based)",
  819. "name": "page",
  820. "in": "query"
  821. },
  822. {
  823. "type": "integer",
  824. "description": "page size of results, maximum page size is 50",
  825. "name": "limit",
  826. "in": "query"
  827. }
  828. ],
  829. "responses": {
  830. "200": {
  831. "$ref": "#/responses/HookList"
  832. }
  833. }
  834. }
  835. },
  836. "/orgs/{org}/hooks/": {
  837. "post": {
  838. "consumes": [
  839. "application/json"
  840. ],
  841. "produces": [
  842. "application/json"
  843. ],
  844. "tags": [
  845. "organization"
  846. ],
  847. "summary": "Create a hook",
  848. "operationId": "orgCreateHook",
  849. "parameters": [
  850. {
  851. "type": "string",
  852. "description": "name of the organization",
  853. "name": "org",
  854. "in": "path",
  855. "required": true
  856. },
  857. {
  858. "name": "body",
  859. "in": "body",
  860. "required": true,
  861. "schema": {
  862. "$ref": "#/definitions/CreateHookOption"
  863. }
  864. }
  865. ],
  866. "responses": {
  867. "201": {
  868. "$ref": "#/responses/Hook"
  869. }
  870. }
  871. }
  872. },
  873. "/orgs/{org}/hooks/{id}": {
  874. "get": {
  875. "produces": [
  876. "application/json"
  877. ],
  878. "tags": [
  879. "organization"
  880. ],
  881. "summary": "Get a hook",
  882. "operationId": "orgGetHook",
  883. "parameters": [
  884. {
  885. "type": "string",
  886. "description": "name of the organization",
  887. "name": "org",
  888. "in": "path",
  889. "required": true
  890. },
  891. {
  892. "type": "integer",
  893. "format": "int64",
  894. "description": "id of the hook to get",
  895. "name": "id",
  896. "in": "path",
  897. "required": true
  898. }
  899. ],
  900. "responses": {
  901. "200": {
  902. "$ref": "#/responses/Hook"
  903. }
  904. }
  905. },
  906. "delete": {
  907. "produces": [
  908. "application/json"
  909. ],
  910. "tags": [
  911. "organization"
  912. ],
  913. "summary": "Delete a hook",
  914. "operationId": "orgDeleteHook",
  915. "parameters": [
  916. {
  917. "type": "string",
  918. "description": "name of the organization",
  919. "name": "org",
  920. "in": "path",
  921. "required": true
  922. },
  923. {
  924. "type": "integer",
  925. "format": "int64",
  926. "description": "id of the hook to delete",
  927. "name": "id",
  928. "in": "path",
  929. "required": true
  930. }
  931. ],
  932. "responses": {
  933. "204": {
  934. "$ref": "#/responses/empty"
  935. }
  936. }
  937. },
  938. "patch": {
  939. "consumes": [
  940. "application/json"
  941. ],
  942. "produces": [
  943. "application/json"
  944. ],
  945. "tags": [
  946. "organization"
  947. ],
  948. "summary": "Update a hook",
  949. "operationId": "orgEditHook",
  950. "parameters": [
  951. {
  952. "type": "string",
  953. "description": "name of the organization",
  954. "name": "org",
  955. "in": "path",
  956. "required": true
  957. },
  958. {
  959. "type": "integer",
  960. "format": "int64",
  961. "description": "id of the hook to update",
  962. "name": "id",
  963. "in": "path",
  964. "required": true
  965. },
  966. {
  967. "name": "body",
  968. "in": "body",
  969. "schema": {
  970. "$ref": "#/definitions/EditHookOption"
  971. }
  972. }
  973. ],
  974. "responses": {
  975. "200": {
  976. "$ref": "#/responses/Hook"
  977. }
  978. }
  979. }
  980. },
  981. "/orgs/{org}/labels": {
  982. "get": {
  983. "produces": [
  984. "application/json"
  985. ],
  986. "tags": [
  987. "organization"
  988. ],
  989. "summary": "List an organization's labels",
  990. "operationId": "orgListLabels",
  991. "parameters": [
  992. {
  993. "type": "string",
  994. "description": "name of the organization",
  995. "name": "org",
  996. "in": "path",
  997. "required": true
  998. },
  999. {
  1000. "type": "integer",
  1001. "description": "page number of results to return (1-based)",
  1002. "name": "page",
  1003. "in": "query"
  1004. },
  1005. {
  1006. "type": "integer",
  1007. "description": "page size of results, maximum page size is 50",
  1008. "name": "limit",
  1009. "in": "query"
  1010. }
  1011. ],
  1012. "responses": {
  1013. "200": {
  1014. "$ref": "#/responses/LabelList"
  1015. }
  1016. }
  1017. },
  1018. "post": {
  1019. "consumes": [
  1020. "application/json"
  1021. ],
  1022. "produces": [
  1023. "application/json"
  1024. ],
  1025. "tags": [
  1026. "organization"
  1027. ],
  1028. "summary": "Create a label for an organization",
  1029. "operationId": "orgCreateLabel",
  1030. "parameters": [
  1031. {
  1032. "type": "string",
  1033. "description": "name of the organization",
  1034. "name": "org",
  1035. "in": "path",
  1036. "required": true
  1037. },
  1038. {
  1039. "name": "body",
  1040. "in": "body",
  1041. "schema": {
  1042. "$ref": "#/definitions/CreateLabelOption"
  1043. }
  1044. }
  1045. ],
  1046. "responses": {
  1047. "201": {
  1048. "$ref": "#/responses/Label"
  1049. },
  1050. "422": {
  1051. "$ref": "#/responses/validationError"
  1052. }
  1053. }
  1054. }
  1055. },
  1056. "/orgs/{org}/labels/{id}": {
  1057. "get": {
  1058. "produces": [
  1059. "application/json"
  1060. ],
  1061. "tags": [
  1062. "organization"
  1063. ],
  1064. "summary": "Get a single label",
  1065. "operationId": "orgGetLabel",
  1066. "parameters": [
  1067. {
  1068. "type": "string",
  1069. "description": "name of the organization",
  1070. "name": "org",
  1071. "in": "path",
  1072. "required": true
  1073. },
  1074. {
  1075. "type": "integer",
  1076. "format": "int64",
  1077. "description": "id of the label to get",
  1078. "name": "id",
  1079. "in": "path",
  1080. "required": true
  1081. }
  1082. ],
  1083. "responses": {
  1084. "200": {
  1085. "$ref": "#/responses/Label"
  1086. }
  1087. }
  1088. },
  1089. "delete": {
  1090. "tags": [
  1091. "organization"
  1092. ],
  1093. "summary": "Delete a label",
  1094. "operationId": "orgDeleteLabel",
  1095. "parameters": [
  1096. {
  1097. "type": "string",
  1098. "description": "name of the organization",
  1099. "name": "org",
  1100. "in": "path",
  1101. "required": true
  1102. },
  1103. {
  1104. "type": "integer",
  1105. "format": "int64",
  1106. "description": "id of the label to delete",
  1107. "name": "id",
  1108. "in": "path",
  1109. "required": true
  1110. }
  1111. ],
  1112. "responses": {
  1113. "204": {
  1114. "$ref": "#/responses/empty"
  1115. }
  1116. }
  1117. },
  1118. "patch": {
  1119. "consumes": [
  1120. "application/json"
  1121. ],
  1122. "produces": [
  1123. "application/json"
  1124. ],
  1125. "tags": [
  1126. "organization"
  1127. ],
  1128. "summary": "Update a label",
  1129. "operationId": "orgEditLabel",
  1130. "parameters": [
  1131. {
  1132. "type": "string",
  1133. "description": "name of the organization",
  1134. "name": "org",
  1135. "in": "path",
  1136. "required": true
  1137. },
  1138. {
  1139. "type": "integer",
  1140. "format": "int64",
  1141. "description": "id of the label to edit",
  1142. "name": "id",
  1143. "in": "path",
  1144. "required": true
  1145. },
  1146. {
  1147. "name": "body",
  1148. "in": "body",
  1149. "schema": {
  1150. "$ref": "#/definitions/EditLabelOption"
  1151. }
  1152. }
  1153. ],
  1154. "responses": {
  1155. "200": {
  1156. "$ref": "#/responses/Label"
  1157. },
  1158. "422": {
  1159. "$ref": "#/responses/validationError"
  1160. }
  1161. }
  1162. }
  1163. },
  1164. "/orgs/{org}/members": {
  1165. "get": {
  1166. "produces": [
  1167. "application/json"
  1168. ],
  1169. "tags": [
  1170. "organization"
  1171. ],
  1172. "summary": "List an organization's members",
  1173. "operationId": "orgListMembers",
  1174. "parameters": [
  1175. {
  1176. "type": "string",
  1177. "description": "name of the organization",
  1178. "name": "org",
  1179. "in": "path",
  1180. "required": true
  1181. },
  1182. {
  1183. "type": "integer",
  1184. "description": "page number of results to return (1-based)",
  1185. "name": "page",
  1186. "in": "query"
  1187. },
  1188. {
  1189. "type": "integer",
  1190. "description": "page size of results, maximum page size is 50",
  1191. "name": "limit",
  1192. "in": "query"
  1193. }
  1194. ],
  1195. "responses": {
  1196. "200": {
  1197. "$ref": "#/responses/UserList"
  1198. }
  1199. }
  1200. }
  1201. },
  1202. "/orgs/{org}/members/{username}": {
  1203. "get": {
  1204. "tags": [
  1205. "organization"
  1206. ],
  1207. "summary": "Check if a user is a member of an organization",
  1208. "operationId": "orgIsMember",
  1209. "parameters": [
  1210. {
  1211. "type": "string",
  1212. "description": "name of the organization",
  1213. "name": "org",
  1214. "in": "path",
  1215. "required": true
  1216. },
  1217. {
  1218. "type": "string",
  1219. "description": "username of the user",
  1220. "name": "username",
  1221. "in": "path",
  1222. "required": true
  1223. }
  1224. ],
  1225. "responses": {
  1226. "204": {
  1227. "description": "user is a member"
  1228. },
  1229. "302": {
  1230. "description": "redirection to /orgs/{org}/public_members/{username}"
  1231. },
  1232. "404": {
  1233. "description": "user is not a member"
  1234. }
  1235. }
  1236. },
  1237. "delete": {
  1238. "produces": [
  1239. "application/json"
  1240. ],
  1241. "tags": [
  1242. "organization"
  1243. ],
  1244. "summary": "Remove a member from an organization",
  1245. "operationId": "orgDeleteMember",
  1246. "parameters": [
  1247. {
  1248. "type": "string",
  1249. "description": "name of the organization",
  1250. "name": "org",
  1251. "in": "path",
  1252. "required": true
  1253. },
  1254. {
  1255. "type": "string",
  1256. "description": "username of the user",
  1257. "name": "username",
  1258. "in": "path",
  1259. "required": true
  1260. }
  1261. ],
  1262. "responses": {
  1263. "204": {
  1264. "description": "member removed"
  1265. }
  1266. }
  1267. }
  1268. },
  1269. "/orgs/{org}/public_members": {
  1270. "get": {
  1271. "produces": [
  1272. "application/json"
  1273. ],
  1274. "tags": [
  1275. "organization"
  1276. ],
  1277. "summary": "List an organization's public members",
  1278. "operationId": "orgListPublicMembers",
  1279. "parameters": [
  1280. {
  1281. "type": "string",
  1282. "description": "name of the organization",
  1283. "name": "org",
  1284. "in": "path",
  1285. "required": true
  1286. },
  1287. {
  1288. "type": "integer",
  1289. "description": "page number of results to return (1-based)",
  1290. "name": "page",
  1291. "in": "query"
  1292. },
  1293. {
  1294. "type": "integer",
  1295. "description": "page size of results, maximum page size is 50",
  1296. "name": "limit",
  1297. "in": "query"
  1298. }
  1299. ],
  1300. "responses": {
  1301. "200": {
  1302. "$ref": "#/responses/UserList"
  1303. }
  1304. }
  1305. }
  1306. },
  1307. "/orgs/{org}/public_members/{username}": {
  1308. "get": {
  1309. "tags": [
  1310. "organization"
  1311. ],
  1312. "summary": "Check if a user is a public member of an organization",
  1313. "operationId": "orgIsPublicMember",
  1314. "parameters": [
  1315. {
  1316. "type": "string",
  1317. "description": "name of the organization",
  1318. "name": "org",
  1319. "in": "path",
  1320. "required": true
  1321. },
  1322. {
  1323. "type": "string",
  1324. "description": "username of the user",
  1325. "name": "username",
  1326. "in": "path",
  1327. "required": true
  1328. }
  1329. ],
  1330. "responses": {
  1331. "204": {
  1332. "description": "user is a public member"
  1333. },
  1334. "404": {
  1335. "description": "user is not a public member"
  1336. }
  1337. }
  1338. },
  1339. "put": {
  1340. "produces": [
  1341. "application/json"
  1342. ],
  1343. "tags": [
  1344. "organization"
  1345. ],
  1346. "summary": "Publicize a user's membership",
  1347. "operationId": "orgPublicizeMember",
  1348. "parameters": [
  1349. {
  1350. "type": "string",
  1351. "description": "name of the organization",
  1352. "name": "org",
  1353. "in": "path",
  1354. "required": true
  1355. },
  1356. {
  1357. "type": "string",
  1358. "description": "username of the user",
  1359. "name": "username",
  1360. "in": "path",
  1361. "required": true
  1362. }
  1363. ],
  1364. "responses": {
  1365. "204": {
  1366. "description": "membership publicized"
  1367. },
  1368. "403": {
  1369. "$ref": "#/responses/forbidden"
  1370. }
  1371. }
  1372. },
  1373. "delete": {
  1374. "produces": [
  1375. "application/json"
  1376. ],
  1377. "tags": [
  1378. "organization"
  1379. ],
  1380. "summary": "Conceal a user's membership",
  1381. "operationId": "orgConcealMember",
  1382. "parameters": [
  1383. {
  1384. "type": "string",
  1385. "description": "name of the organization",
  1386. "name": "org",
  1387. "in": "path",
  1388. "required": true
  1389. },
  1390. {
  1391. "type": "string",
  1392. "description": "username of the user",
  1393. "name": "username",
  1394. "in": "path",
  1395. "required": true
  1396. }
  1397. ],
  1398. "responses": {
  1399. "204": {
  1400. "$ref": "#/responses/empty"
  1401. },
  1402. "403": {
  1403. "$ref": "#/responses/forbidden"
  1404. }
  1405. }
  1406. }
  1407. },
  1408. "/orgs/{org}/repos": {
  1409. "get": {
  1410. "produces": [
  1411. "application/json"
  1412. ],
  1413. "tags": [
  1414. "organization"
  1415. ],
  1416. "summary": "List an organization's repos",
  1417. "operationId": "orgListRepos",
  1418. "parameters": [
  1419. {
  1420. "type": "string",
  1421. "description": "name of the organization",
  1422. "name": "org",
  1423. "in": "path",
  1424. "required": true
  1425. },
  1426. {
  1427. "type": "integer",
  1428. "description": "page number of results to return (1-based)",
  1429. "name": "page",
  1430. "in": "query"
  1431. },
  1432. {
  1433. "type": "integer",
  1434. "description": "page size of results, maximum page size is 50",
  1435. "name": "limit",
  1436. "in": "query"
  1437. }
  1438. ],
  1439. "responses": {
  1440. "200": {
  1441. "$ref": "#/responses/RepositoryList"
  1442. }
  1443. }
  1444. },
  1445. "post": {
  1446. "consumes": [
  1447. "application/json"
  1448. ],
  1449. "produces": [
  1450. "application/json"
  1451. ],
  1452. "tags": [
  1453. "organization"
  1454. ],
  1455. "summary": "Create a repository in an organization",
  1456. "operationId": "createOrgRepo",
  1457. "parameters": [
  1458. {
  1459. "type": "string",
  1460. "description": "name of organization",
  1461. "name": "org",
  1462. "in": "path",
  1463. "required": true
  1464. },
  1465. {
  1466. "name": "body",
  1467. "in": "body",
  1468. "schema": {
  1469. "$ref": "#/definitions/CreateRepoOption"
  1470. }
  1471. }
  1472. ],
  1473. "responses": {
  1474. "201": {
  1475. "$ref": "#/responses/Repository"
  1476. },
  1477. "403": {
  1478. "$ref": "#/responses/forbidden"
  1479. },
  1480. "404": {
  1481. "$ref": "#/responses/notFound"
  1482. }
  1483. }
  1484. }
  1485. },
  1486. "/orgs/{org}/teams": {
  1487. "get": {
  1488. "produces": [
  1489. "application/json"
  1490. ],
  1491. "tags": [
  1492. "organization"
  1493. ],
  1494. "summary": "List an organization's teams",
  1495. "operationId": "orgListTeams",
  1496. "parameters": [
  1497. {
  1498. "type": "string",
  1499. "description": "name of the organization",
  1500. "name": "org",
  1501. "in": "path",
  1502. "required": true
  1503. },
  1504. {
  1505. "type": "integer",
  1506. "description": "page number of results to return (1-based)",
  1507. "name": "page",
  1508. "in": "query"
  1509. },
  1510. {
  1511. "type": "integer",
  1512. "description": "page size of results, maximum page size is 50",
  1513. "name": "limit",
  1514. "in": "query"
  1515. }
  1516. ],
  1517. "responses": {
  1518. "200": {
  1519. "$ref": "#/responses/TeamList"
  1520. }
  1521. }
  1522. },
  1523. "post": {
  1524. "consumes": [
  1525. "application/json"
  1526. ],
  1527. "produces": [
  1528. "application/json"
  1529. ],
  1530. "tags": [
  1531. "organization"
  1532. ],
  1533. "summary": "Create a team",
  1534. "operationId": "orgCreateTeam",
  1535. "parameters": [
  1536. {
  1537. "type": "string",
  1538. "description": "name of the organization",
  1539. "name": "org",
  1540. "in": "path",
  1541. "required": true
  1542. },
  1543. {
  1544. "name": "body",
  1545. "in": "body",
  1546. "schema": {
  1547. "$ref": "#/definitions/CreateTeamOption"
  1548. }
  1549. }
  1550. ],
  1551. "responses": {
  1552. "201": {
  1553. "$ref": "#/responses/Team"
  1554. },
  1555. "422": {
  1556. "$ref": "#/responses/validationError"
  1557. }
  1558. }
  1559. }
  1560. },
  1561. "/orgs/{org}/teams/search": {
  1562. "get": {
  1563. "produces": [
  1564. "application/json"
  1565. ],
  1566. "tags": [
  1567. "organization"
  1568. ],
  1569. "summary": "Search for teams within an organization",
  1570. "operationId": "teamSearch",
  1571. "parameters": [
  1572. {
  1573. "type": "string",
  1574. "description": "name of the organization",
  1575. "name": "org",
  1576. "in": "path",
  1577. "required": true
  1578. },
  1579. {
  1580. "type": "string",
  1581. "description": "keywords to search",
  1582. "name": "q",
  1583. "in": "query"
  1584. },
  1585. {
  1586. "type": "boolean",
  1587. "description": "include search within team description (defaults to true)",
  1588. "name": "include_desc",
  1589. "in": "query"
  1590. },
  1591. {
  1592. "type": "integer",
  1593. "description": "page number of results to return (1-based)",
  1594. "name": "page",
  1595. "in": "query"
  1596. },
  1597. {
  1598. "type": "integer",
  1599. "description": "page size of results, maximum page size is 50",
  1600. "name": "limit",
  1601. "in": "query"
  1602. }
  1603. ],
  1604. "responses": {
  1605. "200": {
  1606. "description": "SearchResults of a successful search",
  1607. "schema": {
  1608. "type": "object",
  1609. "properties": {
  1610. "data": {
  1611. "type": "array",
  1612. "items": {
  1613. "$ref": "#/definitions/Team"
  1614. }
  1615. },
  1616. "ok": {
  1617. "type": "boolean"
  1618. }
  1619. }
  1620. }
  1621. }
  1622. }
  1623. }
  1624. },
  1625. "/repos/issues/search": {
  1626. "get": {
  1627. "produces": [
  1628. "application/json"
  1629. ],
  1630. "tags": [
  1631. "issue"
  1632. ],
  1633. "summary": "Search for issues across the repositories that the user has access to",
  1634. "operationId": "issueSearchIssues",
  1635. "parameters": [
  1636. {
  1637. "type": "string",
  1638. "description": "whether issue is open or closed",
  1639. "name": "state",
  1640. "in": "query"
  1641. },
  1642. {
  1643. "type": "string",
  1644. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  1645. "name": "labels",
  1646. "in": "query"
  1647. },
  1648. {
  1649. "type": "string",
  1650. "description": "search string",
  1651. "name": "q",
  1652. "in": "query"
  1653. },
  1654. {
  1655. "type": "integer",
  1656. "format": "int64",
  1657. "description": "repository to prioritize in the results",
  1658. "name": "priority_repo_id",
  1659. "in": "query"
  1660. },
  1661. {
  1662. "type": "string",
  1663. "description": "filter by type (issues / pulls) if set",
  1664. "name": "type",
  1665. "in": "query"
  1666. },
  1667. {
  1668. "type": "integer",
  1669. "description": "page number of requested issues",
  1670. "name": "page",
  1671. "in": "query"
  1672. }
  1673. ],
  1674. "responses": {
  1675. "200": {
  1676. "$ref": "#/responses/IssueList"
  1677. }
  1678. }
  1679. }
  1680. },
  1681. "/repos/migrate": {
  1682. "post": {
  1683. "consumes": [
  1684. "application/json"
  1685. ],
  1686. "produces": [
  1687. "application/json"
  1688. ],
  1689. "tags": [
  1690. "repository"
  1691. ],
  1692. "summary": "Migrate a remote git repository",
  1693. "operationId": "repoMigrate",
  1694. "parameters": [
  1695. {
  1696. "name": "body",
  1697. "in": "body",
  1698. "schema": {
  1699. "$ref": "#/definitions/MigrateRepoForm"
  1700. }
  1701. }
  1702. ],
  1703. "responses": {
  1704. "201": {
  1705. "$ref": "#/responses/Repository"
  1706. },
  1707. "403": {
  1708. "$ref": "#/responses/forbidden"
  1709. },
  1710. "422": {
  1711. "$ref": "#/responses/validationError"
  1712. }
  1713. }
  1714. }
  1715. },
  1716. "/repos/search": {
  1717. "get": {
  1718. "produces": [
  1719. "application/json"
  1720. ],
  1721. "tags": [
  1722. "repository"
  1723. ],
  1724. "summary": "Search for repositories",
  1725. "operationId": "repoSearch",
  1726. "parameters": [
  1727. {
  1728. "type": "string",
  1729. "description": "keyword",
  1730. "name": "q",
  1731. "in": "query"
  1732. },
  1733. {
  1734. "type": "boolean",
  1735. "description": "Limit search to repositories with keyword as topic",
  1736. "name": "topic",
  1737. "in": "query"
  1738. },
  1739. {
  1740. "type": "boolean",
  1741. "description": "include search of keyword within repository description",
  1742. "name": "includeDesc",
  1743. "in": "query"
  1744. },
  1745. {
  1746. "type": "integer",
  1747. "format": "int64",
  1748. "description": "search only for repos that the user with the given id owns or contributes to",
  1749. "name": "uid",
  1750. "in": "query"
  1751. },
  1752. {
  1753. "type": "integer",
  1754. "format": "int64",
  1755. "description": "repo owner to prioritize in the results",
  1756. "name": "priority_owner_id",
  1757. "in": "query"
  1758. },
  1759. {
  1760. "type": "integer",
  1761. "format": "int64",
  1762. "description": "search only for repos that the user with the given id has starred",
  1763. "name": "starredBy",
  1764. "in": "query"
  1765. },
  1766. {
  1767. "type": "boolean",
  1768. "description": "include private repositories this user has access to (defaults to true)",
  1769. "name": "private",
  1770. "in": "query"
  1771. },
  1772. {
  1773. "type": "boolean",
  1774. "description": "only include private repositories this user has access to (defaults to false)",
  1775. "name": "onlyPrivate",
  1776. "in": "query"
  1777. },
  1778. {
  1779. "type": "boolean",
  1780. "description": "include template repositories this user has access to (defaults to true)",
  1781. "name": "template",
  1782. "in": "query"
  1783. },
  1784. {
  1785. "type": "boolean",
  1786. "description": "show only archived, non-archived or all repositories (defaults to all)",
  1787. "name": "archived",
  1788. "in": "query"
  1789. },
  1790. {
  1791. "type": "string",
  1792. "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"",
  1793. "name": "mode",
  1794. "in": "query"
  1795. },
  1796. {
  1797. "type": "boolean",
  1798. "description": "if `uid` is given, search only for repos that the user owns",
  1799. "name": "exclusive",
  1800. "in": "query"
  1801. },
  1802. {
  1803. "type": "string",
  1804. "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"",
  1805. "name": "sort",
  1806. "in": "query"
  1807. },
  1808. {
  1809. "type": "string",
  1810. "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.",
  1811. "name": "order",
  1812. "in": "query"
  1813. },
  1814. {
  1815. "type": "integer",
  1816. "description": "page number of results to return (1-based)",
  1817. "name": "page",
  1818. "in": "query"
  1819. },
  1820. {
  1821. "type": "integer",
  1822. "description": "page size of results, maximum page size is 50",
  1823. "name": "limit",
  1824. "in": "query"
  1825. }
  1826. ],
  1827. "responses": {
  1828. "200": {
  1829. "$ref": "#/responses/SearchResults"
  1830. },
  1831. "422": {
  1832. "$ref": "#/responses/validationError"
  1833. }
  1834. }
  1835. }
  1836. },
  1837. "/repos/{owner}/{repo}": {
  1838. "get": {
  1839. "produces": [
  1840. "application/json"
  1841. ],
  1842. "tags": [
  1843. "repository"
  1844. ],
  1845. "summary": "Get a repository",
  1846. "operationId": "repoGet",
  1847. "parameters": [
  1848. {
  1849. "type": "string",
  1850. "description": "owner of the repo",
  1851. "name": "owner",
  1852. "in": "path",
  1853. "required": true
  1854. },
  1855. {
  1856. "type": "string",
  1857. "description": "name of the repo",
  1858. "name": "repo",
  1859. "in": "path",
  1860. "required": true
  1861. }
  1862. ],
  1863. "responses": {
  1864. "200": {
  1865. "$ref": "#/responses/Repository"
  1866. }
  1867. }
  1868. },
  1869. "delete": {
  1870. "produces": [
  1871. "application/json"
  1872. ],
  1873. "tags": [
  1874. "repository"
  1875. ],
  1876. "summary": "Delete a repository",
  1877. "operationId": "repoDelete",
  1878. "parameters": [
  1879. {
  1880. "type": "string",
  1881. "description": "owner of the repo to delete",
  1882. "name": "owner",
  1883. "in": "path",
  1884. "required": true
  1885. },
  1886. {
  1887. "type": "string",
  1888. "description": "name of the repo to delete",
  1889. "name": "repo",
  1890. "in": "path",
  1891. "required": true
  1892. }
  1893. ],
  1894. "responses": {
  1895. "204": {
  1896. "$ref": "#/responses/empty"
  1897. },
  1898. "403": {
  1899. "$ref": "#/responses/forbidden"
  1900. }
  1901. }
  1902. },
  1903. "patch": {
  1904. "produces": [
  1905. "application/json"
  1906. ],
  1907. "tags": [
  1908. "repository"
  1909. ],
  1910. "summary": "Edit a repository's properties. Only fields that are set will be changed.",
  1911. "operationId": "repoEdit",
  1912. "parameters": [
  1913. {
  1914. "type": "string",
  1915. "description": "owner of the repo to edit",
  1916. "name": "owner",
  1917. "in": "path",
  1918. "required": true
  1919. },
  1920. {
  1921. "type": "string",
  1922. "description": "name of the repo to edit",
  1923. "name": "repo",
  1924. "in": "path",
  1925. "required": true
  1926. },
  1927. {
  1928. "description": "Properties of a repo that you can edit",
  1929. "name": "body",
  1930. "in": "body",
  1931. "schema": {
  1932. "$ref": "#/definitions/EditRepoOption"
  1933. }
  1934. }
  1935. ],
  1936. "responses": {
  1937. "200": {
  1938. "$ref": "#/responses/Repository"
  1939. },
  1940. "403": {
  1941. "$ref": "#/responses/forbidden"
  1942. },
  1943. "422": {
  1944. "$ref": "#/responses/validationError"
  1945. }
  1946. }
  1947. }
  1948. },
  1949. "/repos/{owner}/{repo}/archive/{archive}": {
  1950. "get": {
  1951. "produces": [
  1952. "application/json"
  1953. ],
  1954. "tags": [
  1955. "repository"
  1956. ],
  1957. "summary": "Get an archive of a repository",
  1958. "operationId": "repoGetArchive",
  1959. "parameters": [
  1960. {
  1961. "type": "string",
  1962. "description": "owner of the repo",
  1963. "name": "owner",
  1964. "in": "path",
  1965. "required": true
  1966. },
  1967. {
  1968. "type": "string",
  1969. "description": "name of the repo",
  1970. "name": "repo",
  1971. "in": "path",
  1972. "required": true
  1973. },
  1974. {
  1975. "type": "string",
  1976. "description": "archive to download, consisting of a git reference and archive",
  1977. "name": "archive",
  1978. "in": "path",
  1979. "required": true
  1980. }
  1981. ],
  1982. "responses": {
  1983. "200": {
  1984. "description": "success"
  1985. },
  1986. "404": {
  1987. "$ref": "#/responses/notFound"
  1988. }
  1989. }
  1990. }
  1991. },
  1992. "/repos/{owner}/{repo}/branch_protections": {
  1993. "get": {
  1994. "produces": [
  1995. "application/json"
  1996. ],
  1997. "tags": [
  1998. "repository"
  1999. ],
  2000. "summary": "List branch protections for a repository",
  2001. "operationId": "repoListBranchProtection",
  2002. "parameters": [
  2003. {
  2004. "type": "string",
  2005. "description": "owner of the repo",
  2006. "name": "owner",
  2007. "in": "path",
  2008. "required": true
  2009. },
  2010. {
  2011. "type": "string",
  2012. "description": "name of the repo",
  2013. "name": "repo",
  2014. "in": "path",
  2015. "required": true
  2016. }
  2017. ],
  2018. "responses": {
  2019. "200": {
  2020. "$ref": "#/responses/BranchProtectionList"
  2021. }
  2022. }
  2023. },
  2024. "post": {
  2025. "consumes": [
  2026. "application/json"
  2027. ],
  2028. "produces": [
  2029. "application/json"
  2030. ],
  2031. "tags": [
  2032. "repository"
  2033. ],
  2034. "summary": "Create a branch protections for a repository",
  2035. "operationId": "repoCreateBranchProtection",
  2036. "parameters": [
  2037. {
  2038. "type": "string",
  2039. "description": "owner of the repo",
  2040. "name": "owner",
  2041. "in": "path",
  2042. "required": true
  2043. },
  2044. {
  2045. "type": "string",
  2046. "description": "name of the repo",
  2047. "name": "repo",
  2048. "in": "path",
  2049. "required": true
  2050. },
  2051. {
  2052. "name": "body",
  2053. "in": "body",
  2054. "schema": {
  2055. "$ref": "#/definitions/CreateBranchProtectionOption"
  2056. }
  2057. }
  2058. ],
  2059. "responses": {
  2060. "201": {
  2061. "$ref": "#/responses/BranchProtection"
  2062. },
  2063. "403": {
  2064. "$ref": "#/responses/forbidden"
  2065. },
  2066. "404": {
  2067. "$ref": "#/responses/notFound"
  2068. },
  2069. "422": {
  2070. "$ref": "#/responses/validationError"
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "/repos/{owner}/{repo}/branch_protections/{name}": {
  2076. "get": {
  2077. "produces": [
  2078. "application/json"
  2079. ],
  2080. "tags": [
  2081. "repository"
  2082. ],
  2083. "summary": "Get a specific branch protection for the repository",
  2084. "operationId": "repoGetBranchProtection",
  2085. "parameters": [
  2086. {
  2087. "type": "string",
  2088. "description": "owner of the repo",
  2089. "name": "owner",
  2090. "in": "path",
  2091. "required": true
  2092. },
  2093. {
  2094. "type": "string",
  2095. "description": "name of the repo",
  2096. "name": "repo",
  2097. "in": "path",
  2098. "required": true
  2099. },
  2100. {
  2101. "type": "string",
  2102. "description": "name of protected branch",
  2103. "name": "name",
  2104. "in": "path",
  2105. "required": true
  2106. }
  2107. ],
  2108. "responses": {
  2109. "200": {
  2110. "$ref": "#/responses/BranchProtection"
  2111. },
  2112. "404": {
  2113. "$ref": "#/responses/notFound"
  2114. }
  2115. }
  2116. },
  2117. "delete": {
  2118. "produces": [
  2119. "application/json"
  2120. ],
  2121. "tags": [
  2122. "repository"
  2123. ],
  2124. "summary": "Delete a specific branch protection for the repository",
  2125. "operationId": "repoDeleteBranchProtection",
  2126. "parameters": [
  2127. {
  2128. "type": "string",
  2129. "description": "owner of the repo",
  2130. "name": "owner",
  2131. "in": "path",
  2132. "required": true
  2133. },
  2134. {
  2135. "type": "string",
  2136. "description": "name of the repo",
  2137. "name": "repo",
  2138. "in": "path",
  2139. "required": true
  2140. },
  2141. {
  2142. "type": "string",
  2143. "description": "name of protected branch",
  2144. "name": "name",
  2145. "in": "path",
  2146. "required": true
  2147. }
  2148. ],
  2149. "responses": {
  2150. "204": {
  2151. "$ref": "#/responses/empty"
  2152. },
  2153. "404": {
  2154. "$ref": "#/responses/notFound"
  2155. }
  2156. }
  2157. },
  2158. "patch": {
  2159. "consumes": [
  2160. "application/json"
  2161. ],
  2162. "produces": [
  2163. "application/json"
  2164. ],
  2165. "tags": [
  2166. "repository"
  2167. ],
  2168. "summary": "Edit a branch protections for a repository. Only fields that are set will be changed",
  2169. "operationId": "repoEditBranchProtection",
  2170. "parameters": [
  2171. {
  2172. "type": "string",
  2173. "description": "owner of the repo",
  2174. "name": "owner",
  2175. "in": "path",
  2176. "required": true
  2177. },
  2178. {
  2179. "type": "string",
  2180. "description": "name of the repo",
  2181. "name": "repo",
  2182. "in": "path",
  2183. "required": true
  2184. },
  2185. {
  2186. "type": "string",
  2187. "description": "name of protected branch",
  2188. "name": "name",
  2189. "in": "path",
  2190. "required": true
  2191. },
  2192. {
  2193. "name": "body",
  2194. "in": "body",
  2195. "schema": {
  2196. "$ref": "#/definitions/EditBranchProtectionOption"
  2197. }
  2198. }
  2199. ],
  2200. "responses": {
  2201. "200": {
  2202. "$ref": "#/responses/BranchProtection"
  2203. },
  2204. "404": {
  2205. "$ref": "#/responses/notFound"
  2206. },
  2207. "422": {
  2208. "$ref": "#/responses/validationError"
  2209. }
  2210. }
  2211. }
  2212. },
  2213. "/repos/{owner}/{repo}/branches": {
  2214. "get": {
  2215. "produces": [
  2216. "application/json"
  2217. ],
  2218. "tags": [
  2219. "repository"
  2220. ],
  2221. "summary": "List a repository's branches",
  2222. "operationId": "repoListBranches",
  2223. "parameters": [
  2224. {
  2225. "type": "string",
  2226. "description": "owner of the repo",
  2227. "name": "owner",
  2228. "in": "path",
  2229. "required": true
  2230. },
  2231. {
  2232. "type": "string",
  2233. "description": "name of the repo",
  2234. "name": "repo",
  2235. "in": "path",
  2236. "required": true
  2237. }
  2238. ],
  2239. "responses": {
  2240. "200": {
  2241. "$ref": "#/responses/BranchList"
  2242. }
  2243. }
  2244. }
  2245. },
  2246. "/repos/{owner}/{repo}/branches/{branch}": {
  2247. "get": {
  2248. "produces": [
  2249. "application/json"
  2250. ],
  2251. "tags": [
  2252. "repository"
  2253. ],
  2254. "summary": "Retrieve a specific branch from a repository, including its effective branch protection",
  2255. "operationId": "repoGetBranch",
  2256. "parameters": [
  2257. {
  2258. "type": "string",
  2259. "description": "owner of the repo",
  2260. "name": "owner",
  2261. "in": "path",
  2262. "required": true
  2263. },
  2264. {
  2265. "type": "string",
  2266. "description": "name of the repo",
  2267. "name": "repo",
  2268. "in": "path",
  2269. "required": true
  2270. },
  2271. {
  2272. "type": "string",
  2273. "description": "branch to get",
  2274. "name": "branch",
  2275. "in": "path",
  2276. "required": true
  2277. }
  2278. ],
  2279. "responses": {
  2280. "200": {
  2281. "$ref": "#/responses/Branch"
  2282. }
  2283. }
  2284. },
  2285. "delete": {
  2286. "produces": [
  2287. "application/json"
  2288. ],
  2289. "tags": [
  2290. "repository"
  2291. ],
  2292. "summary": "Delete a specific branch from a repository",
  2293. "operationId": "repoDeleteBranch",
  2294. "parameters": [
  2295. {
  2296. "type": "string",
  2297. "description": "owner of the repo",
  2298. "name": "owner",
  2299. "in": "path",
  2300. "required": true
  2301. },
  2302. {
  2303. "type": "string",
  2304. "description": "name of the repo",
  2305. "name": "repo",
  2306. "in": "path",
  2307. "required": true
  2308. },
  2309. {
  2310. "type": "string",
  2311. "description": "branch to delete",
  2312. "name": "branch",
  2313. "in": "path",
  2314. "required": true
  2315. }
  2316. ],
  2317. "responses": {
  2318. "204": {
  2319. "$ref": "#/responses/empty"
  2320. },
  2321. "403": {
  2322. "$ref": "#/responses/error"
  2323. }
  2324. }
  2325. }
  2326. },
  2327. "/repos/{owner}/{repo}/cloudbrain/{jobid}": {
  2328. "get": {
  2329. "produces": [
  2330. "application/json"
  2331. ],
  2332. "tags": [
  2333. "cloudbrain"
  2334. ],
  2335. "summary": "Get a single task",
  2336. "operationId": "jobTask",
  2337. "parameters": [
  2338. {
  2339. "type": "string",
  2340. "description": "owner of the repo",
  2341. "name": "owner",
  2342. "in": "path",
  2343. "required": true
  2344. },
  2345. {
  2346. "type": "string",
  2347. "description": "name of the repo",
  2348. "name": "repo",
  2349. "in": "path",
  2350. "required": true
  2351. },
  2352. {
  2353. "type": "string",
  2354. "description": "id of cloudbrain jobid",
  2355. "name": "jobid",
  2356. "in": "path",
  2357. "required": true
  2358. }
  2359. ],
  2360. "responses": {
  2361. "200": {}
  2362. }
  2363. }
  2364. },
  2365. "/repos/{owner}/{repo}/collaborators": {
  2366. "get": {
  2367. "produces": [
  2368. "application/json"
  2369. ],
  2370. "tags": [
  2371. "repository"
  2372. ],
  2373. "summary": "List a repository's collaborators",
  2374. "operationId": "repoListCollaborators",
  2375. "parameters": [
  2376. {
  2377. "type": "string",
  2378. "description": "owner of the repo",
  2379. "name": "owner",
  2380. "in": "path",
  2381. "required": true
  2382. },
  2383. {
  2384. "type": "string",
  2385. "description": "name of the repo",
  2386. "name": "repo",
  2387. "in": "path",
  2388. "required": true
  2389. },
  2390. {
  2391. "type": "integer",
  2392. "description": "page number of results to return (1-based)",
  2393. "name": "page",
  2394. "in": "query"
  2395. },
  2396. {
  2397. "type": "integer",
  2398. "description": "page size of results, maximum page size is 50",
  2399. "name": "limit",
  2400. "in": "query"
  2401. }
  2402. ],
  2403. "responses": {
  2404. "200": {
  2405. "$ref": "#/responses/UserList"
  2406. }
  2407. }
  2408. }
  2409. },
  2410. "/repos/{owner}/{repo}/collaborators/{collaborator}": {
  2411. "get": {
  2412. "produces": [
  2413. "application/json"
  2414. ],
  2415. "tags": [
  2416. "repository"
  2417. ],
  2418. "summary": "Check if a user is a collaborator of a repository",
  2419. "operationId": "repoCheckCollaborator",
  2420. "parameters": [
  2421. {
  2422. "type": "string",
  2423. "description": "owner of the repo",
  2424. "name": "owner",
  2425. "in": "path",
  2426. "required": true
  2427. },
  2428. {
  2429. "type": "string",
  2430. "description": "name of the repo",
  2431. "name": "repo",
  2432. "in": "path",
  2433. "required": true
  2434. },
  2435. {
  2436. "type": "string",
  2437. "description": "username of the collaborator",
  2438. "name": "collaborator",
  2439. "in": "path",
  2440. "required": true
  2441. }
  2442. ],
  2443. "responses": {
  2444. "204": {
  2445. "$ref": "#/responses/empty"
  2446. },
  2447. "404": {
  2448. "$ref": "#/responses/notFound"
  2449. },
  2450. "422": {
  2451. "$ref": "#/responses/validationError"
  2452. }
  2453. }
  2454. },
  2455. "put": {
  2456. "produces": [
  2457. "application/json"
  2458. ],
  2459. "tags": [
  2460. "repository"
  2461. ],
  2462. "summary": "Add a collaborator to a repository",
  2463. "operationId": "repoAddCollaborator",
  2464. "parameters": [
  2465. {
  2466. "type": "string",
  2467. "description": "owner of the repo",
  2468. "name": "owner",
  2469. "in": "path",
  2470. "required": true
  2471. },
  2472. {
  2473. "type": "string",
  2474. "description": "name of the repo",
  2475. "name": "repo",
  2476. "in": "path",
  2477. "required": true
  2478. },
  2479. {
  2480. "type": "string",
  2481. "description": "username of the collaborator to add",
  2482. "name": "collaborator",
  2483. "in": "path",
  2484. "required": true
  2485. },
  2486. {
  2487. "name": "body",
  2488. "in": "body",
  2489. "schema": {
  2490. "$ref": "#/definitions/AddCollaboratorOption"
  2491. }
  2492. }
  2493. ],
  2494. "responses": {
  2495. "204": {
  2496. "$ref": "#/responses/empty"
  2497. },
  2498. "422": {
  2499. "$ref": "#/responses/validationError"
  2500. }
  2501. }
  2502. },
  2503. "delete": {
  2504. "produces": [
  2505. "application/json"
  2506. ],
  2507. "tags": [
  2508. "repository"
  2509. ],
  2510. "summary": "Delete a collaborator from a repository",
  2511. "operationId": "repoDeleteCollaborator",
  2512. "parameters": [
  2513. {
  2514. "type": "string",
  2515. "description": "owner of the repo",
  2516. "name": "owner",
  2517. "in": "path",
  2518. "required": true
  2519. },
  2520. {
  2521. "type": "string",
  2522. "description": "name of the repo",
  2523. "name": "repo",
  2524. "in": "path",
  2525. "required": true
  2526. },
  2527. {
  2528. "type": "string",
  2529. "description": "username of the collaborator to delete",
  2530. "name": "collaborator",
  2531. "in": "path",
  2532. "required": true
  2533. }
  2534. ],
  2535. "responses": {
  2536. "204": {
  2537. "$ref": "#/responses/empty"
  2538. },
  2539. "422": {
  2540. "$ref": "#/responses/validationError"
  2541. }
  2542. }
  2543. }
  2544. },
  2545. "/repos/{owner}/{repo}/commits": {
  2546. "get": {
  2547. "produces": [
  2548. "application/json"
  2549. ],
  2550. "tags": [
  2551. "repository"
  2552. ],
  2553. "summary": "Get a list of all commits from a repository",
  2554. "operationId": "repoGetAllCommits",
  2555. "parameters": [
  2556. {
  2557. "type": "string",
  2558. "description": "owner of the repo",
  2559. "name": "owner",
  2560. "in": "path",
  2561. "required": true
  2562. },
  2563. {
  2564. "type": "string",
  2565. "description": "name of the repo",
  2566. "name": "repo",
  2567. "in": "path",
  2568. "required": true
  2569. },
  2570. {
  2571. "type": "string",
  2572. "description": "SHA or branch to start listing commits from (usually 'master')",
  2573. "name": "sha",
  2574. "in": "query"
  2575. },
  2576. {
  2577. "type": "integer",
  2578. "description": "page number of results to return (1-based)",
  2579. "name": "page",
  2580. "in": "query"
  2581. },
  2582. {
  2583. "type": "integer",
  2584. "description": "page size of results, maximum page size is 50",
  2585. "name": "limit",
  2586. "in": "query"
  2587. }
  2588. ],
  2589. "responses": {
  2590. "200": {
  2591. "$ref": "#/responses/CommitList"
  2592. },
  2593. "404": {
  2594. "$ref": "#/responses/notFound"
  2595. },
  2596. "409": {
  2597. "$ref": "#/responses/EmptyRepository"
  2598. }
  2599. }
  2600. }
  2601. },
  2602. "/repos/{owner}/{repo}/commits/{ref}/statuses": {
  2603. "get": {
  2604. "produces": [
  2605. "application/json"
  2606. ],
  2607. "tags": [
  2608. "repository"
  2609. ],
  2610. "summary": "Get a commit's combined status, by branch/tag/commit reference",
  2611. "operationId": "repoGetCombinedStatusByRef",
  2612. "parameters": [
  2613. {
  2614. "type": "string",
  2615. "description": "owner of the repo",
  2616. "name": "owner",
  2617. "in": "path",
  2618. "required": true
  2619. },
  2620. {
  2621. "type": "string",
  2622. "description": "name of the repo",
  2623. "name": "repo",
  2624. "in": "path",
  2625. "required": true
  2626. },
  2627. {
  2628. "type": "string",
  2629. "description": "name of branch/tag/commit",
  2630. "name": "ref",
  2631. "in": "path",
  2632. "required": true
  2633. },
  2634. {
  2635. "type": "integer",
  2636. "description": "page number of results",
  2637. "name": "page",
  2638. "in": "query"
  2639. }
  2640. ],
  2641. "responses": {
  2642. "200": {
  2643. "$ref": "#/responses/Status"
  2644. },
  2645. "400": {
  2646. "$ref": "#/responses/error"
  2647. }
  2648. }
  2649. }
  2650. },
  2651. "/repos/{owner}/{repo}/contents": {
  2652. "get": {
  2653. "produces": [
  2654. "application/json"
  2655. ],
  2656. "tags": [
  2657. "repository"
  2658. ],
  2659. "summary": "Gets the metadata of all the entries of the root dir",
  2660. "operationId": "repoGetContentsList",
  2661. "parameters": [
  2662. {
  2663. "type": "string",
  2664. "description": "owner of the repo",
  2665. "name": "owner",
  2666. "in": "path",
  2667. "required": true
  2668. },
  2669. {
  2670. "type": "string",
  2671. "description": "name of the repo",
  2672. "name": "repo",
  2673. "in": "path",
  2674. "required": true
  2675. },
  2676. {
  2677. "type": "string",
  2678. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  2679. "name": "ref",
  2680. "in": "query"
  2681. }
  2682. ],
  2683. "responses": {
  2684. "200": {
  2685. "$ref": "#/responses/ContentsListResponse"
  2686. },
  2687. "404": {
  2688. "$ref": "#/responses/notFound"
  2689. }
  2690. }
  2691. }
  2692. },
  2693. "/repos/{owner}/{repo}/contents/{filepath}": {
  2694. "get": {
  2695. "produces": [
  2696. "application/json"
  2697. ],
  2698. "tags": [
  2699. "repository"
  2700. ],
  2701. "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir",
  2702. "operationId": "repoGetContents",
  2703. "parameters": [
  2704. {
  2705. "type": "string",
  2706. "description": "owner of the repo",
  2707. "name": "owner",
  2708. "in": "path",
  2709. "required": true
  2710. },
  2711. {
  2712. "type": "string",
  2713. "description": "name of the repo",
  2714. "name": "repo",
  2715. "in": "path",
  2716. "required": true
  2717. },
  2718. {
  2719. "type": "string",
  2720. "description": "path of the dir, file, symlink or submodule in the repo",
  2721. "name": "filepath",
  2722. "in": "path",
  2723. "required": true
  2724. },
  2725. {
  2726. "type": "string",
  2727. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  2728. "name": "ref",
  2729. "in": "query"
  2730. }
  2731. ],
  2732. "responses": {
  2733. "200": {
  2734. "$ref": "#/responses/ContentsResponse"
  2735. },
  2736. "404": {
  2737. "$ref": "#/responses/notFound"
  2738. }
  2739. }
  2740. },
  2741. "put": {
  2742. "consumes": [
  2743. "application/json"
  2744. ],
  2745. "produces": [
  2746. "application/json"
  2747. ],
  2748. "tags": [
  2749. "repository"
  2750. ],
  2751. "summary": "Update a file in a repository",
  2752. "operationId": "repoUpdateFile",
  2753. "parameters": [
  2754. {
  2755. "type": "string",
  2756. "description": "owner of the repo",
  2757. "name": "owner",
  2758. "in": "path",
  2759. "required": true
  2760. },
  2761. {
  2762. "type": "string",
  2763. "description": "name of the repo",
  2764. "name": "repo",
  2765. "in": "path",
  2766. "required": true
  2767. },
  2768. {
  2769. "type": "string",
  2770. "description": "path of the file to update",
  2771. "name": "filepath",
  2772. "in": "path",
  2773. "required": true
  2774. },
  2775. {
  2776. "name": "body",
  2777. "in": "body",
  2778. "required": true,
  2779. "schema": {
  2780. "$ref": "#/definitions/UpdateFileOptions"
  2781. }
  2782. }
  2783. ],
  2784. "responses": {
  2785. "200": {
  2786. "$ref": "#/responses/FileResponse"
  2787. }
  2788. }
  2789. },
  2790. "post": {
  2791. "consumes": [
  2792. "application/json"
  2793. ],
  2794. "produces": [
  2795. "application/json"
  2796. ],
  2797. "tags": [
  2798. "repository"
  2799. ],
  2800. "summary": "Create a file in a repository",
  2801. "operationId": "repoCreateFile",
  2802. "parameters": [
  2803. {
  2804. "type": "string",
  2805. "description": "owner of the repo",
  2806. "name": "owner",
  2807. "in": "path",
  2808. "required": true
  2809. },
  2810. {
  2811. "type": "string",
  2812. "description": "name of the repo",
  2813. "name": "repo",
  2814. "in": "path",
  2815. "required": true
  2816. },
  2817. {
  2818. "type": "string",
  2819. "description": "path of the file to create",
  2820. "name": "filepath",
  2821. "in": "path",
  2822. "required": true
  2823. },
  2824. {
  2825. "name": "body",
  2826. "in": "body",
  2827. "required": true,
  2828. "schema": {
  2829. "$ref": "#/definitions/CreateFileOptions"
  2830. }
  2831. }
  2832. ],
  2833. "responses": {
  2834. "201": {
  2835. "$ref": "#/responses/FileResponse"
  2836. }
  2837. }
  2838. },
  2839. "delete": {
  2840. "consumes": [
  2841. "application/json"
  2842. ],
  2843. "produces": [
  2844. "application/json"
  2845. ],
  2846. "tags": [
  2847. "repository"
  2848. ],
  2849. "summary": "Delete a file in a repository",
  2850. "operationId": "repoDeleteFile",
  2851. "parameters": [
  2852. {
  2853. "type": "string",
  2854. "description": "owner of the repo",
  2855. "name": "owner",
  2856. "in": "path",
  2857. "required": true
  2858. },
  2859. {
  2860. "type": "string",
  2861. "description": "name of the repo",
  2862. "name": "repo",
  2863. "in": "path",
  2864. "required": true
  2865. },
  2866. {
  2867. "type": "string",
  2868. "description": "path of the file to delete",
  2869. "name": "filepath",
  2870. "in": "path",
  2871. "required": true
  2872. },
  2873. {
  2874. "name": "body",
  2875. "in": "body",
  2876. "required": true,
  2877. "schema": {
  2878. "$ref": "#/definitions/DeleteFileOptions"
  2879. }
  2880. }
  2881. ],
  2882. "responses": {
  2883. "200": {
  2884. "$ref": "#/responses/FileDeleteResponse"
  2885. },
  2886. "400": {
  2887. "$ref": "#/responses/error"
  2888. },
  2889. "403": {
  2890. "$ref": "#/responses/error"
  2891. },
  2892. "404": {
  2893. "$ref": "#/responses/error"
  2894. }
  2895. }
  2896. }
  2897. },
  2898. "/repos/{owner}/{repo}/editorconfig/{filepath}": {
  2899. "get": {
  2900. "produces": [
  2901. "application/json"
  2902. ],
  2903. "tags": [
  2904. "repository"
  2905. ],
  2906. "summary": "Get the EditorConfig definitions of a file in a repository",
  2907. "operationId": "repoGetEditorConfig",
  2908. "parameters": [
  2909. {
  2910. "type": "string",
  2911. "description": "owner of the repo",
  2912. "name": "owner",
  2913. "in": "path",
  2914. "required": true
  2915. },
  2916. {
  2917. "type": "string",
  2918. "description": "name of the repo",
  2919. "name": "repo",
  2920. "in": "path",
  2921. "required": true
  2922. },
  2923. {
  2924. "type": "string",
  2925. "description": "filepath of file to get",
  2926. "name": "filepath",
  2927. "in": "path",
  2928. "required": true
  2929. }
  2930. ],
  2931. "responses": {
  2932. "200": {
  2933. "description": "success"
  2934. },
  2935. "404": {
  2936. "$ref": "#/responses/notFound"
  2937. }
  2938. }
  2939. }
  2940. },
  2941. "/repos/{owner}/{repo}/forks": {
  2942. "get": {
  2943. "produces": [
  2944. "application/json"
  2945. ],
  2946. "tags": [
  2947. "repository"
  2948. ],
  2949. "summary": "List a repository's forks",
  2950. "operationId": "listForks",
  2951. "parameters": [
  2952. {
  2953. "type": "string",
  2954. "description": "owner of the repo",
  2955. "name": "owner",
  2956. "in": "path",
  2957. "required": true
  2958. },
  2959. {
  2960. "type": "string",
  2961. "description": "name of the repo",
  2962. "name": "repo",
  2963. "in": "path",
  2964. "required": true
  2965. },
  2966. {
  2967. "type": "integer",
  2968. "description": "page number of results to return (1-based)",
  2969. "name": "page",
  2970. "in": "query"
  2971. },
  2972. {
  2973. "type": "integer",
  2974. "description": "page size of results, maximum page size is 50",
  2975. "name": "limit",
  2976. "in": "query"
  2977. }
  2978. ],
  2979. "responses": {
  2980. "200": {
  2981. "$ref": "#/responses/RepositoryList"
  2982. }
  2983. }
  2984. },
  2985. "post": {
  2986. "produces": [
  2987. "application/json"
  2988. ],
  2989. "tags": [
  2990. "repository"
  2991. ],
  2992. "summary": "Fork a repository",
  2993. "operationId": "createFork",
  2994. "parameters": [
  2995. {
  2996. "type": "string",
  2997. "description": "owner of the repo to fork",
  2998. "name": "owner",
  2999. "in": "path",
  3000. "required": true
  3001. },
  3002. {
  3003. "type": "string",
  3004. "description": "name of the repo to fork",
  3005. "name": "repo",
  3006. "in": "path",
  3007. "required": true
  3008. },
  3009. {
  3010. "name": "body",
  3011. "in": "body",
  3012. "schema": {
  3013. "$ref": "#/definitions/CreateForkOption"
  3014. }
  3015. }
  3016. ],
  3017. "responses": {
  3018. "202": {
  3019. "$ref": "#/responses/Repository"
  3020. },
  3021. "403": {
  3022. "$ref": "#/responses/forbidden"
  3023. },
  3024. "422": {
  3025. "$ref": "#/responses/validationError"
  3026. }
  3027. }
  3028. }
  3029. },
  3030. "/repos/{owner}/{repo}/git/blobs/{sha}": {
  3031. "get": {
  3032. "produces": [
  3033. "application/json"
  3034. ],
  3035. "tags": [
  3036. "repository"
  3037. ],
  3038. "summary": "Gets the blob of a repository.",
  3039. "operationId": "GetBlob",
  3040. "parameters": [
  3041. {
  3042. "type": "string",
  3043. "description": "owner of the repo",
  3044. "name": "owner",
  3045. "in": "path",
  3046. "required": true
  3047. },
  3048. {
  3049. "type": "string",
  3050. "description": "name of the repo",
  3051. "name": "repo",
  3052. "in": "path",
  3053. "required": true
  3054. },
  3055. {
  3056. "type": "string",
  3057. "description": "sha of the commit",
  3058. "name": "sha",
  3059. "in": "path",
  3060. "required": true
  3061. }
  3062. ],
  3063. "responses": {
  3064. "200": {
  3065. "$ref": "#/responses/GitBlobResponse"
  3066. },
  3067. "400": {
  3068. "$ref": "#/responses/error"
  3069. }
  3070. }
  3071. }
  3072. },
  3073. "/repos/{owner}/{repo}/git/commits/{sha}": {
  3074. "get": {
  3075. "produces": [
  3076. "application/json"
  3077. ],
  3078. "tags": [
  3079. "repository"
  3080. ],
  3081. "summary": "Get a single commit from a repository",
  3082. "operationId": "repoGetSingleCommit",
  3083. "parameters": [
  3084. {
  3085. "type": "string",
  3086. "description": "owner of the repo",
  3087. "name": "owner",
  3088. "in": "path",
  3089. "required": true
  3090. },
  3091. {
  3092. "type": "string",
  3093. "description": "name of the repo",
  3094. "name": "repo",
  3095. "in": "path",
  3096. "required": true
  3097. },
  3098. {
  3099. "type": "string",
  3100. "description": "a git ref or commit sha",
  3101. "name": "sha",
  3102. "in": "path",
  3103. "required": true
  3104. }
  3105. ],
  3106. "responses": {
  3107. "200": {
  3108. "$ref": "#/responses/Commit"
  3109. },
  3110. "404": {
  3111. "$ref": "#/responses/notFound"
  3112. },
  3113. "422": {
  3114. "$ref": "#/responses/validationError"
  3115. }
  3116. }
  3117. }
  3118. },
  3119. "/repos/{owner}/{repo}/git/refs": {
  3120. "get": {
  3121. "produces": [
  3122. "application/json"
  3123. ],
  3124. "tags": [
  3125. "repository"
  3126. ],
  3127. "summary": "Get specified ref or filtered repository's refs",
  3128. "operationId": "repoListAllGitRefs",
  3129. "parameters": [
  3130. {
  3131. "type": "string",
  3132. "description": "owner of the repo",
  3133. "name": "owner",
  3134. "in": "path",
  3135. "required": true
  3136. },
  3137. {
  3138. "type": "string",
  3139. "description": "name of the repo",
  3140. "name": "repo",
  3141. "in": "path",
  3142. "required": true
  3143. }
  3144. ],
  3145. "responses": {
  3146. "200": {
  3147. "$ref": "#/responses/ReferenceList"
  3148. },
  3149. "404": {
  3150. "$ref": "#/responses/notFound"
  3151. }
  3152. }
  3153. }
  3154. },
  3155. "/repos/{owner}/{repo}/git/refs/{ref}": {
  3156. "get": {
  3157. "produces": [
  3158. "application/json"
  3159. ],
  3160. "tags": [
  3161. "repository"
  3162. ],
  3163. "summary": "Get specified ref or filtered repository's refs",
  3164. "operationId": "repoListGitRefs",
  3165. "parameters": [
  3166. {
  3167. "type": "string",
  3168. "description": "owner of the repo",
  3169. "name": "owner",
  3170. "in": "path",
  3171. "required": true
  3172. },
  3173. {
  3174. "type": "string",
  3175. "description": "name of the repo",
  3176. "name": "repo",
  3177. "in": "path",
  3178. "required": true
  3179. },
  3180. {
  3181. "type": "string",
  3182. "description": "part or full name of the ref",
  3183. "name": "ref",
  3184. "in": "path",
  3185. "required": true
  3186. }
  3187. ],
  3188. "responses": {
  3189. "200": {
  3190. "$ref": "#/responses/ReferenceList"
  3191. },
  3192. "404": {
  3193. "$ref": "#/responses/notFound"
  3194. }
  3195. }
  3196. }
  3197. },
  3198. "/repos/{owner}/{repo}/git/tags/{sha}": {
  3199. "get": {
  3200. "produces": [
  3201. "application/json"
  3202. ],
  3203. "tags": [
  3204. "repository"
  3205. ],
  3206. "summary": "Gets the tag object of an annotated tag (not lightweight tags)",
  3207. "operationId": "GetTag",
  3208. "parameters": [
  3209. {
  3210. "type": "string",
  3211. "description": "owner of the repo",
  3212. "name": "owner",
  3213. "in": "path",
  3214. "required": true
  3215. },
  3216. {
  3217. "type": "string",
  3218. "description": "name of the repo",
  3219. "name": "repo",
  3220. "in": "path",
  3221. "required": true
  3222. },
  3223. {
  3224. "type": "string",
  3225. "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.",
  3226. "name": "sha",
  3227. "in": "path",
  3228. "required": true
  3229. }
  3230. ],
  3231. "responses": {
  3232. "200": {
  3233. "$ref": "#/responses/AnnotatedTag"
  3234. },
  3235. "400": {
  3236. "$ref": "#/responses/error"
  3237. }
  3238. }
  3239. }
  3240. },
  3241. "/repos/{owner}/{repo}/git/trees/{sha}": {
  3242. "get": {
  3243. "produces": [
  3244. "application/json"
  3245. ],
  3246. "tags": [
  3247. "repository"
  3248. ],
  3249. "summary": "Gets the tree of a repository.",
  3250. "operationId": "GetTree",
  3251. "parameters": [
  3252. {
  3253. "type": "string",
  3254. "description": "owner of the repo",
  3255. "name": "owner",
  3256. "in": "path",
  3257. "required": true
  3258. },
  3259. {
  3260. "type": "string",
  3261. "description": "name of the repo",
  3262. "name": "repo",
  3263. "in": "path",
  3264. "required": true
  3265. },
  3266. {
  3267. "type": "string",
  3268. "description": "sha of the commit",
  3269. "name": "sha",
  3270. "in": "path",
  3271. "required": true
  3272. },
  3273. {
  3274. "type": "boolean",
  3275. "description": "show all directories and files",
  3276. "name": "recursive",
  3277. "in": "query"
  3278. },
  3279. {
  3280. "type": "integer",
  3281. "description": "page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page",
  3282. "name": "page",
  3283. "in": "query"
  3284. },
  3285. {
  3286. "type": "integer",
  3287. "description": "number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE",
  3288. "name": "per_page",
  3289. "in": "query"
  3290. }
  3291. ],
  3292. "responses": {
  3293. "200": {
  3294. "$ref": "#/responses/GitTreeResponse"
  3295. },
  3296. "400": {
  3297. "$ref": "#/responses/error"
  3298. }
  3299. }
  3300. }
  3301. },
  3302. "/repos/{owner}/{repo}/hooks": {
  3303. "get": {
  3304. "produces": [
  3305. "application/json"
  3306. ],
  3307. "tags": [
  3308. "repository"
  3309. ],
  3310. "summary": "List the hooks in a repository",
  3311. "operationId": "repoListHooks",
  3312. "parameters": [
  3313. {
  3314. "type": "string",
  3315. "description": "owner of the repo",
  3316. "name": "owner",
  3317. "in": "path",
  3318. "required": true
  3319. },
  3320. {
  3321. "type": "string",
  3322. "description": "name of the repo",
  3323. "name": "repo",
  3324. "in": "path",
  3325. "required": true
  3326. },
  3327. {
  3328. "type": "integer",
  3329. "description": "page number of results to return (1-based)",
  3330. "name": "page",
  3331. "in": "query"
  3332. },
  3333. {
  3334. "type": "integer",
  3335. "description": "page size of results, maximum page size is 50",
  3336. "name": "limit",
  3337. "in": "query"
  3338. }
  3339. ],
  3340. "responses": {
  3341. "200": {
  3342. "$ref": "#/responses/HookList"
  3343. }
  3344. }
  3345. },
  3346. "post": {
  3347. "consumes": [
  3348. "application/json"
  3349. ],
  3350. "produces": [
  3351. "application/json"
  3352. ],
  3353. "tags": [
  3354. "repository"
  3355. ],
  3356. "summary": "Create a hook",
  3357. "operationId": "repoCreateHook",
  3358. "parameters": [
  3359. {
  3360. "type": "string",
  3361. "description": "owner of the repo",
  3362. "name": "owner",
  3363. "in": "path",
  3364. "required": true
  3365. },
  3366. {
  3367. "type": "string",
  3368. "description": "name of the repo",
  3369. "name": "repo",
  3370. "in": "path",
  3371. "required": true
  3372. },
  3373. {
  3374. "name": "body",
  3375. "in": "body",
  3376. "schema": {
  3377. "$ref": "#/definitions/CreateHookOption"
  3378. }
  3379. }
  3380. ],
  3381. "responses": {
  3382. "201": {
  3383. "$ref": "#/responses/Hook"
  3384. }
  3385. }
  3386. }
  3387. },
  3388. "/repos/{owner}/{repo}/hooks/git": {
  3389. "get": {
  3390. "produces": [
  3391. "application/json"
  3392. ],
  3393. "tags": [
  3394. "repository"
  3395. ],
  3396. "summary": "List the Git hooks in a repository",
  3397. "operationId": "repoListGitHooks",
  3398. "parameters": [
  3399. {
  3400. "type": "string",
  3401. "description": "owner of the repo",
  3402. "name": "owner",
  3403. "in": "path",
  3404. "required": true
  3405. },
  3406. {
  3407. "type": "string",
  3408. "description": "name of the repo",
  3409. "name": "repo",
  3410. "in": "path",
  3411. "required": true
  3412. }
  3413. ],
  3414. "responses": {
  3415. "200": {
  3416. "$ref": "#/responses/GitHookList"
  3417. }
  3418. }
  3419. }
  3420. },
  3421. "/repos/{owner}/{repo}/hooks/git/{id}": {
  3422. "get": {
  3423. "produces": [
  3424. "application/json"
  3425. ],
  3426. "tags": [
  3427. "repository"
  3428. ],
  3429. "summary": "Get a Git hook",
  3430. "operationId": "repoGetGitHook",
  3431. "parameters": [
  3432. {
  3433. "type": "string",
  3434. "description": "owner of the repo",
  3435. "name": "owner",
  3436. "in": "path",
  3437. "required": true
  3438. },
  3439. {
  3440. "type": "string",
  3441. "description": "name of the repo",
  3442. "name": "repo",
  3443. "in": "path",
  3444. "required": true
  3445. },
  3446. {
  3447. "type": "string",
  3448. "description": "id of the hook to get",
  3449. "name": "id",
  3450. "in": "path",
  3451. "required": true
  3452. }
  3453. ],
  3454. "responses": {
  3455. "200": {
  3456. "$ref": "#/responses/GitHook"
  3457. },
  3458. "404": {
  3459. "$ref": "#/responses/notFound"
  3460. }
  3461. }
  3462. },
  3463. "delete": {
  3464. "produces": [
  3465. "application/json"
  3466. ],
  3467. "tags": [
  3468. "repository"
  3469. ],
  3470. "summary": "Delete a Git hook in a repository",
  3471. "operationId": "repoDeleteGitHook",
  3472. "parameters": [
  3473. {
  3474. "type": "string",
  3475. "description": "owner of the repo",
  3476. "name": "owner",
  3477. "in": "path",
  3478. "required": true
  3479. },
  3480. {
  3481. "type": "string",
  3482. "description": "name of the repo",
  3483. "name": "repo",
  3484. "in": "path",
  3485. "required": true
  3486. },
  3487. {
  3488. "type": "string",
  3489. "description": "id of the hook to get",
  3490. "name": "id",
  3491. "in": "path",
  3492. "required": true
  3493. }
  3494. ],
  3495. "responses": {
  3496. "204": {
  3497. "$ref": "#/responses/empty"
  3498. },
  3499. "404": {
  3500. "$ref": "#/responses/notFound"
  3501. }
  3502. }
  3503. },
  3504. "patch": {
  3505. "produces": [
  3506. "application/json"
  3507. ],
  3508. "tags": [
  3509. "repository"
  3510. ],
  3511. "summary": "Edit a Git hook in a repository",
  3512. "operationId": "repoEditGitHook",
  3513. "parameters": [
  3514. {
  3515. "type": "string",
  3516. "description": "owner of the repo",
  3517. "name": "owner",
  3518. "in": "path",
  3519. "required": true
  3520. },
  3521. {
  3522. "type": "string",
  3523. "description": "name of the repo",
  3524. "name": "repo",
  3525. "in": "path",
  3526. "required": true
  3527. },
  3528. {
  3529. "type": "string",
  3530. "description": "id of the hook to get",
  3531. "name": "id",
  3532. "in": "path",
  3533. "required": true
  3534. },
  3535. {
  3536. "name": "body",
  3537. "in": "body",
  3538. "schema": {
  3539. "$ref": "#/definitions/EditGitHookOption"
  3540. }
  3541. }
  3542. ],
  3543. "responses": {
  3544. "200": {
  3545. "$ref": "#/responses/GitHook"
  3546. },
  3547. "404": {
  3548. "$ref": "#/responses/notFound"
  3549. }
  3550. }
  3551. }
  3552. },
  3553. "/repos/{owner}/{repo}/hooks/{id}": {
  3554. "get": {
  3555. "produces": [
  3556. "application/json"
  3557. ],
  3558. "tags": [
  3559. "repository"
  3560. ],
  3561. "summary": "Get a hook",
  3562. "operationId": "repoGetHook",
  3563. "parameters": [
  3564. {
  3565. "type": "string",
  3566. "description": "owner of the repo",
  3567. "name": "owner",
  3568. "in": "path",
  3569. "required": true
  3570. },
  3571. {
  3572. "type": "string",
  3573. "description": "name of the repo",
  3574. "name": "repo",
  3575. "in": "path",
  3576. "required": true
  3577. },
  3578. {
  3579. "type": "integer",
  3580. "format": "int64",
  3581. "description": "id of the hook to get",
  3582. "name": "id",
  3583. "in": "path",
  3584. "required": true
  3585. }
  3586. ],
  3587. "responses": {
  3588. "200": {
  3589. "$ref": "#/responses/Hook"
  3590. },
  3591. "404": {
  3592. "$ref": "#/responses/notFound"
  3593. }
  3594. }
  3595. },
  3596. "delete": {
  3597. "produces": [
  3598. "application/json"
  3599. ],
  3600. "tags": [
  3601. "repository"
  3602. ],
  3603. "summary": "Delete a hook in a repository",
  3604. "operationId": "repoDeleteHook",
  3605. "parameters": [
  3606. {
  3607. "type": "string",
  3608. "description": "owner of the repo",
  3609. "name": "owner",
  3610. "in": "path",
  3611. "required": true
  3612. },
  3613. {
  3614. "type": "string",
  3615. "description": "name of the repo",
  3616. "name": "repo",
  3617. "in": "path",
  3618. "required": true
  3619. },
  3620. {
  3621. "type": "integer",
  3622. "format": "int64",
  3623. "description": "id of the hook to delete",
  3624. "name": "id",
  3625. "in": "path",
  3626. "required": true
  3627. }
  3628. ],
  3629. "responses": {
  3630. "204": {
  3631. "$ref": "#/responses/empty"
  3632. },
  3633. "404": {
  3634. "$ref": "#/responses/notFound"
  3635. }
  3636. }
  3637. },
  3638. "patch": {
  3639. "produces": [
  3640. "application/json"
  3641. ],
  3642. "tags": [
  3643. "repository"
  3644. ],
  3645. "summary": "Edit a hook in a repository",
  3646. "operationId": "repoEditHook",
  3647. "parameters": [
  3648. {
  3649. "type": "string",
  3650. "description": "owner of the repo",
  3651. "name": "owner",
  3652. "in": "path",
  3653. "required": true
  3654. },
  3655. {
  3656. "type": "string",
  3657. "description": "name of the repo",
  3658. "name": "repo",
  3659. "in": "path",
  3660. "required": true
  3661. },
  3662. {
  3663. "type": "integer",
  3664. "format": "int64",
  3665. "description": "index of the hook",
  3666. "name": "id",
  3667. "in": "path",
  3668. "required": true
  3669. },
  3670. {
  3671. "name": "body",
  3672. "in": "body",
  3673. "schema": {
  3674. "$ref": "#/definitions/EditHookOption"
  3675. }
  3676. }
  3677. ],
  3678. "responses": {
  3679. "200": {
  3680. "$ref": "#/responses/Hook"
  3681. }
  3682. }
  3683. }
  3684. },
  3685. "/repos/{owner}/{repo}/hooks/{id}/tests": {
  3686. "post": {
  3687. "produces": [
  3688. "application/json"
  3689. ],
  3690. "tags": [
  3691. "repository"
  3692. ],
  3693. "summary": "Test a push webhook",
  3694. "operationId": "repoTestHook",
  3695. "parameters": [
  3696. {
  3697. "type": "string",
  3698. "description": "owner of the repo",
  3699. "name": "owner",
  3700. "in": "path",
  3701. "required": true
  3702. },
  3703. {
  3704. "type": "string",
  3705. "description": "name of the repo",
  3706. "name": "repo",
  3707. "in": "path",
  3708. "required": true
  3709. },
  3710. {
  3711. "type": "integer",
  3712. "format": "int64",
  3713. "description": "id of the hook to test",
  3714. "name": "id",
  3715. "in": "path",
  3716. "required": true
  3717. }
  3718. ],
  3719. "responses": {
  3720. "204": {
  3721. "$ref": "#/responses/empty"
  3722. }
  3723. }
  3724. }
  3725. },
  3726. "/repos/{owner}/{repo}/issues": {
  3727. "get": {
  3728. "produces": [
  3729. "application/json"
  3730. ],
  3731. "tags": [
  3732. "issue"
  3733. ],
  3734. "summary": "List a repository's issues",
  3735. "operationId": "issueListIssues",
  3736. "parameters": [
  3737. {
  3738. "type": "string",
  3739. "description": "owner of the repo",
  3740. "name": "owner",
  3741. "in": "path",
  3742. "required": true
  3743. },
  3744. {
  3745. "type": "string",
  3746. "description": "name of the repo",
  3747. "name": "repo",
  3748. "in": "path",
  3749. "required": true
  3750. },
  3751. {
  3752. "type": "string",
  3753. "description": "whether issue is open or closed",
  3754. "name": "state",
  3755. "in": "query"
  3756. },
  3757. {
  3758. "type": "string",
  3759. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  3760. "name": "labels",
  3761. "in": "query"
  3762. },
  3763. {
  3764. "type": "string",
  3765. "description": "search string",
  3766. "name": "q",
  3767. "in": "query"
  3768. },
  3769. {
  3770. "type": "string",
  3771. "description": "filter by type (issues / pulls) if set",
  3772. "name": "type",
  3773. "in": "query"
  3774. },
  3775. {
  3776. "type": "string",
  3777. "description": "comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded",
  3778. "name": "milestones",
  3779. "in": "query"
  3780. },
  3781. {
  3782. "type": "integer",
  3783. "description": "page number of results to return (1-based)",
  3784. "name": "page",
  3785. "in": "query"
  3786. },
  3787. {
  3788. "type": "integer",
  3789. "description": "page size of results, maximum page size is 50",
  3790. "name": "limit",
  3791. "in": "query"
  3792. }
  3793. ],
  3794. "responses": {
  3795. "200": {
  3796. "$ref": "#/responses/IssueList"
  3797. }
  3798. }
  3799. },
  3800. "post": {
  3801. "consumes": [
  3802. "application/json"
  3803. ],
  3804. "produces": [
  3805. "application/json"
  3806. ],
  3807. "tags": [
  3808. "issue"
  3809. ],
  3810. "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  3811. "operationId": "issueCreateIssue",
  3812. "parameters": [
  3813. {
  3814. "type": "string",
  3815. "description": "owner of the repo",
  3816. "name": "owner",
  3817. "in": "path",
  3818. "required": true
  3819. },
  3820. {
  3821. "type": "string",
  3822. "description": "name of the repo",
  3823. "name": "repo",
  3824. "in": "path",
  3825. "required": true
  3826. },
  3827. {
  3828. "name": "body",
  3829. "in": "body",
  3830. "schema": {
  3831. "$ref": "#/definitions/CreateIssueOption"
  3832. }
  3833. }
  3834. ],
  3835. "responses": {
  3836. "201": {
  3837. "$ref": "#/responses/Issue"
  3838. },
  3839. "403": {
  3840. "$ref": "#/responses/forbidden"
  3841. },
  3842. "412": {
  3843. "$ref": "#/responses/error"
  3844. },
  3845. "422": {
  3846. "$ref": "#/responses/validationError"
  3847. }
  3848. }
  3849. }
  3850. },
  3851. "/repos/{owner}/{repo}/issues/comments": {
  3852. "get": {
  3853. "produces": [
  3854. "application/json"
  3855. ],
  3856. "tags": [
  3857. "issue"
  3858. ],
  3859. "summary": "List all comments in a repository",
  3860. "operationId": "issueGetRepoComments",
  3861. "parameters": [
  3862. {
  3863. "type": "string",
  3864. "description": "owner of the repo",
  3865. "name": "owner",
  3866. "in": "path",
  3867. "required": true
  3868. },
  3869. {
  3870. "type": "string",
  3871. "description": "name of the repo",
  3872. "name": "repo",
  3873. "in": "path",
  3874. "required": true
  3875. },
  3876. {
  3877. "type": "string",
  3878. "format": "date-time",
  3879. "description": "if provided, only comments updated since the provided time are returned.",
  3880. "name": "since",
  3881. "in": "query"
  3882. },
  3883. {
  3884. "type": "string",
  3885. "format": "date-time",
  3886. "description": "if provided, only comments updated before the provided time are returned.",
  3887. "name": "before",
  3888. "in": "query"
  3889. },
  3890. {
  3891. "type": "integer",
  3892. "description": "page number of results to return (1-based)",
  3893. "name": "page",
  3894. "in": "query"
  3895. },
  3896. {
  3897. "type": "integer",
  3898. "description": "page size of results, maximum page size is 50",
  3899. "name": "limit",
  3900. "in": "query"
  3901. }
  3902. ],
  3903. "responses": {
  3904. "200": {
  3905. "$ref": "#/responses/CommentList"
  3906. }
  3907. }
  3908. }
  3909. },
  3910. "/repos/{owner}/{repo}/issues/comments/{id}": {
  3911. "get": {
  3912. "consumes": [
  3913. "application/json"
  3914. ],
  3915. "produces": [
  3916. "application/json"
  3917. ],
  3918. "tags": [
  3919. "issue"
  3920. ],
  3921. "summary": "Get a comment",
  3922. "operationId": "issueGetComment",
  3923. "parameters": [
  3924. {
  3925. "type": "string",
  3926. "description": "owner of the repo",
  3927. "name": "owner",
  3928. "in": "path",
  3929. "required": true
  3930. },
  3931. {
  3932. "type": "string",
  3933. "description": "name of the repo",
  3934. "name": "repo",
  3935. "in": "path",
  3936. "required": true
  3937. },
  3938. {
  3939. "type": "integer",
  3940. "format": "int64",
  3941. "description": "id of the comment",
  3942. "name": "id",
  3943. "in": "path",
  3944. "required": true
  3945. }
  3946. ],
  3947. "responses": {
  3948. "200": {
  3949. "$ref": "#/responses/Comment"
  3950. },
  3951. "204": {
  3952. "$ref": "#/responses/empty"
  3953. },
  3954. "403": {
  3955. "$ref": "#/responses/forbidden"
  3956. },
  3957. "404": {
  3958. "$ref": "#/responses/notFound"
  3959. }
  3960. }
  3961. },
  3962. "delete": {
  3963. "tags": [
  3964. "issue"
  3965. ],
  3966. "summary": "Delete a comment",
  3967. "operationId": "issueDeleteComment",
  3968. "parameters": [
  3969. {
  3970. "type": "string",
  3971. "description": "owner of the repo",
  3972. "name": "owner",
  3973. "in": "path",
  3974. "required": true
  3975. },
  3976. {
  3977. "type": "string",
  3978. "description": "name of the repo",
  3979. "name": "repo",
  3980. "in": "path",
  3981. "required": true
  3982. },
  3983. {
  3984. "type": "integer",
  3985. "format": "int64",
  3986. "description": "id of comment to delete",
  3987. "name": "id",
  3988. "in": "path",
  3989. "required": true
  3990. }
  3991. ],
  3992. "responses": {
  3993. "204": {
  3994. "$ref": "#/responses/empty"
  3995. },
  3996. "403": {
  3997. "$ref": "#/responses/forbidden"
  3998. },
  3999. "404": {
  4000. "$ref": "#/responses/notFound"
  4001. }
  4002. }
  4003. },
  4004. "patch": {
  4005. "consumes": [
  4006. "application/json"
  4007. ],
  4008. "produces": [
  4009. "application/json"
  4010. ],
  4011. "tags": [
  4012. "issue"
  4013. ],
  4014. "summary": "Edit a comment",
  4015. "operationId": "issueEditComment",
  4016. "parameters": [
  4017. {
  4018. "type": "string",
  4019. "description": "owner of the repo",
  4020. "name": "owner",
  4021. "in": "path",
  4022. "required": true
  4023. },
  4024. {
  4025. "type": "string",
  4026. "description": "name of the repo",
  4027. "name": "repo",
  4028. "in": "path",
  4029. "required": true
  4030. },
  4031. {
  4032. "type": "integer",
  4033. "format": "int64",
  4034. "description": "id of the comment to edit",
  4035. "name": "id",
  4036. "in": "path",
  4037. "required": true
  4038. },
  4039. {
  4040. "name": "body",
  4041. "in": "body",
  4042. "schema": {
  4043. "$ref": "#/definitions/EditIssueCommentOption"
  4044. }
  4045. }
  4046. ],
  4047. "responses": {
  4048. "200": {
  4049. "$ref": "#/responses/Comment"
  4050. },
  4051. "204": {
  4052. "$ref": "#/responses/empty"
  4053. },
  4054. "403": {
  4055. "$ref": "#/responses/forbidden"
  4056. },
  4057. "404": {
  4058. "$ref": "#/responses/notFound"
  4059. }
  4060. }
  4061. }
  4062. },
  4063. "/repos/{owner}/{repo}/issues/comments/{id}/reactions": {
  4064. "get": {
  4065. "consumes": [
  4066. "application/json"
  4067. ],
  4068. "produces": [
  4069. "application/json"
  4070. ],
  4071. "tags": [
  4072. "issue"
  4073. ],
  4074. "summary": "Get a list of reactions from a comment of an issue",
  4075. "operationId": "issueGetCommentReactions",
  4076. "parameters": [
  4077. {
  4078. "type": "string",
  4079. "description": "owner of the repo",
  4080. "name": "owner",
  4081. "in": "path",
  4082. "required": true
  4083. },
  4084. {
  4085. "type": "string",
  4086. "description": "name of the repo",
  4087. "name": "repo",
  4088. "in": "path",
  4089. "required": true
  4090. },
  4091. {
  4092. "type": "integer",
  4093. "format": "int64",
  4094. "description": "id of the comment to edit",
  4095. "name": "id",
  4096. "in": "path",
  4097. "required": true
  4098. }
  4099. ],
  4100. "responses": {
  4101. "200": {
  4102. "$ref": "#/responses/ReactionList"
  4103. },
  4104. "403": {
  4105. "$ref": "#/responses/forbidden"
  4106. }
  4107. }
  4108. },
  4109. "post": {
  4110. "consumes": [
  4111. "application/json"
  4112. ],
  4113. "produces": [
  4114. "application/json"
  4115. ],
  4116. "tags": [
  4117. "issue"
  4118. ],
  4119. "summary": "Add a reaction to a comment of an issue",
  4120. "operationId": "issuePostCommentReaction",
  4121. "parameters": [
  4122. {
  4123. "type": "string",
  4124. "description": "owner of the repo",
  4125. "name": "owner",
  4126. "in": "path",
  4127. "required": true
  4128. },
  4129. {
  4130. "type": "string",
  4131. "description": "name of the repo",
  4132. "name": "repo",
  4133. "in": "path",
  4134. "required": true
  4135. },
  4136. {
  4137. "type": "integer",
  4138. "format": "int64",
  4139. "description": "id of the comment to edit",
  4140. "name": "id",
  4141. "in": "path",
  4142. "required": true
  4143. },
  4144. {
  4145. "name": "content",
  4146. "in": "body",
  4147. "schema": {
  4148. "$ref": "#/definitions/EditReactionOption"
  4149. }
  4150. }
  4151. ],
  4152. "responses": {
  4153. "200": {
  4154. "$ref": "#/responses/Reaction"
  4155. },
  4156. "201": {
  4157. "$ref": "#/responses/Reaction"
  4158. },
  4159. "403": {
  4160. "$ref": "#/responses/forbidden"
  4161. }
  4162. }
  4163. },
  4164. "delete": {
  4165. "consumes": [
  4166. "application/json"
  4167. ],
  4168. "produces": [
  4169. "application/json"
  4170. ],
  4171. "tags": [
  4172. "issue"
  4173. ],
  4174. "summary": "Remove a reaction from a comment of an issue",
  4175. "operationId": "issueDeleteCommentReaction",
  4176. "parameters": [
  4177. {
  4178. "type": "string",
  4179. "description": "owner of the repo",
  4180. "name": "owner",
  4181. "in": "path",
  4182. "required": true
  4183. },
  4184. {
  4185. "type": "string",
  4186. "description": "name of the repo",
  4187. "name": "repo",
  4188. "in": "path",
  4189. "required": true
  4190. },
  4191. {
  4192. "type": "integer",
  4193. "format": "int64",
  4194. "description": "id of the comment to edit",
  4195. "name": "id",
  4196. "in": "path",
  4197. "required": true
  4198. },
  4199. {
  4200. "name": "content",
  4201. "in": "body",
  4202. "schema": {
  4203. "$ref": "#/definitions/EditReactionOption"
  4204. }
  4205. }
  4206. ],
  4207. "responses": {
  4208. "200": {
  4209. "$ref": "#/responses/empty"
  4210. },
  4211. "403": {
  4212. "$ref": "#/responses/forbidden"
  4213. }
  4214. }
  4215. }
  4216. },
  4217. "/repos/{owner}/{repo}/issues/{index}": {
  4218. "get": {
  4219. "produces": [
  4220. "application/json"
  4221. ],
  4222. "tags": [
  4223. "issue"
  4224. ],
  4225. "summary": "Get an issue",
  4226. "operationId": "issueGetIssue",
  4227. "parameters": [
  4228. {
  4229. "type": "string",
  4230. "description": "owner of the repo",
  4231. "name": "owner",
  4232. "in": "path",
  4233. "required": true
  4234. },
  4235. {
  4236. "type": "string",
  4237. "description": "name of the repo",
  4238. "name": "repo",
  4239. "in": "path",
  4240. "required": true
  4241. },
  4242. {
  4243. "type": "integer",
  4244. "format": "int64",
  4245. "description": "index of the issue to get",
  4246. "name": "index",
  4247. "in": "path",
  4248. "required": true
  4249. }
  4250. ],
  4251. "responses": {
  4252. "200": {
  4253. "$ref": "#/responses/Issue"
  4254. },
  4255. "404": {
  4256. "$ref": "#/responses/notFound"
  4257. }
  4258. }
  4259. },
  4260. "patch": {
  4261. "consumes": [
  4262. "application/json"
  4263. ],
  4264. "produces": [
  4265. "application/json"
  4266. ],
  4267. "tags": [
  4268. "issue"
  4269. ],
  4270. "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  4271. "operationId": "issueEditIssue",
  4272. "parameters": [
  4273. {
  4274. "type": "string",
  4275. "description": "owner of the repo",
  4276. "name": "owner",
  4277. "in": "path",
  4278. "required": true
  4279. },
  4280. {
  4281. "type": "string",
  4282. "description": "name of the repo",
  4283. "name": "repo",
  4284. "in": "path",
  4285. "required": true
  4286. },
  4287. {
  4288. "type": "integer",
  4289. "format": "int64",
  4290. "description": "index of the issue to edit",
  4291. "name": "index",
  4292. "in": "path",
  4293. "required": true
  4294. },
  4295. {
  4296. "name": "body",
  4297. "in": "body",
  4298. "schema": {
  4299. "$ref": "#/definitions/EditIssueOption"
  4300. }
  4301. }
  4302. ],
  4303. "responses": {
  4304. "201": {
  4305. "$ref": "#/responses/Issue"
  4306. },
  4307. "403": {
  4308. "$ref": "#/responses/forbidden"
  4309. },
  4310. "404": {
  4311. "$ref": "#/responses/notFound"
  4312. },
  4313. "412": {
  4314. "$ref": "#/responses/error"
  4315. }
  4316. }
  4317. }
  4318. },
  4319. "/repos/{owner}/{repo}/issues/{index}/comments": {
  4320. "get": {
  4321. "produces": [
  4322. "application/json"
  4323. ],
  4324. "tags": [
  4325. "issue"
  4326. ],
  4327. "summary": "List all comments on an issue",
  4328. "operationId": "issueGetComments",
  4329. "parameters": [
  4330. {
  4331. "type": "string",
  4332. "description": "owner of the repo",
  4333. "name": "owner",
  4334. "in": "path",
  4335. "required": true
  4336. },
  4337. {
  4338. "type": "string",
  4339. "description": "name of the repo",
  4340. "name": "repo",
  4341. "in": "path",
  4342. "required": true
  4343. },
  4344. {
  4345. "type": "integer",
  4346. "format": "int64",
  4347. "description": "index of the issue",
  4348. "name": "index",
  4349. "in": "path",
  4350. "required": true
  4351. },
  4352. {
  4353. "type": "string",
  4354. "format": "date-time",
  4355. "description": "if provided, only comments updated since the specified time are returned.",
  4356. "name": "since",
  4357. "in": "query"
  4358. },
  4359. {
  4360. "type": "string",
  4361. "format": "date-time",
  4362. "description": "if provided, only comments updated before the provided time are returned.",
  4363. "name": "before",
  4364. "in": "query"
  4365. }
  4366. ],
  4367. "responses": {
  4368. "200": {
  4369. "$ref": "#/responses/CommentList"
  4370. }
  4371. }
  4372. },
  4373. "post": {
  4374. "consumes": [
  4375. "application/json"
  4376. ],
  4377. "produces": [
  4378. "application/json"
  4379. ],
  4380. "tags": [
  4381. "issue"
  4382. ],
  4383. "summary": "Add a comment to an issue",
  4384. "operationId": "issueCreateComment",
  4385. "parameters": [
  4386. {
  4387. "type": "string",
  4388. "description": "owner of the repo",
  4389. "name": "owner",
  4390. "in": "path",
  4391. "required": true
  4392. },
  4393. {
  4394. "type": "string",
  4395. "description": "name of the repo",
  4396. "name": "repo",
  4397. "in": "path",
  4398. "required": true
  4399. },
  4400. {
  4401. "type": "integer",
  4402. "format": "int64",
  4403. "description": "index of the issue",
  4404. "name": "index",
  4405. "in": "path",
  4406. "required": true
  4407. },
  4408. {
  4409. "name": "body",
  4410. "in": "body",
  4411. "schema": {
  4412. "$ref": "#/definitions/CreateIssueCommentOption"
  4413. }
  4414. }
  4415. ],
  4416. "responses": {
  4417. "201": {
  4418. "$ref": "#/responses/Comment"
  4419. },
  4420. "403": {
  4421. "$ref": "#/responses/forbidden"
  4422. }
  4423. }
  4424. }
  4425. },
  4426. "/repos/{owner}/{repo}/issues/{index}/comments/{id}": {
  4427. "delete": {
  4428. "tags": [
  4429. "issue"
  4430. ],
  4431. "summary": "Delete a comment",
  4432. "operationId": "issueDeleteCommentDeprecated",
  4433. "deprecated": true,
  4434. "parameters": [
  4435. {
  4436. "type": "string",
  4437. "description": "owner of the repo",
  4438. "name": "owner",
  4439. "in": "path",
  4440. "required": true
  4441. },
  4442. {
  4443. "type": "string",
  4444. "description": "name of the repo",
  4445. "name": "repo",
  4446. "in": "path",
  4447. "required": true
  4448. },
  4449. {
  4450. "type": "integer",
  4451. "description": "this parameter is ignored",
  4452. "name": "index",
  4453. "in": "path",
  4454. "required": true
  4455. },
  4456. {
  4457. "type": "integer",
  4458. "format": "int64",
  4459. "description": "id of comment to delete",
  4460. "name": "id",
  4461. "in": "path",
  4462. "required": true
  4463. }
  4464. ],
  4465. "responses": {
  4466. "204": {
  4467. "$ref": "#/responses/empty"
  4468. },
  4469. "403": {
  4470. "$ref": "#/responses/forbidden"
  4471. },
  4472. "404": {
  4473. "$ref": "#/responses/notFound"
  4474. }
  4475. }
  4476. },
  4477. "patch": {
  4478. "consumes": [
  4479. "application/json"
  4480. ],
  4481. "produces": [
  4482. "application/json"
  4483. ],
  4484. "tags": [
  4485. "issue"
  4486. ],
  4487. "summary": "Edit a comment",
  4488. "operationId": "issueEditCommentDeprecated",
  4489. "deprecated": true,
  4490. "parameters": [
  4491. {
  4492. "type": "string",
  4493. "description": "owner of the repo",
  4494. "name": "owner",
  4495. "in": "path",
  4496. "required": true
  4497. },
  4498. {
  4499. "type": "string",
  4500. "description": "name of the repo",
  4501. "name": "repo",
  4502. "in": "path",
  4503. "required": true
  4504. },
  4505. {
  4506. "type": "integer",
  4507. "description": "this parameter is ignored",
  4508. "name": "index",
  4509. "in": "path",
  4510. "required": true
  4511. },
  4512. {
  4513. "type": "integer",
  4514. "format": "int64",
  4515. "description": "id of the comment to edit",
  4516. "name": "id",
  4517. "in": "path",
  4518. "required": true
  4519. },
  4520. {
  4521. "name": "body",
  4522. "in": "body",
  4523. "schema": {
  4524. "$ref": "#/definitions/EditIssueCommentOption"
  4525. }
  4526. }
  4527. ],
  4528. "responses": {
  4529. "200": {
  4530. "$ref": "#/responses/Comment"
  4531. },
  4532. "204": {
  4533. "$ref": "#/responses/empty"
  4534. },
  4535. "403": {
  4536. "$ref": "#/responses/forbidden"
  4537. },
  4538. "404": {
  4539. "$ref": "#/responses/notFound"
  4540. }
  4541. }
  4542. }
  4543. },
  4544. "/repos/{owner}/{repo}/issues/{index}/deadline": {
  4545. "post": {
  4546. "consumes": [
  4547. "application/json"
  4548. ],
  4549. "produces": [
  4550. "application/json"
  4551. ],
  4552. "tags": [
  4553. "issue"
  4554. ],
  4555. "summary": "Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.",
  4556. "operationId": "issueEditIssueDeadline",
  4557. "parameters": [
  4558. {
  4559. "type": "string",
  4560. "description": "owner of the repo",
  4561. "name": "owner",
  4562. "in": "path",
  4563. "required": true
  4564. },
  4565. {
  4566. "type": "string",
  4567. "description": "name of the repo",
  4568. "name": "repo",
  4569. "in": "path",
  4570. "required": true
  4571. },
  4572. {
  4573. "type": "integer",
  4574. "format": "int64",
  4575. "description": "index of the issue to create or update a deadline on",
  4576. "name": "index",
  4577. "in": "path",
  4578. "required": true
  4579. },
  4580. {
  4581. "name": "body",
  4582. "in": "body",
  4583. "schema": {
  4584. "$ref": "#/definitions/EditDeadlineOption"
  4585. }
  4586. }
  4587. ],
  4588. "responses": {
  4589. "201": {
  4590. "$ref": "#/responses/IssueDeadline"
  4591. },
  4592. "403": {
  4593. "$ref": "#/responses/forbidden"
  4594. },
  4595. "404": {
  4596. "$ref": "#/responses/notFound"
  4597. }
  4598. }
  4599. }
  4600. },
  4601. "/repos/{owner}/{repo}/issues/{index}/labels": {
  4602. "get": {
  4603. "produces": [
  4604. "application/json"
  4605. ],
  4606. "tags": [
  4607. "issue"
  4608. ],
  4609. "summary": "Get an issue's labels",
  4610. "operationId": "issueGetLabels",
  4611. "parameters": [
  4612. {
  4613. "type": "string",
  4614. "description": "owner of the repo",
  4615. "name": "owner",
  4616. "in": "path",
  4617. "required": true
  4618. },
  4619. {
  4620. "type": "string",
  4621. "description": "name of the repo",
  4622. "name": "repo",
  4623. "in": "path",
  4624. "required": true
  4625. },
  4626. {
  4627. "type": "integer",
  4628. "format": "int64",
  4629. "description": "index of the issue",
  4630. "name": "index",
  4631. "in": "path",
  4632. "required": true
  4633. }
  4634. ],
  4635. "responses": {
  4636. "200": {
  4637. "$ref": "#/responses/LabelList"
  4638. },
  4639. "404": {
  4640. "$ref": "#/responses/notFound"
  4641. }
  4642. }
  4643. },
  4644. "put": {
  4645. "consumes": [
  4646. "application/json"
  4647. ],
  4648. "produces": [
  4649. "application/json"
  4650. ],
  4651. "tags": [
  4652. "issue"
  4653. ],
  4654. "summary": "Replace an issue's labels",
  4655. "operationId": "issueReplaceLabels",
  4656. "parameters": [
  4657. {
  4658. "type": "string",
  4659. "description": "owner of the repo",
  4660. "name": "owner",
  4661. "in": "path",
  4662. "required": true
  4663. },
  4664. {
  4665. "type": "string",
  4666. "description": "name of the repo",
  4667. "name": "repo",
  4668. "in": "path",
  4669. "required": true
  4670. },
  4671. {
  4672. "type": "integer",
  4673. "format": "int64",
  4674. "description": "index of the issue",
  4675. "name": "index",
  4676. "in": "path",
  4677. "required": true
  4678. },
  4679. {
  4680. "name": "body",
  4681. "in": "body",
  4682. "schema": {
  4683. "$ref": "#/definitions/IssueLabelsOption"
  4684. }
  4685. }
  4686. ],
  4687. "responses": {
  4688. "200": {
  4689. "$ref": "#/responses/LabelList"
  4690. },
  4691. "403": {
  4692. "$ref": "#/responses/forbidden"
  4693. }
  4694. }
  4695. },
  4696. "post": {
  4697. "consumes": [
  4698. "application/json"
  4699. ],
  4700. "produces": [
  4701. "application/json"
  4702. ],
  4703. "tags": [
  4704. "issue"
  4705. ],
  4706. "summary": "Add a label to an issue",
  4707. "operationId": "issueAddLabel",
  4708. "parameters": [
  4709. {
  4710. "type": "string",
  4711. "description": "owner of the repo",
  4712. "name": "owner",
  4713. "in": "path",
  4714. "required": true
  4715. },
  4716. {
  4717. "type": "string",
  4718. "description": "name of the repo",
  4719. "name": "repo",
  4720. "in": "path",
  4721. "required": true
  4722. },
  4723. {
  4724. "type": "integer",
  4725. "format": "int64",
  4726. "description": "index of the issue",
  4727. "name": "index",
  4728. "in": "path",
  4729. "required": true
  4730. },
  4731. {
  4732. "name": "body",
  4733. "in": "body",
  4734. "schema": {
  4735. "$ref": "#/definitions/IssueLabelsOption"
  4736. }
  4737. }
  4738. ],
  4739. "responses": {
  4740. "200": {
  4741. "$ref": "#/responses/LabelList"
  4742. },
  4743. "403": {
  4744. "$ref": "#/responses/forbidden"
  4745. }
  4746. }
  4747. },
  4748. "delete": {
  4749. "produces": [
  4750. "application/json"
  4751. ],
  4752. "tags": [
  4753. "issue"
  4754. ],
  4755. "summary": "Remove all labels from an issue",
  4756. "operationId": "issueClearLabels",
  4757. "parameters": [
  4758. {
  4759. "type": "string",
  4760. "description": "owner of the repo",
  4761. "name": "owner",
  4762. "in": "path",
  4763. "required": true
  4764. },
  4765. {
  4766. "type": "string",
  4767. "description": "name of the repo",
  4768. "name": "repo",
  4769. "in": "path",
  4770. "required": true
  4771. },
  4772. {
  4773. "type": "integer",
  4774. "format": "int64",
  4775. "description": "index of the issue",
  4776. "name": "index",
  4777. "in": "path",
  4778. "required": true
  4779. }
  4780. ],
  4781. "responses": {
  4782. "204": {
  4783. "$ref": "#/responses/empty"
  4784. },
  4785. "403": {
  4786. "$ref": "#/responses/forbidden"
  4787. }
  4788. }
  4789. }
  4790. },
  4791. "/repos/{owner}/{repo}/issues/{index}/labels/{id}": {
  4792. "delete": {
  4793. "produces": [
  4794. "application/json"
  4795. ],
  4796. "tags": [
  4797. "issue"
  4798. ],
  4799. "summary": "Remove a label from an issue",
  4800. "operationId": "issueRemoveLabel",
  4801. "parameters": [
  4802. {
  4803. "type": "string",
  4804. "description": "owner of the repo",
  4805. "name": "owner",
  4806. "in": "path",
  4807. "required": true
  4808. },
  4809. {
  4810. "type": "string",
  4811. "description": "name of the repo",
  4812. "name": "repo",
  4813. "in": "path",
  4814. "required": true
  4815. },
  4816. {
  4817. "type": "integer",
  4818. "format": "int64",
  4819. "description": "index of the issue",
  4820. "name": "index",
  4821. "in": "path",
  4822. "required": true
  4823. },
  4824. {
  4825. "type": "integer",
  4826. "format": "int64",
  4827. "description": "id of the label to remove",
  4828. "name": "id",
  4829. "in": "path",
  4830. "required": true
  4831. }
  4832. ],
  4833. "responses": {
  4834. "204": {
  4835. "$ref": "#/responses/empty"
  4836. },
  4837. "403": {
  4838. "$ref": "#/responses/forbidden"
  4839. },
  4840. "422": {
  4841. "$ref": "#/responses/validationError"
  4842. }
  4843. }
  4844. }
  4845. },
  4846. "/repos/{owner}/{repo}/issues/{index}/reactions": {
  4847. "get": {
  4848. "consumes": [
  4849. "application/json"
  4850. ],
  4851. "produces": [
  4852. "application/json"
  4853. ],
  4854. "tags": [
  4855. "issue"
  4856. ],
  4857. "summary": "Get a list reactions of an issue",
  4858. "operationId": "issueGetIssueReactions",
  4859. "parameters": [
  4860. {
  4861. "type": "string",
  4862. "description": "owner of the repo",
  4863. "name": "owner",
  4864. "in": "path",
  4865. "required": true
  4866. },
  4867. {
  4868. "type": "string",
  4869. "description": "name of the repo",
  4870. "name": "repo",
  4871. "in": "path",
  4872. "required": true
  4873. },
  4874. {
  4875. "type": "integer",
  4876. "format": "int64",
  4877. "description": "index of the issue",
  4878. "name": "index",
  4879. "in": "path",
  4880. "required": true
  4881. },
  4882. {
  4883. "type": "integer",
  4884. "description": "page number of results to return (1-based)",
  4885. "name": "page",
  4886. "in": "query"
  4887. },
  4888. {
  4889. "type": "integer",
  4890. "description": "page size of results, maximum page size is 50",
  4891. "name": "limit",
  4892. "in": "query"
  4893. }
  4894. ],
  4895. "responses": {
  4896. "200": {
  4897. "$ref": "#/responses/ReactionList"
  4898. },
  4899. "403": {
  4900. "$ref": "#/responses/forbidden"
  4901. }
  4902. }
  4903. },
  4904. "post": {
  4905. "consumes": [
  4906. "application/json"
  4907. ],
  4908. "produces": [
  4909. "application/json"
  4910. ],
  4911. "tags": [
  4912. "issue"
  4913. ],
  4914. "summary": "Add a reaction to an issue",
  4915. "operationId": "issuePostIssueReaction",
  4916. "parameters": [
  4917. {
  4918. "type": "string",
  4919. "description": "owner of the repo",
  4920. "name": "owner",
  4921. "in": "path",
  4922. "required": true
  4923. },
  4924. {
  4925. "type": "string",
  4926. "description": "name of the repo",
  4927. "name": "repo",
  4928. "in": "path",
  4929. "required": true
  4930. },
  4931. {
  4932. "type": "integer",
  4933. "format": "int64",
  4934. "description": "index of the issue",
  4935. "name": "index",
  4936. "in": "path",
  4937. "required": true
  4938. },
  4939. {
  4940. "name": "content",
  4941. "in": "body",
  4942. "schema": {
  4943. "$ref": "#/definitions/EditReactionOption"
  4944. }
  4945. }
  4946. ],
  4947. "responses": {
  4948. "200": {
  4949. "$ref": "#/responses/Reaction"
  4950. },
  4951. "201": {
  4952. "$ref": "#/responses/Reaction"
  4953. },
  4954. "403": {
  4955. "$ref": "#/responses/forbidden"
  4956. }
  4957. }
  4958. },
  4959. "delete": {
  4960. "consumes": [
  4961. "application/json"
  4962. ],
  4963. "produces": [
  4964. "application/json"
  4965. ],
  4966. "tags": [
  4967. "issue"
  4968. ],
  4969. "summary": "Remove a reaction from an issue",
  4970. "operationId": "issueDeleteIssueReaction",
  4971. "parameters": [
  4972. {
  4973. "type": "string",
  4974. "description": "owner of the repo",
  4975. "name": "owner",
  4976. "in": "path",
  4977. "required": true
  4978. },
  4979. {
  4980. "type": "string",
  4981. "description": "name of the repo",
  4982. "name": "repo",
  4983. "in": "path",
  4984. "required": true
  4985. },
  4986. {
  4987. "type": "integer",
  4988. "format": "int64",
  4989. "description": "index of the issue",
  4990. "name": "index",
  4991. "in": "path",
  4992. "required": true
  4993. },
  4994. {
  4995. "name": "content",
  4996. "in": "body",
  4997. "schema": {
  4998. "$ref": "#/definitions/EditReactionOption"
  4999. }
  5000. }
  5001. ],
  5002. "responses": {
  5003. "200": {
  5004. "$ref": "#/responses/empty"
  5005. },
  5006. "403": {
  5007. "$ref": "#/responses/forbidden"
  5008. }
  5009. }
  5010. }
  5011. },
  5012. "/repos/{owner}/{repo}/issues/{index}/stopwatch/delete": {
  5013. "delete": {
  5014. "consumes": [
  5015. "application/json"
  5016. ],
  5017. "produces": [
  5018. "application/json"
  5019. ],
  5020. "tags": [
  5021. "issue"
  5022. ],
  5023. "summary": "Delete an issue's existing stopwatch.",
  5024. "operationId": "issueDeleteStopWatch",
  5025. "parameters": [
  5026. {
  5027. "type": "string",
  5028. "description": "owner of the repo",
  5029. "name": "owner",
  5030. "in": "path",
  5031. "required": true
  5032. },
  5033. {
  5034. "type": "string",
  5035. "description": "name of the repo",
  5036. "name": "repo",
  5037. "in": "path",
  5038. "required": true
  5039. },
  5040. {
  5041. "type": "integer",
  5042. "format": "int64",
  5043. "description": "index of the issue to stop the stopwatch on",
  5044. "name": "index",
  5045. "in": "path",
  5046. "required": true
  5047. }
  5048. ],
  5049. "responses": {
  5050. "204": {
  5051. "$ref": "#/responses/empty"
  5052. },
  5053. "403": {
  5054. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5055. },
  5056. "404": {
  5057. "$ref": "#/responses/notFound"
  5058. },
  5059. "409": {
  5060. "description": "Cannot cancel a non existent stopwatch"
  5061. }
  5062. }
  5063. }
  5064. },
  5065. "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": {
  5066. "post": {
  5067. "consumes": [
  5068. "application/json"
  5069. ],
  5070. "produces": [
  5071. "application/json"
  5072. ],
  5073. "tags": [
  5074. "issue"
  5075. ],
  5076. "summary": "Start stopwatch on an issue.",
  5077. "operationId": "issueStartStopWatch",
  5078. "parameters": [
  5079. {
  5080. "type": "string",
  5081. "description": "owner of the repo",
  5082. "name": "owner",
  5083. "in": "path",
  5084. "required": true
  5085. },
  5086. {
  5087. "type": "string",
  5088. "description": "name of the repo",
  5089. "name": "repo",
  5090. "in": "path",
  5091. "required": true
  5092. },
  5093. {
  5094. "type": "integer",
  5095. "format": "int64",
  5096. "description": "index of the issue to create the stopwatch on",
  5097. "name": "index",
  5098. "in": "path",
  5099. "required": true
  5100. }
  5101. ],
  5102. "responses": {
  5103. "201": {
  5104. "$ref": "#/responses/empty"
  5105. },
  5106. "403": {
  5107. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5108. },
  5109. "404": {
  5110. "$ref": "#/responses/notFound"
  5111. },
  5112. "409": {
  5113. "description": "Cannot start a stopwatch again if it already exists"
  5114. }
  5115. }
  5116. }
  5117. },
  5118. "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": {
  5119. "post": {
  5120. "consumes": [
  5121. "application/json"
  5122. ],
  5123. "produces": [
  5124. "application/json"
  5125. ],
  5126. "tags": [
  5127. "issue"
  5128. ],
  5129. "summary": "Stop an issue's existing stopwatch.",
  5130. "operationId": "issueStopStopWatch",
  5131. "parameters": [
  5132. {
  5133. "type": "string",
  5134. "description": "owner of the repo",
  5135. "name": "owner",
  5136. "in": "path",
  5137. "required": true
  5138. },
  5139. {
  5140. "type": "string",
  5141. "description": "name of the repo",
  5142. "name": "repo",
  5143. "in": "path",
  5144. "required": true
  5145. },
  5146. {
  5147. "type": "integer",
  5148. "format": "int64",
  5149. "description": "index of the issue to stop the stopwatch on",
  5150. "name": "index",
  5151. "in": "path",
  5152. "required": true
  5153. }
  5154. ],
  5155. "responses": {
  5156. "201": {
  5157. "$ref": "#/responses/empty"
  5158. },
  5159. "403": {
  5160. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5161. },
  5162. "404": {
  5163. "$ref": "#/responses/notFound"
  5164. },
  5165. "409": {
  5166. "description": "Cannot stop a non existent stopwatch"
  5167. }
  5168. }
  5169. }
  5170. },
  5171. "/repos/{owner}/{repo}/issues/{index}/subscriptions": {
  5172. "get": {
  5173. "consumes": [
  5174. "application/json"
  5175. ],
  5176. "produces": [
  5177. "application/json"
  5178. ],
  5179. "tags": [
  5180. "issue"
  5181. ],
  5182. "summary": "Get users who subscribed on an issue.",
  5183. "operationId": "issueSubscriptions",
  5184. "parameters": [
  5185. {
  5186. "type": "string",
  5187. "description": "owner of the repo",
  5188. "name": "owner",
  5189. "in": "path",
  5190. "required": true
  5191. },
  5192. {
  5193. "type": "string",
  5194. "description": "name of the repo",
  5195. "name": "repo",
  5196. "in": "path",
  5197. "required": true
  5198. },
  5199. {
  5200. "type": "integer",
  5201. "format": "int64",
  5202. "description": "index of the issue",
  5203. "name": "index",
  5204. "in": "path",
  5205. "required": true
  5206. },
  5207. {
  5208. "type": "integer",
  5209. "description": "page number of results to return (1-based)",
  5210. "name": "page",
  5211. "in": "query"
  5212. },
  5213. {
  5214. "type": "integer",
  5215. "description": "page size of results, maximum page size is 50",
  5216. "name": "limit",
  5217. "in": "query"
  5218. }
  5219. ],
  5220. "responses": {
  5221. "200": {
  5222. "$ref": "#/responses/UserList"
  5223. },
  5224. "404": {
  5225. "$ref": "#/responses/notFound"
  5226. }
  5227. }
  5228. }
  5229. },
  5230. "/repos/{owner}/{repo}/issues/{index}/subscriptions/check": {
  5231. "get": {
  5232. "consumes": [
  5233. "application/json"
  5234. ],
  5235. "produces": [
  5236. "application/json"
  5237. ],
  5238. "tags": [
  5239. "issue"
  5240. ],
  5241. "summary": "Check if user is subscribed to an issue",
  5242. "operationId": "issueCheckSubscription",
  5243. "parameters": [
  5244. {
  5245. "type": "string",
  5246. "description": "owner of the repo",
  5247. "name": "owner",
  5248. "in": "path",
  5249. "required": true
  5250. },
  5251. {
  5252. "type": "string",
  5253. "description": "name of the repo",
  5254. "name": "repo",
  5255. "in": "path",
  5256. "required": true
  5257. },
  5258. {
  5259. "type": "integer",
  5260. "format": "int64",
  5261. "description": "index of the issue",
  5262. "name": "index",
  5263. "in": "path",
  5264. "required": true
  5265. }
  5266. ],
  5267. "responses": {
  5268. "200": {
  5269. "$ref": "#/responses/WatchInfo"
  5270. },
  5271. "404": {
  5272. "$ref": "#/responses/notFound"
  5273. }
  5274. }
  5275. }
  5276. },
  5277. "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}": {
  5278. "put": {
  5279. "consumes": [
  5280. "application/json"
  5281. ],
  5282. "produces": [
  5283. "application/json"
  5284. ],
  5285. "tags": [
  5286. "issue"
  5287. ],
  5288. "summary": "Subscribe user to issue",
  5289. "operationId": "issueAddSubscription",
  5290. "parameters": [
  5291. {
  5292. "type": "string",
  5293. "description": "owner of the repo",
  5294. "name": "owner",
  5295. "in": "path",
  5296. "required": true
  5297. },
  5298. {
  5299. "type": "string",
  5300. "description": "name of the repo",
  5301. "name": "repo",
  5302. "in": "path",
  5303. "required": true
  5304. },
  5305. {
  5306. "type": "integer",
  5307. "format": "int64",
  5308. "description": "index of the issue",
  5309. "name": "index",
  5310. "in": "path",
  5311. "required": true
  5312. },
  5313. {
  5314. "type": "string",
  5315. "description": "user to subscribe",
  5316. "name": "user",
  5317. "in": "path",
  5318. "required": true
  5319. }
  5320. ],
  5321. "responses": {
  5322. "200": {
  5323. "description": "Already subscribed"
  5324. },
  5325. "201": {
  5326. "description": "Successfully Subscribed"
  5327. },
  5328. "304": {
  5329. "description": "User can only subscribe itself if he is no admin"
  5330. },
  5331. "404": {
  5332. "$ref": "#/responses/notFound"
  5333. }
  5334. }
  5335. },
  5336. "delete": {
  5337. "consumes": [
  5338. "application/json"
  5339. ],
  5340. "produces": [
  5341. "application/json"
  5342. ],
  5343. "tags": [
  5344. "issue"
  5345. ],
  5346. "summary": "Unsubscribe user from issue",
  5347. "operationId": "issueDeleteSubscription",
  5348. "parameters": [
  5349. {
  5350. "type": "string",
  5351. "description": "owner of the repo",
  5352. "name": "owner",
  5353. "in": "path",
  5354. "required": true
  5355. },
  5356. {
  5357. "type": "string",
  5358. "description": "name of the repo",
  5359. "name": "repo",
  5360. "in": "path",
  5361. "required": true
  5362. },
  5363. {
  5364. "type": "integer",
  5365. "format": "int64",
  5366. "description": "index of the issue",
  5367. "name": "index",
  5368. "in": "path",
  5369. "required": true
  5370. },
  5371. {
  5372. "type": "string",
  5373. "description": "user witch unsubscribe",
  5374. "name": "user",
  5375. "in": "path",
  5376. "required": true
  5377. }
  5378. ],
  5379. "responses": {
  5380. "200": {
  5381. "description": "Already unsubscribed"
  5382. },
  5383. "201": {
  5384. "description": "Successfully Unsubscribed"
  5385. },
  5386. "304": {
  5387. "description": "User can only subscribe itself if he is no admin"
  5388. },
  5389. "404": {
  5390. "$ref": "#/responses/notFound"
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "/repos/{owner}/{repo}/issues/{index}/times": {
  5396. "get": {
  5397. "produces": [
  5398. "application/json"
  5399. ],
  5400. "tags": [
  5401. "issue"
  5402. ],
  5403. "summary": "List an issue's tracked times",
  5404. "operationId": "issueTrackedTimes",
  5405. "parameters": [
  5406. {
  5407. "type": "string",
  5408. "description": "owner of the repo",
  5409. "name": "owner",
  5410. "in": "path",
  5411. "required": true
  5412. },
  5413. {
  5414. "type": "string",
  5415. "description": "name of the repo",
  5416. "name": "repo",
  5417. "in": "path",
  5418. "required": true
  5419. },
  5420. {
  5421. "type": "integer",
  5422. "format": "int64",
  5423. "description": "index of the issue",
  5424. "name": "index",
  5425. "in": "path",
  5426. "required": true
  5427. },
  5428. {
  5429. "type": "string",
  5430. "format": "date-time",
  5431. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  5432. "name": "since",
  5433. "in": "query"
  5434. },
  5435. {
  5436. "type": "string",
  5437. "format": "date-time",
  5438. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  5439. "name": "before",
  5440. "in": "query"
  5441. },
  5442. {
  5443. "type": "integer",
  5444. "description": "page number of results to return (1-based)",
  5445. "name": "page",
  5446. "in": "query"
  5447. },
  5448. {
  5449. "type": "integer",
  5450. "description": "page size of results, maximum page size is 50",
  5451. "name": "limit",
  5452. "in": "query"
  5453. }
  5454. ],
  5455. "responses": {
  5456. "200": {
  5457. "$ref": "#/responses/TrackedTimeList"
  5458. },
  5459. "404": {
  5460. "$ref": "#/responses/notFound"
  5461. }
  5462. }
  5463. },
  5464. "post": {
  5465. "consumes": [
  5466. "application/json"
  5467. ],
  5468. "produces": [
  5469. "application/json"
  5470. ],
  5471. "tags": [
  5472. "issue"
  5473. ],
  5474. "summary": "Add tracked time to a issue",
  5475. "operationId": "issueAddTime",
  5476. "parameters": [
  5477. {
  5478. "type": "string",
  5479. "description": "owner of the repo",
  5480. "name": "owner",
  5481. "in": "path",
  5482. "required": true
  5483. },
  5484. {
  5485. "type": "string",
  5486. "description": "name of the repo",
  5487. "name": "repo",
  5488. "in": "path",
  5489. "required": true
  5490. },
  5491. {
  5492. "type": "integer",
  5493. "format": "int64",
  5494. "description": "index of the issue",
  5495. "name": "index",
  5496. "in": "path",
  5497. "required": true
  5498. },
  5499. {
  5500. "name": "body",
  5501. "in": "body",
  5502. "schema": {
  5503. "$ref": "#/definitions/AddTimeOption"
  5504. }
  5505. }
  5506. ],
  5507. "responses": {
  5508. "200": {
  5509. "$ref": "#/responses/TrackedTime"
  5510. },
  5511. "400": {
  5512. "$ref": "#/responses/error"
  5513. },
  5514. "403": {
  5515. "$ref": "#/responses/forbidden"
  5516. }
  5517. }
  5518. },
  5519. "delete": {
  5520. "consumes": [
  5521. "application/json"
  5522. ],
  5523. "produces": [
  5524. "application/json"
  5525. ],
  5526. "tags": [
  5527. "issue"
  5528. ],
  5529. "summary": "Reset a tracked time of an issue",
  5530. "operationId": "issueResetTime",
  5531. "parameters": [
  5532. {
  5533. "type": "string",
  5534. "description": "owner of the repo",
  5535. "name": "owner",
  5536. "in": "path",
  5537. "required": true
  5538. },
  5539. {
  5540. "type": "string",
  5541. "description": "name of the repo",
  5542. "name": "repo",
  5543. "in": "path",
  5544. "required": true
  5545. },
  5546. {
  5547. "type": "integer",
  5548. "format": "int64",
  5549. "description": "index of the issue to add tracked time to",
  5550. "name": "index",
  5551. "in": "path",
  5552. "required": true
  5553. }
  5554. ],
  5555. "responses": {
  5556. "204": {
  5557. "$ref": "#/responses/empty"
  5558. },
  5559. "400": {
  5560. "$ref": "#/responses/error"
  5561. },
  5562. "403": {
  5563. "$ref": "#/responses/forbidden"
  5564. }
  5565. }
  5566. }
  5567. },
  5568. "/repos/{owner}/{repo}/issues/{index}/times/{id}": {
  5569. "delete": {
  5570. "consumes": [
  5571. "application/json"
  5572. ],
  5573. "produces": [
  5574. "application/json"
  5575. ],
  5576. "tags": [
  5577. "issue"
  5578. ],
  5579. "summary": "Delete specific tracked time",
  5580. "operationId": "issueDeleteTime",
  5581. "parameters": [
  5582. {
  5583. "type": "string",
  5584. "description": "owner of the repo",
  5585. "name": "owner",
  5586. "in": "path",
  5587. "required": true
  5588. },
  5589. {
  5590. "type": "string",
  5591. "description": "name of the repo",
  5592. "name": "repo",
  5593. "in": "path",
  5594. "required": true
  5595. },
  5596. {
  5597. "type": "integer",
  5598. "format": "int64",
  5599. "description": "index of the issue",
  5600. "name": "index",
  5601. "in": "path",
  5602. "required": true
  5603. },
  5604. {
  5605. "type": "integer",
  5606. "format": "int64",
  5607. "description": "id of time to delete",
  5608. "name": "id",
  5609. "in": "path",
  5610. "required": true
  5611. }
  5612. ],
  5613. "responses": {
  5614. "204": {
  5615. "$ref": "#/responses/empty"
  5616. },
  5617. "400": {
  5618. "$ref": "#/responses/error"
  5619. },
  5620. "403": {
  5621. "$ref": "#/responses/forbidden"
  5622. }
  5623. }
  5624. }
  5625. },
  5626. "/repos/{owner}/{repo}/keys": {
  5627. "get": {
  5628. "produces": [
  5629. "application/json"
  5630. ],
  5631. "tags": [
  5632. "repository"
  5633. ],
  5634. "summary": "List a repository's keys",
  5635. "operationId": "repoListKeys",
  5636. "parameters": [
  5637. {
  5638. "type": "string",
  5639. "description": "owner of the repo",
  5640. "name": "owner",
  5641. "in": "path",
  5642. "required": true
  5643. },
  5644. {
  5645. "type": "string",
  5646. "description": "name of the repo",
  5647. "name": "repo",
  5648. "in": "path",
  5649. "required": true
  5650. },
  5651. {
  5652. "type": "integer",
  5653. "description": "the key_id to search for",
  5654. "name": "key_id",
  5655. "in": "query"
  5656. },
  5657. {
  5658. "type": "string",
  5659. "description": "fingerprint of the key",
  5660. "name": "fingerprint",
  5661. "in": "query"
  5662. },
  5663. {
  5664. "type": "integer",
  5665. "description": "page number of results to return (1-based)",
  5666. "name": "page",
  5667. "in": "query"
  5668. },
  5669. {
  5670. "type": "integer",
  5671. "description": "page size of results, maximum page size is 50",
  5672. "name": "limit",
  5673. "in": "query"
  5674. }
  5675. ],
  5676. "responses": {
  5677. "200": {
  5678. "$ref": "#/responses/DeployKeyList"
  5679. }
  5680. }
  5681. },
  5682. "post": {
  5683. "consumes": [
  5684. "application/json"
  5685. ],
  5686. "produces": [
  5687. "application/json"
  5688. ],
  5689. "tags": [
  5690. "repository"
  5691. ],
  5692. "summary": "Add a key to a repository",
  5693. "operationId": "repoCreateKey",
  5694. "parameters": [
  5695. {
  5696. "type": "string",
  5697. "description": "owner of the repo",
  5698. "name": "owner",
  5699. "in": "path",
  5700. "required": true
  5701. },
  5702. {
  5703. "type": "string",
  5704. "description": "name of the repo",
  5705. "name": "repo",
  5706. "in": "path",
  5707. "required": true
  5708. },
  5709. {
  5710. "name": "body",
  5711. "in": "body",
  5712. "schema": {
  5713. "$ref": "#/definitions/CreateKeyOption"
  5714. }
  5715. }
  5716. ],
  5717. "responses": {
  5718. "201": {
  5719. "$ref": "#/responses/DeployKey"
  5720. },
  5721. "422": {
  5722. "$ref": "#/responses/validationError"
  5723. }
  5724. }
  5725. }
  5726. },
  5727. "/repos/{owner}/{repo}/keys/{id}": {
  5728. "get": {
  5729. "produces": [
  5730. "application/json"
  5731. ],
  5732. "tags": [
  5733. "repository"
  5734. ],
  5735. "summary": "Get a repository's key by id",
  5736. "operationId": "repoGetKey",
  5737. "parameters": [
  5738. {
  5739. "type": "string",
  5740. "description": "owner of the repo",
  5741. "name": "owner",
  5742. "in": "path",
  5743. "required": true
  5744. },
  5745. {
  5746. "type": "string",
  5747. "description": "name of the repo",
  5748. "name": "repo",
  5749. "in": "path",
  5750. "required": true
  5751. },
  5752. {
  5753. "type": "integer",
  5754. "format": "int64",
  5755. "description": "id of the key to get",
  5756. "name": "id",
  5757. "in": "path",
  5758. "required": true
  5759. }
  5760. ],
  5761. "responses": {
  5762. "200": {
  5763. "$ref": "#/responses/DeployKey"
  5764. }
  5765. }
  5766. },
  5767. "delete": {
  5768. "tags": [
  5769. "repository"
  5770. ],
  5771. "summary": "Delete a key from a repository",
  5772. "operationId": "repoDeleteKey",
  5773. "parameters": [
  5774. {
  5775. "type": "string",
  5776. "description": "owner of the repo",
  5777. "name": "owner",
  5778. "in": "path",
  5779. "required": true
  5780. },
  5781. {
  5782. "type": "string",
  5783. "description": "name of the repo",
  5784. "name": "repo",
  5785. "in": "path",
  5786. "required": true
  5787. },
  5788. {
  5789. "type": "integer",
  5790. "format": "int64",
  5791. "description": "id of the key to delete",
  5792. "name": "id",
  5793. "in": "path",
  5794. "required": true
  5795. }
  5796. ],
  5797. "responses": {
  5798. "204": {
  5799. "$ref": "#/responses/empty"
  5800. },
  5801. "403": {
  5802. "$ref": "#/responses/forbidden"
  5803. }
  5804. }
  5805. }
  5806. },
  5807. "/repos/{owner}/{repo}/labels": {
  5808. "get": {
  5809. "produces": [
  5810. "application/json"
  5811. ],
  5812. "tags": [
  5813. "issue"
  5814. ],
  5815. "summary": "Get all of a repository's labels",
  5816. "operationId": "issueListLabels",
  5817. "parameters": [
  5818. {
  5819. "type": "string",
  5820. "description": "owner of the repo",
  5821. "name": "owner",
  5822. "in": "path",
  5823. "required": true
  5824. },
  5825. {
  5826. "type": "string",
  5827. "description": "name of the repo",
  5828. "name": "repo",
  5829. "in": "path",
  5830. "required": true
  5831. },
  5832. {
  5833. "type": "integer",
  5834. "description": "page number of results to return (1-based)",
  5835. "name": "page",
  5836. "in": "query"
  5837. },
  5838. {
  5839. "type": "integer",
  5840. "description": "page size of results, maximum page size is 50",
  5841. "name": "limit",
  5842. "in": "query"
  5843. }
  5844. ],
  5845. "responses": {
  5846. "200": {
  5847. "$ref": "#/responses/LabelList"
  5848. }
  5849. }
  5850. },
  5851. "post": {
  5852. "consumes": [
  5853. "application/json"
  5854. ],
  5855. "produces": [
  5856. "application/json"
  5857. ],
  5858. "tags": [
  5859. "issue"
  5860. ],
  5861. "summary": "Create a label",
  5862. "operationId": "issueCreateLabel",
  5863. "parameters": [
  5864. {
  5865. "type": "string",
  5866. "description": "owner of the repo",
  5867. "name": "owner",
  5868. "in": "path",
  5869. "required": true
  5870. },
  5871. {
  5872. "type": "string",
  5873. "description": "name of the repo",
  5874. "name": "repo",
  5875. "in": "path",
  5876. "required": true
  5877. },
  5878. {
  5879. "name": "body",
  5880. "in": "body",
  5881. "schema": {
  5882. "$ref": "#/definitions/CreateLabelOption"
  5883. }
  5884. }
  5885. ],
  5886. "responses": {
  5887. "201": {
  5888. "$ref": "#/responses/Label"
  5889. },
  5890. "422": {
  5891. "$ref": "#/responses/validationError"
  5892. }
  5893. }
  5894. }
  5895. },
  5896. "/repos/{owner}/{repo}/labels/{id}": {
  5897. "get": {
  5898. "produces": [
  5899. "application/json"
  5900. ],
  5901. "tags": [
  5902. "issue"
  5903. ],
  5904. "summary": "Get a single label",
  5905. "operationId": "issueGetLabel",
  5906. "parameters": [
  5907. {
  5908. "type": "string",
  5909. "description": "owner of the repo",
  5910. "name": "owner",
  5911. "in": "path",
  5912. "required": true
  5913. },
  5914. {
  5915. "type": "string",
  5916. "description": "name of the repo",
  5917. "name": "repo",
  5918. "in": "path",
  5919. "required": true
  5920. },
  5921. {
  5922. "type": "integer",
  5923. "format": "int64",
  5924. "description": "id of the label to get",
  5925. "name": "id",
  5926. "in": "path",
  5927. "required": true
  5928. }
  5929. ],
  5930. "responses": {
  5931. "200": {
  5932. "$ref": "#/responses/Label"
  5933. }
  5934. }
  5935. },
  5936. "delete": {
  5937. "tags": [
  5938. "issue"
  5939. ],
  5940. "summary": "Delete a label",
  5941. "operationId": "issueDeleteLabel",
  5942. "parameters": [
  5943. {
  5944. "type": "string",
  5945. "description": "owner of the repo",
  5946. "name": "owner",
  5947. "in": "path",
  5948. "required": true
  5949. },
  5950. {
  5951. "type": "string",
  5952. "description": "name of the repo",
  5953. "name": "repo",
  5954. "in": "path",
  5955. "required": true
  5956. },
  5957. {
  5958. "type": "integer",
  5959. "format": "int64",
  5960. "description": "id of the label to delete",
  5961. "name": "id",
  5962. "in": "path",
  5963. "required": true
  5964. }
  5965. ],
  5966. "responses": {
  5967. "204": {
  5968. "$ref": "#/responses/empty"
  5969. }
  5970. }
  5971. },
  5972. "patch": {
  5973. "consumes": [
  5974. "application/json"
  5975. ],
  5976. "produces": [
  5977. "application/json"
  5978. ],
  5979. "tags": [
  5980. "issue"
  5981. ],
  5982. "summary": "Update a label",
  5983. "operationId": "issueEditLabel",
  5984. "parameters": [
  5985. {
  5986. "type": "string",
  5987. "description": "owner of the repo",
  5988. "name": "owner",
  5989. "in": "path",
  5990. "required": true
  5991. },
  5992. {
  5993. "type": "string",
  5994. "description": "name of the repo",
  5995. "name": "repo",
  5996. "in": "path",
  5997. "required": true
  5998. },
  5999. {
  6000. "type": "integer",
  6001. "format": "int64",
  6002. "description": "id of the label to edit",
  6003. "name": "id",
  6004. "in": "path",
  6005. "required": true
  6006. },
  6007. {
  6008. "name": "body",
  6009. "in": "body",
  6010. "schema": {
  6011. "$ref": "#/definitions/EditLabelOption"
  6012. }
  6013. }
  6014. ],
  6015. "responses": {
  6016. "200": {
  6017. "$ref": "#/responses/Label"
  6018. },
  6019. "422": {
  6020. "$ref": "#/responses/validationError"
  6021. }
  6022. }
  6023. }
  6024. },
  6025. "/repos/{owner}/{repo}/milestones": {
  6026. "get": {
  6027. "produces": [
  6028. "application/json"
  6029. ],
  6030. "tags": [
  6031. "issue"
  6032. ],
  6033. "summary": "Get all of a repository's opened milestones",
  6034. "operationId": "issueGetMilestonesList",
  6035. "parameters": [
  6036. {
  6037. "type": "string",
  6038. "description": "owner of the repo",
  6039. "name": "owner",
  6040. "in": "path",
  6041. "required": true
  6042. },
  6043. {
  6044. "type": "string",
  6045. "description": "name of the repo",
  6046. "name": "repo",
  6047. "in": "path",
  6048. "required": true
  6049. },
  6050. {
  6051. "type": "string",
  6052. "description": "Milestone state, Recognised values are open, closed and all. Defaults to \"open\"",
  6053. "name": "state",
  6054. "in": "query"
  6055. },
  6056. {
  6057. "type": "integer",
  6058. "description": "page number of results to return (1-based)",
  6059. "name": "page",
  6060. "in": "query"
  6061. },
  6062. {
  6063. "type": "integer",
  6064. "description": "page size of results, maximum page size is 50",
  6065. "name": "limit",
  6066. "in": "query"
  6067. }
  6068. ],
  6069. "responses": {
  6070. "200": {
  6071. "$ref": "#/responses/MilestoneList"
  6072. }
  6073. }
  6074. },
  6075. "post": {
  6076. "consumes": [
  6077. "application/json"
  6078. ],
  6079. "produces": [
  6080. "application/json"
  6081. ],
  6082. "tags": [
  6083. "issue"
  6084. ],
  6085. "summary": "Create a milestone",
  6086. "operationId": "issueCreateMilestone",
  6087. "parameters": [
  6088. {
  6089. "type": "string",
  6090. "description": "owner of the repo",
  6091. "name": "owner",
  6092. "in": "path",
  6093. "required": true
  6094. },
  6095. {
  6096. "type": "string",
  6097. "description": "name of the repo",
  6098. "name": "repo",
  6099. "in": "path",
  6100. "required": true
  6101. },
  6102. {
  6103. "name": "body",
  6104. "in": "body",
  6105. "schema": {
  6106. "$ref": "#/definitions/CreateMilestoneOption"
  6107. }
  6108. }
  6109. ],
  6110. "responses": {
  6111. "201": {
  6112. "$ref": "#/responses/Milestone"
  6113. }
  6114. }
  6115. }
  6116. },
  6117. "/repos/{owner}/{repo}/milestones/{id}": {
  6118. "get": {
  6119. "produces": [
  6120. "application/json"
  6121. ],
  6122. "tags": [
  6123. "issue"
  6124. ],
  6125. "summary": "Get a milestone",
  6126. "operationId": "issueGetMilestone",
  6127. "parameters": [
  6128. {
  6129. "type": "string",
  6130. "description": "owner of the repo",
  6131. "name": "owner",
  6132. "in": "path",
  6133. "required": true
  6134. },
  6135. {
  6136. "type": "string",
  6137. "description": "name of the repo",
  6138. "name": "repo",
  6139. "in": "path",
  6140. "required": true
  6141. },
  6142. {
  6143. "type": "integer",
  6144. "format": "int64",
  6145. "description": "id of the milestone",
  6146. "name": "id",
  6147. "in": "path",
  6148. "required": true
  6149. }
  6150. ],
  6151. "responses": {
  6152. "200": {
  6153. "$ref": "#/responses/Milestone"
  6154. }
  6155. }
  6156. },
  6157. "delete": {
  6158. "tags": [
  6159. "issue"
  6160. ],
  6161. "summary": "Delete a milestone",
  6162. "operationId": "issueDeleteMilestone",
  6163. "parameters": [
  6164. {
  6165. "type": "string",
  6166. "description": "owner of the repo",
  6167. "name": "owner",
  6168. "in": "path",
  6169. "required": true
  6170. },
  6171. {
  6172. "type": "string",
  6173. "description": "name of the repo",
  6174. "name": "repo",
  6175. "in": "path",
  6176. "required": true
  6177. },
  6178. {
  6179. "type": "integer",
  6180. "format": "int64",
  6181. "description": "id of the milestone to delete",
  6182. "name": "id",
  6183. "in": "path",
  6184. "required": true
  6185. }
  6186. ],
  6187. "responses": {
  6188. "204": {
  6189. "$ref": "#/responses/empty"
  6190. }
  6191. }
  6192. },
  6193. "patch": {
  6194. "consumes": [
  6195. "application/json"
  6196. ],
  6197. "produces": [
  6198. "application/json"
  6199. ],
  6200. "tags": [
  6201. "issue"
  6202. ],
  6203. "summary": "Update a milestone",
  6204. "operationId": "issueEditMilestone",
  6205. "parameters": [
  6206. {
  6207. "type": "string",
  6208. "description": "owner of the repo",
  6209. "name": "owner",
  6210. "in": "path",
  6211. "required": true
  6212. },
  6213. {
  6214. "type": "string",
  6215. "description": "name of the repo",
  6216. "name": "repo",
  6217. "in": "path",
  6218. "required": true
  6219. },
  6220. {
  6221. "type": "integer",
  6222. "format": "int64",
  6223. "description": "id of the milestone",
  6224. "name": "id",
  6225. "in": "path",
  6226. "required": true
  6227. },
  6228. {
  6229. "name": "body",
  6230. "in": "body",
  6231. "schema": {
  6232. "$ref": "#/definitions/EditMilestoneOption"
  6233. }
  6234. }
  6235. ],
  6236. "responses": {
  6237. "200": {
  6238. "$ref": "#/responses/Milestone"
  6239. }
  6240. }
  6241. }
  6242. },
  6243. "/repos/{owner}/{repo}/mirror-sync": {
  6244. "post": {
  6245. "produces": [
  6246. "application/json"
  6247. ],
  6248. "tags": [
  6249. "repository"
  6250. ],
  6251. "summary": "Sync a mirrored repository",
  6252. "operationId": "repoMirrorSync",
  6253. "parameters": [
  6254. {
  6255. "type": "string",
  6256. "description": "owner of the repo to sync",
  6257. "name": "owner",
  6258. "in": "path",
  6259. "required": true
  6260. },
  6261. {
  6262. "type": "string",
  6263. "description": "name of the repo to sync",
  6264. "name": "repo",
  6265. "in": "path",
  6266. "required": true
  6267. }
  6268. ],
  6269. "responses": {
  6270. "200": {
  6271. "$ref": "#/responses/empty"
  6272. },
  6273. "403": {
  6274. "$ref": "#/responses/forbidden"
  6275. }
  6276. }
  6277. }
  6278. },
  6279. "/repos/{owner}/{repo}/notifications": {
  6280. "get": {
  6281. "consumes": [
  6282. "application/json"
  6283. ],
  6284. "produces": [
  6285. "application/json"
  6286. ],
  6287. "tags": [
  6288. "notification"
  6289. ],
  6290. "summary": "List users's notification threads on a specific repo",
  6291. "operationId": "notifyGetRepoList",
  6292. "parameters": [
  6293. {
  6294. "type": "string",
  6295. "description": "owner of the repo",
  6296. "name": "owner",
  6297. "in": "path",
  6298. "required": true
  6299. },
  6300. {
  6301. "type": "string",
  6302. "description": "name of the repo",
  6303. "name": "repo",
  6304. "in": "path",
  6305. "required": true
  6306. },
  6307. {
  6308. "type": "string",
  6309. "description": "If true, show notifications marked as read. Default value is false",
  6310. "name": "all",
  6311. "in": "query"
  6312. },
  6313. {
  6314. "type": "string",
  6315. "format": "date-time",
  6316. "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
  6317. "name": "since",
  6318. "in": "query"
  6319. },
  6320. {
  6321. "type": "string",
  6322. "format": "date-time",
  6323. "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
  6324. "name": "before",
  6325. "in": "query"
  6326. },
  6327. {
  6328. "type": "integer",
  6329. "description": "page number of results to return (1-based)",
  6330. "name": "page",
  6331. "in": "query"
  6332. },
  6333. {
  6334. "type": "integer",
  6335. "description": "page size of results, maximum page size is 50",
  6336. "name": "limit",
  6337. "in": "query"
  6338. }
  6339. ],
  6340. "responses": {
  6341. "200": {
  6342. "$ref": "#/responses/NotificationThreadList"
  6343. }
  6344. }
  6345. },
  6346. "put": {
  6347. "consumes": [
  6348. "application/json"
  6349. ],
  6350. "produces": [
  6351. "application/json"
  6352. ],
  6353. "tags": [
  6354. "notification"
  6355. ],
  6356. "summary": "Mark notification threads as read on a specific repo",
  6357. "operationId": "notifyReadRepoList",
  6358. "parameters": [
  6359. {
  6360. "type": "string",
  6361. "description": "owner of the repo",
  6362. "name": "owner",
  6363. "in": "path",
  6364. "required": true
  6365. },
  6366. {
  6367. "type": "string",
  6368. "description": "name of the repo",
  6369. "name": "repo",
  6370. "in": "path",
  6371. "required": true
  6372. },
  6373. {
  6374. "type": "string",
  6375. "format": "date-time",
  6376. "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
  6377. "name": "last_read_at",
  6378. "in": "query"
  6379. }
  6380. ],
  6381. "responses": {
  6382. "205": {
  6383. "$ref": "#/responses/empty"
  6384. }
  6385. }
  6386. }
  6387. },
  6388. "/repos/{owner}/{repo}/pulls": {
  6389. "get": {
  6390. "produces": [
  6391. "application/json"
  6392. ],
  6393. "tags": [
  6394. "repository"
  6395. ],
  6396. "summary": "List a repo's pull requests",
  6397. "operationId": "repoListPullRequests",
  6398. "parameters": [
  6399. {
  6400. "type": "string",
  6401. "description": "owner of the repo",
  6402. "name": "owner",
  6403. "in": "path",
  6404. "required": true
  6405. },
  6406. {
  6407. "type": "string",
  6408. "description": "name of the repo",
  6409. "name": "repo",
  6410. "in": "path",
  6411. "required": true
  6412. },
  6413. {
  6414. "enum": [
  6415. "closed",
  6416. "open",
  6417. "all"
  6418. ],
  6419. "type": "string",
  6420. "description": "State of pull request: open or closed (optional)",
  6421. "name": "state",
  6422. "in": "query"
  6423. },
  6424. {
  6425. "enum": [
  6426. "oldest",
  6427. "recentupdate",
  6428. "leastupdate",
  6429. "mostcomment",
  6430. "leastcomment",
  6431. "priority"
  6432. ],
  6433. "type": "string",
  6434. "description": "Type of sort",
  6435. "name": "sort",
  6436. "in": "query"
  6437. },
  6438. {
  6439. "type": "integer",
  6440. "format": "int64",
  6441. "description": "ID of the milestone",
  6442. "name": "milestone",
  6443. "in": "query"
  6444. },
  6445. {
  6446. "type": "array",
  6447. "items": {
  6448. "type": "integer",
  6449. "format": "int64"
  6450. },
  6451. "collectionFormat": "multi",
  6452. "description": "Label IDs",
  6453. "name": "labels",
  6454. "in": "query"
  6455. },
  6456. {
  6457. "type": "integer",
  6458. "description": "page number of results to return (1-based)",
  6459. "name": "page",
  6460. "in": "query"
  6461. },
  6462. {
  6463. "type": "integer",
  6464. "description": "page size of results, maximum page size is 50",
  6465. "name": "limit",
  6466. "in": "query"
  6467. }
  6468. ],
  6469. "responses": {
  6470. "200": {
  6471. "$ref": "#/responses/PullRequestList"
  6472. }
  6473. }
  6474. },
  6475. "post": {
  6476. "consumes": [
  6477. "application/json"
  6478. ],
  6479. "produces": [
  6480. "application/json"
  6481. ],
  6482. "tags": [
  6483. "repository"
  6484. ],
  6485. "summary": "Create a pull request",
  6486. "operationId": "repoCreatePullRequest",
  6487. "parameters": [
  6488. {
  6489. "type": "string",
  6490. "description": "owner of the repo",
  6491. "name": "owner",
  6492. "in": "path",
  6493. "required": true
  6494. },
  6495. {
  6496. "type": "string",
  6497. "description": "name of the repo",
  6498. "name": "repo",
  6499. "in": "path",
  6500. "required": true
  6501. },
  6502. {
  6503. "name": "body",
  6504. "in": "body",
  6505. "schema": {
  6506. "$ref": "#/definitions/CreatePullRequestOption"
  6507. }
  6508. }
  6509. ],
  6510. "responses": {
  6511. "201": {
  6512. "$ref": "#/responses/PullRequest"
  6513. },
  6514. "409": {
  6515. "$ref": "#/responses/error"
  6516. },
  6517. "422": {
  6518. "$ref": "#/responses/validationError"
  6519. }
  6520. }
  6521. }
  6522. },
  6523. "/repos/{owner}/{repo}/pulls/{index}": {
  6524. "get": {
  6525. "produces": [
  6526. "application/json"
  6527. ],
  6528. "tags": [
  6529. "repository"
  6530. ],
  6531. "summary": "Get a pull request",
  6532. "operationId": "repoGetPullRequest",
  6533. "parameters": [
  6534. {
  6535. "type": "string",
  6536. "description": "owner of the repo",
  6537. "name": "owner",
  6538. "in": "path",
  6539. "required": true
  6540. },
  6541. {
  6542. "type": "string",
  6543. "description": "name of the repo",
  6544. "name": "repo",
  6545. "in": "path",
  6546. "required": true
  6547. },
  6548. {
  6549. "type": "integer",
  6550. "format": "int64",
  6551. "description": "index of the pull request to get",
  6552. "name": "index",
  6553. "in": "path",
  6554. "required": true
  6555. }
  6556. ],
  6557. "responses": {
  6558. "200": {
  6559. "$ref": "#/responses/PullRequest"
  6560. },
  6561. "404": {
  6562. "$ref": "#/responses/notFound"
  6563. }
  6564. }
  6565. },
  6566. "patch": {
  6567. "consumes": [
  6568. "application/json"
  6569. ],
  6570. "produces": [
  6571. "application/json"
  6572. ],
  6573. "tags": [
  6574. "repository"
  6575. ],
  6576. "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.",
  6577. "operationId": "repoEditPullRequest",
  6578. "parameters": [
  6579. {
  6580. "type": "string",
  6581. "description": "owner of the repo",
  6582. "name": "owner",
  6583. "in": "path",
  6584. "required": true
  6585. },
  6586. {
  6587. "type": "string",
  6588. "description": "name of the repo",
  6589. "name": "repo",
  6590. "in": "path",
  6591. "required": true
  6592. },
  6593. {
  6594. "type": "integer",
  6595. "format": "int64",
  6596. "description": "index of the pull request to edit",
  6597. "name": "index",
  6598. "in": "path",
  6599. "required": true
  6600. },
  6601. {
  6602. "name": "body",
  6603. "in": "body",
  6604. "schema": {
  6605. "$ref": "#/definitions/EditPullRequestOption"
  6606. }
  6607. }
  6608. ],
  6609. "responses": {
  6610. "201": {
  6611. "$ref": "#/responses/PullRequest"
  6612. },
  6613. "403": {
  6614. "$ref": "#/responses/forbidden"
  6615. },
  6616. "412": {
  6617. "$ref": "#/responses/error"
  6618. },
  6619. "422": {
  6620. "$ref": "#/responses/validationError"
  6621. }
  6622. }
  6623. }
  6624. },
  6625. "/repos/{owner}/{repo}/pulls/{index}/merge": {
  6626. "get": {
  6627. "produces": [
  6628. "application/json"
  6629. ],
  6630. "tags": [
  6631. "repository"
  6632. ],
  6633. "summary": "Check if a pull request has been merged",
  6634. "operationId": "repoPullRequestIsMerged",
  6635. "parameters": [
  6636. {
  6637. "type": "string",
  6638. "description": "owner of the repo",
  6639. "name": "owner",
  6640. "in": "path",
  6641. "required": true
  6642. },
  6643. {
  6644. "type": "string",
  6645. "description": "name of the repo",
  6646. "name": "repo",
  6647. "in": "path",
  6648. "required": true
  6649. },
  6650. {
  6651. "type": "integer",
  6652. "format": "int64",
  6653. "description": "index of the pull request",
  6654. "name": "index",
  6655. "in": "path",
  6656. "required": true
  6657. }
  6658. ],
  6659. "responses": {
  6660. "204": {
  6661. "description": "pull request has been merged"
  6662. },
  6663. "404": {
  6664. "description": "pull request has not been merged"
  6665. }
  6666. }
  6667. },
  6668. "post": {
  6669. "produces": [
  6670. "application/json"
  6671. ],
  6672. "tags": [
  6673. "repository"
  6674. ],
  6675. "summary": "Merge a pull request",
  6676. "operationId": "repoMergePullRequest",
  6677. "parameters": [
  6678. {
  6679. "type": "string",
  6680. "description": "owner of the repo",
  6681. "name": "owner",
  6682. "in": "path",
  6683. "required": true
  6684. },
  6685. {
  6686. "type": "string",
  6687. "description": "name of the repo",
  6688. "name": "repo",
  6689. "in": "path",
  6690. "required": true
  6691. },
  6692. {
  6693. "type": "integer",
  6694. "format": "int64",
  6695. "description": "index of the pull request to merge",
  6696. "name": "index",
  6697. "in": "path",
  6698. "required": true
  6699. },
  6700. {
  6701. "name": "body",
  6702. "in": "body",
  6703. "schema": {
  6704. "$ref": "#/definitions/MergePullRequestOption"
  6705. }
  6706. }
  6707. ],
  6708. "responses": {
  6709. "200": {
  6710. "$ref": "#/responses/empty"
  6711. },
  6712. "405": {
  6713. "$ref": "#/responses/empty"
  6714. },
  6715. "409": {
  6716. "$ref": "#/responses/error"
  6717. }
  6718. }
  6719. }
  6720. },
  6721. "/repos/{owner}/{repo}/pulls/{index}/reviews": {
  6722. "get": {
  6723. "produces": [
  6724. "application/json"
  6725. ],
  6726. "tags": [
  6727. "repository"
  6728. ],
  6729. "summary": "List all reviews for a pull request",
  6730. "operationId": "repoListPullReviews",
  6731. "parameters": [
  6732. {
  6733. "type": "string",
  6734. "description": "owner of the repo",
  6735. "name": "owner",
  6736. "in": "path",
  6737. "required": true
  6738. },
  6739. {
  6740. "type": "string",
  6741. "description": "name of the repo",
  6742. "name": "repo",
  6743. "in": "path",
  6744. "required": true
  6745. },
  6746. {
  6747. "type": "integer",
  6748. "format": "int64",
  6749. "description": "index of the pull request",
  6750. "name": "index",
  6751. "in": "path",
  6752. "required": true
  6753. },
  6754. {
  6755. "type": "integer",
  6756. "description": "page number of results to return (1-based)",
  6757. "name": "page",
  6758. "in": "query"
  6759. },
  6760. {
  6761. "type": "integer",
  6762. "description": "page size of results, maximum page size is 50",
  6763. "name": "limit",
  6764. "in": "query"
  6765. }
  6766. ],
  6767. "responses": {
  6768. "200": {
  6769. "$ref": "#/responses/PullReviewList"
  6770. },
  6771. "404": {
  6772. "$ref": "#/responses/notFound"
  6773. }
  6774. }
  6775. },
  6776. "post": {
  6777. "produces": [
  6778. "application/json"
  6779. ],
  6780. "tags": [
  6781. "repository"
  6782. ],
  6783. "summary": "Create a review to an pull request",
  6784. "operationId": "repoCreatePullReview",
  6785. "parameters": [
  6786. {
  6787. "type": "string",
  6788. "description": "owner of the repo",
  6789. "name": "owner",
  6790. "in": "path",
  6791. "required": true
  6792. },
  6793. {
  6794. "type": "string",
  6795. "description": "name of the repo",
  6796. "name": "repo",
  6797. "in": "path",
  6798. "required": true
  6799. },
  6800. {
  6801. "type": "integer",
  6802. "format": "int64",
  6803. "description": "index of the pull request",
  6804. "name": "index",
  6805. "in": "path",
  6806. "required": true
  6807. },
  6808. {
  6809. "name": "body",
  6810. "in": "body",
  6811. "required": true,
  6812. "schema": {
  6813. "$ref": "#/definitions/CreatePullReviewOptions"
  6814. }
  6815. }
  6816. ],
  6817. "responses": {
  6818. "200": {
  6819. "$ref": "#/responses/PullReview"
  6820. },
  6821. "404": {
  6822. "$ref": "#/responses/notFound"
  6823. },
  6824. "422": {
  6825. "$ref": "#/responses/validationError"
  6826. }
  6827. }
  6828. }
  6829. },
  6830. "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}": {
  6831. "get": {
  6832. "produces": [
  6833. "application/json"
  6834. ],
  6835. "tags": [
  6836. "repository"
  6837. ],
  6838. "summary": "Get a specific review for a pull request",
  6839. "operationId": "repoGetPullReview",
  6840. "parameters": [
  6841. {
  6842. "type": "string",
  6843. "description": "owner of the repo",
  6844. "name": "owner",
  6845. "in": "path",
  6846. "required": true
  6847. },
  6848. {
  6849. "type": "string",
  6850. "description": "name of the repo",
  6851. "name": "repo",
  6852. "in": "path",
  6853. "required": true
  6854. },
  6855. {
  6856. "type": "integer",
  6857. "format": "int64",
  6858. "description": "index of the pull request",
  6859. "name": "index",
  6860. "in": "path",
  6861. "required": true
  6862. },
  6863. {
  6864. "type": "integer",
  6865. "format": "int64",
  6866. "description": "id of the review",
  6867. "name": "id",
  6868. "in": "path",
  6869. "required": true
  6870. }
  6871. ],
  6872. "responses": {
  6873. "200": {
  6874. "$ref": "#/responses/PullReview"
  6875. },
  6876. "404": {
  6877. "$ref": "#/responses/notFound"
  6878. }
  6879. }
  6880. },
  6881. "post": {
  6882. "produces": [
  6883. "application/json"
  6884. ],
  6885. "tags": [
  6886. "repository"
  6887. ],
  6888. "summary": "Submit a pending review to an pull request",
  6889. "operationId": "repoSubmitPullReview",
  6890. "parameters": [
  6891. {
  6892. "type": "string",
  6893. "description": "owner of the repo",
  6894. "name": "owner",
  6895. "in": "path",
  6896. "required": true
  6897. },
  6898. {
  6899. "type": "string",
  6900. "description": "name of the repo",
  6901. "name": "repo",
  6902. "in": "path",
  6903. "required": true
  6904. },
  6905. {
  6906. "type": "integer",
  6907. "format": "int64",
  6908. "description": "index of the pull request",
  6909. "name": "index",
  6910. "in": "path",
  6911. "required": true
  6912. },
  6913. {
  6914. "type": "integer",
  6915. "format": "int64",
  6916. "description": "id of the review",
  6917. "name": "id",
  6918. "in": "path",
  6919. "required": true
  6920. },
  6921. {
  6922. "name": "body",
  6923. "in": "body",
  6924. "required": true,
  6925. "schema": {
  6926. "$ref": "#/definitions/SubmitPullReviewOptions"
  6927. }
  6928. }
  6929. ],
  6930. "responses": {
  6931. "200": {
  6932. "$ref": "#/responses/PullReview"
  6933. },
  6934. "404": {
  6935. "$ref": "#/responses/notFound"
  6936. },
  6937. "422": {
  6938. "$ref": "#/responses/validationError"
  6939. }
  6940. }
  6941. },
  6942. "delete": {
  6943. "produces": [
  6944. "application/json"
  6945. ],
  6946. "tags": [
  6947. "repository"
  6948. ],
  6949. "summary": "Delete a specific review from a pull request",
  6950. "operationId": "repoDeletePullReview",
  6951. "parameters": [
  6952. {
  6953. "type": "string",
  6954. "description": "owner of the repo",
  6955. "name": "owner",
  6956. "in": "path",
  6957. "required": true
  6958. },
  6959. {
  6960. "type": "string",
  6961. "description": "name of the repo",
  6962. "name": "repo",
  6963. "in": "path",
  6964. "required": true
  6965. },
  6966. {
  6967. "type": "integer",
  6968. "format": "int64",
  6969. "description": "index of the pull request",
  6970. "name": "index",
  6971. "in": "path",
  6972. "required": true
  6973. },
  6974. {
  6975. "type": "integer",
  6976. "format": "int64",
  6977. "description": "id of the review",
  6978. "name": "id",
  6979. "in": "path",
  6980. "required": true
  6981. }
  6982. ],
  6983. "responses": {
  6984. "204": {
  6985. "$ref": "#/responses/empty"
  6986. },
  6987. "403": {
  6988. "$ref": "#/responses/forbidden"
  6989. },
  6990. "404": {
  6991. "$ref": "#/responses/notFound"
  6992. }
  6993. }
  6994. }
  6995. },
  6996. "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments": {
  6997. "get": {
  6998. "produces": [
  6999. "application/json"
  7000. ],
  7001. "tags": [
  7002. "repository"
  7003. ],
  7004. "summary": "Get a specific review for a pull request",
  7005. "operationId": "repoGetPullReviewComments",
  7006. "parameters": [
  7007. {
  7008. "type": "string",
  7009. "description": "owner of the repo",
  7010. "name": "owner",
  7011. "in": "path",
  7012. "required": true
  7013. },
  7014. {
  7015. "type": "string",
  7016. "description": "name of the repo",
  7017. "name": "repo",
  7018. "in": "path",
  7019. "required": true
  7020. },
  7021. {
  7022. "type": "integer",
  7023. "format": "int64",
  7024. "description": "index of the pull request",
  7025. "name": "index",
  7026. "in": "path",
  7027. "required": true
  7028. },
  7029. {
  7030. "type": "integer",
  7031. "format": "int64",
  7032. "description": "id of the review",
  7033. "name": "id",
  7034. "in": "path",
  7035. "required": true
  7036. }
  7037. ],
  7038. "responses": {
  7039. "200": {
  7040. "$ref": "#/responses/PullReviewCommentList"
  7041. },
  7042. "404": {
  7043. "$ref": "#/responses/notFound"
  7044. }
  7045. }
  7046. }
  7047. },
  7048. "/repos/{owner}/{repo}/raw/{filepath}": {
  7049. "get": {
  7050. "produces": [
  7051. "application/json"
  7052. ],
  7053. "tags": [
  7054. "repository"
  7055. ],
  7056. "summary": "Get a file from a repository",
  7057. "operationId": "repoGetRawFile",
  7058. "parameters": [
  7059. {
  7060. "type": "string",
  7061. "description": "owner of the repo",
  7062. "name": "owner",
  7063. "in": "path",
  7064. "required": true
  7065. },
  7066. {
  7067. "type": "string",
  7068. "description": "name of the repo",
  7069. "name": "repo",
  7070. "in": "path",
  7071. "required": true
  7072. },
  7073. {
  7074. "type": "string",
  7075. "description": "filepath of the file to get",
  7076. "name": "filepath",
  7077. "in": "path",
  7078. "required": true
  7079. }
  7080. ],
  7081. "responses": {
  7082. "200": {
  7083. "description": "success"
  7084. },
  7085. "404": {
  7086. "$ref": "#/responses/notFound"
  7087. }
  7088. }
  7089. }
  7090. },
  7091. "/repos/{owner}/{repo}/releases": {
  7092. "get": {
  7093. "produces": [
  7094. "application/json"
  7095. ],
  7096. "tags": [
  7097. "repository"
  7098. ],
  7099. "summary": "List a repo's releases",
  7100. "operationId": "repoListReleases",
  7101. "parameters": [
  7102. {
  7103. "type": "string",
  7104. "description": "owner of the repo",
  7105. "name": "owner",
  7106. "in": "path",
  7107. "required": true
  7108. },
  7109. {
  7110. "type": "string",
  7111. "description": "name of the repo",
  7112. "name": "repo",
  7113. "in": "path",
  7114. "required": true
  7115. },
  7116. {
  7117. "type": "integer",
  7118. "description": "items count every page wants to load",
  7119. "name": "per_page",
  7120. "in": "query"
  7121. },
  7122. {
  7123. "type": "integer",
  7124. "description": "page number of results to return (1-based)",
  7125. "name": "page",
  7126. "in": "query"
  7127. },
  7128. {
  7129. "type": "integer",
  7130. "description": "page size of results, maximum page size is 50",
  7131. "name": "limit",
  7132. "in": "query"
  7133. }
  7134. ],
  7135. "responses": {
  7136. "200": {
  7137. "$ref": "#/responses/ReleaseList"
  7138. }
  7139. }
  7140. },
  7141. "post": {
  7142. "consumes": [
  7143. "application/json"
  7144. ],
  7145. "produces": [
  7146. "application/json"
  7147. ],
  7148. "tags": [
  7149. "repository"
  7150. ],
  7151. "summary": "Create a release",
  7152. "operationId": "repoCreateRelease",
  7153. "parameters": [
  7154. {
  7155. "type": "string",
  7156. "description": "owner of the repo",
  7157. "name": "owner",
  7158. "in": "path",
  7159. "required": true
  7160. },
  7161. {
  7162. "type": "string",
  7163. "description": "name of the repo",
  7164. "name": "repo",
  7165. "in": "path",
  7166. "required": true
  7167. },
  7168. {
  7169. "name": "body",
  7170. "in": "body",
  7171. "schema": {
  7172. "$ref": "#/definitions/CreateReleaseOption"
  7173. }
  7174. }
  7175. ],
  7176. "responses": {
  7177. "201": {
  7178. "$ref": "#/responses/Release"
  7179. },
  7180. "409": {
  7181. "$ref": "#/responses/error"
  7182. }
  7183. }
  7184. }
  7185. },
  7186. "/repos/{owner}/{repo}/releases/{id}": {
  7187. "get": {
  7188. "produces": [
  7189. "application/json"
  7190. ],
  7191. "tags": [
  7192. "repository"
  7193. ],
  7194. "summary": "Get a release",
  7195. "operationId": "repoGetRelease",
  7196. "parameters": [
  7197. {
  7198. "type": "string",
  7199. "description": "owner of the repo",
  7200. "name": "owner",
  7201. "in": "path",
  7202. "required": true
  7203. },
  7204. {
  7205. "type": "string",
  7206. "description": "name of the repo",
  7207. "name": "repo",
  7208. "in": "path",
  7209. "required": true
  7210. },
  7211. {
  7212. "type": "integer",
  7213. "format": "int64",
  7214. "description": "id of the release to get",
  7215. "name": "id",
  7216. "in": "path",
  7217. "required": true
  7218. }
  7219. ],
  7220. "responses": {
  7221. "200": {
  7222. "$ref": "#/responses/Release"
  7223. }
  7224. }
  7225. },
  7226. "delete": {
  7227. "tags": [
  7228. "repository"
  7229. ],
  7230. "summary": "Delete a release",
  7231. "operationId": "repoDeleteRelease",
  7232. "parameters": [
  7233. {
  7234. "type": "string",
  7235. "description": "owner of the repo",
  7236. "name": "owner",
  7237. "in": "path",
  7238. "required": true
  7239. },
  7240. {
  7241. "type": "string",
  7242. "description": "name of the repo",
  7243. "name": "repo",
  7244. "in": "path",
  7245. "required": true
  7246. },
  7247. {
  7248. "type": "integer",
  7249. "format": "int64",
  7250. "description": "id of the release to delete",
  7251. "name": "id",
  7252. "in": "path",
  7253. "required": true
  7254. }
  7255. ],
  7256. "responses": {
  7257. "204": {
  7258. "$ref": "#/responses/empty"
  7259. }
  7260. }
  7261. },
  7262. "patch": {
  7263. "consumes": [
  7264. "application/json"
  7265. ],
  7266. "produces": [
  7267. "application/json"
  7268. ],
  7269. "tags": [
  7270. "repository"
  7271. ],
  7272. "summary": "Update a release",
  7273. "operationId": "repoEditRelease",
  7274. "parameters": [
  7275. {
  7276. "type": "string",
  7277. "description": "owner of the repo",
  7278. "name": "owner",
  7279. "in": "path",
  7280. "required": true
  7281. },
  7282. {
  7283. "type": "string",
  7284. "description": "name of the repo",
  7285. "name": "repo",
  7286. "in": "path",
  7287. "required": true
  7288. },
  7289. {
  7290. "type": "integer",
  7291. "format": "int64",
  7292. "description": "id of the release to edit",
  7293. "name": "id",
  7294. "in": "path",
  7295. "required": true
  7296. },
  7297. {
  7298. "name": "body",
  7299. "in": "body",
  7300. "schema": {
  7301. "$ref": "#/definitions/EditReleaseOption"
  7302. }
  7303. }
  7304. ],
  7305. "responses": {
  7306. "200": {
  7307. "$ref": "#/responses/Release"
  7308. }
  7309. }
  7310. }
  7311. },
  7312. "/repos/{owner}/{repo}/releases/{id}/assets": {
  7313. "get": {
  7314. "produces": [
  7315. "application/json"
  7316. ],
  7317. "tags": [
  7318. "repository"
  7319. ],
  7320. "summary": "List release's attachments",
  7321. "operationId": "repoListReleaseAttachments",
  7322. "parameters": [
  7323. {
  7324. "type": "string",
  7325. "description": "owner of the repo",
  7326. "name": "owner",
  7327. "in": "path",
  7328. "required": true
  7329. },
  7330. {
  7331. "type": "string",
  7332. "description": "name of the repo",
  7333. "name": "repo",
  7334. "in": "path",
  7335. "required": true
  7336. },
  7337. {
  7338. "type": "integer",
  7339. "format": "int64",
  7340. "description": "id of the release",
  7341. "name": "id",
  7342. "in": "path",
  7343. "required": true
  7344. }
  7345. ],
  7346. "responses": {
  7347. "200": {
  7348. "$ref": "#/responses/AttachmentList"
  7349. }
  7350. }
  7351. },
  7352. "post": {
  7353. "consumes": [
  7354. "multipart/form-data"
  7355. ],
  7356. "produces": [
  7357. "application/json"
  7358. ],
  7359. "tags": [
  7360. "repository"
  7361. ],
  7362. "summary": "Create a release attachment",
  7363. "operationId": "repoCreateReleaseAttachment",
  7364. "parameters": [
  7365. {
  7366. "type": "string",
  7367. "description": "owner of the repo",
  7368. "name": "owner",
  7369. "in": "path",
  7370. "required": true
  7371. },
  7372. {
  7373. "type": "string",
  7374. "description": "name of the repo",
  7375. "name": "repo",
  7376. "in": "path",
  7377. "required": true
  7378. },
  7379. {
  7380. "type": "integer",
  7381. "format": "int64",
  7382. "description": "id of the release",
  7383. "name": "id",
  7384. "in": "path",
  7385. "required": true
  7386. },
  7387. {
  7388. "type": "string",
  7389. "description": "name of the attachment",
  7390. "name": "name",
  7391. "in": "query"
  7392. },
  7393. {
  7394. "type": "file",
  7395. "description": "attachment to upload",
  7396. "name": "attachment",
  7397. "in": "formData",
  7398. "required": true
  7399. }
  7400. ],
  7401. "responses": {
  7402. "201": {
  7403. "$ref": "#/responses/Attachment"
  7404. },
  7405. "400": {
  7406. "$ref": "#/responses/error"
  7407. }
  7408. }
  7409. }
  7410. },
  7411. "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": {
  7412. "get": {
  7413. "produces": [
  7414. "application/json"
  7415. ],
  7416. "tags": [
  7417. "repository"
  7418. ],
  7419. "summary": "Get a release attachment",
  7420. "operationId": "repoGetReleaseAttachment",
  7421. "parameters": [
  7422. {
  7423. "type": "string",
  7424. "description": "owner of the repo",
  7425. "name": "owner",
  7426. "in": "path",
  7427. "required": true
  7428. },
  7429. {
  7430. "type": "string",
  7431. "description": "name of the repo",
  7432. "name": "repo",
  7433. "in": "path",
  7434. "required": true
  7435. },
  7436. {
  7437. "type": "integer",
  7438. "format": "int64",
  7439. "description": "id of the release",
  7440. "name": "id",
  7441. "in": "path",
  7442. "required": true
  7443. },
  7444. {
  7445. "type": "integer",
  7446. "format": "int64",
  7447. "description": "id of the attachment to get",
  7448. "name": "attachment_id",
  7449. "in": "path",
  7450. "required": true
  7451. }
  7452. ],
  7453. "responses": {
  7454. "200": {
  7455. "$ref": "#/responses/Attachment"
  7456. }
  7457. }
  7458. },
  7459. "delete": {
  7460. "produces": [
  7461. "application/json"
  7462. ],
  7463. "tags": [
  7464. "repository"
  7465. ],
  7466. "summary": "Delete a release attachment",
  7467. "operationId": "repoDeleteReleaseAttachment",
  7468. "parameters": [
  7469. {
  7470. "type": "string",
  7471. "description": "owner of the repo",
  7472. "name": "owner",
  7473. "in": "path",
  7474. "required": true
  7475. },
  7476. {
  7477. "type": "string",
  7478. "description": "name of the repo",
  7479. "name": "repo",
  7480. "in": "path",
  7481. "required": true
  7482. },
  7483. {
  7484. "type": "integer",
  7485. "format": "int64",
  7486. "description": "id of the release",
  7487. "name": "id",
  7488. "in": "path",
  7489. "required": true
  7490. },
  7491. {
  7492. "type": "integer",
  7493. "format": "int64",
  7494. "description": "id of the attachment to delete",
  7495. "name": "attachment_id",
  7496. "in": "path",
  7497. "required": true
  7498. }
  7499. ],
  7500. "responses": {
  7501. "204": {
  7502. "$ref": "#/responses/empty"
  7503. }
  7504. }
  7505. },
  7506. "patch": {
  7507. "consumes": [
  7508. "application/json"
  7509. ],
  7510. "produces": [
  7511. "application/json"
  7512. ],
  7513. "tags": [
  7514. "repository"
  7515. ],
  7516. "summary": "Edit a release attachment",
  7517. "operationId": "repoEditReleaseAttachment",
  7518. "parameters": [
  7519. {
  7520. "type": "string",
  7521. "description": "owner of the repo",
  7522. "name": "owner",
  7523. "in": "path",
  7524. "required": true
  7525. },
  7526. {
  7527. "type": "string",
  7528. "description": "name of the repo",
  7529. "name": "repo",
  7530. "in": "path",
  7531. "required": true
  7532. },
  7533. {
  7534. "type": "integer",
  7535. "format": "int64",
  7536. "description": "id of the release",
  7537. "name": "id",
  7538. "in": "path",
  7539. "required": true
  7540. },
  7541. {
  7542. "type": "integer",
  7543. "format": "int64",
  7544. "description": "id of the attachment to edit",
  7545. "name": "attachment_id",
  7546. "in": "path",
  7547. "required": true
  7548. },
  7549. {
  7550. "name": "body",
  7551. "in": "body",
  7552. "schema": {
  7553. "$ref": "#/definitions/EditAttachmentOptions"
  7554. }
  7555. }
  7556. ],
  7557. "responses": {
  7558. "201": {
  7559. "$ref": "#/responses/Attachment"
  7560. }
  7561. }
  7562. }
  7563. },
  7564. "/repos/{owner}/{repo}/signing-key.gpg": {
  7565. "get": {
  7566. "produces": [
  7567. "text/plain"
  7568. ],
  7569. "tags": [
  7570. "repository"
  7571. ],
  7572. "summary": "Get signing-key.gpg for given repository",
  7573. "operationId": "repoSigningKey",
  7574. "parameters": [
  7575. {
  7576. "type": "string",
  7577. "description": "owner of the repo",
  7578. "name": "owner",
  7579. "in": "path",
  7580. "required": true
  7581. },
  7582. {
  7583. "type": "string",
  7584. "description": "name of the repo",
  7585. "name": "repo",
  7586. "in": "path",
  7587. "required": true
  7588. }
  7589. ],
  7590. "responses": {
  7591. "200": {
  7592. "description": "GPG armored public key",
  7593. "schema": {
  7594. "type": "string"
  7595. }
  7596. }
  7597. }
  7598. }
  7599. },
  7600. "/repos/{owner}/{repo}/stargazers": {
  7601. "get": {
  7602. "produces": [
  7603. "application/json"
  7604. ],
  7605. "tags": [
  7606. "repository"
  7607. ],
  7608. "summary": "List a repo's stargazers",
  7609. "operationId": "repoListStargazers",
  7610. "parameters": [
  7611. {
  7612. "type": "string",
  7613. "description": "owner of the repo",
  7614. "name": "owner",
  7615. "in": "path",
  7616. "required": true
  7617. },
  7618. {
  7619. "type": "string",
  7620. "description": "name of the repo",
  7621. "name": "repo",
  7622. "in": "path",
  7623. "required": true
  7624. },
  7625. {
  7626. "type": "integer",
  7627. "description": "page number of results to return (1-based)",
  7628. "name": "page",
  7629. "in": "query"
  7630. },
  7631. {
  7632. "type": "integer",
  7633. "description": "page size of results, maximum page size is 50",
  7634. "name": "limit",
  7635. "in": "query"
  7636. }
  7637. ],
  7638. "responses": {
  7639. "200": {
  7640. "$ref": "#/responses/UserList"
  7641. }
  7642. }
  7643. }
  7644. },
  7645. "/repos/{owner}/{repo}/statuses/{sha}": {
  7646. "get": {
  7647. "produces": [
  7648. "application/json"
  7649. ],
  7650. "tags": [
  7651. "repository"
  7652. ],
  7653. "summary": "Get a commit's statuses",
  7654. "operationId": "repoListStatuses",
  7655. "parameters": [
  7656. {
  7657. "type": "string",
  7658. "description": "owner of the repo",
  7659. "name": "owner",
  7660. "in": "path",
  7661. "required": true
  7662. },
  7663. {
  7664. "type": "string",
  7665. "description": "name of the repo",
  7666. "name": "repo",
  7667. "in": "path",
  7668. "required": true
  7669. },
  7670. {
  7671. "type": "string",
  7672. "description": "sha of the commit",
  7673. "name": "sha",
  7674. "in": "path",
  7675. "required": true
  7676. },
  7677. {
  7678. "enum": [
  7679. "oldest",
  7680. "recentupdate",
  7681. "leastupdate",
  7682. "leastindex",
  7683. "highestindex"
  7684. ],
  7685. "type": "string",
  7686. "description": "type of sort",
  7687. "name": "sort",
  7688. "in": "query"
  7689. },
  7690. {
  7691. "enum": [
  7692. "pending",
  7693. "success",
  7694. "error",
  7695. "failure",
  7696. "warning"
  7697. ],
  7698. "type": "string",
  7699. "description": "type of state",
  7700. "name": "state",
  7701. "in": "query"
  7702. },
  7703. {
  7704. "type": "integer",
  7705. "description": "page number of results to return (1-based)",
  7706. "name": "page",
  7707. "in": "query"
  7708. },
  7709. {
  7710. "type": "integer",
  7711. "description": "page size of results, maximum page size is 50",
  7712. "name": "limit",
  7713. "in": "query"
  7714. }
  7715. ],
  7716. "responses": {
  7717. "200": {
  7718. "$ref": "#/responses/StatusList"
  7719. },
  7720. "400": {
  7721. "$ref": "#/responses/error"
  7722. }
  7723. }
  7724. },
  7725. "post": {
  7726. "produces": [
  7727. "application/json"
  7728. ],
  7729. "tags": [
  7730. "repository"
  7731. ],
  7732. "summary": "Create a commit status",
  7733. "operationId": "repoCreateStatus",
  7734. "parameters": [
  7735. {
  7736. "type": "string",
  7737. "description": "owner of the repo",
  7738. "name": "owner",
  7739. "in": "path",
  7740. "required": true
  7741. },
  7742. {
  7743. "type": "string",
  7744. "description": "name of the repo",
  7745. "name": "repo",
  7746. "in": "path",
  7747. "required": true
  7748. },
  7749. {
  7750. "type": "string",
  7751. "description": "sha of the commit",
  7752. "name": "sha",
  7753. "in": "path",
  7754. "required": true
  7755. },
  7756. {
  7757. "name": "body",
  7758. "in": "body",
  7759. "schema": {
  7760. "$ref": "#/definitions/CreateStatusOption"
  7761. }
  7762. }
  7763. ],
  7764. "responses": {
  7765. "201": {
  7766. "$ref": "#/responses/Status"
  7767. },
  7768. "400": {
  7769. "$ref": "#/responses/error"
  7770. }
  7771. }
  7772. }
  7773. },
  7774. "/repos/{owner}/{repo}/subscribers": {
  7775. "get": {
  7776. "produces": [
  7777. "application/json"
  7778. ],
  7779. "tags": [
  7780. "repository"
  7781. ],
  7782. "summary": "List a repo's watchers",
  7783. "operationId": "repoListSubscribers",
  7784. "parameters": [
  7785. {
  7786. "type": "string",
  7787. "description": "owner of the repo",
  7788. "name": "owner",
  7789. "in": "path",
  7790. "required": true
  7791. },
  7792. {
  7793. "type": "string",
  7794. "description": "name of the repo",
  7795. "name": "repo",
  7796. "in": "path",
  7797. "required": true
  7798. },
  7799. {
  7800. "type": "integer",
  7801. "description": "page number of results to return (1-based)",
  7802. "name": "page",
  7803. "in": "query"
  7804. },
  7805. {
  7806. "type": "integer",
  7807. "description": "page size of results, maximum page size is 50",
  7808. "name": "limit",
  7809. "in": "query"
  7810. }
  7811. ],
  7812. "responses": {
  7813. "200": {
  7814. "$ref": "#/responses/UserList"
  7815. }
  7816. }
  7817. }
  7818. },
  7819. "/repos/{owner}/{repo}/subscription": {
  7820. "get": {
  7821. "tags": [
  7822. "repository"
  7823. ],
  7824. "summary": "Check if the current user is watching a repo",
  7825. "operationId": "userCurrentCheckSubscription",
  7826. "parameters": [
  7827. {
  7828. "type": "string",
  7829. "description": "owner of the repo",
  7830. "name": "owner",
  7831. "in": "path",
  7832. "required": true
  7833. },
  7834. {
  7835. "type": "string",
  7836. "description": "name of the repo",
  7837. "name": "repo",
  7838. "in": "path",
  7839. "required": true
  7840. }
  7841. ],
  7842. "responses": {
  7843. "200": {
  7844. "$ref": "#/responses/WatchInfo"
  7845. },
  7846. "404": {
  7847. "description": "User is not watching this repo or repo do not exist"
  7848. }
  7849. }
  7850. },
  7851. "put": {
  7852. "tags": [
  7853. "repository"
  7854. ],
  7855. "summary": "Watch a repo",
  7856. "operationId": "userCurrentPutSubscription",
  7857. "parameters": [
  7858. {
  7859. "type": "string",
  7860. "description": "owner of the repo",
  7861. "name": "owner",
  7862. "in": "path",
  7863. "required": true
  7864. },
  7865. {
  7866. "type": "string",
  7867. "description": "name of the repo",
  7868. "name": "repo",
  7869. "in": "path",
  7870. "required": true
  7871. }
  7872. ],
  7873. "responses": {
  7874. "200": {
  7875. "$ref": "#/responses/WatchInfo"
  7876. }
  7877. }
  7878. },
  7879. "delete": {
  7880. "tags": [
  7881. "repository"
  7882. ],
  7883. "summary": "Unwatch a repo",
  7884. "operationId": "userCurrentDeleteSubscription",
  7885. "parameters": [
  7886. {
  7887. "type": "string",
  7888. "description": "owner of the repo",
  7889. "name": "owner",
  7890. "in": "path",
  7891. "required": true
  7892. },
  7893. {
  7894. "type": "string",
  7895. "description": "name of the repo",
  7896. "name": "repo",
  7897. "in": "path",
  7898. "required": true
  7899. }
  7900. ],
  7901. "responses": {
  7902. "204": {
  7903. "$ref": "#/responses/empty"
  7904. }
  7905. }
  7906. }
  7907. },
  7908. "/repos/{owner}/{repo}/tags": {
  7909. "get": {
  7910. "produces": [
  7911. "application/json"
  7912. ],
  7913. "tags": [
  7914. "repository"
  7915. ],
  7916. "summary": "List a repository's tags",
  7917. "operationId": "repoListTags",
  7918. "parameters": [
  7919. {
  7920. "type": "string",
  7921. "description": "owner of the repo",
  7922. "name": "owner",
  7923. "in": "path",
  7924. "required": true
  7925. },
  7926. {
  7927. "type": "string",
  7928. "description": "name of the repo",
  7929. "name": "repo",
  7930. "in": "path",
  7931. "required": true
  7932. },
  7933. {
  7934. "type": "integer",
  7935. "description": "page number of results to return (1-based)",
  7936. "name": "page",
  7937. "in": "query"
  7938. },
  7939. {
  7940. "type": "integer",
  7941. "description": "page size of results, default maximum page size is 50",
  7942. "name": "limit",
  7943. "in": "query"
  7944. }
  7945. ],
  7946. "responses": {
  7947. "200": {
  7948. "$ref": "#/responses/TagList"
  7949. }
  7950. }
  7951. }
  7952. },
  7953. "/repos/{owner}/{repo}/times": {
  7954. "get": {
  7955. "produces": [
  7956. "application/json"
  7957. ],
  7958. "tags": [
  7959. "repository"
  7960. ],
  7961. "summary": "List a repo's tracked times",
  7962. "operationId": "repoTrackedTimes",
  7963. "parameters": [
  7964. {
  7965. "type": "string",
  7966. "description": "owner of the repo",
  7967. "name": "owner",
  7968. "in": "path",
  7969. "required": true
  7970. },
  7971. {
  7972. "type": "string",
  7973. "description": "name of the repo",
  7974. "name": "repo",
  7975. "in": "path",
  7976. "required": true
  7977. },
  7978. {
  7979. "type": "string",
  7980. "description": "optional filter by user",
  7981. "name": "user",
  7982. "in": "query"
  7983. },
  7984. {
  7985. "type": "string",
  7986. "format": "date-time",
  7987. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  7988. "name": "since",
  7989. "in": "query"
  7990. },
  7991. {
  7992. "type": "string",
  7993. "format": "date-time",
  7994. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  7995. "name": "before",
  7996. "in": "query"
  7997. },
  7998. {
  7999. "type": "integer",
  8000. "description": "page number of results to return (1-based)",
  8001. "name": "page",
  8002. "in": "query"
  8003. },
  8004. {
  8005. "type": "integer",
  8006. "description": "page size of results, maximum page size is 50",
  8007. "name": "limit",
  8008. "in": "query"
  8009. }
  8010. ],
  8011. "responses": {
  8012. "200": {
  8013. "$ref": "#/responses/TrackedTimeList"
  8014. },
  8015. "400": {
  8016. "$ref": "#/responses/error"
  8017. },
  8018. "403": {
  8019. "$ref": "#/responses/forbidden"
  8020. }
  8021. }
  8022. }
  8023. },
  8024. "/repos/{owner}/{repo}/times/{user}": {
  8025. "get": {
  8026. "produces": [
  8027. "application/json"
  8028. ],
  8029. "tags": [
  8030. "repository"
  8031. ],
  8032. "summary": "List a user's tracked times in a repo",
  8033. "operationId": "userTrackedTimes",
  8034. "deprecated": true,
  8035. "parameters": [
  8036. {
  8037. "type": "string",
  8038. "description": "owner of the repo",
  8039. "name": "owner",
  8040. "in": "path",
  8041. "required": true
  8042. },
  8043. {
  8044. "type": "string",
  8045. "description": "name of the repo",
  8046. "name": "repo",
  8047. "in": "path",
  8048. "required": true
  8049. },
  8050. {
  8051. "type": "string",
  8052. "description": "username of user",
  8053. "name": "user",
  8054. "in": "path",
  8055. "required": true
  8056. }
  8057. ],
  8058. "responses": {
  8059. "200": {
  8060. "$ref": "#/responses/TrackedTimeList"
  8061. },
  8062. "400": {
  8063. "$ref": "#/responses/error"
  8064. },
  8065. "403": {
  8066. "$ref": "#/responses/forbidden"
  8067. }
  8068. }
  8069. }
  8070. },
  8071. "/repos/{owner}/{repo}/topics": {
  8072. "get": {
  8073. "produces": [
  8074. "application/json"
  8075. ],
  8076. "tags": [
  8077. "repository"
  8078. ],
  8079. "summary": "Get list of topics that a repository has",
  8080. "operationId": "repoListTopics",
  8081. "parameters": [
  8082. {
  8083. "type": "string",
  8084. "description": "owner of the repo",
  8085. "name": "owner",
  8086. "in": "path",
  8087. "required": true
  8088. },
  8089. {
  8090. "type": "string",
  8091. "description": "name of the repo",
  8092. "name": "repo",
  8093. "in": "path",
  8094. "required": true
  8095. },
  8096. {
  8097. "type": "integer",
  8098. "description": "page number of results to return (1-based)",
  8099. "name": "page",
  8100. "in": "query"
  8101. },
  8102. {
  8103. "type": "integer",
  8104. "description": "page size of results, maximum page size is 50",
  8105. "name": "limit",
  8106. "in": "query"
  8107. }
  8108. ],
  8109. "responses": {
  8110. "200": {
  8111. "$ref": "#/responses/TopicNames"
  8112. }
  8113. }
  8114. },
  8115. "put": {
  8116. "produces": [
  8117. "application/json"
  8118. ],
  8119. "tags": [
  8120. "repository"
  8121. ],
  8122. "summary": "Replace list of topics for a repository",
  8123. "operationId": "repoUpdateTopics",
  8124. "parameters": [
  8125. {
  8126. "type": "string",
  8127. "description": "owner of the repo",
  8128. "name": "owner",
  8129. "in": "path",
  8130. "required": true
  8131. },
  8132. {
  8133. "type": "string",
  8134. "description": "name of the repo",
  8135. "name": "repo",
  8136. "in": "path",
  8137. "required": true
  8138. },
  8139. {
  8140. "name": "body",
  8141. "in": "body",
  8142. "schema": {
  8143. "$ref": "#/definitions/RepoTopicOptions"
  8144. }
  8145. }
  8146. ],
  8147. "responses": {
  8148. "204": {
  8149. "$ref": "#/responses/empty"
  8150. },
  8151. "422": {
  8152. "$ref": "#/responses/invalidTopicsError"
  8153. }
  8154. }
  8155. }
  8156. },
  8157. "/repos/{owner}/{repo}/topics/{topic}": {
  8158. "put": {
  8159. "produces": [
  8160. "application/json"
  8161. ],
  8162. "tags": [
  8163. "repository"
  8164. ],
  8165. "summary": "Add a topic to a repository",
  8166. "operationId": "repoAddTopíc",
  8167. "parameters": [
  8168. {
  8169. "type": "string",
  8170. "description": "owner of the repo",
  8171. "name": "owner",
  8172. "in": "path",
  8173. "required": true
  8174. },
  8175. {
  8176. "type": "string",
  8177. "description": "name of the repo",
  8178. "name": "repo",
  8179. "in": "path",
  8180. "required": true
  8181. },
  8182. {
  8183. "type": "string",
  8184. "description": "name of the topic to add",
  8185. "name": "topic",
  8186. "in": "path",
  8187. "required": true
  8188. }
  8189. ],
  8190. "responses": {
  8191. "204": {
  8192. "$ref": "#/responses/empty"
  8193. },
  8194. "422": {
  8195. "$ref": "#/responses/invalidTopicsError"
  8196. }
  8197. }
  8198. },
  8199. "delete": {
  8200. "produces": [
  8201. "application/json"
  8202. ],
  8203. "tags": [
  8204. "repository"
  8205. ],
  8206. "summary": "Delete a topic from a repository",
  8207. "operationId": "repoDeleteTopic",
  8208. "parameters": [
  8209. {
  8210. "type": "string",
  8211. "description": "owner of the repo",
  8212. "name": "owner",
  8213. "in": "path",
  8214. "required": true
  8215. },
  8216. {
  8217. "type": "string",
  8218. "description": "name of the repo",
  8219. "name": "repo",
  8220. "in": "path",
  8221. "required": true
  8222. },
  8223. {
  8224. "type": "string",
  8225. "description": "name of the topic to delete",
  8226. "name": "topic",
  8227. "in": "path",
  8228. "required": true
  8229. }
  8230. ],
  8231. "responses": {
  8232. "204": {
  8233. "$ref": "#/responses/empty"
  8234. },
  8235. "422": {
  8236. "$ref": "#/responses/invalidTopicsError"
  8237. }
  8238. }
  8239. }
  8240. },
  8241. "/repos/{owner}/{repo}/transfer": {
  8242. "post": {
  8243. "produces": [
  8244. "application/json"
  8245. ],
  8246. "tags": [
  8247. "repository"
  8248. ],
  8249. "summary": "Transfer a repo ownership",
  8250. "operationId": "repoTransfer",
  8251. "parameters": [
  8252. {
  8253. "type": "string",
  8254. "description": "owner of the repo to transfer",
  8255. "name": "owner",
  8256. "in": "path",
  8257. "required": true
  8258. },
  8259. {
  8260. "type": "string",
  8261. "description": "name of the repo to transfer",
  8262. "name": "repo",
  8263. "in": "path",
  8264. "required": true
  8265. },
  8266. {
  8267. "description": "Transfer Options",
  8268. "name": "body",
  8269. "in": "body",
  8270. "required": true,
  8271. "schema": {
  8272. "$ref": "#/definitions/TransferRepoOption"
  8273. }
  8274. }
  8275. ],
  8276. "responses": {
  8277. "202": {
  8278. "$ref": "#/responses/Repository"
  8279. },
  8280. "403": {
  8281. "$ref": "#/responses/forbidden"
  8282. },
  8283. "404": {
  8284. "$ref": "#/responses/notFound"
  8285. },
  8286. "422": {
  8287. "$ref": "#/responses/validationError"
  8288. }
  8289. }
  8290. }
  8291. },
  8292. "/repositories/{id}": {
  8293. "get": {
  8294. "produces": [
  8295. "application/json"
  8296. ],
  8297. "tags": [
  8298. "repository"
  8299. ],
  8300. "summary": "Get a repository by id",
  8301. "operationId": "repoGetByID",
  8302. "parameters": [
  8303. {
  8304. "type": "integer",
  8305. "format": "int64",
  8306. "description": "id of the repo to get",
  8307. "name": "id",
  8308. "in": "path",
  8309. "required": true
  8310. }
  8311. ],
  8312. "responses": {
  8313. "200": {
  8314. "$ref": "#/responses/Repository"
  8315. }
  8316. }
  8317. }
  8318. },
  8319. "/signing-key.gpg": {
  8320. "get": {
  8321. "produces": [
  8322. "text/plain"
  8323. ],
  8324. "tags": [
  8325. "miscellaneous"
  8326. ],
  8327. "summary": "Get default signing-key.gpg",
  8328. "operationId": "getSigningKey",
  8329. "responses": {
  8330. "200": {
  8331. "description": "GPG armored public key",
  8332. "schema": {
  8333. "type": "string"
  8334. }
  8335. }
  8336. }
  8337. }
  8338. },
  8339. "/teams/{id}": {
  8340. "get": {
  8341. "produces": [
  8342. "application/json"
  8343. ],
  8344. "tags": [
  8345. "organization"
  8346. ],
  8347. "summary": "Get a team",
  8348. "operationId": "orgGetTeam",
  8349. "parameters": [
  8350. {
  8351. "type": "integer",
  8352. "format": "int64",
  8353. "description": "id of the team to get",
  8354. "name": "id",
  8355. "in": "path",
  8356. "required": true
  8357. }
  8358. ],
  8359. "responses": {
  8360. "200": {
  8361. "$ref": "#/responses/Team"
  8362. }
  8363. }
  8364. },
  8365. "delete": {
  8366. "tags": [
  8367. "organization"
  8368. ],
  8369. "summary": "Delete a team",
  8370. "operationId": "orgDeleteTeam",
  8371. "parameters": [
  8372. {
  8373. "type": "integer",
  8374. "format": "int64",
  8375. "description": "id of the team to delete",
  8376. "name": "id",
  8377. "in": "path",
  8378. "required": true
  8379. }
  8380. ],
  8381. "responses": {
  8382. "204": {
  8383. "description": "team deleted"
  8384. }
  8385. }
  8386. },
  8387. "patch": {
  8388. "consumes": [
  8389. "application/json"
  8390. ],
  8391. "produces": [
  8392. "application/json"
  8393. ],
  8394. "tags": [
  8395. "organization"
  8396. ],
  8397. "summary": "Edit a team",
  8398. "operationId": "orgEditTeam",
  8399. "parameters": [
  8400. {
  8401. "type": "integer",
  8402. "description": "id of the team to edit",
  8403. "name": "id",
  8404. "in": "path",
  8405. "required": true
  8406. },
  8407. {
  8408. "name": "body",
  8409. "in": "body",
  8410. "schema": {
  8411. "$ref": "#/definitions/EditTeamOption"
  8412. }
  8413. }
  8414. ],
  8415. "responses": {
  8416. "200": {
  8417. "$ref": "#/responses/Team"
  8418. }
  8419. }
  8420. }
  8421. },
  8422. "/teams/{id}/members": {
  8423. "get": {
  8424. "produces": [
  8425. "application/json"
  8426. ],
  8427. "tags": [
  8428. "organization"
  8429. ],
  8430. "summary": "List a team's members",
  8431. "operationId": "orgListTeamMembers",
  8432. "parameters": [
  8433. {
  8434. "type": "integer",
  8435. "format": "int64",
  8436. "description": "id of the team",
  8437. "name": "id",
  8438. "in": "path",
  8439. "required": true
  8440. },
  8441. {
  8442. "type": "integer",
  8443. "description": "page number of results to return (1-based)",
  8444. "name": "page",
  8445. "in": "query"
  8446. },
  8447. {
  8448. "type": "integer",
  8449. "description": "page size of results, maximum page size is 50",
  8450. "name": "limit",
  8451. "in": "query"
  8452. }
  8453. ],
  8454. "responses": {
  8455. "200": {
  8456. "$ref": "#/responses/UserList"
  8457. }
  8458. }
  8459. }
  8460. },
  8461. "/teams/{id}/members/{username}": {
  8462. "get": {
  8463. "produces": [
  8464. "application/json"
  8465. ],
  8466. "tags": [
  8467. "organization"
  8468. ],
  8469. "summary": "List a particular member of team",
  8470. "operationId": "orgListTeamMember",
  8471. "parameters": [
  8472. {
  8473. "type": "integer",
  8474. "format": "int64",
  8475. "description": "id of the team",
  8476. "name": "id",
  8477. "in": "path",
  8478. "required": true
  8479. },
  8480. {
  8481. "type": "string",
  8482. "description": "username of the member to list",
  8483. "name": "username",
  8484. "in": "path",
  8485. "required": true
  8486. }
  8487. ],
  8488. "responses": {
  8489. "200": {
  8490. "$ref": "#/responses/User"
  8491. },
  8492. "404": {
  8493. "$ref": "#/responses/notFound"
  8494. }
  8495. }
  8496. },
  8497. "put": {
  8498. "produces": [
  8499. "application/json"
  8500. ],
  8501. "tags": [
  8502. "organization"
  8503. ],
  8504. "summary": "Add a team member",
  8505. "operationId": "orgAddTeamMember",
  8506. "parameters": [
  8507. {
  8508. "type": "integer",
  8509. "format": "int64",
  8510. "description": "id of the team",
  8511. "name": "id",
  8512. "in": "path",
  8513. "required": true
  8514. },
  8515. {
  8516. "type": "string",
  8517. "description": "username of the user to add",
  8518. "name": "username",
  8519. "in": "path",
  8520. "required": true
  8521. }
  8522. ],
  8523. "responses": {
  8524. "204": {
  8525. "$ref": "#/responses/empty"
  8526. },
  8527. "404": {
  8528. "$ref": "#/responses/notFound"
  8529. }
  8530. }
  8531. },
  8532. "delete": {
  8533. "produces": [
  8534. "application/json"
  8535. ],
  8536. "tags": [
  8537. "organization"
  8538. ],
  8539. "summary": "Remove a team member",
  8540. "operationId": "orgRemoveTeamMember",
  8541. "parameters": [
  8542. {
  8543. "type": "integer",
  8544. "format": "int64",
  8545. "description": "id of the team",
  8546. "name": "id",
  8547. "in": "path",
  8548. "required": true
  8549. },
  8550. {
  8551. "type": "string",
  8552. "description": "username of the user to remove",
  8553. "name": "username",
  8554. "in": "path",
  8555. "required": true
  8556. }
  8557. ],
  8558. "responses": {
  8559. "204": {
  8560. "$ref": "#/responses/empty"
  8561. },
  8562. "404": {
  8563. "$ref": "#/responses/notFound"
  8564. }
  8565. }
  8566. }
  8567. },
  8568. "/teams/{id}/repos": {
  8569. "get": {
  8570. "produces": [
  8571. "application/json"
  8572. ],
  8573. "tags": [
  8574. "organization"
  8575. ],
  8576. "summary": "List a team's repos",
  8577. "operationId": "orgListTeamRepos",
  8578. "parameters": [
  8579. {
  8580. "type": "integer",
  8581. "format": "int64",
  8582. "description": "id of the team",
  8583. "name": "id",
  8584. "in": "path",
  8585. "required": true
  8586. },
  8587. {
  8588. "type": "integer",
  8589. "description": "page number of results to return (1-based)",
  8590. "name": "page",
  8591. "in": "query"
  8592. },
  8593. {
  8594. "type": "integer",
  8595. "description": "page size of results, maximum page size is 50",
  8596. "name": "limit",
  8597. "in": "query"
  8598. }
  8599. ],
  8600. "responses": {
  8601. "200": {
  8602. "$ref": "#/responses/RepositoryList"
  8603. }
  8604. }
  8605. }
  8606. },
  8607. "/teams/{id}/repos/{org}/{repo}": {
  8608. "put": {
  8609. "produces": [
  8610. "application/json"
  8611. ],
  8612. "tags": [
  8613. "organization"
  8614. ],
  8615. "summary": "Add a repository to a team",
  8616. "operationId": "orgAddTeamRepository",
  8617. "parameters": [
  8618. {
  8619. "type": "integer",
  8620. "format": "int64",
  8621. "description": "id of the team",
  8622. "name": "id",
  8623. "in": "path",
  8624. "required": true
  8625. },
  8626. {
  8627. "type": "string",
  8628. "description": "organization that owns the repo to add",
  8629. "name": "org",
  8630. "in": "path",
  8631. "required": true
  8632. },
  8633. {
  8634. "type": "string",
  8635. "description": "name of the repo to add",
  8636. "name": "repo",
  8637. "in": "path",
  8638. "required": true
  8639. }
  8640. ],
  8641. "responses": {
  8642. "204": {
  8643. "$ref": "#/responses/empty"
  8644. },
  8645. "403": {
  8646. "$ref": "#/responses/forbidden"
  8647. }
  8648. }
  8649. },
  8650. "delete": {
  8651. "description": "This does not delete the repository, it only removes the repository from the team.",
  8652. "produces": [
  8653. "application/json"
  8654. ],
  8655. "tags": [
  8656. "organization"
  8657. ],
  8658. "summary": "Remove a repository from a team",
  8659. "operationId": "orgRemoveTeamRepository",
  8660. "parameters": [
  8661. {
  8662. "type": "integer",
  8663. "format": "int64",
  8664. "description": "id of the team",
  8665. "name": "id",
  8666. "in": "path",
  8667. "required": true
  8668. },
  8669. {
  8670. "type": "string",
  8671. "description": "organization that owns the repo to remove",
  8672. "name": "org",
  8673. "in": "path",
  8674. "required": true
  8675. },
  8676. {
  8677. "type": "string",
  8678. "description": "name of the repo to remove",
  8679. "name": "repo",
  8680. "in": "path",
  8681. "required": true
  8682. }
  8683. ],
  8684. "responses": {
  8685. "204": {
  8686. "$ref": "#/responses/empty"
  8687. },
  8688. "403": {
  8689. "$ref": "#/responses/forbidden"
  8690. }
  8691. }
  8692. }
  8693. },
  8694. "/topics/search": {
  8695. "get": {
  8696. "produces": [
  8697. "application/json"
  8698. ],
  8699. "tags": [
  8700. "repository"
  8701. ],
  8702. "summary": "search topics via keyword",
  8703. "operationId": "topicSearch",
  8704. "parameters": [
  8705. {
  8706. "type": "string",
  8707. "description": "keywords to search",
  8708. "name": "q",
  8709. "in": "query",
  8710. "required": true
  8711. },
  8712. {
  8713. "type": "integer",
  8714. "description": "page number of results to return (1-based)",
  8715. "name": "page",
  8716. "in": "query"
  8717. },
  8718. {
  8719. "type": "integer",
  8720. "description": "page size of results, maximum page size is 50",
  8721. "name": "limit",
  8722. "in": "query"
  8723. }
  8724. ],
  8725. "responses": {
  8726. "200": {
  8727. "$ref": "#/responses/TopicListResponse"
  8728. },
  8729. "403": {
  8730. "$ref": "#/responses/forbidden"
  8731. }
  8732. }
  8733. }
  8734. },
  8735. "/user": {
  8736. "get": {
  8737. "produces": [
  8738. "application/json"
  8739. ],
  8740. "tags": [
  8741. "user"
  8742. ],
  8743. "summary": "Get the authenticated user",
  8744. "operationId": "userGetCurrent",
  8745. "responses": {
  8746. "200": {
  8747. "$ref": "#/responses/User"
  8748. }
  8749. }
  8750. }
  8751. },
  8752. "/user/applications/oauth2": {
  8753. "get": {
  8754. "produces": [
  8755. "application/json"
  8756. ],
  8757. "tags": [
  8758. "user"
  8759. ],
  8760. "summary": "List the authenticated user's oauth2 applications",
  8761. "operationId": "userGetOauth2Application",
  8762. "parameters": [
  8763. {
  8764. "type": "integer",
  8765. "description": "page number of results to return (1-based)",
  8766. "name": "page",
  8767. "in": "query"
  8768. },
  8769. {
  8770. "type": "integer",
  8771. "description": "page size of results, maximum page size is 50",
  8772. "name": "limit",
  8773. "in": "query"
  8774. }
  8775. ],
  8776. "responses": {
  8777. "200": {
  8778. "$ref": "#/responses/OAuth2ApplicationList"
  8779. }
  8780. }
  8781. },
  8782. "post": {
  8783. "produces": [
  8784. "application/json"
  8785. ],
  8786. "tags": [
  8787. "user"
  8788. ],
  8789. "summary": "creates a new OAuth2 application",
  8790. "operationId": "userCreateOAuth2Application",
  8791. "parameters": [
  8792. {
  8793. "name": "body",
  8794. "in": "body",
  8795. "required": true,
  8796. "schema": {
  8797. "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
  8798. }
  8799. }
  8800. ],
  8801. "responses": {
  8802. "201": {
  8803. "$ref": "#/responses/OAuth2Application"
  8804. }
  8805. }
  8806. }
  8807. },
  8808. "/user/applications/oauth2/{id}": {
  8809. "get": {
  8810. "produces": [
  8811. "application/json"
  8812. ],
  8813. "tags": [
  8814. "user"
  8815. ],
  8816. "summary": "get an OAuth2 Application",
  8817. "operationId": "userGetOAuth2Application",
  8818. "parameters": [
  8819. {
  8820. "type": "integer",
  8821. "format": "int64",
  8822. "description": "Application ID to be found",
  8823. "name": "id",
  8824. "in": "path",
  8825. "required": true
  8826. }
  8827. ],
  8828. "responses": {
  8829. "200": {
  8830. "$ref": "#/responses/OAuth2Application"
  8831. }
  8832. }
  8833. },
  8834. "delete": {
  8835. "produces": [
  8836. "application/json"
  8837. ],
  8838. "tags": [
  8839. "user"
  8840. ],
  8841. "summary": "delete an OAuth2 Application",
  8842. "operationId": "userDeleteOAuth2Application",
  8843. "parameters": [
  8844. {
  8845. "type": "integer",
  8846. "format": "int64",
  8847. "description": "token to be deleted",
  8848. "name": "id",
  8849. "in": "path",
  8850. "required": true
  8851. }
  8852. ],
  8853. "responses": {
  8854. "204": {
  8855. "$ref": "#/responses/empty"
  8856. }
  8857. }
  8858. },
  8859. "patch": {
  8860. "produces": [
  8861. "application/json"
  8862. ],
  8863. "tags": [
  8864. "user"
  8865. ],
  8866. "summary": "update an OAuth2 Application, this includes regenerating the client secret",
  8867. "operationId": "userUpdateOAuth2Application",
  8868. "parameters": [
  8869. {
  8870. "type": "integer",
  8871. "format": "int64",
  8872. "description": "application to be updated",
  8873. "name": "id",
  8874. "in": "path",
  8875. "required": true
  8876. },
  8877. {
  8878. "name": "body",
  8879. "in": "body",
  8880. "required": true,
  8881. "schema": {
  8882. "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
  8883. }
  8884. }
  8885. ],
  8886. "responses": {
  8887. "200": {
  8888. "$ref": "#/responses/OAuth2Application"
  8889. }
  8890. }
  8891. }
  8892. },
  8893. "/user/emails": {
  8894. "get": {
  8895. "produces": [
  8896. "application/json"
  8897. ],
  8898. "tags": [
  8899. "user"
  8900. ],
  8901. "summary": "List the authenticated user's email addresses",
  8902. "operationId": "userListEmails",
  8903. "responses": {
  8904. "200": {
  8905. "$ref": "#/responses/EmailList"
  8906. }
  8907. }
  8908. },
  8909. "post": {
  8910. "produces": [
  8911. "application/json"
  8912. ],
  8913. "tags": [
  8914. "user"
  8915. ],
  8916. "summary": "Add email addresses",
  8917. "operationId": "userAddEmail",
  8918. "parameters": [
  8919. {
  8920. "name": "body",
  8921. "in": "body",
  8922. "schema": {
  8923. "$ref": "#/definitions/CreateEmailOption"
  8924. }
  8925. }
  8926. ],
  8927. "responses": {
  8928. "201": {
  8929. "$ref": "#/responses/EmailList"
  8930. },
  8931. "422": {
  8932. "$ref": "#/responses/validationError"
  8933. }
  8934. }
  8935. },
  8936. "delete": {
  8937. "produces": [
  8938. "application/json"
  8939. ],
  8940. "tags": [
  8941. "user"
  8942. ],
  8943. "summary": "Delete email addresses",
  8944. "operationId": "userDeleteEmail",
  8945. "parameters": [
  8946. {
  8947. "name": "body",
  8948. "in": "body",
  8949. "schema": {
  8950. "$ref": "#/definitions/DeleteEmailOption"
  8951. }
  8952. }
  8953. ],
  8954. "responses": {
  8955. "204": {
  8956. "$ref": "#/responses/empty"
  8957. }
  8958. }
  8959. }
  8960. },
  8961. "/user/followers": {
  8962. "get": {
  8963. "produces": [
  8964. "application/json"
  8965. ],
  8966. "tags": [
  8967. "user"
  8968. ],
  8969. "summary": "List the authenticated user's followers",
  8970. "operationId": "userCurrentListFollowers",
  8971. "parameters": [
  8972. {
  8973. "type": "integer",
  8974. "description": "page number of results to return (1-based)",
  8975. "name": "page",
  8976. "in": "query"
  8977. },
  8978. {
  8979. "type": "integer",
  8980. "description": "page size of results, maximum page size is 50",
  8981. "name": "limit",
  8982. "in": "query"
  8983. }
  8984. ],
  8985. "responses": {
  8986. "200": {
  8987. "$ref": "#/responses/UserList"
  8988. }
  8989. }
  8990. }
  8991. },
  8992. "/user/following": {
  8993. "get": {
  8994. "produces": [
  8995. "application/json"
  8996. ],
  8997. "tags": [
  8998. "user"
  8999. ],
  9000. "summary": "List the users that the authenticated user is following",
  9001. "operationId": "userCurrentListFollowing",
  9002. "parameters": [
  9003. {
  9004. "type": "integer",
  9005. "description": "page number of results to return (1-based)",
  9006. "name": "page",
  9007. "in": "query"
  9008. },
  9009. {
  9010. "type": "integer",
  9011. "description": "page size of results, maximum page size is 50",
  9012. "name": "limit",
  9013. "in": "query"
  9014. }
  9015. ],
  9016. "responses": {
  9017. "200": {
  9018. "$ref": "#/responses/UserList"
  9019. }
  9020. }
  9021. }
  9022. },
  9023. "/user/following/{username}": {
  9024. "get": {
  9025. "tags": [
  9026. "user"
  9027. ],
  9028. "summary": "Check whether a user is followed by the authenticated user",
  9029. "operationId": "userCurrentCheckFollowing",
  9030. "parameters": [
  9031. {
  9032. "type": "string",
  9033. "description": "username of followed user",
  9034. "name": "username",
  9035. "in": "path",
  9036. "required": true
  9037. }
  9038. ],
  9039. "responses": {
  9040. "204": {
  9041. "$ref": "#/responses/empty"
  9042. },
  9043. "404": {
  9044. "$ref": "#/responses/notFound"
  9045. }
  9046. }
  9047. },
  9048. "put": {
  9049. "tags": [
  9050. "user"
  9051. ],
  9052. "summary": "Follow a user",
  9053. "operationId": "userCurrentPutFollow",
  9054. "parameters": [
  9055. {
  9056. "type": "string",
  9057. "description": "username of user to follow",
  9058. "name": "username",
  9059. "in": "path",
  9060. "required": true
  9061. }
  9062. ],
  9063. "responses": {
  9064. "204": {
  9065. "$ref": "#/responses/empty"
  9066. }
  9067. }
  9068. },
  9069. "delete": {
  9070. "tags": [
  9071. "user"
  9072. ],
  9073. "summary": "Unfollow a user",
  9074. "operationId": "userCurrentDeleteFollow",
  9075. "parameters": [
  9076. {
  9077. "type": "string",
  9078. "description": "username of user to unfollow",
  9079. "name": "username",
  9080. "in": "path",
  9081. "required": true
  9082. }
  9083. ],
  9084. "responses": {
  9085. "204": {
  9086. "$ref": "#/responses/empty"
  9087. }
  9088. }
  9089. }
  9090. },
  9091. "/user/gpg_keys": {
  9092. "get": {
  9093. "produces": [
  9094. "application/json"
  9095. ],
  9096. "tags": [
  9097. "user"
  9098. ],
  9099. "summary": "List the authenticated user's GPG keys",
  9100. "operationId": "userCurrentListGPGKeys",
  9101. "parameters": [
  9102. {
  9103. "type": "integer",
  9104. "description": "page number of results to return (1-based)",
  9105. "name": "page",
  9106. "in": "query"
  9107. },
  9108. {
  9109. "type": "integer",
  9110. "description": "page size of results, maximum page size is 50",
  9111. "name": "limit",
  9112. "in": "query"
  9113. }
  9114. ],
  9115. "responses": {
  9116. "200": {
  9117. "$ref": "#/responses/GPGKeyList"
  9118. }
  9119. }
  9120. },
  9121. "post": {
  9122. "consumes": [
  9123. "application/json"
  9124. ],
  9125. "produces": [
  9126. "application/json"
  9127. ],
  9128. "tags": [
  9129. "user"
  9130. ],
  9131. "summary": "Create a GPG key",
  9132. "operationId": "userCurrentPostGPGKey",
  9133. "parameters": [
  9134. {
  9135. "name": "Form",
  9136. "in": "body",
  9137. "schema": {
  9138. "$ref": "#/definitions/CreateGPGKeyOption"
  9139. }
  9140. }
  9141. ],
  9142. "responses": {
  9143. "201": {
  9144. "$ref": "#/responses/GPGKey"
  9145. },
  9146. "422": {
  9147. "$ref": "#/responses/validationError"
  9148. }
  9149. }
  9150. }
  9151. },
  9152. "/user/gpg_keys/{id}": {
  9153. "get": {
  9154. "produces": [
  9155. "application/json"
  9156. ],
  9157. "tags": [
  9158. "user"
  9159. ],
  9160. "summary": "Get a GPG key",
  9161. "operationId": "userCurrentGetGPGKey",
  9162. "parameters": [
  9163. {
  9164. "type": "integer",
  9165. "format": "int64",
  9166. "description": "id of key to get",
  9167. "name": "id",
  9168. "in": "path",
  9169. "required": true
  9170. }
  9171. ],
  9172. "responses": {
  9173. "200": {
  9174. "$ref": "#/responses/GPGKey"
  9175. },
  9176. "404": {
  9177. "$ref": "#/responses/notFound"
  9178. }
  9179. }
  9180. },
  9181. "delete": {
  9182. "produces": [
  9183. "application/json"
  9184. ],
  9185. "tags": [
  9186. "user"
  9187. ],
  9188. "summary": "Remove a GPG key",
  9189. "operationId": "userCurrentDeleteGPGKey",
  9190. "parameters": [
  9191. {
  9192. "type": "integer",
  9193. "format": "int64",
  9194. "description": "id of key to delete",
  9195. "name": "id",
  9196. "in": "path",
  9197. "required": true
  9198. }
  9199. ],
  9200. "responses": {
  9201. "204": {
  9202. "$ref": "#/responses/empty"
  9203. },
  9204. "403": {
  9205. "$ref": "#/responses/forbidden"
  9206. }
  9207. }
  9208. }
  9209. },
  9210. "/user/keys": {
  9211. "get": {
  9212. "produces": [
  9213. "application/json"
  9214. ],
  9215. "tags": [
  9216. "user"
  9217. ],
  9218. "summary": "List the authenticated user's public keys",
  9219. "operationId": "userCurrentListKeys",
  9220. "parameters": [
  9221. {
  9222. "type": "string",
  9223. "description": "fingerprint of the key",
  9224. "name": "fingerprint",
  9225. "in": "query"
  9226. },
  9227. {
  9228. "type": "integer",
  9229. "description": "page number of results to return (1-based)",
  9230. "name": "page",
  9231. "in": "query"
  9232. },
  9233. {
  9234. "type": "integer",
  9235. "description": "page size of results, maximum page size is 50",
  9236. "name": "limit",
  9237. "in": "query"
  9238. }
  9239. ],
  9240. "responses": {
  9241. "200": {
  9242. "$ref": "#/responses/PublicKeyList"
  9243. }
  9244. }
  9245. },
  9246. "post": {
  9247. "consumes": [
  9248. "application/json"
  9249. ],
  9250. "produces": [
  9251. "application/json"
  9252. ],
  9253. "tags": [
  9254. "user"
  9255. ],
  9256. "summary": "Create a public key",
  9257. "operationId": "userCurrentPostKey",
  9258. "parameters": [
  9259. {
  9260. "name": "body",
  9261. "in": "body",
  9262. "schema": {
  9263. "$ref": "#/definitions/CreateKeyOption"
  9264. }
  9265. }
  9266. ],
  9267. "responses": {
  9268. "201": {
  9269. "$ref": "#/responses/PublicKey"
  9270. },
  9271. "422": {
  9272. "$ref": "#/responses/validationError"
  9273. }
  9274. }
  9275. }
  9276. },
  9277. "/user/keys/{id}": {
  9278. "get": {
  9279. "produces": [
  9280. "application/json"
  9281. ],
  9282. "tags": [
  9283. "user"
  9284. ],
  9285. "summary": "Get a public key",
  9286. "operationId": "userCurrentGetKey",
  9287. "parameters": [
  9288. {
  9289. "type": "integer",
  9290. "format": "int64",
  9291. "description": "id of key to get",
  9292. "name": "id",
  9293. "in": "path",
  9294. "required": true
  9295. }
  9296. ],
  9297. "responses": {
  9298. "200": {
  9299. "$ref": "#/responses/PublicKey"
  9300. },
  9301. "404": {
  9302. "$ref": "#/responses/notFound"
  9303. }
  9304. }
  9305. },
  9306. "delete": {
  9307. "produces": [
  9308. "application/json"
  9309. ],
  9310. "tags": [
  9311. "user"
  9312. ],
  9313. "summary": "Delete a public key",
  9314. "operationId": "userCurrentDeleteKey",
  9315. "parameters": [
  9316. {
  9317. "type": "integer",
  9318. "format": "int64",
  9319. "description": "id of key to delete",
  9320. "name": "id",
  9321. "in": "path",
  9322. "required": true
  9323. }
  9324. ],
  9325. "responses": {
  9326. "204": {
  9327. "$ref": "#/responses/empty"
  9328. },
  9329. "403": {
  9330. "$ref": "#/responses/forbidden"
  9331. },
  9332. "404": {
  9333. "$ref": "#/responses/notFound"
  9334. }
  9335. }
  9336. }
  9337. },
  9338. "/user/orgs": {
  9339. "get": {
  9340. "produces": [
  9341. "application/json"
  9342. ],
  9343. "tags": [
  9344. "organization"
  9345. ],
  9346. "summary": "List the current user's organizations",
  9347. "operationId": "orgListCurrentUserOrgs",
  9348. "parameters": [
  9349. {
  9350. "type": "integer",
  9351. "description": "page number of results to return (1-based)",
  9352. "name": "page",
  9353. "in": "query"
  9354. },
  9355. {
  9356. "type": "integer",
  9357. "description": "page size of results, maximum page size is 50",
  9358. "name": "limit",
  9359. "in": "query"
  9360. }
  9361. ],
  9362. "responses": {
  9363. "200": {
  9364. "$ref": "#/responses/OrganizationList"
  9365. }
  9366. }
  9367. }
  9368. },
  9369. "/user/repos": {
  9370. "get": {
  9371. "produces": [
  9372. "application/json"
  9373. ],
  9374. "tags": [
  9375. "user"
  9376. ],
  9377. "summary": "List the repos that the authenticated user owns or has access to",
  9378. "operationId": "userCurrentListRepos",
  9379. "parameters": [
  9380. {
  9381. "type": "integer",
  9382. "description": "page number of results to return (1-based)",
  9383. "name": "page",
  9384. "in": "query"
  9385. },
  9386. {
  9387. "type": "integer",
  9388. "description": "page size of results, maximum page size is 50",
  9389. "name": "limit",
  9390. "in": "query"
  9391. }
  9392. ],
  9393. "responses": {
  9394. "200": {
  9395. "$ref": "#/responses/RepositoryList"
  9396. }
  9397. }
  9398. },
  9399. "post": {
  9400. "consumes": [
  9401. "application/json"
  9402. ],
  9403. "produces": [
  9404. "application/json"
  9405. ],
  9406. "tags": [
  9407. "repository",
  9408. "user"
  9409. ],
  9410. "summary": "Create a repository",
  9411. "operationId": "createCurrentUserRepo",
  9412. "parameters": [
  9413. {
  9414. "name": "body",
  9415. "in": "body",
  9416. "schema": {
  9417. "$ref": "#/definitions/CreateRepoOption"
  9418. }
  9419. }
  9420. ],
  9421. "responses": {
  9422. "201": {
  9423. "$ref": "#/responses/Repository"
  9424. },
  9425. "409": {
  9426. "description": "The repository with the same name already exists."
  9427. },
  9428. "422": {
  9429. "$ref": "#/responses/validationError"
  9430. }
  9431. }
  9432. }
  9433. },
  9434. "/user/starred": {
  9435. "get": {
  9436. "produces": [
  9437. "application/json"
  9438. ],
  9439. "tags": [
  9440. "user"
  9441. ],
  9442. "summary": "The repos that the authenticated user has starred",
  9443. "operationId": "userCurrentListStarred",
  9444. "parameters": [
  9445. {
  9446. "type": "integer",
  9447. "description": "page number of results to return (1-based)",
  9448. "name": "page",
  9449. "in": "query"
  9450. },
  9451. {
  9452. "type": "integer",
  9453. "description": "page size of results, maximum page size is 50",
  9454. "name": "limit",
  9455. "in": "query"
  9456. }
  9457. ],
  9458. "responses": {
  9459. "200": {
  9460. "$ref": "#/responses/RepositoryList"
  9461. }
  9462. }
  9463. }
  9464. },
  9465. "/user/starred/{owner}/{repo}": {
  9466. "get": {
  9467. "tags": [
  9468. "user"
  9469. ],
  9470. "summary": "Whether the authenticated is starring the repo",
  9471. "operationId": "userCurrentCheckStarring",
  9472. "parameters": [
  9473. {
  9474. "type": "string",
  9475. "description": "owner of the repo",
  9476. "name": "owner",
  9477. "in": "path",
  9478. "required": true
  9479. },
  9480. {
  9481. "type": "string",
  9482. "description": "name of the repo",
  9483. "name": "repo",
  9484. "in": "path",
  9485. "required": true
  9486. }
  9487. ],
  9488. "responses": {
  9489. "204": {
  9490. "$ref": "#/responses/empty"
  9491. },
  9492. "404": {
  9493. "$ref": "#/responses/notFound"
  9494. }
  9495. }
  9496. },
  9497. "put": {
  9498. "tags": [
  9499. "user"
  9500. ],
  9501. "summary": "Star the given repo",
  9502. "operationId": "userCurrentPutStar",
  9503. "parameters": [
  9504. {
  9505. "type": "string",
  9506. "description": "owner of the repo to star",
  9507. "name": "owner",
  9508. "in": "path",
  9509. "required": true
  9510. },
  9511. {
  9512. "type": "string",
  9513. "description": "name of the repo to star",
  9514. "name": "repo",
  9515. "in": "path",
  9516. "required": true
  9517. }
  9518. ],
  9519. "responses": {
  9520. "204": {
  9521. "$ref": "#/responses/empty"
  9522. }
  9523. }
  9524. },
  9525. "delete": {
  9526. "tags": [
  9527. "user"
  9528. ],
  9529. "summary": "Unstar the given repo",
  9530. "operationId": "userCurrentDeleteStar",
  9531. "parameters": [
  9532. {
  9533. "type": "string",
  9534. "description": "owner of the repo to unstar",
  9535. "name": "owner",
  9536. "in": "path",
  9537. "required": true
  9538. },
  9539. {
  9540. "type": "string",
  9541. "description": "name of the repo to unstar",
  9542. "name": "repo",
  9543. "in": "path",
  9544. "required": true
  9545. }
  9546. ],
  9547. "responses": {
  9548. "204": {
  9549. "$ref": "#/responses/empty"
  9550. }
  9551. }
  9552. }
  9553. },
  9554. "/user/stopwatches": {
  9555. "get": {
  9556. "consumes": [
  9557. "application/json"
  9558. ],
  9559. "produces": [
  9560. "application/json"
  9561. ],
  9562. "tags": [
  9563. "user"
  9564. ],
  9565. "summary": "Get list of all existing stopwatches",
  9566. "operationId": "userGetStopWatches",
  9567. "parameters": [
  9568. {
  9569. "type": "integer",
  9570. "description": "page number of results to return (1-based)",
  9571. "name": "page",
  9572. "in": "query"
  9573. },
  9574. {
  9575. "type": "integer",
  9576. "description": "page size of results, maximum page size is 50",
  9577. "name": "limit",
  9578. "in": "query"
  9579. }
  9580. ],
  9581. "responses": {
  9582. "200": {
  9583. "$ref": "#/responses/StopWatchList"
  9584. }
  9585. }
  9586. }
  9587. },
  9588. "/user/subscriptions": {
  9589. "get": {
  9590. "produces": [
  9591. "application/json"
  9592. ],
  9593. "tags": [
  9594. "user"
  9595. ],
  9596. "summary": "List repositories watched by the authenticated user",
  9597. "operationId": "userCurrentListSubscriptions",
  9598. "parameters": [
  9599. {
  9600. "type": "integer",
  9601. "description": "page number of results to return (1-based)",
  9602. "name": "page",
  9603. "in": "query"
  9604. },
  9605. {
  9606. "type": "integer",
  9607. "description": "page size of results, maximum page size is 50",
  9608. "name": "limit",
  9609. "in": "query"
  9610. }
  9611. ],
  9612. "responses": {
  9613. "200": {
  9614. "$ref": "#/responses/RepositoryList"
  9615. }
  9616. }
  9617. }
  9618. },
  9619. "/user/teams": {
  9620. "get": {
  9621. "produces": [
  9622. "application/json"
  9623. ],
  9624. "tags": [
  9625. "user"
  9626. ],
  9627. "summary": "List all the teams a user belongs to",
  9628. "operationId": "userListTeams",
  9629. "parameters": [
  9630. {
  9631. "type": "integer",
  9632. "description": "page number of results to return (1-based)",
  9633. "name": "page",
  9634. "in": "query"
  9635. },
  9636. {
  9637. "type": "integer",
  9638. "description": "page size of results, maximum page size is 50",
  9639. "name": "limit",
  9640. "in": "query"
  9641. }
  9642. ],
  9643. "responses": {
  9644. "200": {
  9645. "$ref": "#/responses/TeamList"
  9646. }
  9647. }
  9648. }
  9649. },
  9650. "/user/times": {
  9651. "get": {
  9652. "produces": [
  9653. "application/json"
  9654. ],
  9655. "tags": [
  9656. "user"
  9657. ],
  9658. "summary": "List the current user's tracked times",
  9659. "operationId": "userCurrentTrackedTimes",
  9660. "parameters": [
  9661. {
  9662. "type": "string",
  9663. "format": "date-time",
  9664. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  9665. "name": "since",
  9666. "in": "query"
  9667. },
  9668. {
  9669. "type": "string",
  9670. "format": "date-time",
  9671. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  9672. "name": "before",
  9673. "in": "query"
  9674. }
  9675. ],
  9676. "responses": {
  9677. "200": {
  9678. "$ref": "#/responses/TrackedTimeList"
  9679. }
  9680. }
  9681. }
  9682. },
  9683. "/users/search": {
  9684. "get": {
  9685. "produces": [
  9686. "application/json"
  9687. ],
  9688. "tags": [
  9689. "user"
  9690. ],
  9691. "summary": "Search for users",
  9692. "operationId": "userSearch",
  9693. "parameters": [
  9694. {
  9695. "type": "string",
  9696. "description": "keyword",
  9697. "name": "q",
  9698. "in": "query"
  9699. },
  9700. {
  9701. "type": "integer",
  9702. "format": "int64",
  9703. "description": "ID of the user to search for",
  9704. "name": "uid",
  9705. "in": "query"
  9706. },
  9707. {
  9708. "type": "integer",
  9709. "description": "page number of results to return (1-based)",
  9710. "name": "page",
  9711. "in": "query"
  9712. },
  9713. {
  9714. "type": "integer",
  9715. "description": "page size of results, maximum page size is 50",
  9716. "name": "limit",
  9717. "in": "query"
  9718. }
  9719. ],
  9720. "responses": {
  9721. "200": {
  9722. "description": "SearchResults of a successful search",
  9723. "schema": {
  9724. "type": "object",
  9725. "properties": {
  9726. "data": {
  9727. "type": "array",
  9728. "items": {
  9729. "$ref": "#/definitions/User"
  9730. }
  9731. },
  9732. "ok": {
  9733. "type": "boolean"
  9734. }
  9735. }
  9736. }
  9737. }
  9738. }
  9739. }
  9740. },
  9741. "/users/{follower}/following/{followee}": {
  9742. "get": {
  9743. "tags": [
  9744. "user"
  9745. ],
  9746. "summary": "Check if one user is following another user",
  9747. "operationId": "userCheckFollowing",
  9748. "parameters": [
  9749. {
  9750. "type": "string",
  9751. "description": "username of following user",
  9752. "name": "follower",
  9753. "in": "path",
  9754. "required": true
  9755. },
  9756. {
  9757. "type": "string",
  9758. "description": "username of followed user",
  9759. "name": "followee",
  9760. "in": "path",
  9761. "required": true
  9762. }
  9763. ],
  9764. "responses": {
  9765. "204": {
  9766. "$ref": "#/responses/empty"
  9767. },
  9768. "404": {
  9769. "$ref": "#/responses/notFound"
  9770. }
  9771. }
  9772. }
  9773. },
  9774. "/users/{username}": {
  9775. "get": {
  9776. "produces": [
  9777. "application/json"
  9778. ],
  9779. "tags": [
  9780. "user"
  9781. ],
  9782. "summary": "Get a user",
  9783. "operationId": "userGet",
  9784. "parameters": [
  9785. {
  9786. "type": "string",
  9787. "description": "username of user to get",
  9788. "name": "username",
  9789. "in": "path",
  9790. "required": true
  9791. }
  9792. ],
  9793. "responses": {
  9794. "200": {
  9795. "$ref": "#/responses/User"
  9796. },
  9797. "404": {
  9798. "$ref": "#/responses/notFound"
  9799. }
  9800. }
  9801. }
  9802. },
  9803. "/users/{username}/followers": {
  9804. "get": {
  9805. "produces": [
  9806. "application/json"
  9807. ],
  9808. "tags": [
  9809. "user"
  9810. ],
  9811. "summary": "List the given user's followers",
  9812. "operationId": "userListFollowers",
  9813. "parameters": [
  9814. {
  9815. "type": "string",
  9816. "description": "username of user",
  9817. "name": "username",
  9818. "in": "path",
  9819. "required": true
  9820. },
  9821. {
  9822. "type": "integer",
  9823. "description": "page number of results to return (1-based)",
  9824. "name": "page",
  9825. "in": "query"
  9826. },
  9827. {
  9828. "type": "integer",
  9829. "description": "page size of results, maximum page size is 50",
  9830. "name": "limit",
  9831. "in": "query"
  9832. }
  9833. ],
  9834. "responses": {
  9835. "200": {
  9836. "$ref": "#/responses/UserList"
  9837. }
  9838. }
  9839. }
  9840. },
  9841. "/users/{username}/following": {
  9842. "get": {
  9843. "produces": [
  9844. "application/json"
  9845. ],
  9846. "tags": [
  9847. "user"
  9848. ],
  9849. "summary": "List the users that the given user is following",
  9850. "operationId": "userListFollowing",
  9851. "parameters": [
  9852. {
  9853. "type": "string",
  9854. "description": "username of user",
  9855. "name": "username",
  9856. "in": "path",
  9857. "required": true
  9858. },
  9859. {
  9860. "type": "integer",
  9861. "description": "page number of results to return (1-based)",
  9862. "name": "page",
  9863. "in": "query"
  9864. },
  9865. {
  9866. "type": "integer",
  9867. "description": "page size of results, maximum page size is 50",
  9868. "name": "limit",
  9869. "in": "query"
  9870. }
  9871. ],
  9872. "responses": {
  9873. "200": {
  9874. "$ref": "#/responses/UserList"
  9875. }
  9876. }
  9877. }
  9878. },
  9879. "/users/{username}/gpg_keys": {
  9880. "get": {
  9881. "produces": [
  9882. "application/json"
  9883. ],
  9884. "tags": [
  9885. "user"
  9886. ],
  9887. "summary": "List the given user's GPG keys",
  9888. "operationId": "userListGPGKeys",
  9889. "parameters": [
  9890. {
  9891. "type": "string",
  9892. "description": "username of user",
  9893. "name": "username",
  9894. "in": "path",
  9895. "required": true
  9896. },
  9897. {
  9898. "type": "integer",
  9899. "description": "page number of results to return (1-based)",
  9900. "name": "page",
  9901. "in": "query"
  9902. },
  9903. {
  9904. "type": "integer",
  9905. "description": "page size of results, maximum page size is 50",
  9906. "name": "limit",
  9907. "in": "query"
  9908. }
  9909. ],
  9910. "responses": {
  9911. "200": {
  9912. "$ref": "#/responses/GPGKeyList"
  9913. }
  9914. }
  9915. }
  9916. },
  9917. "/users/{username}/heatmap": {
  9918. "get": {
  9919. "produces": [
  9920. "application/json"
  9921. ],
  9922. "tags": [
  9923. "user"
  9924. ],
  9925. "summary": "Get a user's heatmap",
  9926. "operationId": "userGetHeatmapData",
  9927. "parameters": [
  9928. {
  9929. "type": "string",
  9930. "description": "username of user to get",
  9931. "name": "username",
  9932. "in": "path",
  9933. "required": true
  9934. }
  9935. ],
  9936. "responses": {
  9937. "200": {
  9938. "$ref": "#/responses/UserHeatmapData"
  9939. },
  9940. "404": {
  9941. "$ref": "#/responses/notFound"
  9942. }
  9943. }
  9944. }
  9945. },
  9946. "/users/{username}/keys": {
  9947. "get": {
  9948. "produces": [
  9949. "application/json"
  9950. ],
  9951. "tags": [
  9952. "user"
  9953. ],
  9954. "summary": "List the given user's public keys",
  9955. "operationId": "userListKeys",
  9956. "parameters": [
  9957. {
  9958. "type": "string",
  9959. "description": "username of user",
  9960. "name": "username",
  9961. "in": "path",
  9962. "required": true
  9963. },
  9964. {
  9965. "type": "string",
  9966. "description": "fingerprint of the key",
  9967. "name": "fingerprint",
  9968. "in": "query"
  9969. },
  9970. {
  9971. "type": "integer",
  9972. "description": "page number of results to return (1-based)",
  9973. "name": "page",
  9974. "in": "query"
  9975. },
  9976. {
  9977. "type": "integer",
  9978. "description": "page size of results, maximum page size is 50",
  9979. "name": "limit",
  9980. "in": "query"
  9981. }
  9982. ],
  9983. "responses": {
  9984. "200": {
  9985. "$ref": "#/responses/PublicKeyList"
  9986. }
  9987. }
  9988. }
  9989. },
  9990. "/users/{username}/orgs": {
  9991. "get": {
  9992. "produces": [
  9993. "application/json"
  9994. ],
  9995. "tags": [
  9996. "organization"
  9997. ],
  9998. "summary": "List a user's organizations",
  9999. "operationId": "orgListUserOrgs",
  10000. "parameters": [
  10001. {
  10002. "type": "string",
  10003. "description": "username of user",
  10004. "name": "username",
  10005. "in": "path",
  10006. "required": true
  10007. },
  10008. {
  10009. "type": "integer",
  10010. "description": "page number of results to return (1-based)",
  10011. "name": "page",
  10012. "in": "query"
  10013. },
  10014. {
  10015. "type": "integer",
  10016. "description": "page size of results, maximum page size is 50",
  10017. "name": "limit",
  10018. "in": "query"
  10019. }
  10020. ],
  10021. "responses": {
  10022. "200": {
  10023. "$ref": "#/responses/OrganizationList"
  10024. }
  10025. }
  10026. }
  10027. },
  10028. "/users/{username}/repos": {
  10029. "get": {
  10030. "produces": [
  10031. "application/json"
  10032. ],
  10033. "tags": [
  10034. "user"
  10035. ],
  10036. "summary": "List the repos owned by the given user",
  10037. "operationId": "userListRepos",
  10038. "parameters": [
  10039. {
  10040. "type": "string",
  10041. "description": "username of user",
  10042. "name": "username",
  10043. "in": "path",
  10044. "required": true
  10045. },
  10046. {
  10047. "type": "integer",
  10048. "description": "page number of results to return (1-based)",
  10049. "name": "page",
  10050. "in": "query"
  10051. },
  10052. {
  10053. "type": "integer",
  10054. "description": "page size of results, maximum page size is 50",
  10055. "name": "limit",
  10056. "in": "query"
  10057. }
  10058. ],
  10059. "responses": {
  10060. "200": {
  10061. "$ref": "#/responses/RepositoryList"
  10062. }
  10063. }
  10064. }
  10065. },
  10066. "/users/{username}/starred": {
  10067. "get": {
  10068. "produces": [
  10069. "application/json"
  10070. ],
  10071. "tags": [
  10072. "user"
  10073. ],
  10074. "summary": "The repos that the given user has starred",
  10075. "operationId": "userListStarred",
  10076. "parameters": [
  10077. {
  10078. "type": "string",
  10079. "description": "username of user",
  10080. "name": "username",
  10081. "in": "path",
  10082. "required": true
  10083. },
  10084. {
  10085. "type": "integer",
  10086. "description": "page number of results to return (1-based)",
  10087. "name": "page",
  10088. "in": "query"
  10089. },
  10090. {
  10091. "type": "integer",
  10092. "description": "page size of results, maximum page size is 50",
  10093. "name": "limit",
  10094. "in": "query"
  10095. }
  10096. ],
  10097. "responses": {
  10098. "200": {
  10099. "$ref": "#/responses/RepositoryList"
  10100. }
  10101. }
  10102. }
  10103. },
  10104. "/users/{username}/subscriptions": {
  10105. "get": {
  10106. "produces": [
  10107. "application/json"
  10108. ],
  10109. "tags": [
  10110. "user"
  10111. ],
  10112. "summary": "List the repositories watched by a user",
  10113. "operationId": "userListSubscriptions",
  10114. "parameters": [
  10115. {
  10116. "type": "string",
  10117. "description": "username of the user",
  10118. "name": "username",
  10119. "in": "path",
  10120. "required": true
  10121. },
  10122. {
  10123. "type": "integer",
  10124. "description": "page number of results to return (1-based)",
  10125. "name": "page",
  10126. "in": "query"
  10127. },
  10128. {
  10129. "type": "integer",
  10130. "description": "page size of results, maximum page size is 50",
  10131. "name": "limit",
  10132. "in": "query"
  10133. }
  10134. ],
  10135. "responses": {
  10136. "200": {
  10137. "$ref": "#/responses/RepositoryList"
  10138. }
  10139. }
  10140. }
  10141. },
  10142. "/users/{username}/tokens": {
  10143. "get": {
  10144. "produces": [
  10145. "application/json"
  10146. ],
  10147. "tags": [
  10148. "user"
  10149. ],
  10150. "summary": "List the authenticated user's access tokens",
  10151. "operationId": "userGetTokens",
  10152. "parameters": [
  10153. {
  10154. "type": "string",
  10155. "description": "username of user",
  10156. "name": "username",
  10157. "in": "path",
  10158. "required": true
  10159. },
  10160. {
  10161. "type": "integer",
  10162. "description": "page number of results to return (1-based)",
  10163. "name": "page",
  10164. "in": "query"
  10165. },
  10166. {
  10167. "type": "integer",
  10168. "description": "page size of results, maximum page size is 50",
  10169. "name": "limit",
  10170. "in": "query"
  10171. }
  10172. ],
  10173. "responses": {
  10174. "200": {
  10175. "$ref": "#/responses/AccessTokenList"
  10176. }
  10177. }
  10178. },
  10179. "post": {
  10180. "consumes": [
  10181. "application/json"
  10182. ],
  10183. "produces": [
  10184. "application/json"
  10185. ],
  10186. "tags": [
  10187. "user"
  10188. ],
  10189. "summary": "Create an access token",
  10190. "operationId": "userCreateToken",
  10191. "parameters": [
  10192. {
  10193. "type": "string",
  10194. "x-go-name": "Name",
  10195. "description": "username of user",
  10196. "name": "username",
  10197. "in": "path",
  10198. "required": true
  10199. },
  10200. {
  10201. "name": "accessToken",
  10202. "in": "body",
  10203. "schema": {
  10204. "type": "object",
  10205. "required": [
  10206. "name"
  10207. ],
  10208. "properties": {
  10209. "name": {
  10210. "type": "string"
  10211. }
  10212. }
  10213. }
  10214. }
  10215. ],
  10216. "responses": {
  10217. "200": {
  10218. "$ref": "#/responses/AccessToken"
  10219. }
  10220. }
  10221. }
  10222. },
  10223. "/users/{username}/tokens/{token}": {
  10224. "delete": {
  10225. "produces": [
  10226. "application/json"
  10227. ],
  10228. "tags": [
  10229. "user"
  10230. ],
  10231. "summary": "delete an access token",
  10232. "operationId": "userDeleteAccessToken",
  10233. "parameters": [
  10234. {
  10235. "type": "string",
  10236. "description": "username of user",
  10237. "name": "username",
  10238. "in": "path",
  10239. "required": true
  10240. },
  10241. {
  10242. "type": "integer",
  10243. "format": "int64",
  10244. "description": "token to be deleted",
  10245. "name": "token",
  10246. "in": "path",
  10247. "required": true
  10248. }
  10249. ],
  10250. "responses": {
  10251. "204": {
  10252. "$ref": "#/responses/empty"
  10253. }
  10254. }
  10255. }
  10256. },
  10257. "/version": {
  10258. "get": {
  10259. "produces": [
  10260. "application/json"
  10261. ],
  10262. "tags": [
  10263. "miscellaneous"
  10264. ],
  10265. "summary": "Returns the version of the OpenI application",
  10266. "operationId": "getVersion",
  10267. "responses": {
  10268. "200": {
  10269. "$ref": "#/responses/ServerVersion"
  10270. }
  10271. }
  10272. }
  10273. }
  10274. },
  10275. "definitions": {
  10276. "APIError": {
  10277. "description": "APIError is an api error with a message",
  10278. "type": "object",
  10279. "properties": {
  10280. "message": {
  10281. "type": "string",
  10282. "x-go-name": "Message"
  10283. },
  10284. "url": {
  10285. "type": "string",
  10286. "x-go-name": "URL"
  10287. }
  10288. },
  10289. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10290. },
  10291. "AccessToken": {
  10292. "type": "object",
  10293. "title": "AccessToken represents an API access token.",
  10294. "properties": {
  10295. "id": {
  10296. "type": "integer",
  10297. "format": "int64",
  10298. "x-go-name": "ID"
  10299. },
  10300. "name": {
  10301. "type": "string",
  10302. "x-go-name": "Name"
  10303. },
  10304. "sha1": {
  10305. "type": "string",
  10306. "x-go-name": "Token"
  10307. },
  10308. "token_last_eight": {
  10309. "type": "string",
  10310. "x-go-name": "TokenLastEight"
  10311. }
  10312. },
  10313. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10314. },
  10315. "AddCollaboratorOption": {
  10316. "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository",
  10317. "type": "object",
  10318. "properties": {
  10319. "permission": {
  10320. "type": "string",
  10321. "x-go-name": "Permission"
  10322. }
  10323. },
  10324. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10325. },
  10326. "AddTimeOption": {
  10327. "description": "AddTimeOption options for adding time to an issue",
  10328. "type": "object",
  10329. "required": [
  10330. "time"
  10331. ],
  10332. "properties": {
  10333. "created": {
  10334. "type": "string",
  10335. "format": "date-time",
  10336. "x-go-name": "Created"
  10337. },
  10338. "time": {
  10339. "description": "time in seconds",
  10340. "type": "integer",
  10341. "format": "int64",
  10342. "x-go-name": "Time"
  10343. },
  10344. "user_name": {
  10345. "description": "User who spent the time (optional)",
  10346. "type": "string",
  10347. "x-go-name": "User"
  10348. }
  10349. },
  10350. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10351. },
  10352. "AnnotatedTag": {
  10353. "description": "AnnotatedTag represents an annotated tag",
  10354. "type": "object",
  10355. "properties": {
  10356. "message": {
  10357. "type": "string",
  10358. "x-go-name": "Message"
  10359. },
  10360. "object": {
  10361. "$ref": "#/definitions/AnnotatedTagObject"
  10362. },
  10363. "sha": {
  10364. "type": "string",
  10365. "x-go-name": "SHA"
  10366. },
  10367. "tag": {
  10368. "type": "string",
  10369. "x-go-name": "Tag"
  10370. },
  10371. "tagger": {
  10372. "$ref": "#/definitions/CommitUser"
  10373. },
  10374. "url": {
  10375. "type": "string",
  10376. "x-go-name": "URL"
  10377. },
  10378. "verification": {
  10379. "$ref": "#/definitions/PayloadCommitVerification"
  10380. }
  10381. },
  10382. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10383. },
  10384. "AnnotatedTagObject": {
  10385. "description": "AnnotatedTagObject contains meta information of the tag object",
  10386. "type": "object",
  10387. "properties": {
  10388. "sha": {
  10389. "type": "string",
  10390. "x-go-name": "SHA"
  10391. },
  10392. "type": {
  10393. "type": "string",
  10394. "x-go-name": "Type"
  10395. },
  10396. "url": {
  10397. "type": "string",
  10398. "x-go-name": "URL"
  10399. }
  10400. },
  10401. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10402. },
  10403. "Attachment": {
  10404. "description": "Attachment a generic attachment",
  10405. "type": "object",
  10406. "properties": {
  10407. "browser_download_url": {
  10408. "type": "string",
  10409. "x-go-name": "DownloadURL"
  10410. },
  10411. "created_at": {
  10412. "type": "string",
  10413. "format": "date-time",
  10414. "x-go-name": "Created"
  10415. },
  10416. "download_count": {
  10417. "type": "integer",
  10418. "format": "int64",
  10419. "x-go-name": "DownloadCount"
  10420. },
  10421. "id": {
  10422. "type": "integer",
  10423. "format": "int64",
  10424. "x-go-name": "ID"
  10425. },
  10426. "name": {
  10427. "type": "string",
  10428. "x-go-name": "Name"
  10429. },
  10430. "size": {
  10431. "type": "integer",
  10432. "format": "int64",
  10433. "x-go-name": "Size"
  10434. },
  10435. "uuid": {
  10436. "type": "string",
  10437. "x-go-name": "UUID"
  10438. }
  10439. },
  10440. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10441. },
  10442. "Branch": {
  10443. "description": "Branch represents a repository branch",
  10444. "type": "object",
  10445. "properties": {
  10446. "commit": {
  10447. "$ref": "#/definitions/PayloadCommit"
  10448. },
  10449. "effective_branch_protection_name": {
  10450. "type": "string",
  10451. "x-go-name": "EffectiveBranchProtectionName"
  10452. },
  10453. "enable_status_check": {
  10454. "type": "boolean",
  10455. "x-go-name": "EnableStatusCheck"
  10456. },
  10457. "name": {
  10458. "type": "string",
  10459. "x-go-name": "Name"
  10460. },
  10461. "protected": {
  10462. "type": "boolean",
  10463. "x-go-name": "Protected"
  10464. },
  10465. "required_approvals": {
  10466. "type": "integer",
  10467. "format": "int64",
  10468. "x-go-name": "RequiredApprovals"
  10469. },
  10470. "status_check_contexts": {
  10471. "type": "array",
  10472. "items": {
  10473. "type": "string"
  10474. },
  10475. "x-go-name": "StatusCheckContexts"
  10476. },
  10477. "user_can_merge": {
  10478. "type": "boolean",
  10479. "x-go-name": "UserCanMerge"
  10480. },
  10481. "user_can_push": {
  10482. "type": "boolean",
  10483. "x-go-name": "UserCanPush"
  10484. }
  10485. },
  10486. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10487. },
  10488. "BranchProtection": {
  10489. "description": "BranchProtection represents a branch protection for a repository",
  10490. "type": "object",
  10491. "properties": {
  10492. "approvals_whitelist_teams": {
  10493. "type": "array",
  10494. "items": {
  10495. "type": "string"
  10496. },
  10497. "x-go-name": "ApprovalsWhitelistTeams"
  10498. },
  10499. "approvals_whitelist_username": {
  10500. "type": "array",
  10501. "items": {
  10502. "type": "string"
  10503. },
  10504. "x-go-name": "ApprovalsWhitelistUsernames"
  10505. },
  10506. "block_on_outdated_branch": {
  10507. "type": "boolean",
  10508. "x-go-name": "BlockOnOutdatedBranch"
  10509. },
  10510. "block_on_rejected_reviews": {
  10511. "type": "boolean",
  10512. "x-go-name": "BlockOnRejectedReviews"
  10513. },
  10514. "branch_name": {
  10515. "type": "string",
  10516. "x-go-name": "BranchName"
  10517. },
  10518. "created_at": {
  10519. "type": "string",
  10520. "format": "date-time",
  10521. "x-go-name": "Created"
  10522. },
  10523. "dismiss_stale_approvals": {
  10524. "type": "boolean",
  10525. "x-go-name": "DismissStaleApprovals"
  10526. },
  10527. "enable_approvals_whitelist": {
  10528. "type": "boolean",
  10529. "x-go-name": "EnableApprovalsWhitelist"
  10530. },
  10531. "enable_merge_whitelist": {
  10532. "type": "boolean",
  10533. "x-go-name": "EnableMergeWhitelist"
  10534. },
  10535. "enable_push": {
  10536. "type": "boolean",
  10537. "x-go-name": "EnablePush"
  10538. },
  10539. "enable_push_whitelist": {
  10540. "type": "boolean",
  10541. "x-go-name": "EnablePushWhitelist"
  10542. },
  10543. "enable_status_check": {
  10544. "type": "boolean",
  10545. "x-go-name": "EnableStatusCheck"
  10546. },
  10547. "merge_whitelist_teams": {
  10548. "type": "array",
  10549. "items": {
  10550. "type": "string"
  10551. },
  10552. "x-go-name": "MergeWhitelistTeams"
  10553. },
  10554. "merge_whitelist_usernames": {
  10555. "type": "array",
  10556. "items": {
  10557. "type": "string"
  10558. },
  10559. "x-go-name": "MergeWhitelistUsernames"
  10560. },
  10561. "protected_file_patterns": {
  10562. "type": "string",
  10563. "x-go-name": "ProtectedFilePatterns"
  10564. },
  10565. "push_whitelist_deploy_keys": {
  10566. "type": "boolean",
  10567. "x-go-name": "PushWhitelistDeployKeys"
  10568. },
  10569. "push_whitelist_teams": {
  10570. "type": "array",
  10571. "items": {
  10572. "type": "string"
  10573. },
  10574. "x-go-name": "PushWhitelistTeams"
  10575. },
  10576. "push_whitelist_usernames": {
  10577. "type": "array",
  10578. "items": {
  10579. "type": "string"
  10580. },
  10581. "x-go-name": "PushWhitelistUsernames"
  10582. },
  10583. "require_signed_commits": {
  10584. "type": "boolean",
  10585. "x-go-name": "RequireSignedCommits"
  10586. },
  10587. "required_approvals": {
  10588. "type": "integer",
  10589. "format": "int64",
  10590. "x-go-name": "RequiredApprovals"
  10591. },
  10592. "status_check_contexts": {
  10593. "type": "array",
  10594. "items": {
  10595. "type": "string"
  10596. },
  10597. "x-go-name": "StatusCheckContexts"
  10598. },
  10599. "updated_at": {
  10600. "type": "string",
  10601. "format": "date-time",
  10602. "x-go-name": "Updated"
  10603. }
  10604. },
  10605. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10606. },
  10607. "Comment": {
  10608. "description": "Comment represents a comment on a commit or issue",
  10609. "type": "object",
  10610. "properties": {
  10611. "body": {
  10612. "type": "string",
  10613. "x-go-name": "Body"
  10614. },
  10615. "created_at": {
  10616. "type": "string",
  10617. "format": "date-time",
  10618. "x-go-name": "Created"
  10619. },
  10620. "html_url": {
  10621. "type": "string",
  10622. "x-go-name": "HTMLURL"
  10623. },
  10624. "id": {
  10625. "type": "integer",
  10626. "format": "int64",
  10627. "x-go-name": "ID"
  10628. },
  10629. "issue_url": {
  10630. "type": "string",
  10631. "x-go-name": "IssueURL"
  10632. },
  10633. "original_author": {
  10634. "type": "string",
  10635. "x-go-name": "OriginalAuthor"
  10636. },
  10637. "original_author_id": {
  10638. "type": "integer",
  10639. "format": "int64",
  10640. "x-go-name": "OriginalAuthorID"
  10641. },
  10642. "pull_request_url": {
  10643. "type": "string",
  10644. "x-go-name": "PRURL"
  10645. },
  10646. "updated_at": {
  10647. "type": "string",
  10648. "format": "date-time",
  10649. "x-go-name": "Updated"
  10650. },
  10651. "user": {
  10652. "$ref": "#/definitions/User"
  10653. }
  10654. },
  10655. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10656. },
  10657. "Commit": {
  10658. "type": "object",
  10659. "title": "Commit contains information generated from a Git commit.",
  10660. "properties": {
  10661. "author": {
  10662. "$ref": "#/definitions/User"
  10663. },
  10664. "commit": {
  10665. "$ref": "#/definitions/RepoCommit"
  10666. },
  10667. "committer": {
  10668. "$ref": "#/definitions/User"
  10669. },
  10670. "html_url": {
  10671. "type": "string",
  10672. "x-go-name": "HTMLURL"
  10673. },
  10674. "parents": {
  10675. "type": "array",
  10676. "items": {
  10677. "$ref": "#/definitions/CommitMeta"
  10678. },
  10679. "x-go-name": "Parents"
  10680. },
  10681. "sha": {
  10682. "type": "string",
  10683. "x-go-name": "SHA"
  10684. },
  10685. "url": {
  10686. "type": "string",
  10687. "x-go-name": "URL"
  10688. }
  10689. },
  10690. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10691. },
  10692. "CommitDateOptions": {
  10693. "description": "CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE",
  10694. "type": "object",
  10695. "properties": {
  10696. "author": {
  10697. "type": "string",
  10698. "format": "date-time",
  10699. "x-go-name": "Author"
  10700. },
  10701. "committer": {
  10702. "type": "string",
  10703. "format": "date-time",
  10704. "x-go-name": "Committer"
  10705. }
  10706. },
  10707. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10708. },
  10709. "CommitMeta": {
  10710. "type": "object",
  10711. "title": "CommitMeta contains meta information of a commit in terms of API.",
  10712. "properties": {
  10713. "sha": {
  10714. "type": "string",
  10715. "x-go-name": "SHA"
  10716. },
  10717. "url": {
  10718. "type": "string",
  10719. "x-go-name": "URL"
  10720. }
  10721. },
  10722. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10723. },
  10724. "CommitUser": {
  10725. "type": "object",
  10726. "title": "CommitUser contains information of a user in the context of a commit.",
  10727. "properties": {
  10728. "date": {
  10729. "type": "string",
  10730. "x-go-name": "Date"
  10731. },
  10732. "email": {
  10733. "type": "string",
  10734. "format": "email",
  10735. "x-go-name": "Email"
  10736. },
  10737. "name": {
  10738. "type": "string",
  10739. "x-go-name": "Name"
  10740. }
  10741. },
  10742. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10743. },
  10744. "ContentsResponse": {
  10745. "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content",
  10746. "type": "object",
  10747. "properties": {
  10748. "_links": {
  10749. "$ref": "#/definitions/FileLinksResponse"
  10750. },
  10751. "content": {
  10752. "description": "`content` is populated when `type` is `file`, otherwise null",
  10753. "type": "string",
  10754. "x-go-name": "Content"
  10755. },
  10756. "download_url": {
  10757. "type": "string",
  10758. "x-go-name": "DownloadURL"
  10759. },
  10760. "encoding": {
  10761. "description": "`encoding` is populated when `type` is `file`, otherwise null",
  10762. "type": "string",
  10763. "x-go-name": "Encoding"
  10764. },
  10765. "git_url": {
  10766. "type": "string",
  10767. "x-go-name": "GitURL"
  10768. },
  10769. "html_url": {
  10770. "type": "string",
  10771. "x-go-name": "HTMLURL"
  10772. },
  10773. "name": {
  10774. "type": "string",
  10775. "x-go-name": "Name"
  10776. },
  10777. "path": {
  10778. "type": "string",
  10779. "x-go-name": "Path"
  10780. },
  10781. "sha": {
  10782. "type": "string",
  10783. "x-go-name": "SHA"
  10784. },
  10785. "size": {
  10786. "type": "integer",
  10787. "format": "int64",
  10788. "x-go-name": "Size"
  10789. },
  10790. "submodule_git_url": {
  10791. "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null",
  10792. "type": "string",
  10793. "x-go-name": "SubmoduleGitURL"
  10794. },
  10795. "target": {
  10796. "description": "`target` is populated when `type` is `symlink`, otherwise null",
  10797. "type": "string",
  10798. "x-go-name": "Target"
  10799. },
  10800. "type": {
  10801. "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`",
  10802. "type": "string",
  10803. "x-go-name": "Type"
  10804. },
  10805. "url": {
  10806. "type": "string",
  10807. "x-go-name": "URL"
  10808. }
  10809. },
  10810. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10811. },
  10812. "CreateBranchProtectionOption": {
  10813. "description": "CreateBranchProtectionOption options for creating a branch protection",
  10814. "type": "object",
  10815. "properties": {
  10816. "approvals_whitelist_teams": {
  10817. "type": "array",
  10818. "items": {
  10819. "type": "string"
  10820. },
  10821. "x-go-name": "ApprovalsWhitelistTeams"
  10822. },
  10823. "approvals_whitelist_username": {
  10824. "type": "array",
  10825. "items": {
  10826. "type": "string"
  10827. },
  10828. "x-go-name": "ApprovalsWhitelistUsernames"
  10829. },
  10830. "block_on_outdated_branch": {
  10831. "type": "boolean",
  10832. "x-go-name": "BlockOnOutdatedBranch"
  10833. },
  10834. "block_on_rejected_reviews": {
  10835. "type": "boolean",
  10836. "x-go-name": "BlockOnRejectedReviews"
  10837. },
  10838. "branch_name": {
  10839. "type": "string",
  10840. "x-go-name": "BranchName"
  10841. },
  10842. "dismiss_stale_approvals": {
  10843. "type": "boolean",
  10844. "x-go-name": "DismissStaleApprovals"
  10845. },
  10846. "enable_approvals_whitelist": {
  10847. "type": "boolean",
  10848. "x-go-name": "EnableApprovalsWhitelist"
  10849. },
  10850. "enable_merge_whitelist": {
  10851. "type": "boolean",
  10852. "x-go-name": "EnableMergeWhitelist"
  10853. },
  10854. "enable_push": {
  10855. "type": "boolean",
  10856. "x-go-name": "EnablePush"
  10857. },
  10858. "enable_push_whitelist": {
  10859. "type": "boolean",
  10860. "x-go-name": "EnablePushWhitelist"
  10861. },
  10862. "enable_status_check": {
  10863. "type": "boolean",
  10864. "x-go-name": "EnableStatusCheck"
  10865. },
  10866. "merge_whitelist_teams": {
  10867. "type": "array",
  10868. "items": {
  10869. "type": "string"
  10870. },
  10871. "x-go-name": "MergeWhitelistTeams"
  10872. },
  10873. "merge_whitelist_usernames": {
  10874. "type": "array",
  10875. "items": {
  10876. "type": "string"
  10877. },
  10878. "x-go-name": "MergeWhitelistUsernames"
  10879. },
  10880. "protected_file_patterns": {
  10881. "type": "string",
  10882. "x-go-name": "ProtectedFilePatterns"
  10883. },
  10884. "push_whitelist_deploy_keys": {
  10885. "type": "boolean",
  10886. "x-go-name": "PushWhitelistDeployKeys"
  10887. },
  10888. "push_whitelist_teams": {
  10889. "type": "array",
  10890. "items": {
  10891. "type": "string"
  10892. },
  10893. "x-go-name": "PushWhitelistTeams"
  10894. },
  10895. "push_whitelist_usernames": {
  10896. "type": "array",
  10897. "items": {
  10898. "type": "string"
  10899. },
  10900. "x-go-name": "PushWhitelistUsernames"
  10901. },
  10902. "require_signed_commits": {
  10903. "type": "boolean",
  10904. "x-go-name": "RequireSignedCommits"
  10905. },
  10906. "required_approvals": {
  10907. "type": "integer",
  10908. "format": "int64",
  10909. "x-go-name": "RequiredApprovals"
  10910. },
  10911. "status_check_contexts": {
  10912. "type": "array",
  10913. "items": {
  10914. "type": "string"
  10915. },
  10916. "x-go-name": "StatusCheckContexts"
  10917. }
  10918. },
  10919. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10920. },
  10921. "CreateEmailOption": {
  10922. "description": "CreateEmailOption options when creating email addresses",
  10923. "type": "object",
  10924. "properties": {
  10925. "emails": {
  10926. "description": "email addresses to add",
  10927. "type": "array",
  10928. "items": {
  10929. "type": "string"
  10930. },
  10931. "x-go-name": "Emails"
  10932. }
  10933. },
  10934. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10935. },
  10936. "CreateFileOptions": {
  10937. "description": "CreateFileOptions options for creating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)",
  10938. "type": "object",
  10939. "required": [
  10940. "content"
  10941. ],
  10942. "properties": {
  10943. "author": {
  10944. "$ref": "#/definitions/Identity"
  10945. },
  10946. "branch": {
  10947. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  10948. "type": "string",
  10949. "x-go-name": "BranchName"
  10950. },
  10951. "committer": {
  10952. "$ref": "#/definitions/Identity"
  10953. },
  10954. "content": {
  10955. "description": "content must be base64 encoded",
  10956. "type": "string",
  10957. "x-go-name": "Content"
  10958. },
  10959. "dates": {
  10960. "$ref": "#/definitions/CommitDateOptions"
  10961. },
  10962. "message": {
  10963. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  10964. "type": "string",
  10965. "x-go-name": "Message"
  10966. },
  10967. "new_branch": {
  10968. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  10969. "type": "string",
  10970. "x-go-name": "NewBranchName"
  10971. }
  10972. },
  10973. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10974. },
  10975. "CreateForkOption": {
  10976. "description": "CreateForkOption options for creating a fork",
  10977. "type": "object",
  10978. "properties": {
  10979. "organization": {
  10980. "description": "organization name, if forking into an organization",
  10981. "type": "string",
  10982. "x-go-name": "Organization"
  10983. }
  10984. },
  10985. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10986. },
  10987. "CreateGPGKeyOption": {
  10988. "description": "CreateGPGKeyOption options create user GPG key",
  10989. "type": "object",
  10990. "required": [
  10991. "armored_public_key"
  10992. ],
  10993. "properties": {
  10994. "armored_public_key": {
  10995. "description": "An armored GPG key to add",
  10996. "type": "string",
  10997. "uniqueItems": true,
  10998. "x-go-name": "ArmoredKey"
  10999. }
  11000. },
  11001. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11002. },
  11003. "CreateHookOption": {
  11004. "description": "CreateHookOption options when create a hook",
  11005. "type": "object",
  11006. "required": [
  11007. "type",
  11008. "config"
  11009. ],
  11010. "properties": {
  11011. "active": {
  11012. "type": "boolean",
  11013. "default": false,
  11014. "x-go-name": "Active"
  11015. },
  11016. "branch_filter": {
  11017. "type": "string",
  11018. "x-go-name": "BranchFilter"
  11019. },
  11020. "config": {
  11021. "$ref": "#/definitions/CreateHookOptionConfig"
  11022. },
  11023. "events": {
  11024. "type": "array",
  11025. "items": {
  11026. "type": "string"
  11027. },
  11028. "x-go-name": "Events"
  11029. },
  11030. "type": {
  11031. "type": "string",
  11032. "enum": [
  11033. "dingtalk",
  11034. "discord",
  11035. "gitea",
  11036. "gogs",
  11037. "msteams",
  11038. "slack",
  11039. "telegram",
  11040. "feishu"
  11041. ],
  11042. "x-go-name": "Type"
  11043. }
  11044. },
  11045. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11046. },
  11047. "CreateHookOptionConfig": {
  11048. "description": "CreateHookOptionConfig has all config options in it\nrequired are \"content_type\" and \"url\" Required",
  11049. "type": "object",
  11050. "additionalProperties": {
  11051. "type": "string"
  11052. },
  11053. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11054. },
  11055. "CreateIssueCommentOption": {
  11056. "description": "CreateIssueCommentOption options for creating a comment on an issue",
  11057. "type": "object",
  11058. "required": [
  11059. "body"
  11060. ],
  11061. "properties": {
  11062. "body": {
  11063. "type": "string",
  11064. "x-go-name": "Body"
  11065. }
  11066. },
  11067. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11068. },
  11069. "CreateIssueOption": {
  11070. "description": "CreateIssueOption options to create one issue",
  11071. "type": "object",
  11072. "required": [
  11073. "title"
  11074. ],
  11075. "properties": {
  11076. "assignee": {
  11077. "description": "username of assignee",
  11078. "type": "string",
  11079. "x-go-name": "Assignee"
  11080. },
  11081. "assignees": {
  11082. "type": "array",
  11083. "items": {
  11084. "type": "string"
  11085. },
  11086. "x-go-name": "Assignees"
  11087. },
  11088. "body": {
  11089. "type": "string",
  11090. "x-go-name": "Body"
  11091. },
  11092. "closed": {
  11093. "type": "boolean",
  11094. "x-go-name": "Closed"
  11095. },
  11096. "due_date": {
  11097. "type": "string",
  11098. "format": "date-time",
  11099. "x-go-name": "Deadline"
  11100. },
  11101. "labels": {
  11102. "description": "list of label ids",
  11103. "type": "array",
  11104. "items": {
  11105. "type": "integer",
  11106. "format": "int64"
  11107. },
  11108. "x-go-name": "Labels"
  11109. },
  11110. "milestone": {
  11111. "description": "milestone id",
  11112. "type": "integer",
  11113. "format": "int64",
  11114. "x-go-name": "Milestone"
  11115. },
  11116. "title": {
  11117. "type": "string",
  11118. "x-go-name": "Title"
  11119. }
  11120. },
  11121. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11122. },
  11123. "CreateKeyOption": {
  11124. "description": "CreateKeyOption options when creating a key",
  11125. "type": "object",
  11126. "required": [
  11127. "title",
  11128. "key"
  11129. ],
  11130. "properties": {
  11131. "key": {
  11132. "description": "An armored SSH key to add",
  11133. "type": "string",
  11134. "uniqueItems": true,
  11135. "x-go-name": "Key"
  11136. },
  11137. "read_only": {
  11138. "description": "Describe if the key has only read access or read/write",
  11139. "type": "boolean",
  11140. "x-go-name": "ReadOnly"
  11141. },
  11142. "title": {
  11143. "description": "Title of the key to add",
  11144. "type": "string",
  11145. "uniqueItems": true,
  11146. "x-go-name": "Title"
  11147. }
  11148. },
  11149. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11150. },
  11151. "CreateLabelOption": {
  11152. "description": "CreateLabelOption options for creating a label",
  11153. "type": "object",
  11154. "required": [
  11155. "name",
  11156. "color"
  11157. ],
  11158. "properties": {
  11159. "color": {
  11160. "type": "string",
  11161. "x-go-name": "Color",
  11162. "example": "#00aabb"
  11163. },
  11164. "description": {
  11165. "type": "string",
  11166. "x-go-name": "Description"
  11167. },
  11168. "name": {
  11169. "type": "string",
  11170. "x-go-name": "Name"
  11171. }
  11172. },
  11173. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11174. },
  11175. "CreateMilestoneOption": {
  11176. "description": "CreateMilestoneOption options for creating a milestone",
  11177. "type": "object",
  11178. "properties": {
  11179. "description": {
  11180. "type": "string",
  11181. "x-go-name": "Description"
  11182. },
  11183. "due_on": {
  11184. "type": "string",
  11185. "format": "date-time",
  11186. "x-go-name": "Deadline"
  11187. },
  11188. "title": {
  11189. "type": "string",
  11190. "x-go-name": "Title"
  11191. }
  11192. },
  11193. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11194. },
  11195. "CreateOAuth2ApplicationOptions": {
  11196. "description": "CreateOAuth2ApplicationOptions holds options to create an oauth2 application",
  11197. "type": "object",
  11198. "properties": {
  11199. "name": {
  11200. "type": "string",
  11201. "x-go-name": "Name"
  11202. },
  11203. "redirect_uris": {
  11204. "type": "array",
  11205. "items": {
  11206. "type": "string"
  11207. },
  11208. "x-go-name": "RedirectURIs"
  11209. }
  11210. },
  11211. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11212. },
  11213. "CreateOrgOption": {
  11214. "description": "CreateOrgOption options for creating an organization",
  11215. "type": "object",
  11216. "required": [
  11217. "username"
  11218. ],
  11219. "properties": {
  11220. "description": {
  11221. "type": "string",
  11222. "x-go-name": "Description"
  11223. },
  11224. "full_name": {
  11225. "type": "string",
  11226. "x-go-name": "FullName"
  11227. },
  11228. "location": {
  11229. "type": "string",
  11230. "x-go-name": "Location"
  11231. },
  11232. "repo_admin_change_team_access": {
  11233. "type": "boolean",
  11234. "x-go-name": "RepoAdminChangeTeamAccess"
  11235. },
  11236. "username": {
  11237. "type": "string",
  11238. "x-go-name": "UserName"
  11239. },
  11240. "visibility": {
  11241. "description": "possible values are `public` (default), `limited` or `private`",
  11242. "type": "string",
  11243. "enum": [
  11244. "public",
  11245. "limited",
  11246. "private"
  11247. ],
  11248. "x-go-name": "Visibility"
  11249. },
  11250. "website": {
  11251. "type": "string",
  11252. "x-go-name": "Website"
  11253. }
  11254. },
  11255. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11256. },
  11257. "CreatePullRequestOption": {
  11258. "description": "CreatePullRequestOption options when creating a pull request",
  11259. "type": "object",
  11260. "properties": {
  11261. "assignee": {
  11262. "type": "string",
  11263. "x-go-name": "Assignee"
  11264. },
  11265. "assignees": {
  11266. "type": "array",
  11267. "items": {
  11268. "type": "string"
  11269. },
  11270. "x-go-name": "Assignees"
  11271. },
  11272. "base": {
  11273. "type": "string",
  11274. "x-go-name": "Base"
  11275. },
  11276. "body": {
  11277. "type": "string",
  11278. "x-go-name": "Body"
  11279. },
  11280. "due_date": {
  11281. "type": "string",
  11282. "format": "date-time",
  11283. "x-go-name": "Deadline"
  11284. },
  11285. "head": {
  11286. "type": "string",
  11287. "x-go-name": "Head"
  11288. },
  11289. "labels": {
  11290. "type": "array",
  11291. "items": {
  11292. "type": "integer",
  11293. "format": "int64"
  11294. },
  11295. "x-go-name": "Labels"
  11296. },
  11297. "milestone": {
  11298. "type": "integer",
  11299. "format": "int64",
  11300. "x-go-name": "Milestone"
  11301. },
  11302. "title": {
  11303. "type": "string",
  11304. "x-go-name": "Title"
  11305. }
  11306. },
  11307. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11308. },
  11309. "CreatePullReviewComment": {
  11310. "description": "CreatePullReviewComment represent a review comment for creation api",
  11311. "type": "object",
  11312. "properties": {
  11313. "body": {
  11314. "type": "string",
  11315. "x-go-name": "Body"
  11316. },
  11317. "new_position": {
  11318. "description": "if comment to new file line or 0",
  11319. "type": "integer",
  11320. "format": "int64",
  11321. "x-go-name": "NewLineNum"
  11322. },
  11323. "old_position": {
  11324. "description": "if comment to old file line or 0",
  11325. "type": "integer",
  11326. "format": "int64",
  11327. "x-go-name": "OldLineNum"
  11328. },
  11329. "path": {
  11330. "description": "the tree path",
  11331. "type": "string",
  11332. "x-go-name": "Path"
  11333. }
  11334. },
  11335. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11336. },
  11337. "CreatePullReviewOptions": {
  11338. "description": "CreatePullReviewOptions are options to create a pull review",
  11339. "type": "object",
  11340. "properties": {
  11341. "body": {
  11342. "type": "string",
  11343. "x-go-name": "Body"
  11344. },
  11345. "comments": {
  11346. "type": "array",
  11347. "items": {
  11348. "$ref": "#/definitions/CreatePullReviewComment"
  11349. },
  11350. "x-go-name": "Comments"
  11351. },
  11352. "commit_id": {
  11353. "type": "string",
  11354. "x-go-name": "CommitID"
  11355. },
  11356. "event": {
  11357. "$ref": "#/definitions/ReviewStateType"
  11358. }
  11359. },
  11360. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11361. },
  11362. "CreateReleaseOption": {
  11363. "description": "CreateReleaseOption options when creating a release",
  11364. "type": "object",
  11365. "required": [
  11366. "tag_name"
  11367. ],
  11368. "properties": {
  11369. "body": {
  11370. "type": "string",
  11371. "x-go-name": "Note"
  11372. },
  11373. "draft": {
  11374. "type": "boolean",
  11375. "x-go-name": "IsDraft"
  11376. },
  11377. "name": {
  11378. "type": "string",
  11379. "x-go-name": "Title"
  11380. },
  11381. "prerelease": {
  11382. "type": "boolean",
  11383. "x-go-name": "IsPrerelease"
  11384. },
  11385. "tag_name": {
  11386. "type": "string",
  11387. "x-go-name": "TagName"
  11388. },
  11389. "target_commitish": {
  11390. "type": "string",
  11391. "x-go-name": "Target"
  11392. }
  11393. },
  11394. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11395. },
  11396. "CreateRepoOption": {
  11397. "description": "CreateRepoOption options when creating repository",
  11398. "type": "object",
  11399. "required": [
  11400. "name"
  11401. ],
  11402. "properties": {
  11403. "auto_init": {
  11404. "description": "Whether the repository should be auto-intialized?",
  11405. "type": "boolean",
  11406. "x-go-name": "AutoInit"
  11407. },
  11408. "default_branch": {
  11409. "description": "DefaultBranch of the repository (used when initializes and in template)",
  11410. "type": "string",
  11411. "x-go-name": "DefaultBranch"
  11412. },
  11413. "description": {
  11414. "description": "Description of the repository to create",
  11415. "type": "string",
  11416. "x-go-name": "Description"
  11417. },
  11418. "gitignores": {
  11419. "description": "Gitignores to use",
  11420. "type": "string",
  11421. "x-go-name": "Gitignores"
  11422. },
  11423. "issue_labels": {
  11424. "description": "Issue Label set to use",
  11425. "type": "string",
  11426. "x-go-name": "IssueLabels"
  11427. },
  11428. "license": {
  11429. "description": "License to use",
  11430. "type": "string",
  11431. "x-go-name": "License"
  11432. },
  11433. "name": {
  11434. "description": "Name of the repository to create",
  11435. "type": "string",
  11436. "uniqueItems": true,
  11437. "x-go-name": "Name"
  11438. },
  11439. "private": {
  11440. "description": "Whether the repository is private",
  11441. "type": "boolean",
  11442. "x-go-name": "Private"
  11443. },
  11444. "readme": {
  11445. "description": "Readme of the repository to create",
  11446. "type": "string",
  11447. "x-go-name": "Readme"
  11448. }
  11449. },
  11450. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11451. },
  11452. "CreateStatusOption": {
  11453. "description": "CreateStatusOption holds the information needed to create a new Status for a Commit",
  11454. "type": "object",
  11455. "properties": {
  11456. "context": {
  11457. "type": "string",
  11458. "x-go-name": "Context"
  11459. },
  11460. "description": {
  11461. "type": "string",
  11462. "x-go-name": "Description"
  11463. },
  11464. "state": {
  11465. "$ref": "#/definitions/StatusState"
  11466. },
  11467. "target_url": {
  11468. "type": "string",
  11469. "x-go-name": "TargetURL"
  11470. }
  11471. },
  11472. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11473. },
  11474. "CreateTeamOption": {
  11475. "description": "CreateTeamOption options for creating a team",
  11476. "type": "object",
  11477. "required": [
  11478. "name"
  11479. ],
  11480. "properties": {
  11481. "can_create_org_repo": {
  11482. "type": "boolean",
  11483. "x-go-name": "CanCreateOrgRepo"
  11484. },
  11485. "description": {
  11486. "type": "string",
  11487. "x-go-name": "Description"
  11488. },
  11489. "includes_all_repositories": {
  11490. "type": "boolean",
  11491. "x-go-name": "IncludesAllRepositories"
  11492. },
  11493. "name": {
  11494. "type": "string",
  11495. "x-go-name": "Name"
  11496. },
  11497. "permission": {
  11498. "type": "string",
  11499. "enum": [
  11500. "read",
  11501. "write",
  11502. "admin"
  11503. ],
  11504. "x-go-name": "Permission"
  11505. },
  11506. "units": {
  11507. "type": "array",
  11508. "items": {
  11509. "type": "string"
  11510. },
  11511. "x-go-name": "Units",
  11512. "example": [
  11513. "repo.code",
  11514. "repo.issues",
  11515. "repo.ext_issues",
  11516. "repo.wiki",
  11517. "repo.pulls",
  11518. "repo.releases",
  11519. "repo.ext_wiki"
  11520. ]
  11521. }
  11522. },
  11523. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11524. },
  11525. "CreateUserOption": {
  11526. "description": "CreateUserOption create user options",
  11527. "type": "object",
  11528. "required": [
  11529. "username",
  11530. "email",
  11531. "password"
  11532. ],
  11533. "properties": {
  11534. "email": {
  11535. "type": "string",
  11536. "format": "email",
  11537. "x-go-name": "Email"
  11538. },
  11539. "full_name": {
  11540. "type": "string",
  11541. "x-go-name": "FullName"
  11542. },
  11543. "login_name": {
  11544. "type": "string",
  11545. "x-go-name": "LoginName"
  11546. },
  11547. "must_change_password": {
  11548. "type": "boolean",
  11549. "x-go-name": "MustChangePassword"
  11550. },
  11551. "password": {
  11552. "type": "string",
  11553. "x-go-name": "Password"
  11554. },
  11555. "send_notify": {
  11556. "type": "boolean",
  11557. "x-go-name": "SendNotify"
  11558. },
  11559. "source_id": {
  11560. "type": "integer",
  11561. "format": "int64",
  11562. "x-go-name": "SourceID"
  11563. },
  11564. "username": {
  11565. "type": "string",
  11566. "x-go-name": "Username"
  11567. }
  11568. },
  11569. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11570. },
  11571. "DeleteEmailOption": {
  11572. "description": "DeleteEmailOption options when deleting email addresses",
  11573. "type": "object",
  11574. "properties": {
  11575. "emails": {
  11576. "description": "email addresses to delete",
  11577. "type": "array",
  11578. "items": {
  11579. "type": "string"
  11580. },
  11581. "x-go-name": "Emails"
  11582. }
  11583. },
  11584. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11585. },
  11586. "DeleteFileOptions": {
  11587. "description": "DeleteFileOptions options for deleting files (used for other File structs below)\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)",
  11588. "type": "object",
  11589. "required": [
  11590. "sha"
  11591. ],
  11592. "properties": {
  11593. "author": {
  11594. "$ref": "#/definitions/Identity"
  11595. },
  11596. "branch": {
  11597. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  11598. "type": "string",
  11599. "x-go-name": "BranchName"
  11600. },
  11601. "committer": {
  11602. "$ref": "#/definitions/Identity"
  11603. },
  11604. "dates": {
  11605. "$ref": "#/definitions/CommitDateOptions"
  11606. },
  11607. "message": {
  11608. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  11609. "type": "string",
  11610. "x-go-name": "Message"
  11611. },
  11612. "new_branch": {
  11613. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  11614. "type": "string",
  11615. "x-go-name": "NewBranchName"
  11616. },
  11617. "sha": {
  11618. "description": "sha is the SHA for the file that already exists",
  11619. "type": "string",
  11620. "x-go-name": "SHA"
  11621. }
  11622. },
  11623. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11624. },
  11625. "DeployKey": {
  11626. "description": "DeployKey a deploy key",
  11627. "type": "object",
  11628. "properties": {
  11629. "created_at": {
  11630. "type": "string",
  11631. "format": "date-time",
  11632. "x-go-name": "Created"
  11633. },
  11634. "fingerprint": {
  11635. "type": "string",
  11636. "x-go-name": "Fingerprint"
  11637. },
  11638. "id": {
  11639. "type": "integer",
  11640. "format": "int64",
  11641. "x-go-name": "ID"
  11642. },
  11643. "key": {
  11644. "type": "string",
  11645. "x-go-name": "Key"
  11646. },
  11647. "key_id": {
  11648. "type": "integer",
  11649. "format": "int64",
  11650. "x-go-name": "KeyID"
  11651. },
  11652. "read_only": {
  11653. "type": "boolean",
  11654. "x-go-name": "ReadOnly"
  11655. },
  11656. "repository": {
  11657. "$ref": "#/definitions/Repository"
  11658. },
  11659. "title": {
  11660. "type": "string",
  11661. "x-go-name": "Title"
  11662. },
  11663. "url": {
  11664. "type": "string",
  11665. "x-go-name": "URL"
  11666. }
  11667. },
  11668. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11669. },
  11670. "EditAttachmentOptions": {
  11671. "description": "EditAttachmentOptions options for editing attachments",
  11672. "type": "object",
  11673. "properties": {
  11674. "name": {
  11675. "type": "string",
  11676. "x-go-name": "Name"
  11677. }
  11678. },
  11679. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11680. },
  11681. "EditBranchProtectionOption": {
  11682. "description": "EditBranchProtectionOption options for editing a branch protection",
  11683. "type": "object",
  11684. "properties": {
  11685. "approvals_whitelist_teams": {
  11686. "type": "array",
  11687. "items": {
  11688. "type": "string"
  11689. },
  11690. "x-go-name": "ApprovalsWhitelistTeams"
  11691. },
  11692. "approvals_whitelist_username": {
  11693. "type": "array",
  11694. "items": {
  11695. "type": "string"
  11696. },
  11697. "x-go-name": "ApprovalsWhitelistUsernames"
  11698. },
  11699. "block_on_outdated_branch": {
  11700. "type": "boolean",
  11701. "x-go-name": "BlockOnOutdatedBranch"
  11702. },
  11703. "block_on_rejected_reviews": {
  11704. "type": "boolean",
  11705. "x-go-name": "BlockOnRejectedReviews"
  11706. },
  11707. "dismiss_stale_approvals": {
  11708. "type": "boolean",
  11709. "x-go-name": "DismissStaleApprovals"
  11710. },
  11711. "enable_approvals_whitelist": {
  11712. "type": "boolean",
  11713. "x-go-name": "EnableApprovalsWhitelist"
  11714. },
  11715. "enable_merge_whitelist": {
  11716. "type": "boolean",
  11717. "x-go-name": "EnableMergeWhitelist"
  11718. },
  11719. "enable_push": {
  11720. "type": "boolean",
  11721. "x-go-name": "EnablePush"
  11722. },
  11723. "enable_push_whitelist": {
  11724. "type": "boolean",
  11725. "x-go-name": "EnablePushWhitelist"
  11726. },
  11727. "enable_status_check": {
  11728. "type": "boolean",
  11729. "x-go-name": "EnableStatusCheck"
  11730. },
  11731. "merge_whitelist_teams": {
  11732. "type": "array",
  11733. "items": {
  11734. "type": "string"
  11735. },
  11736. "x-go-name": "MergeWhitelistTeams"
  11737. },
  11738. "merge_whitelist_usernames": {
  11739. "type": "array",
  11740. "items": {
  11741. "type": "string"
  11742. },
  11743. "x-go-name": "MergeWhitelistUsernames"
  11744. },
  11745. "protected_file_patterns": {
  11746. "type": "string",
  11747. "x-go-name": "ProtectedFilePatterns"
  11748. },
  11749. "push_whitelist_deploy_keys": {
  11750. "type": "boolean",
  11751. "x-go-name": "PushWhitelistDeployKeys"
  11752. },
  11753. "push_whitelist_teams": {
  11754. "type": "array",
  11755. "items": {
  11756. "type": "string"
  11757. },
  11758. "x-go-name": "PushWhitelistTeams"
  11759. },
  11760. "push_whitelist_usernames": {
  11761. "type": "array",
  11762. "items": {
  11763. "type": "string"
  11764. },
  11765. "x-go-name": "PushWhitelistUsernames"
  11766. },
  11767. "require_signed_commits": {
  11768. "type": "boolean",
  11769. "x-go-name": "RequireSignedCommits"
  11770. },
  11771. "required_approvals": {
  11772. "type": "integer",
  11773. "format": "int64",
  11774. "x-go-name": "RequiredApprovals"
  11775. },
  11776. "status_check_contexts": {
  11777. "type": "array",
  11778. "items": {
  11779. "type": "string"
  11780. },
  11781. "x-go-name": "StatusCheckContexts"
  11782. }
  11783. },
  11784. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11785. },
  11786. "EditDeadlineOption": {
  11787. "description": "EditDeadlineOption options for creating a deadline",
  11788. "type": "object",
  11789. "required": [
  11790. "due_date"
  11791. ],
  11792. "properties": {
  11793. "due_date": {
  11794. "type": "string",
  11795. "format": "date-time",
  11796. "x-go-name": "Deadline"
  11797. }
  11798. },
  11799. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11800. },
  11801. "EditGitHookOption": {
  11802. "description": "EditGitHookOption options when modifying one Git hook",
  11803. "type": "object",
  11804. "properties": {
  11805. "content": {
  11806. "type": "string",
  11807. "x-go-name": "Content"
  11808. }
  11809. },
  11810. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11811. },
  11812. "EditHookOption": {
  11813. "description": "EditHookOption options when modify one hook",
  11814. "type": "object",
  11815. "properties": {
  11816. "active": {
  11817. "type": "boolean",
  11818. "x-go-name": "Active"
  11819. },
  11820. "branch_filter": {
  11821. "type": "string",
  11822. "x-go-name": "BranchFilter"
  11823. },
  11824. "config": {
  11825. "type": "object",
  11826. "additionalProperties": {
  11827. "type": "string"
  11828. },
  11829. "x-go-name": "Config"
  11830. },
  11831. "events": {
  11832. "type": "array",
  11833. "items": {
  11834. "type": "string"
  11835. },
  11836. "x-go-name": "Events"
  11837. }
  11838. },
  11839. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11840. },
  11841. "EditIssueCommentOption": {
  11842. "description": "EditIssueCommentOption options for editing a comment",
  11843. "type": "object",
  11844. "required": [
  11845. "body"
  11846. ],
  11847. "properties": {
  11848. "body": {
  11849. "type": "string",
  11850. "x-go-name": "Body"
  11851. }
  11852. },
  11853. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11854. },
  11855. "EditIssueOption": {
  11856. "description": "EditIssueOption options for editing an issue",
  11857. "type": "object",
  11858. "properties": {
  11859. "assignee": {
  11860. "type": "string",
  11861. "x-go-name": "Assignee"
  11862. },
  11863. "assignees": {
  11864. "type": "array",
  11865. "items": {
  11866. "type": "string"
  11867. },
  11868. "x-go-name": "Assignees"
  11869. },
  11870. "body": {
  11871. "type": "string",
  11872. "x-go-name": "Body"
  11873. },
  11874. "due_date": {
  11875. "type": "string",
  11876. "format": "date-time",
  11877. "x-go-name": "Deadline"
  11878. },
  11879. "milestone": {
  11880. "type": "integer",
  11881. "format": "int64",
  11882. "x-go-name": "Milestone"
  11883. },
  11884. "state": {
  11885. "type": "string",
  11886. "x-go-name": "State"
  11887. },
  11888. "title": {
  11889. "type": "string",
  11890. "x-go-name": "Title"
  11891. },
  11892. "unset_due_date": {
  11893. "type": "boolean",
  11894. "x-go-name": "RemoveDeadline"
  11895. }
  11896. },
  11897. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11898. },
  11899. "EditLabelOption": {
  11900. "description": "EditLabelOption options for editing a label",
  11901. "type": "object",
  11902. "properties": {
  11903. "color": {
  11904. "type": "string",
  11905. "x-go-name": "Color"
  11906. },
  11907. "description": {
  11908. "type": "string",
  11909. "x-go-name": "Description"
  11910. },
  11911. "name": {
  11912. "type": "string",
  11913. "x-go-name": "Name"
  11914. }
  11915. },
  11916. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11917. },
  11918. "EditMilestoneOption": {
  11919. "description": "EditMilestoneOption options for editing a milestone",
  11920. "type": "object",
  11921. "properties": {
  11922. "description": {
  11923. "type": "string",
  11924. "x-go-name": "Description"
  11925. },
  11926. "due_on": {
  11927. "type": "string",
  11928. "format": "date-time",
  11929. "x-go-name": "Deadline"
  11930. },
  11931. "state": {
  11932. "type": "string",
  11933. "x-go-name": "State"
  11934. },
  11935. "title": {
  11936. "type": "string",
  11937. "x-go-name": "Title"
  11938. }
  11939. },
  11940. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11941. },
  11942. "EditOrgOption": {
  11943. "description": "EditOrgOption options for editing an organization",
  11944. "type": "object",
  11945. "properties": {
  11946. "description": {
  11947. "type": "string",
  11948. "x-go-name": "Description"
  11949. },
  11950. "full_name": {
  11951. "type": "string",
  11952. "x-go-name": "FullName"
  11953. },
  11954. "location": {
  11955. "type": "string",
  11956. "x-go-name": "Location"
  11957. },
  11958. "repo_admin_change_team_access": {
  11959. "type": "boolean",
  11960. "x-go-name": "RepoAdminChangeTeamAccess"
  11961. },
  11962. "visibility": {
  11963. "description": "possible values are `public`, `limited` or `private`",
  11964. "type": "string",
  11965. "enum": [
  11966. "public",
  11967. "limited",
  11968. "private"
  11969. ],
  11970. "x-go-name": "Visibility"
  11971. },
  11972. "website": {
  11973. "type": "string",
  11974. "x-go-name": "Website"
  11975. }
  11976. },
  11977. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11978. },
  11979. "EditPullRequestOption": {
  11980. "description": "EditPullRequestOption options when modify pull request",
  11981. "type": "object",
  11982. "properties": {
  11983. "assignee": {
  11984. "type": "string",
  11985. "x-go-name": "Assignee"
  11986. },
  11987. "assignees": {
  11988. "type": "array",
  11989. "items": {
  11990. "type": "string"
  11991. },
  11992. "x-go-name": "Assignees"
  11993. },
  11994. "body": {
  11995. "type": "string",
  11996. "x-go-name": "Body"
  11997. },
  11998. "due_date": {
  11999. "type": "string",
  12000. "format": "date-time",
  12001. "x-go-name": "Deadline"
  12002. },
  12003. "labels": {
  12004. "type": "array",
  12005. "items": {
  12006. "type": "integer",
  12007. "format": "int64"
  12008. },
  12009. "x-go-name": "Labels"
  12010. },
  12011. "milestone": {
  12012. "type": "integer",
  12013. "format": "int64",
  12014. "x-go-name": "Milestone"
  12015. },
  12016. "state": {
  12017. "type": "string",
  12018. "x-go-name": "State"
  12019. },
  12020. "title": {
  12021. "type": "string",
  12022. "x-go-name": "Title"
  12023. },
  12024. "unset_due_date": {
  12025. "type": "boolean",
  12026. "x-go-name": "RemoveDeadline"
  12027. }
  12028. },
  12029. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12030. },
  12031. "EditReactionOption": {
  12032. "description": "EditReactionOption contain the reaction type",
  12033. "type": "object",
  12034. "properties": {
  12035. "content": {
  12036. "type": "string",
  12037. "x-go-name": "Reaction"
  12038. }
  12039. },
  12040. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12041. },
  12042. "EditReleaseOption": {
  12043. "description": "EditReleaseOption options when editing a release",
  12044. "type": "object",
  12045. "properties": {
  12046. "body": {
  12047. "type": "string",
  12048. "x-go-name": "Note"
  12049. },
  12050. "draft": {
  12051. "type": "boolean",
  12052. "x-go-name": "IsDraft"
  12053. },
  12054. "name": {
  12055. "type": "string",
  12056. "x-go-name": "Title"
  12057. },
  12058. "prerelease": {
  12059. "type": "boolean",
  12060. "x-go-name": "IsPrerelease"
  12061. },
  12062. "tag_name": {
  12063. "type": "string",
  12064. "x-go-name": "TagName"
  12065. },
  12066. "target_commitish": {
  12067. "type": "string",
  12068. "x-go-name": "Target"
  12069. }
  12070. },
  12071. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12072. },
  12073. "EditRepoOption": {
  12074. "description": "EditRepoOption options when editing a repository's properties",
  12075. "type": "object",
  12076. "properties": {
  12077. "allow_merge_commits": {
  12078. "description": "either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`.",
  12079. "type": "boolean",
  12080. "x-go-name": "AllowMerge"
  12081. },
  12082. "allow_rebase": {
  12083. "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.",
  12084. "type": "boolean",
  12085. "x-go-name": "AllowRebase"
  12086. },
  12087. "allow_rebase_explicit": {
  12088. "description": "either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`.",
  12089. "type": "boolean",
  12090. "x-go-name": "AllowRebaseMerge"
  12091. },
  12092. "allow_squash_merge": {
  12093. "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.",
  12094. "type": "boolean",
  12095. "x-go-name": "AllowSquash"
  12096. },
  12097. "archived": {
  12098. "description": "set to `true` to archive this repository.",
  12099. "type": "boolean",
  12100. "x-go-name": "Archived"
  12101. },
  12102. "default_branch": {
  12103. "description": "sets the default branch for this repository.",
  12104. "type": "string",
  12105. "x-go-name": "DefaultBranch"
  12106. },
  12107. "description": {
  12108. "description": "a short description of the repository.",
  12109. "type": "string",
  12110. "x-go-name": "Description"
  12111. },
  12112. "external_tracker": {
  12113. "$ref": "#/definitions/ExternalTracker"
  12114. },
  12115. "external_wiki": {
  12116. "$ref": "#/definitions/ExternalWiki"
  12117. },
  12118. "has_issues": {
  12119. "description": "either `true` to enable issues for this repository or `false` to disable them.",
  12120. "type": "boolean",
  12121. "x-go-name": "HasIssues"
  12122. },
  12123. "has_pull_requests": {
  12124. "description": "either `true` to allow pull requests, or `false` to prevent pull request.",
  12125. "type": "boolean",
  12126. "x-go-name": "HasPullRequests"
  12127. },
  12128. "has_wiki": {
  12129. "description": "either `true` to enable the wiki for this repository or `false` to disable it.",
  12130. "type": "boolean",
  12131. "x-go-name": "HasWiki"
  12132. },
  12133. "ignore_whitespace_conflicts": {
  12134. "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.",
  12135. "type": "boolean",
  12136. "x-go-name": "IgnoreWhitespaceConflicts"
  12137. },
  12138. "internal_tracker": {
  12139. "$ref": "#/definitions/InternalTracker"
  12140. },
  12141. "name": {
  12142. "description": "name of the repository",
  12143. "type": "string",
  12144. "uniqueItems": true,
  12145. "x-go-name": "Name"
  12146. },
  12147. "private": {
  12148. "description": "either `true` to make the repository private or `false` to make it public.\nNote: you will get a 422 error if the organization restricts changing repository visibility to organization\nowners and a non-owner tries to change the value of private.",
  12149. "type": "boolean",
  12150. "x-go-name": "Private"
  12151. },
  12152. "template": {
  12153. "description": "either `true` to make this repository a template or `false` to make it a normal repository",
  12154. "type": "boolean",
  12155. "x-go-name": "Template"
  12156. },
  12157. "website": {
  12158. "description": "a URL with more information about the repository.",
  12159. "type": "string",
  12160. "x-go-name": "Website"
  12161. }
  12162. },
  12163. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12164. },
  12165. "EditTeamOption": {
  12166. "description": "EditTeamOption options for editing a team",
  12167. "type": "object",
  12168. "required": [
  12169. "name"
  12170. ],
  12171. "properties": {
  12172. "can_create_org_repo": {
  12173. "type": "boolean",
  12174. "x-go-name": "CanCreateOrgRepo"
  12175. },
  12176. "description": {
  12177. "type": "string",
  12178. "x-go-name": "Description"
  12179. },
  12180. "includes_all_repositories": {
  12181. "type": "boolean",
  12182. "x-go-name": "IncludesAllRepositories"
  12183. },
  12184. "name": {
  12185. "type": "string",
  12186. "x-go-name": "Name"
  12187. },
  12188. "permission": {
  12189. "type": "string",
  12190. "enum": [
  12191. "read",
  12192. "write",
  12193. "admin"
  12194. ],
  12195. "x-go-name": "Permission"
  12196. },
  12197. "units": {
  12198. "type": "array",
  12199. "items": {
  12200. "type": "string"
  12201. },
  12202. "x-go-name": "Units",
  12203. "example": [
  12204. "repo.code",
  12205. "repo.issues",
  12206. "repo.ext_issues",
  12207. "repo.wiki",
  12208. "repo.pulls",
  12209. "repo.releases",
  12210. "repo.ext_wiki"
  12211. ]
  12212. }
  12213. },
  12214. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12215. },
  12216. "EditUserOption": {
  12217. "description": "EditUserOption edit user options",
  12218. "type": "object",
  12219. "required": [
  12220. "email"
  12221. ],
  12222. "properties": {
  12223. "active": {
  12224. "type": "boolean",
  12225. "x-go-name": "Active"
  12226. },
  12227. "admin": {
  12228. "type": "boolean",
  12229. "x-go-name": "Admin"
  12230. },
  12231. "allow_create_organization": {
  12232. "type": "boolean",
  12233. "x-go-name": "AllowCreateOrganization"
  12234. },
  12235. "allow_git_hook": {
  12236. "type": "boolean",
  12237. "x-go-name": "AllowGitHook"
  12238. },
  12239. "allow_import_local": {
  12240. "type": "boolean",
  12241. "x-go-name": "AllowImportLocal"
  12242. },
  12243. "email": {
  12244. "type": "string",
  12245. "format": "email",
  12246. "x-go-name": "Email"
  12247. },
  12248. "full_name": {
  12249. "type": "string",
  12250. "x-go-name": "FullName"
  12251. },
  12252. "location": {
  12253. "type": "string",
  12254. "x-go-name": "Location"
  12255. },
  12256. "login_name": {
  12257. "type": "string",
  12258. "x-go-name": "LoginName"
  12259. },
  12260. "max_repo_creation": {
  12261. "type": "integer",
  12262. "format": "int64",
  12263. "x-go-name": "MaxRepoCreation"
  12264. },
  12265. "must_change_password": {
  12266. "type": "boolean",
  12267. "x-go-name": "MustChangePassword"
  12268. },
  12269. "password": {
  12270. "type": "string",
  12271. "x-go-name": "Password"
  12272. },
  12273. "prohibit_login": {
  12274. "type": "boolean",
  12275. "x-go-name": "ProhibitLogin"
  12276. },
  12277. "source_id": {
  12278. "type": "integer",
  12279. "format": "int64",
  12280. "x-go-name": "SourceID"
  12281. },
  12282. "website": {
  12283. "type": "string",
  12284. "x-go-name": "Website"
  12285. }
  12286. },
  12287. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12288. },
  12289. "Email": {
  12290. "description": "Email an email address belonging to a user",
  12291. "type": "object",
  12292. "properties": {
  12293. "email": {
  12294. "type": "string",
  12295. "format": "email",
  12296. "x-go-name": "Email"
  12297. },
  12298. "primary": {
  12299. "type": "boolean",
  12300. "x-go-name": "Primary"
  12301. },
  12302. "verified": {
  12303. "type": "boolean",
  12304. "x-go-name": "Verified"
  12305. }
  12306. },
  12307. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12308. },
  12309. "ExternalTracker": {
  12310. "description": "ExternalTracker represents settings for external tracker",
  12311. "type": "object",
  12312. "properties": {
  12313. "external_tracker_format": {
  12314. "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.",
  12315. "type": "string",
  12316. "x-go-name": "ExternalTrackerFormat"
  12317. },
  12318. "external_tracker_style": {
  12319. "description": "External Issue Tracker Number Format, either `numeric` or `alphanumeric`",
  12320. "type": "string",
  12321. "x-go-name": "ExternalTrackerStyle"
  12322. },
  12323. "external_tracker_url": {
  12324. "description": "URL of external issue tracker.",
  12325. "type": "string",
  12326. "x-go-name": "ExternalTrackerURL"
  12327. }
  12328. },
  12329. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12330. },
  12331. "ExternalWiki": {
  12332. "description": "ExternalWiki represents setting for external wiki",
  12333. "type": "object",
  12334. "properties": {
  12335. "external_wiki_url": {
  12336. "description": "URL of external wiki.",
  12337. "type": "string",
  12338. "x-go-name": "ExternalWikiURL"
  12339. }
  12340. },
  12341. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12342. },
  12343. "FileCommitResponse": {
  12344. "type": "object",
  12345. "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.",
  12346. "properties": {
  12347. "author": {
  12348. "$ref": "#/definitions/CommitUser"
  12349. },
  12350. "committer": {
  12351. "$ref": "#/definitions/CommitUser"
  12352. },
  12353. "html_url": {
  12354. "type": "string",
  12355. "x-go-name": "HTMLURL"
  12356. },
  12357. "message": {
  12358. "type": "string",
  12359. "x-go-name": "Message"
  12360. },
  12361. "parents": {
  12362. "type": "array",
  12363. "items": {
  12364. "$ref": "#/definitions/CommitMeta"
  12365. },
  12366. "x-go-name": "Parents"
  12367. },
  12368. "sha": {
  12369. "type": "string",
  12370. "x-go-name": "SHA"
  12371. },
  12372. "tree": {
  12373. "$ref": "#/definitions/CommitMeta"
  12374. },
  12375. "url": {
  12376. "type": "string",
  12377. "x-go-name": "URL"
  12378. }
  12379. },
  12380. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12381. },
  12382. "FileDeleteResponse": {
  12383. "description": "FileDeleteResponse contains information about a repo's file that was deleted",
  12384. "type": "object",
  12385. "properties": {
  12386. "commit": {
  12387. "$ref": "#/definitions/FileCommitResponse"
  12388. },
  12389. "content": {
  12390. "type": "object",
  12391. "x-go-name": "Content"
  12392. },
  12393. "verification": {
  12394. "$ref": "#/definitions/PayloadCommitVerification"
  12395. }
  12396. },
  12397. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12398. },
  12399. "FileLinksResponse": {
  12400. "description": "FileLinksResponse contains the links for a repo's file",
  12401. "type": "object",
  12402. "properties": {
  12403. "git": {
  12404. "type": "string",
  12405. "x-go-name": "GitURL"
  12406. },
  12407. "html": {
  12408. "type": "string",
  12409. "x-go-name": "HTMLURL"
  12410. },
  12411. "self": {
  12412. "type": "string",
  12413. "x-go-name": "Self"
  12414. }
  12415. },
  12416. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12417. },
  12418. "FileResponse": {
  12419. "description": "FileResponse contains information about a repo's file",
  12420. "type": "object",
  12421. "properties": {
  12422. "commit": {
  12423. "$ref": "#/definitions/FileCommitResponse"
  12424. },
  12425. "content": {
  12426. "$ref": "#/definitions/ContentsResponse"
  12427. },
  12428. "verification": {
  12429. "$ref": "#/definitions/PayloadCommitVerification"
  12430. }
  12431. },
  12432. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12433. },
  12434. "GPGKey": {
  12435. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  12436. "type": "object",
  12437. "properties": {
  12438. "can_certify": {
  12439. "type": "boolean",
  12440. "x-go-name": "CanCertify"
  12441. },
  12442. "can_encrypt_comms": {
  12443. "type": "boolean",
  12444. "x-go-name": "CanEncryptComms"
  12445. },
  12446. "can_encrypt_storage": {
  12447. "type": "boolean",
  12448. "x-go-name": "CanEncryptStorage"
  12449. },
  12450. "can_sign": {
  12451. "type": "boolean",
  12452. "x-go-name": "CanSign"
  12453. },
  12454. "created_at": {
  12455. "type": "string",
  12456. "format": "date-time",
  12457. "x-go-name": "Created"
  12458. },
  12459. "emails": {
  12460. "type": "array",
  12461. "items": {
  12462. "$ref": "#/definitions/GPGKeyEmail"
  12463. },
  12464. "x-go-name": "Emails"
  12465. },
  12466. "expires_at": {
  12467. "type": "string",
  12468. "format": "date-time",
  12469. "x-go-name": "Expires"
  12470. },
  12471. "id": {
  12472. "type": "integer",
  12473. "format": "int64",
  12474. "x-go-name": "ID"
  12475. },
  12476. "key_id": {
  12477. "type": "string",
  12478. "x-go-name": "KeyID"
  12479. },
  12480. "primary_key_id": {
  12481. "type": "string",
  12482. "x-go-name": "PrimaryKeyID"
  12483. },
  12484. "public_key": {
  12485. "type": "string",
  12486. "x-go-name": "PublicKey"
  12487. },
  12488. "subkeys": {
  12489. "type": "array",
  12490. "items": {
  12491. "$ref": "#/definitions/GPGKey"
  12492. },
  12493. "x-go-name": "SubsKey"
  12494. }
  12495. },
  12496. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12497. },
  12498. "GPGKeyEmail": {
  12499. "description": "GPGKeyEmail an email attached to a GPGKey",
  12500. "type": "object",
  12501. "properties": {
  12502. "email": {
  12503. "type": "string",
  12504. "x-go-name": "Email"
  12505. },
  12506. "verified": {
  12507. "type": "boolean",
  12508. "x-go-name": "Verified"
  12509. }
  12510. },
  12511. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12512. },
  12513. "GitBlobResponse": {
  12514. "description": "GitBlobResponse represents a git blob",
  12515. "type": "object",
  12516. "properties": {
  12517. "content": {
  12518. "type": "string",
  12519. "x-go-name": "Content"
  12520. },
  12521. "encoding": {
  12522. "type": "string",
  12523. "x-go-name": "Encoding"
  12524. },
  12525. "sha": {
  12526. "type": "string",
  12527. "x-go-name": "SHA"
  12528. },
  12529. "size": {
  12530. "type": "integer",
  12531. "format": "int64",
  12532. "x-go-name": "Size"
  12533. },
  12534. "url": {
  12535. "type": "string",
  12536. "x-go-name": "URL"
  12537. }
  12538. },
  12539. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12540. },
  12541. "GitEntry": {
  12542. "description": "GitEntry represents a git tree",
  12543. "type": "object",
  12544. "properties": {
  12545. "mode": {
  12546. "type": "string",
  12547. "x-go-name": "Mode"
  12548. },
  12549. "path": {
  12550. "type": "string",
  12551. "x-go-name": "Path"
  12552. },
  12553. "sha": {
  12554. "type": "string",
  12555. "x-go-name": "SHA"
  12556. },
  12557. "size": {
  12558. "type": "integer",
  12559. "format": "int64",
  12560. "x-go-name": "Size"
  12561. },
  12562. "type": {
  12563. "type": "string",
  12564. "x-go-name": "Type"
  12565. },
  12566. "url": {
  12567. "type": "string",
  12568. "x-go-name": "URL"
  12569. }
  12570. },
  12571. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12572. },
  12573. "GitHook": {
  12574. "description": "GitHook represents a Git repository hook",
  12575. "type": "object",
  12576. "properties": {
  12577. "content": {
  12578. "type": "string",
  12579. "x-go-name": "Content"
  12580. },
  12581. "is_active": {
  12582. "type": "boolean",
  12583. "x-go-name": "IsActive"
  12584. },
  12585. "name": {
  12586. "type": "string",
  12587. "x-go-name": "Name"
  12588. }
  12589. },
  12590. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12591. },
  12592. "GitObject": {
  12593. "type": "object",
  12594. "title": "GitObject represents a Git object.",
  12595. "properties": {
  12596. "sha": {
  12597. "type": "string",
  12598. "x-go-name": "SHA"
  12599. },
  12600. "type": {
  12601. "type": "string",
  12602. "x-go-name": "Type"
  12603. },
  12604. "url": {
  12605. "type": "string",
  12606. "x-go-name": "URL"
  12607. }
  12608. },
  12609. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12610. },
  12611. "GitTreeResponse": {
  12612. "description": "GitTreeResponse returns a git tree",
  12613. "type": "object",
  12614. "properties": {
  12615. "page": {
  12616. "type": "integer",
  12617. "format": "int64",
  12618. "x-go-name": "Page"
  12619. },
  12620. "sha": {
  12621. "type": "string",
  12622. "x-go-name": "SHA"
  12623. },
  12624. "total_count": {
  12625. "type": "integer",
  12626. "format": "int64",
  12627. "x-go-name": "TotalCount"
  12628. },
  12629. "tree": {
  12630. "type": "array",
  12631. "items": {
  12632. "$ref": "#/definitions/GitEntry"
  12633. },
  12634. "x-go-name": "Entries"
  12635. },
  12636. "truncated": {
  12637. "type": "boolean",
  12638. "x-go-name": "Truncated"
  12639. },
  12640. "url": {
  12641. "type": "string",
  12642. "x-go-name": "URL"
  12643. }
  12644. },
  12645. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12646. },
  12647. "Hook": {
  12648. "description": "Hook a hook is a web hook when one repository changed",
  12649. "type": "object",
  12650. "properties": {
  12651. "active": {
  12652. "type": "boolean",
  12653. "x-go-name": "Active"
  12654. },
  12655. "config": {
  12656. "type": "object",
  12657. "additionalProperties": {
  12658. "type": "string"
  12659. },
  12660. "x-go-name": "Config"
  12661. },
  12662. "created_at": {
  12663. "type": "string",
  12664. "format": "date-time",
  12665. "x-go-name": "Created"
  12666. },
  12667. "events": {
  12668. "type": "array",
  12669. "items": {
  12670. "type": "string"
  12671. },
  12672. "x-go-name": "Events"
  12673. },
  12674. "id": {
  12675. "type": "integer",
  12676. "format": "int64",
  12677. "x-go-name": "ID"
  12678. },
  12679. "type": {
  12680. "type": "string",
  12681. "x-go-name": "Type"
  12682. },
  12683. "updated_at": {
  12684. "type": "string",
  12685. "format": "date-time",
  12686. "x-go-name": "Updated"
  12687. }
  12688. },
  12689. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12690. },
  12691. "Identity": {
  12692. "description": "Identity for a person's identity like an author or committer",
  12693. "type": "object",
  12694. "properties": {
  12695. "email": {
  12696. "type": "string",
  12697. "format": "email",
  12698. "x-go-name": "Email"
  12699. },
  12700. "name": {
  12701. "type": "string",
  12702. "x-go-name": "Name"
  12703. }
  12704. },
  12705. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12706. },
  12707. "InternalTracker": {
  12708. "description": "InternalTracker represents settings for internal tracker",
  12709. "type": "object",
  12710. "properties": {
  12711. "allow_only_contributors_to_track_time": {
  12712. "description": "Let only contributors track time (Built-in issue tracker)",
  12713. "type": "boolean",
  12714. "x-go-name": "AllowOnlyContributorsToTrackTime"
  12715. },
  12716. "enable_issue_dependencies": {
  12717. "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)",
  12718. "type": "boolean",
  12719. "x-go-name": "EnableIssueDependencies"
  12720. },
  12721. "enable_time_tracker": {
  12722. "description": "Enable time tracking (Built-in issue tracker)",
  12723. "type": "boolean",
  12724. "x-go-name": "EnableTimeTracker"
  12725. }
  12726. },
  12727. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12728. },
  12729. "Issue": {
  12730. "description": "Issue represents an issue in a repository",
  12731. "type": "object",
  12732. "properties": {
  12733. "assignee": {
  12734. "$ref": "#/definitions/User"
  12735. },
  12736. "assignees": {
  12737. "type": "array",
  12738. "items": {
  12739. "$ref": "#/definitions/User"
  12740. },
  12741. "x-go-name": "Assignees"
  12742. },
  12743. "body": {
  12744. "type": "string",
  12745. "x-go-name": "Body"
  12746. },
  12747. "closed_at": {
  12748. "type": "string",
  12749. "format": "date-time",
  12750. "x-go-name": "Closed"
  12751. },
  12752. "comments": {
  12753. "type": "integer",
  12754. "format": "int64",
  12755. "x-go-name": "Comments"
  12756. },
  12757. "created_at": {
  12758. "type": "string",
  12759. "format": "date-time",
  12760. "x-go-name": "Created"
  12761. },
  12762. "due_date": {
  12763. "type": "string",
  12764. "format": "date-time",
  12765. "x-go-name": "Deadline"
  12766. },
  12767. "html_url": {
  12768. "type": "string",
  12769. "x-go-name": "HTMLURL"
  12770. },
  12771. "id": {
  12772. "type": "integer",
  12773. "format": "int64",
  12774. "x-go-name": "ID"
  12775. },
  12776. "labels": {
  12777. "type": "array",
  12778. "items": {
  12779. "$ref": "#/definitions/Label"
  12780. },
  12781. "x-go-name": "Labels"
  12782. },
  12783. "milestone": {
  12784. "$ref": "#/definitions/Milestone"
  12785. },
  12786. "number": {
  12787. "type": "integer",
  12788. "format": "int64",
  12789. "x-go-name": "Index"
  12790. },
  12791. "original_author": {
  12792. "type": "string",
  12793. "x-go-name": "OriginalAuthor"
  12794. },
  12795. "original_author_id": {
  12796. "type": "integer",
  12797. "format": "int64",
  12798. "x-go-name": "OriginalAuthorID"
  12799. },
  12800. "pull_request": {
  12801. "$ref": "#/definitions/PullRequestMeta"
  12802. },
  12803. "repository": {
  12804. "$ref": "#/definitions/RepositoryMeta"
  12805. },
  12806. "state": {
  12807. "$ref": "#/definitions/StateType"
  12808. },
  12809. "title": {
  12810. "type": "string",
  12811. "x-go-name": "Title"
  12812. },
  12813. "updated_at": {
  12814. "type": "string",
  12815. "format": "date-time",
  12816. "x-go-name": "Updated"
  12817. },
  12818. "url": {
  12819. "type": "string",
  12820. "x-go-name": "URL"
  12821. },
  12822. "user": {
  12823. "$ref": "#/definitions/User"
  12824. }
  12825. },
  12826. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12827. },
  12828. "IssueDeadline": {
  12829. "description": "IssueDeadline represents an issue deadline",
  12830. "type": "object",
  12831. "properties": {
  12832. "due_date": {
  12833. "type": "string",
  12834. "format": "date-time",
  12835. "x-go-name": "Deadline"
  12836. }
  12837. },
  12838. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12839. },
  12840. "IssueLabelsOption": {
  12841. "description": "IssueLabelsOption a collection of labels",
  12842. "type": "object",
  12843. "properties": {
  12844. "labels": {
  12845. "description": "list of label IDs",
  12846. "type": "array",
  12847. "items": {
  12848. "type": "integer",
  12849. "format": "int64"
  12850. },
  12851. "x-go-name": "Labels"
  12852. }
  12853. },
  12854. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12855. },
  12856. "Label": {
  12857. "description": "Label a label to an issue or a pr",
  12858. "type": "object",
  12859. "properties": {
  12860. "color": {
  12861. "type": "string",
  12862. "x-go-name": "Color",
  12863. "example": "00aabb"
  12864. },
  12865. "description": {
  12866. "type": "string",
  12867. "x-go-name": "Description"
  12868. },
  12869. "id": {
  12870. "type": "integer",
  12871. "format": "int64",
  12872. "x-go-name": "ID"
  12873. },
  12874. "name": {
  12875. "type": "string",
  12876. "x-go-name": "Name"
  12877. },
  12878. "url": {
  12879. "type": "string",
  12880. "x-go-name": "URL"
  12881. }
  12882. },
  12883. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12884. },
  12885. "MarkdownOption": {
  12886. "description": "MarkdownOption markdown options",
  12887. "type": "object",
  12888. "properties": {
  12889. "Context": {
  12890. "description": "Context to render\n\nin: body",
  12891. "type": "string"
  12892. },
  12893. "Mode": {
  12894. "description": "Mode to render\n\nin: body",
  12895. "type": "string"
  12896. },
  12897. "Text": {
  12898. "description": "Text markdown to render\n\nin: body",
  12899. "type": "string"
  12900. },
  12901. "Wiki": {
  12902. "description": "Is it a wiki page ?\n\nin: body",
  12903. "type": "boolean"
  12904. }
  12905. },
  12906. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12907. },
  12908. "MergePullRequestOption": {
  12909. "description": "MergePullRequestForm form for merging Pull Request",
  12910. "type": "object",
  12911. "required": [
  12912. "Do"
  12913. ],
  12914. "properties": {
  12915. "Do": {
  12916. "type": "string",
  12917. "enum": [
  12918. "merge",
  12919. "rebase",
  12920. "rebase-merge",
  12921. "squash"
  12922. ]
  12923. },
  12924. "MergeMessageField": {
  12925. "type": "string"
  12926. },
  12927. "MergeTitleField": {
  12928. "type": "string"
  12929. },
  12930. "force_merge": {
  12931. "type": "boolean",
  12932. "x-go-name": "ForceMerge"
  12933. }
  12934. },
  12935. "x-go-name": "MergePullRequestForm",
  12936. "x-go-package": "code.gitea.io/gitea/modules/auth"
  12937. },
  12938. "MigrateRepoForm": {
  12939. "description": "MigrateRepoForm form for migrating repository",
  12940. "type": "object",
  12941. "required": [
  12942. "clone_addr",
  12943. "uid",
  12944. "repo_name"
  12945. ],
  12946. "properties": {
  12947. "auth_password": {
  12948. "type": "string",
  12949. "x-go-name": "AuthPassword"
  12950. },
  12951. "auth_username": {
  12952. "type": "string",
  12953. "x-go-name": "AuthUsername"
  12954. },
  12955. "clone_addr": {
  12956. "type": "string",
  12957. "x-go-name": "CloneAddr"
  12958. },
  12959. "description": {
  12960. "type": "string",
  12961. "x-go-name": "Description"
  12962. },
  12963. "issues": {
  12964. "type": "boolean",
  12965. "x-go-name": "Issues"
  12966. },
  12967. "labels": {
  12968. "type": "boolean",
  12969. "x-go-name": "Labels"
  12970. },
  12971. "milestones": {
  12972. "type": "boolean",
  12973. "x-go-name": "Milestones"
  12974. },
  12975. "mirror": {
  12976. "type": "boolean",
  12977. "x-go-name": "Mirror"
  12978. },
  12979. "private": {
  12980. "type": "boolean",
  12981. "x-go-name": "Private"
  12982. },
  12983. "pull_requests": {
  12984. "type": "boolean",
  12985. "x-go-name": "PullRequests"
  12986. },
  12987. "releases": {
  12988. "type": "boolean",
  12989. "x-go-name": "Releases"
  12990. },
  12991. "repo_name": {
  12992. "type": "string",
  12993. "x-go-name": "RepoName"
  12994. },
  12995. "uid": {
  12996. "type": "integer",
  12997. "format": "int64",
  12998. "x-go-name": "UID"
  12999. },
  13000. "wiki": {
  13001. "type": "boolean",
  13002. "x-go-name": "Wiki"
  13003. }
  13004. },
  13005. "x-go-package": "code.gitea.io/gitea/modules/auth"
  13006. },
  13007. "Milestone": {
  13008. "description": "Milestone milestone is a collection of issues on one repository",
  13009. "type": "object",
  13010. "properties": {
  13011. "closed_at": {
  13012. "type": "string",
  13013. "format": "date-time",
  13014. "x-go-name": "Closed"
  13015. },
  13016. "closed_issues": {
  13017. "type": "integer",
  13018. "format": "int64",
  13019. "x-go-name": "ClosedIssues"
  13020. },
  13021. "description": {
  13022. "type": "string",
  13023. "x-go-name": "Description"
  13024. },
  13025. "due_on": {
  13026. "type": "string",
  13027. "format": "date-time",
  13028. "x-go-name": "Deadline"
  13029. },
  13030. "id": {
  13031. "type": "integer",
  13032. "format": "int64",
  13033. "x-go-name": "ID"
  13034. },
  13035. "open_issues": {
  13036. "type": "integer",
  13037. "format": "int64",
  13038. "x-go-name": "OpenIssues"
  13039. },
  13040. "state": {
  13041. "$ref": "#/definitions/StateType"
  13042. },
  13043. "title": {
  13044. "type": "string",
  13045. "x-go-name": "Title"
  13046. }
  13047. },
  13048. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13049. },
  13050. "NotificationCount": {
  13051. "description": "NotificationCount number of unread notifications",
  13052. "type": "object",
  13053. "properties": {
  13054. "new": {
  13055. "type": "integer",
  13056. "format": "int64",
  13057. "x-go-name": "New"
  13058. }
  13059. },
  13060. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13061. },
  13062. "NotificationSubject": {
  13063. "description": "NotificationSubject contains the notification subject (Issue/Pull/Commit)",
  13064. "type": "object",
  13065. "properties": {
  13066. "latest_comment_url": {
  13067. "type": "string",
  13068. "x-go-name": "LatestCommentURL"
  13069. },
  13070. "title": {
  13071. "type": "string",
  13072. "x-go-name": "Title"
  13073. },
  13074. "type": {
  13075. "type": "string",
  13076. "x-go-name": "Type"
  13077. },
  13078. "url": {
  13079. "type": "string",
  13080. "x-go-name": "URL"
  13081. }
  13082. },
  13083. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13084. },
  13085. "NotificationThread": {
  13086. "description": "NotificationThread expose Notification on API",
  13087. "type": "object",
  13088. "properties": {
  13089. "id": {
  13090. "type": "integer",
  13091. "format": "int64",
  13092. "x-go-name": "ID"
  13093. },
  13094. "pinned": {
  13095. "type": "boolean",
  13096. "x-go-name": "Pinned"
  13097. },
  13098. "repository": {
  13099. "$ref": "#/definitions/Repository"
  13100. },
  13101. "subject": {
  13102. "$ref": "#/definitions/NotificationSubject"
  13103. },
  13104. "unread": {
  13105. "type": "boolean",
  13106. "x-go-name": "Unread"
  13107. },
  13108. "updated_at": {
  13109. "type": "string",
  13110. "format": "date-time",
  13111. "x-go-name": "UpdatedAt"
  13112. },
  13113. "url": {
  13114. "type": "string",
  13115. "x-go-name": "URL"
  13116. }
  13117. },
  13118. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13119. },
  13120. "OAuth2Application": {
  13121. "type": "object",
  13122. "title": "OAuth2Application represents an OAuth2 application.",
  13123. "properties": {
  13124. "client_id": {
  13125. "type": "string",
  13126. "x-go-name": "ClientID"
  13127. },
  13128. "client_secret": {
  13129. "type": "string",
  13130. "x-go-name": "ClientSecret"
  13131. },
  13132. "created": {
  13133. "type": "string",
  13134. "format": "date-time",
  13135. "x-go-name": "Created"
  13136. },
  13137. "id": {
  13138. "type": "integer",
  13139. "format": "int64",
  13140. "x-go-name": "ID"
  13141. },
  13142. "name": {
  13143. "type": "string",
  13144. "x-go-name": "Name"
  13145. },
  13146. "redirect_uris": {
  13147. "type": "array",
  13148. "items": {
  13149. "type": "string"
  13150. },
  13151. "x-go-name": "RedirectURIs"
  13152. }
  13153. },
  13154. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13155. },
  13156. "Organization": {
  13157. "description": "Organization represents an organization",
  13158. "type": "object",
  13159. "properties": {
  13160. "avatar_url": {
  13161. "type": "string",
  13162. "x-go-name": "AvatarURL"
  13163. },
  13164. "description": {
  13165. "type": "string",
  13166. "x-go-name": "Description"
  13167. },
  13168. "full_name": {
  13169. "type": "string",
  13170. "x-go-name": "FullName"
  13171. },
  13172. "id": {
  13173. "type": "integer",
  13174. "format": "int64",
  13175. "x-go-name": "ID"
  13176. },
  13177. "location": {
  13178. "type": "string",
  13179. "x-go-name": "Location"
  13180. },
  13181. "repo_admin_change_team_access": {
  13182. "type": "boolean",
  13183. "x-go-name": "RepoAdminChangeTeamAccess"
  13184. },
  13185. "username": {
  13186. "type": "string",
  13187. "x-go-name": "UserName"
  13188. },
  13189. "visibility": {
  13190. "type": "string",
  13191. "x-go-name": "Visibility"
  13192. },
  13193. "website": {
  13194. "type": "string",
  13195. "x-go-name": "Website"
  13196. }
  13197. },
  13198. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13199. },
  13200. "PRBranchInfo": {
  13201. "description": "PRBranchInfo information about a branch",
  13202. "type": "object",
  13203. "properties": {
  13204. "label": {
  13205. "type": "string",
  13206. "x-go-name": "Name"
  13207. },
  13208. "ref": {
  13209. "type": "string",
  13210. "x-go-name": "Ref"
  13211. },
  13212. "repo": {
  13213. "$ref": "#/definitions/Repository"
  13214. },
  13215. "repo_id": {
  13216. "type": "integer",
  13217. "format": "int64",
  13218. "x-go-name": "RepoID"
  13219. },
  13220. "sha": {
  13221. "type": "string",
  13222. "x-go-name": "Sha"
  13223. }
  13224. },
  13225. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13226. },
  13227. "PayloadCommit": {
  13228. "description": "PayloadCommit represents a commit",
  13229. "type": "object",
  13230. "properties": {
  13231. "added": {
  13232. "type": "array",
  13233. "items": {
  13234. "type": "string"
  13235. },
  13236. "x-go-name": "Added"
  13237. },
  13238. "author": {
  13239. "$ref": "#/definitions/PayloadUser"
  13240. },
  13241. "committer": {
  13242. "$ref": "#/definitions/PayloadUser"
  13243. },
  13244. "id": {
  13245. "description": "sha1 hash of the commit",
  13246. "type": "string",
  13247. "x-go-name": "ID"
  13248. },
  13249. "message": {
  13250. "type": "string",
  13251. "x-go-name": "Message"
  13252. },
  13253. "modified": {
  13254. "type": "array",
  13255. "items": {
  13256. "type": "string"
  13257. },
  13258. "x-go-name": "Modified"
  13259. },
  13260. "removed": {
  13261. "type": "array",
  13262. "items": {
  13263. "type": "string"
  13264. },
  13265. "x-go-name": "Removed"
  13266. },
  13267. "timestamp": {
  13268. "type": "string",
  13269. "format": "date-time",
  13270. "x-go-name": "Timestamp"
  13271. },
  13272. "url": {
  13273. "type": "string",
  13274. "x-go-name": "URL"
  13275. },
  13276. "verification": {
  13277. "$ref": "#/definitions/PayloadCommitVerification"
  13278. }
  13279. },
  13280. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13281. },
  13282. "PayloadCommitVerification": {
  13283. "description": "PayloadCommitVerification represents the GPG verification of a commit",
  13284. "type": "object",
  13285. "properties": {
  13286. "payload": {
  13287. "type": "string",
  13288. "x-go-name": "Payload"
  13289. },
  13290. "reason": {
  13291. "type": "string",
  13292. "x-go-name": "Reason"
  13293. },
  13294. "signature": {
  13295. "type": "string",
  13296. "x-go-name": "Signature"
  13297. },
  13298. "signer": {
  13299. "$ref": "#/definitions/PayloadUser"
  13300. },
  13301. "verified": {
  13302. "type": "boolean",
  13303. "x-go-name": "Verified"
  13304. }
  13305. },
  13306. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13307. },
  13308. "PayloadUser": {
  13309. "description": "PayloadUser represents the author or committer of a commit",
  13310. "type": "object",
  13311. "properties": {
  13312. "email": {
  13313. "type": "string",
  13314. "format": "email",
  13315. "x-go-name": "Email"
  13316. },
  13317. "name": {
  13318. "description": "Full name of the commit author",
  13319. "type": "string",
  13320. "x-go-name": "Name"
  13321. },
  13322. "username": {
  13323. "type": "string",
  13324. "x-go-name": "UserName"
  13325. }
  13326. },
  13327. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13328. },
  13329. "Permission": {
  13330. "description": "Permission represents a set of permissions",
  13331. "type": "object",
  13332. "properties": {
  13333. "admin": {
  13334. "type": "boolean",
  13335. "x-go-name": "Admin"
  13336. },
  13337. "pull": {
  13338. "type": "boolean",
  13339. "x-go-name": "Pull"
  13340. },
  13341. "push": {
  13342. "type": "boolean",
  13343. "x-go-name": "Push"
  13344. }
  13345. },
  13346. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13347. },
  13348. "PublicKey": {
  13349. "description": "PublicKey publickey is a user key to push code to repository",
  13350. "type": "object",
  13351. "properties": {
  13352. "created_at": {
  13353. "type": "string",
  13354. "format": "date-time",
  13355. "x-go-name": "Created"
  13356. },
  13357. "fingerprint": {
  13358. "type": "string",
  13359. "x-go-name": "Fingerprint"
  13360. },
  13361. "id": {
  13362. "type": "integer",
  13363. "format": "int64",
  13364. "x-go-name": "ID"
  13365. },
  13366. "key": {
  13367. "type": "string",
  13368. "x-go-name": "Key"
  13369. },
  13370. "key_type": {
  13371. "type": "string",
  13372. "x-go-name": "KeyType"
  13373. },
  13374. "read_only": {
  13375. "type": "boolean",
  13376. "x-go-name": "ReadOnly"
  13377. },
  13378. "title": {
  13379. "type": "string",
  13380. "x-go-name": "Title"
  13381. },
  13382. "url": {
  13383. "type": "string",
  13384. "x-go-name": "URL"
  13385. },
  13386. "user": {
  13387. "$ref": "#/definitions/User"
  13388. }
  13389. },
  13390. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13391. },
  13392. "PullRequest": {
  13393. "description": "PullRequest represents a pull request",
  13394. "type": "object",
  13395. "properties": {
  13396. "assignee": {
  13397. "$ref": "#/definitions/User"
  13398. },
  13399. "assignees": {
  13400. "type": "array",
  13401. "items": {
  13402. "$ref": "#/definitions/User"
  13403. },
  13404. "x-go-name": "Assignees"
  13405. },
  13406. "base": {
  13407. "$ref": "#/definitions/PRBranchInfo"
  13408. },
  13409. "body": {
  13410. "type": "string",
  13411. "x-go-name": "Body"
  13412. },
  13413. "closed_at": {
  13414. "type": "string",
  13415. "format": "date-time",
  13416. "x-go-name": "Closed"
  13417. },
  13418. "comments": {
  13419. "type": "integer",
  13420. "format": "int64",
  13421. "x-go-name": "Comments"
  13422. },
  13423. "created_at": {
  13424. "type": "string",
  13425. "format": "date-time",
  13426. "x-go-name": "Created"
  13427. },
  13428. "diff_url": {
  13429. "type": "string",
  13430. "x-go-name": "DiffURL"
  13431. },
  13432. "due_date": {
  13433. "type": "string",
  13434. "format": "date-time",
  13435. "x-go-name": "Deadline"
  13436. },
  13437. "head": {
  13438. "$ref": "#/definitions/PRBranchInfo"
  13439. },
  13440. "html_url": {
  13441. "type": "string",
  13442. "x-go-name": "HTMLURL"
  13443. },
  13444. "id": {
  13445. "type": "integer",
  13446. "format": "int64",
  13447. "x-go-name": "ID"
  13448. },
  13449. "labels": {
  13450. "type": "array",
  13451. "items": {
  13452. "$ref": "#/definitions/Label"
  13453. },
  13454. "x-go-name": "Labels"
  13455. },
  13456. "merge_base": {
  13457. "type": "string",
  13458. "x-go-name": "MergeBase"
  13459. },
  13460. "merge_commit_sha": {
  13461. "type": "string",
  13462. "x-go-name": "MergedCommitID"
  13463. },
  13464. "mergeable": {
  13465. "type": "boolean",
  13466. "x-go-name": "Mergeable"
  13467. },
  13468. "merged": {
  13469. "type": "boolean",
  13470. "x-go-name": "HasMerged"
  13471. },
  13472. "merged_at": {
  13473. "type": "string",
  13474. "format": "date-time",
  13475. "x-go-name": "Merged"
  13476. },
  13477. "merged_by": {
  13478. "$ref": "#/definitions/User"
  13479. },
  13480. "milestone": {
  13481. "$ref": "#/definitions/Milestone"
  13482. },
  13483. "number": {
  13484. "type": "integer",
  13485. "format": "int64",
  13486. "x-go-name": "Index"
  13487. },
  13488. "patch_url": {
  13489. "type": "string",
  13490. "x-go-name": "PatchURL"
  13491. },
  13492. "state": {
  13493. "$ref": "#/definitions/StateType"
  13494. },
  13495. "title": {
  13496. "type": "string",
  13497. "x-go-name": "Title"
  13498. },
  13499. "updated_at": {
  13500. "type": "string",
  13501. "format": "date-time",
  13502. "x-go-name": "Updated"
  13503. },
  13504. "url": {
  13505. "type": "string",
  13506. "x-go-name": "URL"
  13507. },
  13508. "user": {
  13509. "$ref": "#/definitions/User"
  13510. }
  13511. },
  13512. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13513. },
  13514. "PullRequestMeta": {
  13515. "description": "PullRequestMeta PR info if an issue is a PR",
  13516. "type": "object",
  13517. "properties": {
  13518. "merged": {
  13519. "type": "boolean",
  13520. "x-go-name": "HasMerged"
  13521. },
  13522. "merged_at": {
  13523. "type": "string",
  13524. "format": "date-time",
  13525. "x-go-name": "Merged"
  13526. }
  13527. },
  13528. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13529. },
  13530. "PullReview": {
  13531. "description": "PullReview represents a pull request review",
  13532. "type": "object",
  13533. "properties": {
  13534. "body": {
  13535. "type": "string",
  13536. "x-go-name": "Body"
  13537. },
  13538. "comments_count": {
  13539. "type": "integer",
  13540. "format": "int64",
  13541. "x-go-name": "CodeCommentsCount"
  13542. },
  13543. "commit_id": {
  13544. "type": "string",
  13545. "x-go-name": "CommitID"
  13546. },
  13547. "html_url": {
  13548. "type": "string",
  13549. "x-go-name": "HTMLURL"
  13550. },
  13551. "id": {
  13552. "type": "integer",
  13553. "format": "int64",
  13554. "x-go-name": "ID"
  13555. },
  13556. "official": {
  13557. "type": "boolean",
  13558. "x-go-name": "Official"
  13559. },
  13560. "pull_request_url": {
  13561. "type": "string",
  13562. "x-go-name": "HTMLPullURL"
  13563. },
  13564. "stale": {
  13565. "type": "boolean",
  13566. "x-go-name": "Stale"
  13567. },
  13568. "state": {
  13569. "$ref": "#/definitions/ReviewStateType"
  13570. },
  13571. "submitted_at": {
  13572. "type": "string",
  13573. "format": "date-time",
  13574. "x-go-name": "Submitted"
  13575. },
  13576. "user": {
  13577. "$ref": "#/definitions/User"
  13578. }
  13579. },
  13580. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13581. },
  13582. "PullReviewComment": {
  13583. "description": "PullReviewComment represents a comment on a pull request review",
  13584. "type": "object",
  13585. "properties": {
  13586. "body": {
  13587. "type": "string",
  13588. "x-go-name": "Body"
  13589. },
  13590. "commit_id": {
  13591. "type": "string",
  13592. "x-go-name": "CommitID"
  13593. },
  13594. "created_at": {
  13595. "type": "string",
  13596. "format": "date-time",
  13597. "x-go-name": "Created"
  13598. },
  13599. "diff_hunk": {
  13600. "type": "string",
  13601. "x-go-name": "DiffHunk"
  13602. },
  13603. "html_url": {
  13604. "type": "string",
  13605. "x-go-name": "HTMLURL"
  13606. },
  13607. "id": {
  13608. "type": "integer",
  13609. "format": "int64",
  13610. "x-go-name": "ID"
  13611. },
  13612. "original_commit_id": {
  13613. "type": "string",
  13614. "x-go-name": "OrigCommitID"
  13615. },
  13616. "original_position": {
  13617. "type": "integer",
  13618. "format": "uint64",
  13619. "x-go-name": "OldLineNum"
  13620. },
  13621. "path": {
  13622. "type": "string",
  13623. "x-go-name": "Path"
  13624. },
  13625. "position": {
  13626. "type": "integer",
  13627. "format": "uint64",
  13628. "x-go-name": "LineNum"
  13629. },
  13630. "pull_request_review_id": {
  13631. "type": "integer",
  13632. "format": "int64",
  13633. "x-go-name": "ReviewID"
  13634. },
  13635. "pull_request_url": {
  13636. "type": "string",
  13637. "x-go-name": "HTMLPullURL"
  13638. },
  13639. "updated_at": {
  13640. "type": "string",
  13641. "format": "date-time",
  13642. "x-go-name": "Updated"
  13643. },
  13644. "user": {
  13645. "$ref": "#/definitions/User"
  13646. }
  13647. },
  13648. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13649. },
  13650. "Reaction": {
  13651. "description": "Reaction contain one reaction",
  13652. "type": "object",
  13653. "properties": {
  13654. "content": {
  13655. "type": "string",
  13656. "x-go-name": "Reaction"
  13657. },
  13658. "created_at": {
  13659. "type": "string",
  13660. "format": "date-time",
  13661. "x-go-name": "Created"
  13662. },
  13663. "user": {
  13664. "$ref": "#/definitions/User"
  13665. }
  13666. },
  13667. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13668. },
  13669. "Reference": {
  13670. "type": "object",
  13671. "title": "Reference represents a Git reference.",
  13672. "properties": {
  13673. "object": {
  13674. "$ref": "#/definitions/GitObject"
  13675. },
  13676. "ref": {
  13677. "type": "string",
  13678. "x-go-name": "Ref"
  13679. },
  13680. "url": {
  13681. "type": "string",
  13682. "x-go-name": "URL"
  13683. }
  13684. },
  13685. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13686. },
  13687. "Release": {
  13688. "description": "Release represents a repository release",
  13689. "type": "object",
  13690. "properties": {
  13691. "assets": {
  13692. "type": "array",
  13693. "items": {
  13694. "$ref": "#/definitions/Attachment"
  13695. },
  13696. "x-go-name": "Attachments"
  13697. },
  13698. "author": {
  13699. "$ref": "#/definitions/User"
  13700. },
  13701. "body": {
  13702. "type": "string",
  13703. "x-go-name": "Note"
  13704. },
  13705. "created_at": {
  13706. "type": "string",
  13707. "format": "date-time",
  13708. "x-go-name": "CreatedAt"
  13709. },
  13710. "draft": {
  13711. "type": "boolean",
  13712. "x-go-name": "IsDraft"
  13713. },
  13714. "html_url": {
  13715. "type": "string",
  13716. "x-go-name": "HTMLURL"
  13717. },
  13718. "id": {
  13719. "type": "integer",
  13720. "format": "int64",
  13721. "x-go-name": "ID"
  13722. },
  13723. "name": {
  13724. "type": "string",
  13725. "x-go-name": "Title"
  13726. },
  13727. "prerelease": {
  13728. "type": "boolean",
  13729. "x-go-name": "IsPrerelease"
  13730. },
  13731. "published_at": {
  13732. "type": "string",
  13733. "format": "date-time",
  13734. "x-go-name": "PublishedAt"
  13735. },
  13736. "tag_name": {
  13737. "type": "string",
  13738. "x-go-name": "TagName"
  13739. },
  13740. "tarball_url": {
  13741. "type": "string",
  13742. "x-go-name": "TarURL"
  13743. },
  13744. "target_commitish": {
  13745. "type": "string",
  13746. "x-go-name": "Target"
  13747. },
  13748. "url": {
  13749. "type": "string",
  13750. "x-go-name": "URL"
  13751. },
  13752. "zipball_url": {
  13753. "type": "string",
  13754. "x-go-name": "ZipURL"
  13755. }
  13756. },
  13757. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13758. },
  13759. "RepoCommit": {
  13760. "type": "object",
  13761. "title": "RepoCommit contains information of a commit in the context of a repository.",
  13762. "properties": {
  13763. "author": {
  13764. "$ref": "#/definitions/CommitUser"
  13765. },
  13766. "committer": {
  13767. "$ref": "#/definitions/CommitUser"
  13768. },
  13769. "message": {
  13770. "type": "string",
  13771. "x-go-name": "Message"
  13772. },
  13773. "tree": {
  13774. "$ref": "#/definitions/CommitMeta"
  13775. },
  13776. "url": {
  13777. "type": "string",
  13778. "x-go-name": "URL"
  13779. }
  13780. },
  13781. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13782. },
  13783. "RepoTopicOptions": {
  13784. "description": "RepoTopicOptions a collection of repo topic names",
  13785. "type": "object",
  13786. "properties": {
  13787. "topics": {
  13788. "description": "list of topic names",
  13789. "type": "array",
  13790. "items": {
  13791. "type": "string"
  13792. },
  13793. "x-go-name": "Topics"
  13794. }
  13795. },
  13796. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13797. },
  13798. "Repository": {
  13799. "description": "Repository represents a repository",
  13800. "type": "object",
  13801. "properties": {
  13802. "allow_merge_commits": {
  13803. "type": "boolean",
  13804. "x-go-name": "AllowMerge"
  13805. },
  13806. "allow_rebase": {
  13807. "type": "boolean",
  13808. "x-go-name": "AllowRebase"
  13809. },
  13810. "allow_rebase_explicit": {
  13811. "type": "boolean",
  13812. "x-go-name": "AllowRebaseMerge"
  13813. },
  13814. "allow_squash_merge": {
  13815. "type": "boolean",
  13816. "x-go-name": "AllowSquash"
  13817. },
  13818. "archived": {
  13819. "type": "boolean",
  13820. "x-go-name": "Archived"
  13821. },
  13822. "avatar_url": {
  13823. "type": "string",
  13824. "x-go-name": "AvatarURL"
  13825. },
  13826. "clone_url": {
  13827. "type": "string",
  13828. "x-go-name": "CloneURL"
  13829. },
  13830. "created_at": {
  13831. "type": "string",
  13832. "format": "date-time",
  13833. "x-go-name": "Created"
  13834. },
  13835. "default_branch": {
  13836. "type": "string",
  13837. "x-go-name": "DefaultBranch"
  13838. },
  13839. "description": {
  13840. "type": "string",
  13841. "x-go-name": "Description"
  13842. },
  13843. "empty": {
  13844. "type": "boolean",
  13845. "x-go-name": "Empty"
  13846. },
  13847. "external_tracker": {
  13848. "$ref": "#/definitions/ExternalTracker"
  13849. },
  13850. "external_wiki": {
  13851. "$ref": "#/definitions/ExternalWiki"
  13852. },
  13853. "fork": {
  13854. "type": "boolean",
  13855. "x-go-name": "Fork"
  13856. },
  13857. "forks_count": {
  13858. "type": "integer",
  13859. "format": "int64",
  13860. "x-go-name": "Forks"
  13861. },
  13862. "full_name": {
  13863. "type": "string",
  13864. "x-go-name": "FullName"
  13865. },
  13866. "has_issues": {
  13867. "type": "boolean",
  13868. "x-go-name": "HasIssues"
  13869. },
  13870. "has_pull_requests": {
  13871. "type": "boolean",
  13872. "x-go-name": "HasPullRequests"
  13873. },
  13874. "has_wiki": {
  13875. "type": "boolean",
  13876. "x-go-name": "HasWiki"
  13877. },
  13878. "html_url": {
  13879. "type": "string",
  13880. "x-go-name": "HTMLURL"
  13881. },
  13882. "id": {
  13883. "type": "integer",
  13884. "format": "int64",
  13885. "x-go-name": "ID"
  13886. },
  13887. "ignore_whitespace_conflicts": {
  13888. "type": "boolean",
  13889. "x-go-name": "IgnoreWhitespaceConflicts"
  13890. },
  13891. "internal_tracker": {
  13892. "$ref": "#/definitions/InternalTracker"
  13893. },
  13894. "mirror": {
  13895. "type": "boolean",
  13896. "x-go-name": "Mirror"
  13897. },
  13898. "name": {
  13899. "type": "string",
  13900. "x-go-name": "Name"
  13901. },
  13902. "open_issues_count": {
  13903. "type": "integer",
  13904. "format": "int64",
  13905. "x-go-name": "OpenIssues"
  13906. },
  13907. "open_pr_counter": {
  13908. "type": "integer",
  13909. "format": "int64",
  13910. "x-go-name": "OpenPulls"
  13911. },
  13912. "original_url": {
  13913. "type": "string",
  13914. "x-go-name": "OriginalURL"
  13915. },
  13916. "owner": {
  13917. "$ref": "#/definitions/User"
  13918. },
  13919. "parent": {
  13920. "$ref": "#/definitions/Repository"
  13921. },
  13922. "permissions": {
  13923. "$ref": "#/definitions/Permission"
  13924. },
  13925. "private": {
  13926. "type": "boolean",
  13927. "x-go-name": "Private"
  13928. },
  13929. "release_counter": {
  13930. "type": "integer",
  13931. "format": "int64",
  13932. "x-go-name": "Releases"
  13933. },
  13934. "size": {
  13935. "type": "integer",
  13936. "format": "int64",
  13937. "x-go-name": "Size"
  13938. },
  13939. "ssh_url": {
  13940. "type": "string",
  13941. "x-go-name": "SSHURL"
  13942. },
  13943. "stars_count": {
  13944. "type": "integer",
  13945. "format": "int64",
  13946. "x-go-name": "Stars"
  13947. },
  13948. "template": {
  13949. "type": "boolean",
  13950. "x-go-name": "Template"
  13951. },
  13952. "updated_at": {
  13953. "type": "string",
  13954. "format": "date-time",
  13955. "x-go-name": "Updated"
  13956. },
  13957. "watchers_count": {
  13958. "type": "integer",
  13959. "format": "int64",
  13960. "x-go-name": "Watchers"
  13961. },
  13962. "website": {
  13963. "type": "string",
  13964. "x-go-name": "Website"
  13965. }
  13966. },
  13967. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13968. },
  13969. "RepositoryMeta": {
  13970. "description": "RepositoryMeta basic repository information",
  13971. "type": "object",
  13972. "properties": {
  13973. "full_name": {
  13974. "type": "string",
  13975. "x-go-name": "FullName"
  13976. },
  13977. "id": {
  13978. "type": "integer",
  13979. "format": "int64",
  13980. "x-go-name": "ID"
  13981. },
  13982. "name": {
  13983. "type": "string",
  13984. "x-go-name": "Name"
  13985. },
  13986. "owner": {
  13987. "type": "string",
  13988. "x-go-name": "Owner"
  13989. }
  13990. },
  13991. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13992. },
  13993. "ReviewStateType": {
  13994. "description": "ReviewStateType review state type",
  13995. "type": "string",
  13996. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13997. },
  13998. "SearchResults": {
  13999. "description": "SearchResults results of a successful search",
  14000. "type": "object",
  14001. "properties": {
  14002. "data": {
  14003. "type": "array",
  14004. "items": {
  14005. "$ref": "#/definitions/Repository"
  14006. },
  14007. "x-go-name": "Data"
  14008. },
  14009. "ok": {
  14010. "type": "boolean",
  14011. "x-go-name": "OK"
  14012. }
  14013. },
  14014. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14015. },
  14016. "ServerVersion": {
  14017. "description": "ServerVersion wraps the version of the server",
  14018. "type": "object",
  14019. "properties": {
  14020. "version": {
  14021. "type": "string",
  14022. "x-go-name": "Version"
  14023. }
  14024. },
  14025. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14026. },
  14027. "StateType": {
  14028. "description": "StateType issue state type",
  14029. "type": "string",
  14030. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14031. },
  14032. "Status": {
  14033. "description": "Status holds a single Status of a single Commit",
  14034. "type": "object",
  14035. "properties": {
  14036. "context": {
  14037. "type": "string",
  14038. "x-go-name": "Context"
  14039. },
  14040. "created_at": {
  14041. "type": "string",
  14042. "format": "date-time",
  14043. "x-go-name": "Created"
  14044. },
  14045. "creator": {
  14046. "$ref": "#/definitions/User"
  14047. },
  14048. "description": {
  14049. "type": "string",
  14050. "x-go-name": "Description"
  14051. },
  14052. "id": {
  14053. "type": "integer",
  14054. "format": "int64",
  14055. "x-go-name": "ID"
  14056. },
  14057. "status": {
  14058. "$ref": "#/definitions/StatusState"
  14059. },
  14060. "target_url": {
  14061. "type": "string",
  14062. "x-go-name": "TargetURL"
  14063. },
  14064. "updated_at": {
  14065. "type": "string",
  14066. "format": "date-time",
  14067. "x-go-name": "Updated"
  14068. },
  14069. "url": {
  14070. "type": "string",
  14071. "x-go-name": "URL"
  14072. }
  14073. },
  14074. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14075. },
  14076. "StatusState": {
  14077. "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"",
  14078. "type": "string",
  14079. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14080. },
  14081. "StopWatch": {
  14082. "description": "StopWatch represent a running stopwatch",
  14083. "type": "object",
  14084. "properties": {
  14085. "created": {
  14086. "type": "string",
  14087. "format": "date-time",
  14088. "x-go-name": "Created"
  14089. },
  14090. "issue_index": {
  14091. "type": "integer",
  14092. "format": "int64",
  14093. "x-go-name": "IssueIndex"
  14094. }
  14095. },
  14096. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14097. },
  14098. "SubmitPullReviewOptions": {
  14099. "description": "SubmitPullReviewOptions are options to submit a pending pull review",
  14100. "type": "object",
  14101. "properties": {
  14102. "body": {
  14103. "type": "string",
  14104. "x-go-name": "Body"
  14105. },
  14106. "event": {
  14107. "$ref": "#/definitions/ReviewStateType"
  14108. }
  14109. },
  14110. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14111. },
  14112. "Tag": {
  14113. "description": "Tag represents a repository tag",
  14114. "type": "object",
  14115. "properties": {
  14116. "commit": {
  14117. "$ref": "#/definitions/CommitMeta"
  14118. },
  14119. "id": {
  14120. "type": "string",
  14121. "x-go-name": "ID"
  14122. },
  14123. "name": {
  14124. "type": "string",
  14125. "x-go-name": "Name"
  14126. },
  14127. "tarball_url": {
  14128. "type": "string",
  14129. "x-go-name": "TarballURL"
  14130. },
  14131. "zipball_url": {
  14132. "type": "string",
  14133. "x-go-name": "ZipballURL"
  14134. }
  14135. },
  14136. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14137. },
  14138. "Team": {
  14139. "description": "Team represents a team in an organization",
  14140. "type": "object",
  14141. "properties": {
  14142. "can_create_org_repo": {
  14143. "type": "boolean",
  14144. "x-go-name": "CanCreateOrgRepo"
  14145. },
  14146. "description": {
  14147. "type": "string",
  14148. "x-go-name": "Description"
  14149. },
  14150. "id": {
  14151. "type": "integer",
  14152. "format": "int64",
  14153. "x-go-name": "ID"
  14154. },
  14155. "includes_all_repositories": {
  14156. "type": "boolean",
  14157. "x-go-name": "IncludesAllRepositories"
  14158. },
  14159. "name": {
  14160. "type": "string",
  14161. "x-go-name": "Name"
  14162. },
  14163. "organization": {
  14164. "$ref": "#/definitions/Organization"
  14165. },
  14166. "permission": {
  14167. "type": "string",
  14168. "enum": [
  14169. "none",
  14170. "read",
  14171. "write",
  14172. "admin",
  14173. "owner"
  14174. ],
  14175. "x-go-name": "Permission"
  14176. },
  14177. "units": {
  14178. "type": "array",
  14179. "items": {
  14180. "type": "string"
  14181. },
  14182. "x-go-name": "Units",
  14183. "example": [
  14184. "repo.code",
  14185. "repo.issues",
  14186. "repo.ext_issues",
  14187. "repo.wiki",
  14188. "repo.pulls",
  14189. "repo.releases",
  14190. "repo.ext_wiki"
  14191. ]
  14192. }
  14193. },
  14194. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14195. },
  14196. "TimeStamp": {
  14197. "description": "TimeStamp defines a timestamp",
  14198. "type": "integer",
  14199. "format": "int64",
  14200. "x-go-package": "code.gitea.io/gitea/modules/timeutil"
  14201. },
  14202. "TopicName": {
  14203. "description": "TopicName a list of repo topic names",
  14204. "type": "object",
  14205. "properties": {
  14206. "topics": {
  14207. "type": "array",
  14208. "items": {
  14209. "type": "string"
  14210. },
  14211. "x-go-name": "TopicNames"
  14212. }
  14213. },
  14214. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14215. },
  14216. "TopicResponse": {
  14217. "description": "TopicResponse for returning topics",
  14218. "type": "object",
  14219. "properties": {
  14220. "created": {
  14221. "type": "string",
  14222. "format": "date-time",
  14223. "x-go-name": "Created"
  14224. },
  14225. "id": {
  14226. "type": "integer",
  14227. "format": "int64",
  14228. "x-go-name": "ID"
  14229. },
  14230. "repo_count": {
  14231. "type": "integer",
  14232. "format": "int64",
  14233. "x-go-name": "RepoCount"
  14234. },
  14235. "topic_name": {
  14236. "type": "string",
  14237. "x-go-name": "Name"
  14238. },
  14239. "updated": {
  14240. "type": "string",
  14241. "format": "date-time",
  14242. "x-go-name": "Updated"
  14243. }
  14244. },
  14245. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14246. },
  14247. "TrackedTime": {
  14248. "description": "TrackedTime worked time for an issue / pr",
  14249. "type": "object",
  14250. "properties": {
  14251. "created": {
  14252. "type": "string",
  14253. "format": "date-time",
  14254. "x-go-name": "Created"
  14255. },
  14256. "id": {
  14257. "type": "integer",
  14258. "format": "int64",
  14259. "x-go-name": "ID"
  14260. },
  14261. "issue": {
  14262. "$ref": "#/definitions/Issue"
  14263. },
  14264. "issue_id": {
  14265. "description": "deprecated (only for backwards compatibility)",
  14266. "type": "integer",
  14267. "format": "int64",
  14268. "x-go-name": "IssueID"
  14269. },
  14270. "time": {
  14271. "description": "Time in seconds",
  14272. "type": "integer",
  14273. "format": "int64",
  14274. "x-go-name": "Time"
  14275. },
  14276. "user_id": {
  14277. "description": "deprecated (only for backwards compatibility)",
  14278. "type": "integer",
  14279. "format": "int64",
  14280. "x-go-name": "UserID"
  14281. },
  14282. "user_name": {
  14283. "type": "string",
  14284. "x-go-name": "UserName"
  14285. }
  14286. },
  14287. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14288. },
  14289. "TransferRepoOption": {
  14290. "description": "TransferRepoOption options when transfer a repository's ownership",
  14291. "type": "object",
  14292. "required": [
  14293. "new_owner"
  14294. ],
  14295. "properties": {
  14296. "new_owner": {
  14297. "type": "string",
  14298. "x-go-name": "NewOwner"
  14299. },
  14300. "team_ids": {
  14301. "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.",
  14302. "type": "array",
  14303. "items": {
  14304. "type": "integer",
  14305. "format": "int64"
  14306. },
  14307. "x-go-name": "TeamIDs"
  14308. }
  14309. },
  14310. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14311. },
  14312. "UpdateFileOptions": {
  14313. "description": "UpdateFileOptions options for updating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)",
  14314. "type": "object",
  14315. "required": [
  14316. "sha",
  14317. "content"
  14318. ],
  14319. "properties": {
  14320. "author": {
  14321. "$ref": "#/definitions/Identity"
  14322. },
  14323. "branch": {
  14324. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  14325. "type": "string",
  14326. "x-go-name": "BranchName"
  14327. },
  14328. "committer": {
  14329. "$ref": "#/definitions/Identity"
  14330. },
  14331. "content": {
  14332. "description": "content must be base64 encoded",
  14333. "type": "string",
  14334. "x-go-name": "Content"
  14335. },
  14336. "dates": {
  14337. "$ref": "#/definitions/CommitDateOptions"
  14338. },
  14339. "from_path": {
  14340. "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL",
  14341. "type": "string",
  14342. "x-go-name": "FromPath"
  14343. },
  14344. "message": {
  14345. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  14346. "type": "string",
  14347. "x-go-name": "Message"
  14348. },
  14349. "new_branch": {
  14350. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  14351. "type": "string",
  14352. "x-go-name": "NewBranchName"
  14353. },
  14354. "sha": {
  14355. "description": "sha is the SHA for the file that already exists",
  14356. "type": "string",
  14357. "x-go-name": "SHA"
  14358. }
  14359. },
  14360. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14361. },
  14362. "User": {
  14363. "description": "User represents a user",
  14364. "type": "object",
  14365. "properties": {
  14366. "avatar_url": {
  14367. "description": "URL to the user's avatar",
  14368. "type": "string",
  14369. "x-go-name": "AvatarURL"
  14370. },
  14371. "created": {
  14372. "type": "string",
  14373. "format": "date-time",
  14374. "x-go-name": "Created"
  14375. },
  14376. "email": {
  14377. "type": "string",
  14378. "format": "email",
  14379. "x-go-name": "Email"
  14380. },
  14381. "full_name": {
  14382. "description": "the user's full name",
  14383. "type": "string",
  14384. "x-go-name": "FullName"
  14385. },
  14386. "id": {
  14387. "description": "the user's id",
  14388. "type": "integer",
  14389. "format": "int64",
  14390. "x-go-name": "ID"
  14391. },
  14392. "is_admin": {
  14393. "description": "Is the user an administrator",
  14394. "type": "boolean",
  14395. "x-go-name": "IsAdmin"
  14396. },
  14397. "language": {
  14398. "description": "User locale",
  14399. "type": "string",
  14400. "x-go-name": "Language"
  14401. },
  14402. "last_login": {
  14403. "type": "string",
  14404. "format": "date-time",
  14405. "x-go-name": "LastLogin"
  14406. },
  14407. "login": {
  14408. "description": "the user's username",
  14409. "type": "string",
  14410. "x-go-name": "UserName"
  14411. }
  14412. },
  14413. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14414. },
  14415. "UserHeatmapData": {
  14416. "description": "UserHeatmapData represents the data needed to create a heatmap",
  14417. "type": "object",
  14418. "properties": {
  14419. "contributions": {
  14420. "type": "integer",
  14421. "format": "int64",
  14422. "x-go-name": "Contributions"
  14423. },
  14424. "timestamp": {
  14425. "$ref": "#/definitions/TimeStamp"
  14426. }
  14427. },
  14428. "x-go-package": "code.gitea.io/gitea/models"
  14429. },
  14430. "WatchInfo": {
  14431. "description": "WatchInfo represents an API watch status of one repository",
  14432. "type": "object",
  14433. "properties": {
  14434. "created_at": {
  14435. "type": "string",
  14436. "format": "date-time",
  14437. "x-go-name": "CreatedAt"
  14438. },
  14439. "ignored": {
  14440. "type": "boolean",
  14441. "x-go-name": "Ignored"
  14442. },
  14443. "reason": {
  14444. "type": "object",
  14445. "x-go-name": "Reason"
  14446. },
  14447. "repository_url": {
  14448. "type": "string",
  14449. "x-go-name": "RepositoryURL"
  14450. },
  14451. "subscribed": {
  14452. "type": "boolean",
  14453. "x-go-name": "Subscribed"
  14454. },
  14455. "url": {
  14456. "type": "string",
  14457. "x-go-name": "URL"
  14458. }
  14459. },
  14460. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14461. }
  14462. },
  14463. "responses": {
  14464. "AccessToken": {
  14465. "description": "AccessToken represents an API access token.",
  14466. "headers": {
  14467. "id": {
  14468. "type": "integer",
  14469. "format": "int64"
  14470. },
  14471. "name": {
  14472. "type": "string"
  14473. },
  14474. "sha1": {
  14475. "type": "string"
  14476. },
  14477. "token_last_eight": {
  14478. "type": "string"
  14479. }
  14480. }
  14481. },
  14482. "AccessTokenList": {
  14483. "description": "AccessTokenList represents a list of API access token.",
  14484. "schema": {
  14485. "type": "array",
  14486. "items": {
  14487. "$ref": "#/definitions/AccessToken"
  14488. }
  14489. }
  14490. },
  14491. "AnnotatedTag": {
  14492. "description": "AnnotatedTag",
  14493. "schema": {
  14494. "$ref": "#/definitions/AnnotatedTag"
  14495. }
  14496. },
  14497. "Attachment": {
  14498. "description": "Attachment",
  14499. "schema": {
  14500. "$ref": "#/definitions/Attachment"
  14501. }
  14502. },
  14503. "AttachmentList": {
  14504. "description": "AttachmentList",
  14505. "schema": {
  14506. "type": "array",
  14507. "items": {
  14508. "$ref": "#/definitions/Attachment"
  14509. }
  14510. }
  14511. },
  14512. "Branch": {
  14513. "description": "Branch",
  14514. "schema": {
  14515. "$ref": "#/definitions/Branch"
  14516. }
  14517. },
  14518. "BranchList": {
  14519. "description": "BranchList",
  14520. "schema": {
  14521. "type": "array",
  14522. "items": {
  14523. "$ref": "#/definitions/Branch"
  14524. }
  14525. }
  14526. },
  14527. "BranchProtection": {
  14528. "description": "BranchProtection",
  14529. "schema": {
  14530. "$ref": "#/definitions/BranchProtection"
  14531. }
  14532. },
  14533. "BranchProtectionList": {
  14534. "description": "BranchProtectionList",
  14535. "schema": {
  14536. "type": "array",
  14537. "items": {
  14538. "$ref": "#/definitions/BranchProtection"
  14539. }
  14540. }
  14541. },
  14542. "Comment": {
  14543. "description": "Comment",
  14544. "schema": {
  14545. "$ref": "#/definitions/Comment"
  14546. }
  14547. },
  14548. "CommentList": {
  14549. "description": "CommentList",
  14550. "schema": {
  14551. "type": "array",
  14552. "items": {
  14553. "$ref": "#/definitions/Comment"
  14554. }
  14555. }
  14556. },
  14557. "Commit": {
  14558. "description": "Commit",
  14559. "schema": {
  14560. "$ref": "#/definitions/Commit"
  14561. }
  14562. },
  14563. "CommitList": {
  14564. "description": "CommitList",
  14565. "schema": {
  14566. "type": "array",
  14567. "items": {
  14568. "$ref": "#/definitions/Commit"
  14569. }
  14570. },
  14571. "headers": {
  14572. "X-HasMore": {
  14573. "type": "boolean",
  14574. "description": "True if there is another page"
  14575. },
  14576. "X-Page": {
  14577. "type": "integer",
  14578. "format": "int64",
  14579. "description": "The current page"
  14580. },
  14581. "X-PageCount": {
  14582. "type": "integer",
  14583. "format": "int64",
  14584. "description": "Total number of pages"
  14585. },
  14586. "X-PerPage": {
  14587. "type": "integer",
  14588. "format": "int64",
  14589. "description": "Commits per page"
  14590. },
  14591. "X-Total": {
  14592. "type": "integer",
  14593. "format": "int64",
  14594. "description": "Total commit count"
  14595. }
  14596. }
  14597. },
  14598. "ContentsListResponse": {
  14599. "description": "ContentsListResponse",
  14600. "schema": {
  14601. "type": "array",
  14602. "items": {
  14603. "$ref": "#/definitions/ContentsResponse"
  14604. }
  14605. }
  14606. },
  14607. "ContentsResponse": {
  14608. "description": "ContentsResponse",
  14609. "schema": {
  14610. "$ref": "#/definitions/ContentsResponse"
  14611. }
  14612. },
  14613. "DeployKey": {
  14614. "description": "DeployKey",
  14615. "schema": {
  14616. "$ref": "#/definitions/DeployKey"
  14617. }
  14618. },
  14619. "DeployKeyList": {
  14620. "description": "DeployKeyList",
  14621. "schema": {
  14622. "type": "array",
  14623. "items": {
  14624. "$ref": "#/definitions/DeployKey"
  14625. }
  14626. }
  14627. },
  14628. "EmailList": {
  14629. "description": "EmailList",
  14630. "schema": {
  14631. "type": "array",
  14632. "items": {
  14633. "$ref": "#/definitions/Email"
  14634. }
  14635. }
  14636. },
  14637. "EmptyRepository": {
  14638. "description": "EmptyRepository",
  14639. "schema": {
  14640. "$ref": "#/definitions/APIError"
  14641. }
  14642. },
  14643. "FileDeleteResponse": {
  14644. "description": "FileDeleteResponse",
  14645. "schema": {
  14646. "$ref": "#/definitions/FileDeleteResponse"
  14647. }
  14648. },
  14649. "FileResponse": {
  14650. "description": "FileResponse",
  14651. "schema": {
  14652. "$ref": "#/definitions/FileResponse"
  14653. }
  14654. },
  14655. "GPGKey": {
  14656. "description": "GPGKey",
  14657. "schema": {
  14658. "$ref": "#/definitions/GPGKey"
  14659. }
  14660. },
  14661. "GPGKeyList": {
  14662. "description": "GPGKeyList",
  14663. "schema": {
  14664. "type": "array",
  14665. "items": {
  14666. "$ref": "#/definitions/GPGKey"
  14667. }
  14668. }
  14669. },
  14670. "GitBlobResponse": {
  14671. "description": "GitBlobResponse",
  14672. "schema": {
  14673. "$ref": "#/definitions/GitBlobResponse"
  14674. }
  14675. },
  14676. "GitHook": {
  14677. "description": "GitHook",
  14678. "schema": {
  14679. "$ref": "#/definitions/GitHook"
  14680. }
  14681. },
  14682. "GitHookList": {
  14683. "description": "GitHookList",
  14684. "schema": {
  14685. "type": "array",
  14686. "items": {
  14687. "$ref": "#/definitions/GitHook"
  14688. }
  14689. }
  14690. },
  14691. "GitTreeResponse": {
  14692. "description": "GitTreeResponse",
  14693. "schema": {
  14694. "$ref": "#/definitions/GitTreeResponse"
  14695. }
  14696. },
  14697. "Hook": {
  14698. "description": "Hook",
  14699. "schema": {
  14700. "$ref": "#/definitions/Hook"
  14701. }
  14702. },
  14703. "HookList": {
  14704. "description": "HookList",
  14705. "schema": {
  14706. "type": "array",
  14707. "items": {
  14708. "$ref": "#/definitions/Hook"
  14709. }
  14710. }
  14711. },
  14712. "Issue": {
  14713. "description": "Issue",
  14714. "schema": {
  14715. "$ref": "#/definitions/Issue"
  14716. }
  14717. },
  14718. "IssueDeadline": {
  14719. "description": "IssueDeadline",
  14720. "schema": {
  14721. "$ref": "#/definitions/IssueDeadline"
  14722. }
  14723. },
  14724. "IssueList": {
  14725. "description": "IssueList",
  14726. "schema": {
  14727. "type": "array",
  14728. "items": {
  14729. "$ref": "#/definitions/Issue"
  14730. }
  14731. }
  14732. },
  14733. "Label": {
  14734. "description": "Label",
  14735. "schema": {
  14736. "$ref": "#/definitions/Label"
  14737. }
  14738. },
  14739. "LabelList": {
  14740. "description": "LabelList",
  14741. "schema": {
  14742. "type": "array",
  14743. "items": {
  14744. "$ref": "#/definitions/Label"
  14745. }
  14746. }
  14747. },
  14748. "MarkdownRender": {
  14749. "description": "MarkdownRender is a rendered markdown document",
  14750. "schema": {
  14751. "type": "string"
  14752. }
  14753. },
  14754. "Milestone": {
  14755. "description": "Milestone",
  14756. "schema": {
  14757. "$ref": "#/definitions/Milestone"
  14758. }
  14759. },
  14760. "MilestoneList": {
  14761. "description": "MilestoneList",
  14762. "schema": {
  14763. "type": "array",
  14764. "items": {
  14765. "$ref": "#/definitions/Milestone"
  14766. }
  14767. }
  14768. },
  14769. "NotificationCount": {
  14770. "description": "Number of unread notifications",
  14771. "schema": {
  14772. "$ref": "#/definitions/NotificationCount"
  14773. }
  14774. },
  14775. "NotificationThread": {
  14776. "description": "NotificationThread",
  14777. "schema": {
  14778. "$ref": "#/definitions/NotificationThread"
  14779. }
  14780. },
  14781. "NotificationThreadList": {
  14782. "description": "NotificationThreadList",
  14783. "schema": {
  14784. "type": "array",
  14785. "items": {
  14786. "$ref": "#/definitions/NotificationThread"
  14787. }
  14788. }
  14789. },
  14790. "OAuth2Application": {
  14791. "description": "OAuth2Application",
  14792. "schema": {
  14793. "$ref": "#/definitions/OAuth2Application"
  14794. }
  14795. },
  14796. "OAuth2ApplicationList": {
  14797. "description": "OAuth2ApplicationList represents a list of OAuth2 applications.",
  14798. "schema": {
  14799. "type": "array",
  14800. "items": {
  14801. "$ref": "#/definitions/OAuth2Application"
  14802. }
  14803. }
  14804. },
  14805. "Organization": {
  14806. "description": "Organization",
  14807. "schema": {
  14808. "$ref": "#/definitions/Organization"
  14809. }
  14810. },
  14811. "OrganizationList": {
  14812. "description": "OrganizationList",
  14813. "schema": {
  14814. "type": "array",
  14815. "items": {
  14816. "$ref": "#/definitions/Organization"
  14817. }
  14818. }
  14819. },
  14820. "PublicKey": {
  14821. "description": "PublicKey",
  14822. "schema": {
  14823. "$ref": "#/definitions/PublicKey"
  14824. }
  14825. },
  14826. "PublicKeyList": {
  14827. "description": "PublicKeyList",
  14828. "schema": {
  14829. "type": "array",
  14830. "items": {
  14831. "$ref": "#/definitions/PublicKey"
  14832. }
  14833. }
  14834. },
  14835. "PullRequest": {
  14836. "description": "PullRequest",
  14837. "schema": {
  14838. "$ref": "#/definitions/PullRequest"
  14839. }
  14840. },
  14841. "PullRequestList": {
  14842. "description": "PullRequestList",
  14843. "schema": {
  14844. "type": "array",
  14845. "items": {
  14846. "$ref": "#/definitions/PullRequest"
  14847. }
  14848. }
  14849. },
  14850. "PullReview": {
  14851. "description": "PullReview",
  14852. "schema": {
  14853. "$ref": "#/definitions/PullReview"
  14854. }
  14855. },
  14856. "PullReviewComment": {
  14857. "description": "PullComment",
  14858. "schema": {
  14859. "$ref": "#/definitions/PullReviewComment"
  14860. }
  14861. },
  14862. "PullReviewCommentList": {
  14863. "description": "PullCommentList",
  14864. "schema": {
  14865. "type": "array",
  14866. "items": {
  14867. "$ref": "#/definitions/PullReviewComment"
  14868. }
  14869. }
  14870. },
  14871. "PullReviewList": {
  14872. "description": "PullReviewList",
  14873. "schema": {
  14874. "type": "array",
  14875. "items": {
  14876. "$ref": "#/definitions/PullReview"
  14877. }
  14878. }
  14879. },
  14880. "Reaction": {
  14881. "description": "Reaction",
  14882. "schema": {
  14883. "$ref": "#/definitions/Reaction"
  14884. }
  14885. },
  14886. "ReactionList": {
  14887. "description": "ReactionList",
  14888. "schema": {
  14889. "type": "array",
  14890. "items": {
  14891. "$ref": "#/definitions/Reaction"
  14892. }
  14893. }
  14894. },
  14895. "Reference": {
  14896. "description": "Reference",
  14897. "schema": {
  14898. "$ref": "#/definitions/Reference"
  14899. }
  14900. },
  14901. "ReferenceList": {
  14902. "description": "ReferenceList",
  14903. "schema": {
  14904. "type": "array",
  14905. "items": {
  14906. "$ref": "#/definitions/Reference"
  14907. }
  14908. }
  14909. },
  14910. "Release": {
  14911. "description": "Release",
  14912. "schema": {
  14913. "$ref": "#/definitions/Release"
  14914. }
  14915. },
  14916. "ReleaseList": {
  14917. "description": "ReleaseList",
  14918. "schema": {
  14919. "type": "array",
  14920. "items": {
  14921. "$ref": "#/definitions/Release"
  14922. }
  14923. }
  14924. },
  14925. "Repository": {
  14926. "description": "Repository",
  14927. "schema": {
  14928. "$ref": "#/definitions/Repository"
  14929. }
  14930. },
  14931. "RepositoryList": {
  14932. "description": "RepositoryList",
  14933. "schema": {
  14934. "type": "array",
  14935. "items": {
  14936. "$ref": "#/definitions/Repository"
  14937. }
  14938. }
  14939. },
  14940. "SearchResults": {
  14941. "description": "SearchResults",
  14942. "schema": {
  14943. "$ref": "#/definitions/SearchResults"
  14944. }
  14945. },
  14946. "ServerVersion": {
  14947. "description": "ServerVersion",
  14948. "schema": {
  14949. "$ref": "#/definitions/ServerVersion"
  14950. }
  14951. },
  14952. "Status": {
  14953. "description": "Status",
  14954. "schema": {
  14955. "$ref": "#/definitions/Status"
  14956. }
  14957. },
  14958. "StatusList": {
  14959. "description": "StatusList",
  14960. "schema": {
  14961. "type": "array",
  14962. "items": {
  14963. "$ref": "#/definitions/Status"
  14964. }
  14965. }
  14966. },
  14967. "StopWatch": {
  14968. "description": "StopWatch",
  14969. "schema": {
  14970. "$ref": "#/definitions/StopWatch"
  14971. }
  14972. },
  14973. "StopWatchList": {
  14974. "description": "StopWatchList",
  14975. "schema": {
  14976. "type": "array",
  14977. "items": {
  14978. "$ref": "#/definitions/StopWatch"
  14979. }
  14980. }
  14981. },
  14982. "Tag": {
  14983. "description": "Tag",
  14984. "schema": {
  14985. "$ref": "#/definitions/Tag"
  14986. }
  14987. },
  14988. "TagList": {
  14989. "description": "TagList",
  14990. "schema": {
  14991. "type": "array",
  14992. "items": {
  14993. "$ref": "#/definitions/Tag"
  14994. }
  14995. }
  14996. },
  14997. "Team": {
  14998. "description": "Team",
  14999. "schema": {
  15000. "$ref": "#/definitions/Team"
  15001. }
  15002. },
  15003. "TeamList": {
  15004. "description": "TeamList",
  15005. "schema": {
  15006. "type": "array",
  15007. "items": {
  15008. "$ref": "#/definitions/Team"
  15009. }
  15010. }
  15011. },
  15012. "TopicListResponse": {
  15013. "description": "TopicListResponse",
  15014. "schema": {
  15015. "type": "array",
  15016. "items": {
  15017. "$ref": "#/definitions/TopicResponse"
  15018. }
  15019. }
  15020. },
  15021. "TopicNames": {
  15022. "description": "TopicNames",
  15023. "schema": {
  15024. "$ref": "#/definitions/TopicName"
  15025. }
  15026. },
  15027. "TrackedTime": {
  15028. "description": "TrackedTime",
  15029. "schema": {
  15030. "$ref": "#/definitions/TrackedTime"
  15031. }
  15032. },
  15033. "TrackedTimeList": {
  15034. "description": "TrackedTimeList",
  15035. "schema": {
  15036. "type": "array",
  15037. "items": {
  15038. "$ref": "#/definitions/TrackedTime"
  15039. }
  15040. }
  15041. },
  15042. "User": {
  15043. "description": "User",
  15044. "schema": {
  15045. "$ref": "#/definitions/User"
  15046. }
  15047. },
  15048. "UserHeatmapData": {
  15049. "description": "UserHeatmapData",
  15050. "schema": {
  15051. "type": "array",
  15052. "items": {
  15053. "$ref": "#/definitions/UserHeatmapData"
  15054. }
  15055. }
  15056. },
  15057. "UserList": {
  15058. "description": "UserList",
  15059. "schema": {
  15060. "type": "array",
  15061. "items": {
  15062. "$ref": "#/definitions/User"
  15063. }
  15064. }
  15065. },
  15066. "WatchInfo": {
  15067. "description": "WatchInfo",
  15068. "schema": {
  15069. "$ref": "#/definitions/WatchInfo"
  15070. }
  15071. },
  15072. "empty": {
  15073. "description": "APIEmpty is an empty response"
  15074. },
  15075. "error": {
  15076. "description": "APIError is error format response",
  15077. "headers": {
  15078. "message": {
  15079. "type": "string"
  15080. },
  15081. "url": {
  15082. "type": "string"
  15083. }
  15084. }
  15085. },
  15086. "forbidden": {
  15087. "description": "APIForbiddenError is a forbidden error response",
  15088. "headers": {
  15089. "message": {
  15090. "type": "string"
  15091. },
  15092. "url": {
  15093. "type": "string"
  15094. }
  15095. }
  15096. },
  15097. "invalidTopicsError": {
  15098. "description": "APIInvalidTopicsError is error format response to invalid topics",
  15099. "headers": {
  15100. "invalidTopics": {
  15101. "type": "array",
  15102. "items": {
  15103. "type": "string"
  15104. }
  15105. },
  15106. "message": {
  15107. "type": "string"
  15108. }
  15109. }
  15110. },
  15111. "notFound": {
  15112. "description": "APINotFound is a not found empty response"
  15113. },
  15114. "parameterBodies": {
  15115. "description": "parameterBodies",
  15116. "schema": {
  15117. "$ref": "#/definitions/SubmitPullReviewOptions"
  15118. }
  15119. },
  15120. "redirect": {
  15121. "description": "APIRedirect is a redirect response"
  15122. },
  15123. "validationError": {
  15124. "description": "APIValidationError is error format response related to input validation",
  15125. "headers": {
  15126. "message": {
  15127. "type": "string"
  15128. },
  15129. "url": {
  15130. "type": "string"
  15131. }
  15132. }
  15133. }
  15134. },
  15135. "securityDefinitions": {
  15136. "AccessToken": {
  15137. "type": "apiKey",
  15138. "name": "access_token",
  15139. "in": "query"
  15140. },
  15141. "AuthorizationHeaderToken": {
  15142. "description": "API tokens must be prepended with \"token\" followed by a space.",
  15143. "type": "apiKey",
  15144. "name": "Authorization",
  15145. "in": "header"
  15146. },
  15147. "BasicAuth": {
  15148. "type": "basic"
  15149. },
  15150. "SudoHeader": {
  15151. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  15152. "type": "apiKey",
  15153. "name": "Sudo",
  15154. "in": "header"
  15155. },
  15156. "SudoParam": {
  15157. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  15158. "type": "apiKey",
  15159. "name": "sudo",
  15160. "in": "query"
  15161. },
  15162. "Token": {
  15163. "type": "apiKey",
  15164. "name": "token",
  15165. "in": "query"
  15166. }
  15167. },
  15168. "security": [
  15169. {
  15170. "BasicAuth": []
  15171. },
  15172. {
  15173. "Token": []
  15174. },
  15175. {
  15176. "AccessToken": []
  15177. },
  15178. {
  15179. "AuthorizationHeaderToken": []
  15180. },
  15181. {
  15182. "SudoParam": []
  15183. },
  15184. {
  15185. "SudoHeader": []
  15186. }
  15187. ]
  15188. }