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 440 kB

Adopt repositories (#12920) * Don't automatically delete repository files if they are present Prior to this PR Gitea would delete any repository files if they are present during creation or migration. This can in certain circumstances lead to data-loss and is slightly unpleasant. This PR provides a mechanism for Gitea to adopt repositories on creation and otherwise requires an explicit flag for deletion. PushCreate is slightly different - the create will cause adoption if that is allowed otherwise it will delete the data if that is allowed. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix tests and migrate overwrite Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @lunny Only offer to adopt or overwrite if the user can do that. Allow the site administrator to adopt or overwrite in all circumstances Signed-off-by: Andrew Thornton <art27@cantab.net> * Use setting.Repository.DefaultBranch for the default branch Signed-off-by: Andrew Thornton <art27@cantab.net> * Always set setting.Repository.DefaultBranch Signed-off-by: Andrew Thornton <art27@cantab.net> * update swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * update templates Signed-off-by: Andrew Thornton <art27@cantab.net> * ensure repo closed Signed-off-by: Andrew Thornton <art27@cantab.net> * Rewrite of adoption as per @6543 and @lunny Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review * update swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * missing not Signed-off-by: Andrew Thornton <art27@cantab.net> * add modals and flash reporting Signed-off-by: Andrew Thornton <art27@cantab.net> * Make the unadopted page searchable Signed-off-by: Andrew Thornton <art27@cantab.net> * Add API Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * fix swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * Handle empty and non-master branched repositories Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> * remove commented out code Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 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 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 configurable Trust Models (#11712) * Add configurable Trust Models Gitea's default signature verification model differs from GitHub. GitHub uses signatures to verify that the committer is who they say they are - meaning that when GitHub makes a signed commit it must be the committer. The GitHub model prevents re-publishing of commits after revocation of a key and prevents re-signing of other people's commits to create a completely trusted repository signed by one key or a set of trusted keys. The default behaviour of Gitea in contrast is to always display the avatar and information related to a signature. This allows signatures to be decoupled from the committer. That being said, allowing arbitary users to present other peoples commits as theirs is not necessarily desired therefore we have a trust model whereby signatures from collaborators are marked trusted, signatures matching the commit line are marked untrusted and signatures that match a user in the db but not the committer line are marked unmatched. The problem with this model is that this conflicts with Github therefore we need to provide an option to allow users to choose the Github model should they wish to. Signed-off-by: Andrew Thornton <art27@cantab.net> * Adjust locale strings Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @6543 Co-authored-by: 6543 <6543@obermui.de> * Update models/gpg_key.go * Add migration for repository Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years ago
Add configurable Trust Models (#11712) * Add configurable Trust Models Gitea's default signature verification model differs from GitHub. GitHub uses signatures to verify that the committer is who they say they are - meaning that when GitHub makes a signed commit it must be the committer. The GitHub model prevents re-publishing of commits after revocation of a key and prevents re-signing of other people's commits to create a completely trusted repository signed by one key or a set of trusted keys. The default behaviour of Gitea in contrast is to always display the avatar and information related to a signature. This allows signatures to be decoupled from the committer. That being said, allowing arbitary users to present other peoples commits as theirs is not necessarily desired therefore we have a trust model whereby signatures from collaborators are marked trusted, signatures matching the commit line are marked untrusted and signatures that match a user in the db but not the committer line are marked unmatched. The problem with this model is that this conflicts with Github therefore we need to provide an option to allow users to choose the Github model should they wish to. Signed-off-by: Andrew Thornton <art27@cantab.net> * Adjust locale strings Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @6543 Co-authored-by: 6543 <6543@obermui.de> * Update models/gpg_key.go * Add migration for repository Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 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
Move macaron to chi (#14293) Use [chi](https://github.com/go-chi/chi) instead of the forked [macaron](https://gitea.com/macaron/macaron). Since macaron and chi have conflicts with session share, this big PR becomes a have-to thing. According my previous idea, we can replace macaron step by step but I'm wrong. :( Below is a list of big changes on this PR. - [x] Define `context.ResponseWriter` interface with an implementation `context.Response`. - [x] Use chi instead of macaron, and also a customize `Route` to wrap chi so that the router usage is similar as before. - [x] Create different routers for `web`, `api`, `internal` and `install` so that the codes will be more clear and no magic . - [x] Use https://github.com/unrolled/render instead of macaron's internal render - [x] Use https://github.com/NYTimes/gziphandler instead of https://gitea.com/macaron/gzip - [x] Use https://gitea.com/go-chi/session which is a modified version of https://gitea.com/macaron/session and removed `nodb` support since it will not be maintained. **BREAK** - [x] Use https://gitea.com/go-chi/captcha which is a modified version of https://gitea.com/macaron/captcha - [x] Use https://gitea.com/go-chi/cache which is a modified version of https://gitea.com/macaron/cache - [x] Use https://gitea.com/go-chi/binding which is a modified version of https://gitea.com/macaron/binding - [x] Use https://github.com/go-chi/cors instead of https://gitea.com/macaron/cors - [x] Dropped https://gitea.com/macaron/i18n and make a new one in `code.gitea.io/gitea/modules/translation` - [x] Move validation form structs from `code.gitea.io/gitea/modules/auth` to `code.gitea.io/gitea/modules/forms` to avoid dependency cycle. - [x] Removed macaron log service because it's not need any more. **BREAK** - [x] All form structs have to be get by `web.GetForm(ctx)` in the route function but not as a function parameter on routes definition. - [x] Move Git HTTP protocol implementation to use routers directly. - [x] Fix the problem that chi routes don't support trailing slash but macaron did. - [x] `/api/v1/swagger` now will be redirect to `/api/swagger` but not render directly so that `APIContext` will not create a html render. Notices: - Chi router don't support request with trailing slash - Integration test `TestUserHeatmap` maybe mysql version related. It's failed on my macOS(mysql 5.7.29 installed via brew) but succeed on CI. Co-authored-by: 6543 <6543@obermui.de>
4 years ago
Move macaron to chi (#14293) Use [chi](https://github.com/go-chi/chi) instead of the forked [macaron](https://gitea.com/macaron/macaron). Since macaron and chi have conflicts with session share, this big PR becomes a have-to thing. According my previous idea, we can replace macaron step by step but I'm wrong. :( Below is a list of big changes on this PR. - [x] Define `context.ResponseWriter` interface with an implementation `context.Response`. - [x] Use chi instead of macaron, and also a customize `Route` to wrap chi so that the router usage is similar as before. - [x] Create different routers for `web`, `api`, `internal` and `install` so that the codes will be more clear and no magic . - [x] Use https://github.com/unrolled/render instead of macaron's internal render - [x] Use https://github.com/NYTimes/gziphandler instead of https://gitea.com/macaron/gzip - [x] Use https://gitea.com/go-chi/session which is a modified version of https://gitea.com/macaron/session and removed `nodb` support since it will not be maintained. **BREAK** - [x] Use https://gitea.com/go-chi/captcha which is a modified version of https://gitea.com/macaron/captcha - [x] Use https://gitea.com/go-chi/cache which is a modified version of https://gitea.com/macaron/cache - [x] Use https://gitea.com/go-chi/binding which is a modified version of https://gitea.com/macaron/binding - [x] Use https://github.com/go-chi/cors instead of https://gitea.com/macaron/cors - [x] Dropped https://gitea.com/macaron/i18n and make a new one in `code.gitea.io/gitea/modules/translation` - [x] Move validation form structs from `code.gitea.io/gitea/modules/auth` to `code.gitea.io/gitea/modules/forms` to avoid dependency cycle. - [x] Removed macaron log service because it's not need any more. **BREAK** - [x] All form structs have to be get by `web.GetForm(ctx)` in the route function but not as a function parameter on routes definition. - [x] Move Git HTTP protocol implementation to use routers directly. - [x] Fix the problem that chi routes don't support trailing slash but macaron did. - [x] `/api/v1/swagger` now will be redirect to `/api/swagger` but not render directly so that `APIContext` will not create a html render. Notices: - Chi router don't support request with trailing slash - Integration test `TestUserHeatmap` maybe mysql version related. It's failed on my macOS(mysql 5.7.29 installed via brew) but succeed on CI. Co-authored-by: 6543 <6543@obermui.de>
4 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
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108
  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 Gitea API.",
  17. "title": "Gitea API.",
  18. "license": {
  19. "name": "MIT",
  20. "url": "http://opensource.org/licenses/MIT"
  21. },
  22. "version": "{{AppVer}}"
  23. },
  24. "basePath": "{{AppSubUrl}}/api/v1",
  25. "paths": {
  26. "/admin/cron": {
  27. "get": {
  28. "produces": [
  29. "application/json"
  30. ],
  31. "tags": [
  32. "admin"
  33. ],
  34. "summary": "List cron tasks",
  35. "operationId": "adminCronList",
  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",
  46. "name": "limit",
  47. "in": "query"
  48. }
  49. ],
  50. "responses": {
  51. "200": {
  52. "$ref": "#/responses/CronList"
  53. },
  54. "403": {
  55. "$ref": "#/responses/forbidden"
  56. }
  57. }
  58. }
  59. },
  60. "/admin/cron/{task}": {
  61. "post": {
  62. "produces": [
  63. "application/json"
  64. ],
  65. "tags": [
  66. "admin"
  67. ],
  68. "summary": "Run cron task",
  69. "operationId": "adminCronRun",
  70. "parameters": [
  71. {
  72. "type": "string",
  73. "description": "task to run",
  74. "name": "task",
  75. "in": "path",
  76. "required": true
  77. }
  78. ],
  79. "responses": {
  80. "204": {
  81. "$ref": "#/responses/empty"
  82. },
  83. "404": {
  84. "$ref": "#/responses/notFound"
  85. }
  86. }
  87. }
  88. },
  89. "/admin/orgs": {
  90. "get": {
  91. "produces": [
  92. "application/json"
  93. ],
  94. "tags": [
  95. "admin"
  96. ],
  97. "summary": "List all organizations",
  98. "operationId": "adminGetAllOrgs",
  99. "parameters": [
  100. {
  101. "type": "integer",
  102. "description": "page number of results to return (1-based)",
  103. "name": "page",
  104. "in": "query"
  105. },
  106. {
  107. "type": "integer",
  108. "description": "page size of results",
  109. "name": "limit",
  110. "in": "query"
  111. }
  112. ],
  113. "responses": {
  114. "200": {
  115. "$ref": "#/responses/OrganizationList"
  116. },
  117. "403": {
  118. "$ref": "#/responses/forbidden"
  119. }
  120. }
  121. }
  122. },
  123. "/admin/unadopted": {
  124. "get": {
  125. "produces": [
  126. "application/json"
  127. ],
  128. "tags": [
  129. "admin"
  130. ],
  131. "summary": "List unadopted repositories",
  132. "operationId": "adminUnadoptedList",
  133. "parameters": [
  134. {
  135. "type": "integer",
  136. "description": "page number of results to return (1-based)",
  137. "name": "page",
  138. "in": "query"
  139. },
  140. {
  141. "type": "integer",
  142. "description": "page size of results",
  143. "name": "limit",
  144. "in": "query"
  145. },
  146. {
  147. "type": "string",
  148. "description": "pattern of repositories to search for",
  149. "name": "pattern",
  150. "in": "query"
  151. }
  152. ],
  153. "responses": {
  154. "200": {
  155. "$ref": "#/responses/StringSlice"
  156. },
  157. "403": {
  158. "$ref": "#/responses/forbidden"
  159. }
  160. }
  161. }
  162. },
  163. "/admin/unadopted/{owner}/{repo}": {
  164. "post": {
  165. "produces": [
  166. "application/json"
  167. ],
  168. "tags": [
  169. "admin"
  170. ],
  171. "summary": "Adopt unadopted files as a repository",
  172. "operationId": "adminAdoptRepository",
  173. "parameters": [
  174. {
  175. "type": "string",
  176. "description": "owner of the repo",
  177. "name": "owner",
  178. "in": "path",
  179. "required": true
  180. },
  181. {
  182. "type": "string",
  183. "description": "name of the repo",
  184. "name": "repo",
  185. "in": "path",
  186. "required": true
  187. }
  188. ],
  189. "responses": {
  190. "204": {
  191. "$ref": "#/responses/empty"
  192. },
  193. "403": {
  194. "$ref": "#/responses/forbidden"
  195. },
  196. "404": {
  197. "$ref": "#/responses/notFound"
  198. }
  199. }
  200. },
  201. "delete": {
  202. "produces": [
  203. "application/json"
  204. ],
  205. "tags": [
  206. "admin"
  207. ],
  208. "summary": "Delete unadopted files",
  209. "operationId": "adminDeleteUnadoptedRepository",
  210. "parameters": [
  211. {
  212. "type": "string",
  213. "description": "owner of the repo",
  214. "name": "owner",
  215. "in": "path",
  216. "required": true
  217. },
  218. {
  219. "type": "string",
  220. "description": "name of the repo",
  221. "name": "repo",
  222. "in": "path",
  223. "required": true
  224. }
  225. ],
  226. "responses": {
  227. "204": {
  228. "$ref": "#/responses/empty"
  229. },
  230. "403": {
  231. "$ref": "#/responses/forbidden"
  232. }
  233. }
  234. }
  235. },
  236. "/admin/users": {
  237. "get": {
  238. "produces": [
  239. "application/json"
  240. ],
  241. "tags": [
  242. "admin"
  243. ],
  244. "summary": "List all users",
  245. "operationId": "adminGetAllUsers",
  246. "parameters": [
  247. {
  248. "type": "integer",
  249. "description": "page number of results to return (1-based)",
  250. "name": "page",
  251. "in": "query"
  252. },
  253. {
  254. "type": "integer",
  255. "description": "page size of results",
  256. "name": "limit",
  257. "in": "query"
  258. }
  259. ],
  260. "responses": {
  261. "200": {
  262. "$ref": "#/responses/UserList"
  263. },
  264. "403": {
  265. "$ref": "#/responses/forbidden"
  266. }
  267. }
  268. },
  269. "post": {
  270. "consumes": [
  271. "application/json"
  272. ],
  273. "produces": [
  274. "application/json"
  275. ],
  276. "tags": [
  277. "admin"
  278. ],
  279. "summary": "Create a user",
  280. "operationId": "adminCreateUser",
  281. "parameters": [
  282. {
  283. "name": "body",
  284. "in": "body",
  285. "schema": {
  286. "$ref": "#/definitions/CreateUserOption"
  287. }
  288. }
  289. ],
  290. "responses": {
  291. "201": {
  292. "$ref": "#/responses/User"
  293. },
  294. "400": {
  295. "$ref": "#/responses/error"
  296. },
  297. "403": {
  298. "$ref": "#/responses/forbidden"
  299. },
  300. "422": {
  301. "$ref": "#/responses/validationError"
  302. }
  303. }
  304. }
  305. },
  306. "/admin/users/{username}": {
  307. "delete": {
  308. "produces": [
  309. "application/json"
  310. ],
  311. "tags": [
  312. "admin"
  313. ],
  314. "summary": "Delete a user",
  315. "operationId": "adminDeleteUser",
  316. "parameters": [
  317. {
  318. "type": "string",
  319. "description": "username of user to delete",
  320. "name": "username",
  321. "in": "path",
  322. "required": true
  323. }
  324. ],
  325. "responses": {
  326. "204": {
  327. "$ref": "#/responses/empty"
  328. },
  329. "403": {
  330. "$ref": "#/responses/forbidden"
  331. },
  332. "422": {
  333. "$ref": "#/responses/validationError"
  334. }
  335. }
  336. },
  337. "patch": {
  338. "consumes": [
  339. "application/json"
  340. ],
  341. "produces": [
  342. "application/json"
  343. ],
  344. "tags": [
  345. "admin"
  346. ],
  347. "summary": "Edit an existing user",
  348. "operationId": "adminEditUser",
  349. "parameters": [
  350. {
  351. "type": "string",
  352. "description": "username of user to edit",
  353. "name": "username",
  354. "in": "path",
  355. "required": true
  356. },
  357. {
  358. "name": "body",
  359. "in": "body",
  360. "schema": {
  361. "$ref": "#/definitions/EditUserOption"
  362. }
  363. }
  364. ],
  365. "responses": {
  366. "200": {
  367. "$ref": "#/responses/User"
  368. },
  369. "403": {
  370. "$ref": "#/responses/forbidden"
  371. },
  372. "422": {
  373. "$ref": "#/responses/validationError"
  374. }
  375. }
  376. }
  377. },
  378. "/admin/users/{username}/keys": {
  379. "post": {
  380. "consumes": [
  381. "application/json"
  382. ],
  383. "produces": [
  384. "application/json"
  385. ],
  386. "tags": [
  387. "admin"
  388. ],
  389. "summary": "Add a public key on behalf of a user",
  390. "operationId": "adminCreatePublicKey",
  391. "parameters": [
  392. {
  393. "type": "string",
  394. "description": "username of the user",
  395. "name": "username",
  396. "in": "path",
  397. "required": true
  398. },
  399. {
  400. "name": "key",
  401. "in": "body",
  402. "schema": {
  403. "$ref": "#/definitions/CreateKeyOption"
  404. }
  405. }
  406. ],
  407. "responses": {
  408. "201": {
  409. "$ref": "#/responses/PublicKey"
  410. },
  411. "403": {
  412. "$ref": "#/responses/forbidden"
  413. },
  414. "422": {
  415. "$ref": "#/responses/validationError"
  416. }
  417. }
  418. }
  419. },
  420. "/admin/users/{username}/keys/{id}": {
  421. "delete": {
  422. "produces": [
  423. "application/json"
  424. ],
  425. "tags": [
  426. "admin"
  427. ],
  428. "summary": "Delete a user's public key",
  429. "operationId": "adminDeleteUserPublicKey",
  430. "parameters": [
  431. {
  432. "type": "string",
  433. "description": "username of user",
  434. "name": "username",
  435. "in": "path",
  436. "required": true
  437. },
  438. {
  439. "type": "integer",
  440. "format": "int64",
  441. "description": "id of the key to delete",
  442. "name": "id",
  443. "in": "path",
  444. "required": true
  445. }
  446. ],
  447. "responses": {
  448. "204": {
  449. "$ref": "#/responses/empty"
  450. },
  451. "403": {
  452. "$ref": "#/responses/forbidden"
  453. },
  454. "404": {
  455. "$ref": "#/responses/notFound"
  456. }
  457. }
  458. }
  459. },
  460. "/admin/users/{username}/orgs": {
  461. "post": {
  462. "consumes": [
  463. "application/json"
  464. ],
  465. "produces": [
  466. "application/json"
  467. ],
  468. "tags": [
  469. "admin"
  470. ],
  471. "summary": "Create an organization",
  472. "operationId": "adminCreateOrg",
  473. "parameters": [
  474. {
  475. "type": "string",
  476. "description": "username of the user that will own the created organization",
  477. "name": "username",
  478. "in": "path",
  479. "required": true
  480. },
  481. {
  482. "name": "organization",
  483. "in": "body",
  484. "required": true,
  485. "schema": {
  486. "$ref": "#/definitions/CreateOrgOption"
  487. }
  488. }
  489. ],
  490. "responses": {
  491. "201": {
  492. "$ref": "#/responses/Organization"
  493. },
  494. "403": {
  495. "$ref": "#/responses/forbidden"
  496. },
  497. "422": {
  498. "$ref": "#/responses/validationError"
  499. }
  500. }
  501. }
  502. },
  503. "/admin/users/{username}/repos": {
  504. "post": {
  505. "consumes": [
  506. "application/json"
  507. ],
  508. "produces": [
  509. "application/json"
  510. ],
  511. "tags": [
  512. "admin"
  513. ],
  514. "summary": "Create a repository on behalf of a user",
  515. "operationId": "adminCreateRepo",
  516. "parameters": [
  517. {
  518. "type": "string",
  519. "description": "username of the user. This user will own the created repository",
  520. "name": "username",
  521. "in": "path",
  522. "required": true
  523. },
  524. {
  525. "name": "repository",
  526. "in": "body",
  527. "required": true,
  528. "schema": {
  529. "$ref": "#/definitions/CreateRepoOption"
  530. }
  531. }
  532. ],
  533. "responses": {
  534. "201": {
  535. "$ref": "#/responses/Repository"
  536. },
  537. "403": {
  538. "$ref": "#/responses/forbidden"
  539. },
  540. "404": {
  541. "$ref": "#/responses/notFound"
  542. },
  543. "409": {
  544. "$ref": "#/responses/error"
  545. },
  546. "422": {
  547. "$ref": "#/responses/validationError"
  548. }
  549. }
  550. }
  551. },
  552. "/markdown": {
  553. "post": {
  554. "consumes": [
  555. "application/json"
  556. ],
  557. "produces": [
  558. "text/html"
  559. ],
  560. "tags": [
  561. "miscellaneous"
  562. ],
  563. "summary": "Render a markdown document as HTML",
  564. "operationId": "renderMarkdown",
  565. "parameters": [
  566. {
  567. "name": "body",
  568. "in": "body",
  569. "schema": {
  570. "$ref": "#/definitions/MarkdownOption"
  571. }
  572. }
  573. ],
  574. "responses": {
  575. "200": {
  576. "$ref": "#/responses/MarkdownRender"
  577. },
  578. "422": {
  579. "$ref": "#/responses/validationError"
  580. }
  581. }
  582. }
  583. },
  584. "/markdown/raw": {
  585. "post": {
  586. "consumes": [
  587. "text/plain"
  588. ],
  589. "produces": [
  590. "text/html"
  591. ],
  592. "tags": [
  593. "miscellaneous"
  594. ],
  595. "summary": "Render raw markdown as HTML",
  596. "operationId": "renderMarkdownRaw",
  597. "parameters": [
  598. {
  599. "description": "Request body to render",
  600. "name": "body",
  601. "in": "body",
  602. "required": true,
  603. "schema": {
  604. "type": "string"
  605. }
  606. }
  607. ],
  608. "responses": {
  609. "200": {
  610. "$ref": "#/responses/MarkdownRender"
  611. },
  612. "422": {
  613. "$ref": "#/responses/validationError"
  614. }
  615. }
  616. }
  617. },
  618. "/notifications": {
  619. "get": {
  620. "consumes": [
  621. "application/json"
  622. ],
  623. "produces": [
  624. "application/json"
  625. ],
  626. "tags": [
  627. "notification"
  628. ],
  629. "summary": "List users's notification threads",
  630. "operationId": "notifyGetList",
  631. "parameters": [
  632. {
  633. "type": "string",
  634. "description": "If true, show notifications marked as read. Default value is false",
  635. "name": "all",
  636. "in": "query"
  637. },
  638. {
  639. "type": "array",
  640. "items": {
  641. "type": "string"
  642. },
  643. "collectionFormat": "multi",
  644. "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned.",
  645. "name": "status-types",
  646. "in": "query"
  647. },
  648. {
  649. "type": "string",
  650. "format": "date-time",
  651. "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
  652. "name": "since",
  653. "in": "query"
  654. },
  655. {
  656. "type": "string",
  657. "format": "date-time",
  658. "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
  659. "name": "before",
  660. "in": "query"
  661. },
  662. {
  663. "type": "integer",
  664. "description": "page number of results to return (1-based)",
  665. "name": "page",
  666. "in": "query"
  667. },
  668. {
  669. "type": "integer",
  670. "description": "page size of results",
  671. "name": "limit",
  672. "in": "query"
  673. }
  674. ],
  675. "responses": {
  676. "200": {
  677. "$ref": "#/responses/NotificationThreadList"
  678. }
  679. }
  680. },
  681. "put": {
  682. "consumes": [
  683. "application/json"
  684. ],
  685. "produces": [
  686. "application/json"
  687. ],
  688. "tags": [
  689. "notification"
  690. ],
  691. "summary": "Mark notification threads as read, pinned or unread",
  692. "operationId": "notifyReadList",
  693. "parameters": [
  694. {
  695. "type": "string",
  696. "format": "date-time",
  697. "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
  698. "name": "last_read_at",
  699. "in": "query"
  700. },
  701. {
  702. "type": "string",
  703. "description": "If true, mark all notifications on this repo. Default value is false",
  704. "name": "all",
  705. "in": "query"
  706. },
  707. {
  708. "type": "array",
  709. "items": {
  710. "type": "string"
  711. },
  712. "collectionFormat": "multi",
  713. "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.",
  714. "name": "status-types",
  715. "in": "query"
  716. },
  717. {
  718. "type": "string",
  719. "description": "Status to mark notifications as, Defaults to read.",
  720. "name": "to-status",
  721. "in": "query"
  722. }
  723. ],
  724. "responses": {
  725. "205": {
  726. "$ref": "#/responses/empty"
  727. }
  728. }
  729. }
  730. },
  731. "/notifications/new": {
  732. "get": {
  733. "tags": [
  734. "notification"
  735. ],
  736. "summary": "Check if unread notifications exist",
  737. "operationId": "notifyNewAvailable",
  738. "responses": {
  739. "200": {
  740. "$ref": "#/responses/NotificationCount"
  741. }
  742. }
  743. }
  744. },
  745. "/notifications/threads/{id}": {
  746. "get": {
  747. "consumes": [
  748. "application/json"
  749. ],
  750. "produces": [
  751. "application/json"
  752. ],
  753. "tags": [
  754. "notification"
  755. ],
  756. "summary": "Get notification thread by ID",
  757. "operationId": "notifyGetThread",
  758. "parameters": [
  759. {
  760. "type": "string",
  761. "description": "id of notification thread",
  762. "name": "id",
  763. "in": "path",
  764. "required": true
  765. }
  766. ],
  767. "responses": {
  768. "200": {
  769. "$ref": "#/responses/NotificationThread"
  770. },
  771. "403": {
  772. "$ref": "#/responses/forbidden"
  773. },
  774. "404": {
  775. "$ref": "#/responses/notFound"
  776. }
  777. }
  778. },
  779. "patch": {
  780. "consumes": [
  781. "application/json"
  782. ],
  783. "produces": [
  784. "application/json"
  785. ],
  786. "tags": [
  787. "notification"
  788. ],
  789. "summary": "Mark notification thread as read by ID",
  790. "operationId": "notifyReadThread",
  791. "parameters": [
  792. {
  793. "type": "string",
  794. "description": "id of notification thread",
  795. "name": "id",
  796. "in": "path",
  797. "required": true
  798. },
  799. {
  800. "type": "string",
  801. "default": "read",
  802. "description": "Status to mark notifications as",
  803. "name": "to-status",
  804. "in": "query"
  805. }
  806. ],
  807. "responses": {
  808. "205": {
  809. "$ref": "#/responses/empty"
  810. },
  811. "403": {
  812. "$ref": "#/responses/forbidden"
  813. },
  814. "404": {
  815. "$ref": "#/responses/notFound"
  816. }
  817. }
  818. }
  819. },
  820. "/org/{org}/repos": {
  821. "post": {
  822. "consumes": [
  823. "application/json"
  824. ],
  825. "produces": [
  826. "application/json"
  827. ],
  828. "tags": [
  829. "organization"
  830. ],
  831. "summary": "Create a repository in an organization",
  832. "operationId": "createOrgRepoDeprecated",
  833. "deprecated": true,
  834. "parameters": [
  835. {
  836. "type": "string",
  837. "description": "name of organization",
  838. "name": "org",
  839. "in": "path",
  840. "required": true
  841. },
  842. {
  843. "name": "body",
  844. "in": "body",
  845. "schema": {
  846. "$ref": "#/definitions/CreateRepoOption"
  847. }
  848. }
  849. ],
  850. "responses": {
  851. "201": {
  852. "$ref": "#/responses/Repository"
  853. },
  854. "403": {
  855. "$ref": "#/responses/forbidden"
  856. },
  857. "422": {
  858. "$ref": "#/responses/validationError"
  859. }
  860. }
  861. }
  862. },
  863. "/orgs": {
  864. "get": {
  865. "produces": [
  866. "application/json"
  867. ],
  868. "tags": [
  869. "organization"
  870. ],
  871. "summary": "Get list of organizations",
  872. "operationId": "orgGetAll",
  873. "parameters": [
  874. {
  875. "type": "integer",
  876. "description": "page number of results to return (1-based)",
  877. "name": "page",
  878. "in": "query"
  879. },
  880. {
  881. "type": "integer",
  882. "description": "page size of results",
  883. "name": "limit",
  884. "in": "query"
  885. }
  886. ],
  887. "responses": {
  888. "200": {
  889. "$ref": "#/responses/OrganizationList"
  890. }
  891. }
  892. },
  893. "post": {
  894. "consumes": [
  895. "application/json"
  896. ],
  897. "produces": [
  898. "application/json"
  899. ],
  900. "tags": [
  901. "organization"
  902. ],
  903. "summary": "Create an organization",
  904. "operationId": "orgCreate",
  905. "parameters": [
  906. {
  907. "name": "organization",
  908. "in": "body",
  909. "required": true,
  910. "schema": {
  911. "$ref": "#/definitions/CreateOrgOption"
  912. }
  913. }
  914. ],
  915. "responses": {
  916. "201": {
  917. "$ref": "#/responses/Organization"
  918. },
  919. "403": {
  920. "$ref": "#/responses/forbidden"
  921. },
  922. "422": {
  923. "$ref": "#/responses/validationError"
  924. }
  925. }
  926. }
  927. },
  928. "/orgs/{org}": {
  929. "get": {
  930. "produces": [
  931. "application/json"
  932. ],
  933. "tags": [
  934. "organization"
  935. ],
  936. "summary": "Get an organization",
  937. "operationId": "orgGet",
  938. "parameters": [
  939. {
  940. "type": "string",
  941. "description": "name of the organization to get",
  942. "name": "org",
  943. "in": "path",
  944. "required": true
  945. }
  946. ],
  947. "responses": {
  948. "200": {
  949. "$ref": "#/responses/Organization"
  950. }
  951. }
  952. },
  953. "delete": {
  954. "produces": [
  955. "application/json"
  956. ],
  957. "tags": [
  958. "organization"
  959. ],
  960. "summary": "Delete an organization",
  961. "operationId": "orgDelete",
  962. "parameters": [
  963. {
  964. "type": "string",
  965. "description": "organization that is to be deleted",
  966. "name": "org",
  967. "in": "path",
  968. "required": true
  969. }
  970. ],
  971. "responses": {
  972. "204": {
  973. "$ref": "#/responses/empty"
  974. }
  975. }
  976. },
  977. "patch": {
  978. "consumes": [
  979. "application/json"
  980. ],
  981. "produces": [
  982. "application/json"
  983. ],
  984. "tags": [
  985. "organization"
  986. ],
  987. "summary": "Edit an organization",
  988. "operationId": "orgEdit",
  989. "parameters": [
  990. {
  991. "type": "string",
  992. "description": "name of the organization to edit",
  993. "name": "org",
  994. "in": "path",
  995. "required": true
  996. },
  997. {
  998. "name": "body",
  999. "in": "body",
  1000. "required": true,
  1001. "schema": {
  1002. "$ref": "#/definitions/EditOrgOption"
  1003. }
  1004. }
  1005. ],
  1006. "responses": {
  1007. "200": {
  1008. "$ref": "#/responses/Organization"
  1009. }
  1010. }
  1011. }
  1012. },
  1013. "/orgs/{org}/hooks": {
  1014. "get": {
  1015. "produces": [
  1016. "application/json"
  1017. ],
  1018. "tags": [
  1019. "organization"
  1020. ],
  1021. "summary": "List an organization's webhooks",
  1022. "operationId": "orgListHooks",
  1023. "parameters": [
  1024. {
  1025. "type": "string",
  1026. "description": "name of the organization",
  1027. "name": "org",
  1028. "in": "path",
  1029. "required": true
  1030. },
  1031. {
  1032. "type": "integer",
  1033. "description": "page number of results to return (1-based)",
  1034. "name": "page",
  1035. "in": "query"
  1036. },
  1037. {
  1038. "type": "integer",
  1039. "description": "page size of results",
  1040. "name": "limit",
  1041. "in": "query"
  1042. }
  1043. ],
  1044. "responses": {
  1045. "200": {
  1046. "$ref": "#/responses/HookList"
  1047. }
  1048. }
  1049. }
  1050. },
  1051. "/orgs/{org}/hooks/": {
  1052. "post": {
  1053. "consumes": [
  1054. "application/json"
  1055. ],
  1056. "produces": [
  1057. "application/json"
  1058. ],
  1059. "tags": [
  1060. "organization"
  1061. ],
  1062. "summary": "Create a hook",
  1063. "operationId": "orgCreateHook",
  1064. "parameters": [
  1065. {
  1066. "type": "string",
  1067. "description": "name of the organization",
  1068. "name": "org",
  1069. "in": "path",
  1070. "required": true
  1071. },
  1072. {
  1073. "name": "body",
  1074. "in": "body",
  1075. "required": true,
  1076. "schema": {
  1077. "$ref": "#/definitions/CreateHookOption"
  1078. }
  1079. }
  1080. ],
  1081. "responses": {
  1082. "201": {
  1083. "$ref": "#/responses/Hook"
  1084. }
  1085. }
  1086. }
  1087. },
  1088. "/orgs/{org}/hooks/{id}": {
  1089. "get": {
  1090. "produces": [
  1091. "application/json"
  1092. ],
  1093. "tags": [
  1094. "organization"
  1095. ],
  1096. "summary": "Get a hook",
  1097. "operationId": "orgGetHook",
  1098. "parameters": [
  1099. {
  1100. "type": "string",
  1101. "description": "name of the organization",
  1102. "name": "org",
  1103. "in": "path",
  1104. "required": true
  1105. },
  1106. {
  1107. "type": "integer",
  1108. "format": "int64",
  1109. "description": "id of the hook to get",
  1110. "name": "id",
  1111. "in": "path",
  1112. "required": true
  1113. }
  1114. ],
  1115. "responses": {
  1116. "200": {
  1117. "$ref": "#/responses/Hook"
  1118. }
  1119. }
  1120. },
  1121. "delete": {
  1122. "produces": [
  1123. "application/json"
  1124. ],
  1125. "tags": [
  1126. "organization"
  1127. ],
  1128. "summary": "Delete a hook",
  1129. "operationId": "orgDeleteHook",
  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 hook to delete",
  1142. "name": "id",
  1143. "in": "path",
  1144. "required": true
  1145. }
  1146. ],
  1147. "responses": {
  1148. "204": {
  1149. "$ref": "#/responses/empty"
  1150. }
  1151. }
  1152. },
  1153. "patch": {
  1154. "consumes": [
  1155. "application/json"
  1156. ],
  1157. "produces": [
  1158. "application/json"
  1159. ],
  1160. "tags": [
  1161. "organization"
  1162. ],
  1163. "summary": "Update a hook",
  1164. "operationId": "orgEditHook",
  1165. "parameters": [
  1166. {
  1167. "type": "string",
  1168. "description": "name of the organization",
  1169. "name": "org",
  1170. "in": "path",
  1171. "required": true
  1172. },
  1173. {
  1174. "type": "integer",
  1175. "format": "int64",
  1176. "description": "id of the hook to update",
  1177. "name": "id",
  1178. "in": "path",
  1179. "required": true
  1180. },
  1181. {
  1182. "name": "body",
  1183. "in": "body",
  1184. "schema": {
  1185. "$ref": "#/definitions/EditHookOption"
  1186. }
  1187. }
  1188. ],
  1189. "responses": {
  1190. "200": {
  1191. "$ref": "#/responses/Hook"
  1192. }
  1193. }
  1194. }
  1195. },
  1196. "/orgs/{org}/labels": {
  1197. "get": {
  1198. "produces": [
  1199. "application/json"
  1200. ],
  1201. "tags": [
  1202. "organization"
  1203. ],
  1204. "summary": "List an organization's labels",
  1205. "operationId": "orgListLabels",
  1206. "parameters": [
  1207. {
  1208. "type": "string",
  1209. "description": "name of the organization",
  1210. "name": "org",
  1211. "in": "path",
  1212. "required": true
  1213. },
  1214. {
  1215. "type": "integer",
  1216. "description": "page number of results to return (1-based)",
  1217. "name": "page",
  1218. "in": "query"
  1219. },
  1220. {
  1221. "type": "integer",
  1222. "description": "page size of results",
  1223. "name": "limit",
  1224. "in": "query"
  1225. }
  1226. ],
  1227. "responses": {
  1228. "200": {
  1229. "$ref": "#/responses/LabelList"
  1230. }
  1231. }
  1232. },
  1233. "post": {
  1234. "consumes": [
  1235. "application/json"
  1236. ],
  1237. "produces": [
  1238. "application/json"
  1239. ],
  1240. "tags": [
  1241. "organization"
  1242. ],
  1243. "summary": "Create a label for an organization",
  1244. "operationId": "orgCreateLabel",
  1245. "parameters": [
  1246. {
  1247. "type": "string",
  1248. "description": "name of the organization",
  1249. "name": "org",
  1250. "in": "path",
  1251. "required": true
  1252. },
  1253. {
  1254. "name": "body",
  1255. "in": "body",
  1256. "schema": {
  1257. "$ref": "#/definitions/CreateLabelOption"
  1258. }
  1259. }
  1260. ],
  1261. "responses": {
  1262. "201": {
  1263. "$ref": "#/responses/Label"
  1264. },
  1265. "422": {
  1266. "$ref": "#/responses/validationError"
  1267. }
  1268. }
  1269. }
  1270. },
  1271. "/orgs/{org}/labels/{id}": {
  1272. "get": {
  1273. "produces": [
  1274. "application/json"
  1275. ],
  1276. "tags": [
  1277. "organization"
  1278. ],
  1279. "summary": "Get a single label",
  1280. "operationId": "orgGetLabel",
  1281. "parameters": [
  1282. {
  1283. "type": "string",
  1284. "description": "name of the organization",
  1285. "name": "org",
  1286. "in": "path",
  1287. "required": true
  1288. },
  1289. {
  1290. "type": "integer",
  1291. "format": "int64",
  1292. "description": "id of the label to get",
  1293. "name": "id",
  1294. "in": "path",
  1295. "required": true
  1296. }
  1297. ],
  1298. "responses": {
  1299. "200": {
  1300. "$ref": "#/responses/Label"
  1301. }
  1302. }
  1303. },
  1304. "delete": {
  1305. "tags": [
  1306. "organization"
  1307. ],
  1308. "summary": "Delete a label",
  1309. "operationId": "orgDeleteLabel",
  1310. "parameters": [
  1311. {
  1312. "type": "string",
  1313. "description": "name of the organization",
  1314. "name": "org",
  1315. "in": "path",
  1316. "required": true
  1317. },
  1318. {
  1319. "type": "integer",
  1320. "format": "int64",
  1321. "description": "id of the label to delete",
  1322. "name": "id",
  1323. "in": "path",
  1324. "required": true
  1325. }
  1326. ],
  1327. "responses": {
  1328. "204": {
  1329. "$ref": "#/responses/empty"
  1330. }
  1331. }
  1332. },
  1333. "patch": {
  1334. "consumes": [
  1335. "application/json"
  1336. ],
  1337. "produces": [
  1338. "application/json"
  1339. ],
  1340. "tags": [
  1341. "organization"
  1342. ],
  1343. "summary": "Update a label",
  1344. "operationId": "orgEditLabel",
  1345. "parameters": [
  1346. {
  1347. "type": "string",
  1348. "description": "name of the organization",
  1349. "name": "org",
  1350. "in": "path",
  1351. "required": true
  1352. },
  1353. {
  1354. "type": "integer",
  1355. "format": "int64",
  1356. "description": "id of the label to edit",
  1357. "name": "id",
  1358. "in": "path",
  1359. "required": true
  1360. },
  1361. {
  1362. "name": "body",
  1363. "in": "body",
  1364. "schema": {
  1365. "$ref": "#/definitions/EditLabelOption"
  1366. }
  1367. }
  1368. ],
  1369. "responses": {
  1370. "200": {
  1371. "$ref": "#/responses/Label"
  1372. },
  1373. "422": {
  1374. "$ref": "#/responses/validationError"
  1375. }
  1376. }
  1377. }
  1378. },
  1379. "/orgs/{org}/members": {
  1380. "get": {
  1381. "produces": [
  1382. "application/json"
  1383. ],
  1384. "tags": [
  1385. "organization"
  1386. ],
  1387. "summary": "List an organization's members",
  1388. "operationId": "orgListMembers",
  1389. "parameters": [
  1390. {
  1391. "type": "string",
  1392. "description": "name of the organization",
  1393. "name": "org",
  1394. "in": "path",
  1395. "required": true
  1396. },
  1397. {
  1398. "type": "integer",
  1399. "description": "page number of results to return (1-based)",
  1400. "name": "page",
  1401. "in": "query"
  1402. },
  1403. {
  1404. "type": "integer",
  1405. "description": "page size of results",
  1406. "name": "limit",
  1407. "in": "query"
  1408. }
  1409. ],
  1410. "responses": {
  1411. "200": {
  1412. "$ref": "#/responses/UserList"
  1413. }
  1414. }
  1415. }
  1416. },
  1417. "/orgs/{org}/members/{username}": {
  1418. "get": {
  1419. "tags": [
  1420. "organization"
  1421. ],
  1422. "summary": "Check if a user is a member of an organization",
  1423. "operationId": "orgIsMember",
  1424. "parameters": [
  1425. {
  1426. "type": "string",
  1427. "description": "name of the organization",
  1428. "name": "org",
  1429. "in": "path",
  1430. "required": true
  1431. },
  1432. {
  1433. "type": "string",
  1434. "description": "username of the user",
  1435. "name": "username",
  1436. "in": "path",
  1437. "required": true
  1438. }
  1439. ],
  1440. "responses": {
  1441. "204": {
  1442. "description": "user is a member"
  1443. },
  1444. "302": {
  1445. "description": "redirection to /orgs/{org}/public_members/{username}"
  1446. },
  1447. "404": {
  1448. "description": "user is not a member"
  1449. }
  1450. }
  1451. },
  1452. "delete": {
  1453. "produces": [
  1454. "application/json"
  1455. ],
  1456. "tags": [
  1457. "organization"
  1458. ],
  1459. "summary": "Remove a member from an organization",
  1460. "operationId": "orgDeleteMember",
  1461. "parameters": [
  1462. {
  1463. "type": "string",
  1464. "description": "name of the organization",
  1465. "name": "org",
  1466. "in": "path",
  1467. "required": true
  1468. },
  1469. {
  1470. "type": "string",
  1471. "description": "username of the user",
  1472. "name": "username",
  1473. "in": "path",
  1474. "required": true
  1475. }
  1476. ],
  1477. "responses": {
  1478. "204": {
  1479. "description": "member removed"
  1480. }
  1481. }
  1482. }
  1483. },
  1484. "/orgs/{org}/public_members": {
  1485. "get": {
  1486. "produces": [
  1487. "application/json"
  1488. ],
  1489. "tags": [
  1490. "organization"
  1491. ],
  1492. "summary": "List an organization's public members",
  1493. "operationId": "orgListPublicMembers",
  1494. "parameters": [
  1495. {
  1496. "type": "string",
  1497. "description": "name of the organization",
  1498. "name": "org",
  1499. "in": "path",
  1500. "required": true
  1501. },
  1502. {
  1503. "type": "integer",
  1504. "description": "page number of results to return (1-based)",
  1505. "name": "page",
  1506. "in": "query"
  1507. },
  1508. {
  1509. "type": "integer",
  1510. "description": "page size of results",
  1511. "name": "limit",
  1512. "in": "query"
  1513. }
  1514. ],
  1515. "responses": {
  1516. "200": {
  1517. "$ref": "#/responses/UserList"
  1518. }
  1519. }
  1520. }
  1521. },
  1522. "/orgs/{org}/public_members/{username}": {
  1523. "get": {
  1524. "tags": [
  1525. "organization"
  1526. ],
  1527. "summary": "Check if a user is a public member of an organization",
  1528. "operationId": "orgIsPublicMember",
  1529. "parameters": [
  1530. {
  1531. "type": "string",
  1532. "description": "name of the organization",
  1533. "name": "org",
  1534. "in": "path",
  1535. "required": true
  1536. },
  1537. {
  1538. "type": "string",
  1539. "description": "username of the user",
  1540. "name": "username",
  1541. "in": "path",
  1542. "required": true
  1543. }
  1544. ],
  1545. "responses": {
  1546. "204": {
  1547. "description": "user is a public member"
  1548. },
  1549. "404": {
  1550. "description": "user is not a public member"
  1551. }
  1552. }
  1553. },
  1554. "put": {
  1555. "produces": [
  1556. "application/json"
  1557. ],
  1558. "tags": [
  1559. "organization"
  1560. ],
  1561. "summary": "Publicize a user's membership",
  1562. "operationId": "orgPublicizeMember",
  1563. "parameters": [
  1564. {
  1565. "type": "string",
  1566. "description": "name of the organization",
  1567. "name": "org",
  1568. "in": "path",
  1569. "required": true
  1570. },
  1571. {
  1572. "type": "string",
  1573. "description": "username of the user",
  1574. "name": "username",
  1575. "in": "path",
  1576. "required": true
  1577. }
  1578. ],
  1579. "responses": {
  1580. "204": {
  1581. "description": "membership publicized"
  1582. },
  1583. "403": {
  1584. "$ref": "#/responses/forbidden"
  1585. }
  1586. }
  1587. },
  1588. "delete": {
  1589. "produces": [
  1590. "application/json"
  1591. ],
  1592. "tags": [
  1593. "organization"
  1594. ],
  1595. "summary": "Conceal a user's membership",
  1596. "operationId": "orgConcealMember",
  1597. "parameters": [
  1598. {
  1599. "type": "string",
  1600. "description": "name of the organization",
  1601. "name": "org",
  1602. "in": "path",
  1603. "required": true
  1604. },
  1605. {
  1606. "type": "string",
  1607. "description": "username of the user",
  1608. "name": "username",
  1609. "in": "path",
  1610. "required": true
  1611. }
  1612. ],
  1613. "responses": {
  1614. "204": {
  1615. "$ref": "#/responses/empty"
  1616. },
  1617. "403": {
  1618. "$ref": "#/responses/forbidden"
  1619. }
  1620. }
  1621. }
  1622. },
  1623. "/orgs/{org}/repos": {
  1624. "get": {
  1625. "produces": [
  1626. "application/json"
  1627. ],
  1628. "tags": [
  1629. "organization"
  1630. ],
  1631. "summary": "List an organization's repos",
  1632. "operationId": "orgListRepos",
  1633. "parameters": [
  1634. {
  1635. "type": "string",
  1636. "description": "name of the organization",
  1637. "name": "org",
  1638. "in": "path",
  1639. "required": true
  1640. },
  1641. {
  1642. "type": "integer",
  1643. "description": "page number of results to return (1-based)",
  1644. "name": "page",
  1645. "in": "query"
  1646. },
  1647. {
  1648. "type": "integer",
  1649. "description": "page size of results",
  1650. "name": "limit",
  1651. "in": "query"
  1652. }
  1653. ],
  1654. "responses": {
  1655. "200": {
  1656. "$ref": "#/responses/RepositoryList"
  1657. }
  1658. }
  1659. },
  1660. "post": {
  1661. "consumes": [
  1662. "application/json"
  1663. ],
  1664. "produces": [
  1665. "application/json"
  1666. ],
  1667. "tags": [
  1668. "organization"
  1669. ],
  1670. "summary": "Create a repository in an organization",
  1671. "operationId": "createOrgRepo",
  1672. "parameters": [
  1673. {
  1674. "type": "string",
  1675. "description": "name of organization",
  1676. "name": "org",
  1677. "in": "path",
  1678. "required": true
  1679. },
  1680. {
  1681. "name": "body",
  1682. "in": "body",
  1683. "schema": {
  1684. "$ref": "#/definitions/CreateRepoOption"
  1685. }
  1686. }
  1687. ],
  1688. "responses": {
  1689. "201": {
  1690. "$ref": "#/responses/Repository"
  1691. },
  1692. "403": {
  1693. "$ref": "#/responses/forbidden"
  1694. },
  1695. "404": {
  1696. "$ref": "#/responses/notFound"
  1697. }
  1698. }
  1699. }
  1700. },
  1701. "/orgs/{org}/teams": {
  1702. "get": {
  1703. "produces": [
  1704. "application/json"
  1705. ],
  1706. "tags": [
  1707. "organization"
  1708. ],
  1709. "summary": "List an organization's teams",
  1710. "operationId": "orgListTeams",
  1711. "parameters": [
  1712. {
  1713. "type": "string",
  1714. "description": "name of the organization",
  1715. "name": "org",
  1716. "in": "path",
  1717. "required": true
  1718. },
  1719. {
  1720. "type": "integer",
  1721. "description": "page number of results to return (1-based)",
  1722. "name": "page",
  1723. "in": "query"
  1724. },
  1725. {
  1726. "type": "integer",
  1727. "description": "page size of results",
  1728. "name": "limit",
  1729. "in": "query"
  1730. }
  1731. ],
  1732. "responses": {
  1733. "200": {
  1734. "$ref": "#/responses/TeamList"
  1735. }
  1736. }
  1737. },
  1738. "post": {
  1739. "consumes": [
  1740. "application/json"
  1741. ],
  1742. "produces": [
  1743. "application/json"
  1744. ],
  1745. "tags": [
  1746. "organization"
  1747. ],
  1748. "summary": "Create a team",
  1749. "operationId": "orgCreateTeam",
  1750. "parameters": [
  1751. {
  1752. "type": "string",
  1753. "description": "name of the organization",
  1754. "name": "org",
  1755. "in": "path",
  1756. "required": true
  1757. },
  1758. {
  1759. "name": "body",
  1760. "in": "body",
  1761. "schema": {
  1762. "$ref": "#/definitions/CreateTeamOption"
  1763. }
  1764. }
  1765. ],
  1766. "responses": {
  1767. "201": {
  1768. "$ref": "#/responses/Team"
  1769. },
  1770. "422": {
  1771. "$ref": "#/responses/validationError"
  1772. }
  1773. }
  1774. }
  1775. },
  1776. "/orgs/{org}/teams/search": {
  1777. "get": {
  1778. "produces": [
  1779. "application/json"
  1780. ],
  1781. "tags": [
  1782. "organization"
  1783. ],
  1784. "summary": "Search for teams within an organization",
  1785. "operationId": "teamSearch",
  1786. "parameters": [
  1787. {
  1788. "type": "string",
  1789. "description": "name of the organization",
  1790. "name": "org",
  1791. "in": "path",
  1792. "required": true
  1793. },
  1794. {
  1795. "type": "string",
  1796. "description": "keywords to search",
  1797. "name": "q",
  1798. "in": "query"
  1799. },
  1800. {
  1801. "type": "boolean",
  1802. "description": "include search within team description (defaults to true)",
  1803. "name": "include_desc",
  1804. "in": "query"
  1805. },
  1806. {
  1807. "type": "integer",
  1808. "description": "page number of results to return (1-based)",
  1809. "name": "page",
  1810. "in": "query"
  1811. },
  1812. {
  1813. "type": "integer",
  1814. "description": "page size of results",
  1815. "name": "limit",
  1816. "in": "query"
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "SearchResults of a successful search",
  1822. "schema": {
  1823. "type": "object",
  1824. "properties": {
  1825. "data": {
  1826. "type": "array",
  1827. "items": {
  1828. "$ref": "#/definitions/Team"
  1829. }
  1830. },
  1831. "ok": {
  1832. "type": "boolean"
  1833. }
  1834. }
  1835. }
  1836. }
  1837. }
  1838. }
  1839. },
  1840. "/repos/issues/search": {
  1841. "get": {
  1842. "produces": [
  1843. "application/json"
  1844. ],
  1845. "tags": [
  1846. "issue"
  1847. ],
  1848. "summary": "Search for issues across the repositories that the user has access to",
  1849. "operationId": "issueSearchIssues",
  1850. "parameters": [
  1851. {
  1852. "type": "string",
  1853. "description": "whether issue is open or closed",
  1854. "name": "state",
  1855. "in": "query"
  1856. },
  1857. {
  1858. "type": "string",
  1859. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  1860. "name": "labels",
  1861. "in": "query"
  1862. },
  1863. {
  1864. "type": "string",
  1865. "description": "search string",
  1866. "name": "q",
  1867. "in": "query"
  1868. },
  1869. {
  1870. "type": "integer",
  1871. "format": "int64",
  1872. "description": "repository to prioritize in the results",
  1873. "name": "priority_repo_id",
  1874. "in": "query"
  1875. },
  1876. {
  1877. "type": "string",
  1878. "description": "filter by type (issues / pulls) if set",
  1879. "name": "type",
  1880. "in": "query"
  1881. },
  1882. {
  1883. "type": "string",
  1884. "format": "date-time",
  1885. "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
  1886. "name": "since",
  1887. "in": "query"
  1888. },
  1889. {
  1890. "type": "string",
  1891. "format": "date-time",
  1892. "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
  1893. "name": "before",
  1894. "in": "query"
  1895. },
  1896. {
  1897. "type": "boolean",
  1898. "description": "filter (issues / pulls) assigned to you, default is false",
  1899. "name": "assigned",
  1900. "in": "query"
  1901. },
  1902. {
  1903. "type": "boolean",
  1904. "description": "filter (issues / pulls) created by you, default is false",
  1905. "name": "created",
  1906. "in": "query"
  1907. },
  1908. {
  1909. "type": "boolean",
  1910. "description": "filter (issues / pulls) mentioning you, default is false",
  1911. "name": "mentioned",
  1912. "in": "query"
  1913. },
  1914. {
  1915. "type": "boolean",
  1916. "description": "filter pulls requesting your review, default is false",
  1917. "name": "review_requested",
  1918. "in": "query"
  1919. },
  1920. {
  1921. "type": "integer",
  1922. "description": "page number of results to return (1-based)",
  1923. "name": "page",
  1924. "in": "query"
  1925. },
  1926. {
  1927. "type": "integer",
  1928. "description": "page size of results",
  1929. "name": "limit",
  1930. "in": "query"
  1931. }
  1932. ],
  1933. "responses": {
  1934. "200": {
  1935. "$ref": "#/responses/IssueList"
  1936. }
  1937. }
  1938. }
  1939. },
  1940. "/repos/migrate": {
  1941. "post": {
  1942. "consumes": [
  1943. "application/json"
  1944. ],
  1945. "produces": [
  1946. "application/json"
  1947. ],
  1948. "tags": [
  1949. "repository"
  1950. ],
  1951. "summary": "Migrate a remote git repository",
  1952. "operationId": "repoMigrate",
  1953. "parameters": [
  1954. {
  1955. "name": "body",
  1956. "in": "body",
  1957. "schema": {
  1958. "$ref": "#/definitions/MigrateRepoOptions"
  1959. }
  1960. }
  1961. ],
  1962. "responses": {
  1963. "201": {
  1964. "$ref": "#/responses/Repository"
  1965. },
  1966. "403": {
  1967. "$ref": "#/responses/forbidden"
  1968. },
  1969. "422": {
  1970. "$ref": "#/responses/validationError"
  1971. }
  1972. }
  1973. }
  1974. },
  1975. "/repos/search": {
  1976. "get": {
  1977. "produces": [
  1978. "application/json"
  1979. ],
  1980. "tags": [
  1981. "repository"
  1982. ],
  1983. "summary": "Search for repositories",
  1984. "operationId": "repoSearch",
  1985. "parameters": [
  1986. {
  1987. "type": "string",
  1988. "description": "keyword",
  1989. "name": "q",
  1990. "in": "query"
  1991. },
  1992. {
  1993. "type": "boolean",
  1994. "description": "Limit search to repositories with keyword as topic",
  1995. "name": "topic",
  1996. "in": "query"
  1997. },
  1998. {
  1999. "type": "boolean",
  2000. "description": "include search of keyword within repository description",
  2001. "name": "includeDesc",
  2002. "in": "query"
  2003. },
  2004. {
  2005. "type": "integer",
  2006. "format": "int64",
  2007. "description": "search only for repos that the user with the given id owns or contributes to",
  2008. "name": "uid",
  2009. "in": "query"
  2010. },
  2011. {
  2012. "type": "integer",
  2013. "format": "int64",
  2014. "description": "repo owner to prioritize in the results",
  2015. "name": "priority_owner_id",
  2016. "in": "query"
  2017. },
  2018. {
  2019. "type": "integer",
  2020. "format": "int64",
  2021. "description": "search only for repos that belong to the given team id",
  2022. "name": "team_id",
  2023. "in": "query"
  2024. },
  2025. {
  2026. "type": "integer",
  2027. "format": "int64",
  2028. "description": "search only for repos that the user with the given id has starred",
  2029. "name": "starredBy",
  2030. "in": "query"
  2031. },
  2032. {
  2033. "type": "boolean",
  2034. "description": "include private repositories this user has access to (defaults to true)",
  2035. "name": "private",
  2036. "in": "query"
  2037. },
  2038. {
  2039. "type": "boolean",
  2040. "description": "show only pubic, private or all repositories (defaults to all)",
  2041. "name": "is_private",
  2042. "in": "query"
  2043. },
  2044. {
  2045. "type": "boolean",
  2046. "description": "include template repositories this user has access to (defaults to true)",
  2047. "name": "template",
  2048. "in": "query"
  2049. },
  2050. {
  2051. "type": "boolean",
  2052. "description": "show only archived, non-archived or all repositories (defaults to all)",
  2053. "name": "archived",
  2054. "in": "query"
  2055. },
  2056. {
  2057. "type": "string",
  2058. "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"",
  2059. "name": "mode",
  2060. "in": "query"
  2061. },
  2062. {
  2063. "type": "boolean",
  2064. "description": "if `uid` is given, search only for repos that the user owns",
  2065. "name": "exclusive",
  2066. "in": "query"
  2067. },
  2068. {
  2069. "type": "string",
  2070. "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"",
  2071. "name": "sort",
  2072. "in": "query"
  2073. },
  2074. {
  2075. "type": "string",
  2076. "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.",
  2077. "name": "order",
  2078. "in": "query"
  2079. },
  2080. {
  2081. "type": "integer",
  2082. "description": "page number of results to return (1-based)",
  2083. "name": "page",
  2084. "in": "query"
  2085. },
  2086. {
  2087. "type": "integer",
  2088. "description": "page size of results",
  2089. "name": "limit",
  2090. "in": "query"
  2091. }
  2092. ],
  2093. "responses": {
  2094. "200": {
  2095. "$ref": "#/responses/SearchResults"
  2096. },
  2097. "422": {
  2098. "$ref": "#/responses/validationError"
  2099. }
  2100. }
  2101. }
  2102. },
  2103. "/repos/{owner}/{repo}": {
  2104. "get": {
  2105. "produces": [
  2106. "application/json"
  2107. ],
  2108. "tags": [
  2109. "repository"
  2110. ],
  2111. "summary": "Get a repository",
  2112. "operationId": "repoGet",
  2113. "parameters": [
  2114. {
  2115. "type": "string",
  2116. "description": "owner of the repo",
  2117. "name": "owner",
  2118. "in": "path",
  2119. "required": true
  2120. },
  2121. {
  2122. "type": "string",
  2123. "description": "name of the repo",
  2124. "name": "repo",
  2125. "in": "path",
  2126. "required": true
  2127. }
  2128. ],
  2129. "responses": {
  2130. "200": {
  2131. "$ref": "#/responses/Repository"
  2132. }
  2133. }
  2134. },
  2135. "delete": {
  2136. "produces": [
  2137. "application/json"
  2138. ],
  2139. "tags": [
  2140. "repository"
  2141. ],
  2142. "summary": "Delete a repository",
  2143. "operationId": "repoDelete",
  2144. "parameters": [
  2145. {
  2146. "type": "string",
  2147. "description": "owner of the repo to delete",
  2148. "name": "owner",
  2149. "in": "path",
  2150. "required": true
  2151. },
  2152. {
  2153. "type": "string",
  2154. "description": "name of the repo to delete",
  2155. "name": "repo",
  2156. "in": "path",
  2157. "required": true
  2158. }
  2159. ],
  2160. "responses": {
  2161. "204": {
  2162. "$ref": "#/responses/empty"
  2163. },
  2164. "403": {
  2165. "$ref": "#/responses/forbidden"
  2166. }
  2167. }
  2168. },
  2169. "patch": {
  2170. "produces": [
  2171. "application/json"
  2172. ],
  2173. "tags": [
  2174. "repository"
  2175. ],
  2176. "summary": "Edit a repository's properties. Only fields that are set will be changed.",
  2177. "operationId": "repoEdit",
  2178. "parameters": [
  2179. {
  2180. "type": "string",
  2181. "description": "owner of the repo to edit",
  2182. "name": "owner",
  2183. "in": "path",
  2184. "required": true
  2185. },
  2186. {
  2187. "type": "string",
  2188. "description": "name of the repo to edit",
  2189. "name": "repo",
  2190. "in": "path",
  2191. "required": true
  2192. },
  2193. {
  2194. "description": "Properties of a repo that you can edit",
  2195. "name": "body",
  2196. "in": "body",
  2197. "schema": {
  2198. "$ref": "#/definitions/EditRepoOption"
  2199. }
  2200. }
  2201. ],
  2202. "responses": {
  2203. "200": {
  2204. "$ref": "#/responses/Repository"
  2205. },
  2206. "403": {
  2207. "$ref": "#/responses/forbidden"
  2208. },
  2209. "422": {
  2210. "$ref": "#/responses/validationError"
  2211. }
  2212. }
  2213. }
  2214. },
  2215. "/repos/{owner}/{repo}/archive/{archive}": {
  2216. "get": {
  2217. "produces": [
  2218. "application/json"
  2219. ],
  2220. "tags": [
  2221. "repository"
  2222. ],
  2223. "summary": "Get an archive of a repository",
  2224. "operationId": "repoGetArchive",
  2225. "parameters": [
  2226. {
  2227. "type": "string",
  2228. "description": "owner of the repo",
  2229. "name": "owner",
  2230. "in": "path",
  2231. "required": true
  2232. },
  2233. {
  2234. "type": "string",
  2235. "description": "name of the repo",
  2236. "name": "repo",
  2237. "in": "path",
  2238. "required": true
  2239. },
  2240. {
  2241. "type": "string",
  2242. "description": "the git reference for download with attached archive format (e.g. master.zip)",
  2243. "name": "archive",
  2244. "in": "path",
  2245. "required": true
  2246. }
  2247. ],
  2248. "responses": {
  2249. "200": {
  2250. "description": "success"
  2251. },
  2252. "404": {
  2253. "$ref": "#/responses/notFound"
  2254. }
  2255. }
  2256. }
  2257. },
  2258. "/repos/{owner}/{repo}/branch_protections": {
  2259. "get": {
  2260. "produces": [
  2261. "application/json"
  2262. ],
  2263. "tags": [
  2264. "repository"
  2265. ],
  2266. "summary": "List branch protections for a repository",
  2267. "operationId": "repoListBranchProtection",
  2268. "parameters": [
  2269. {
  2270. "type": "string",
  2271. "description": "owner of the repo",
  2272. "name": "owner",
  2273. "in": "path",
  2274. "required": true
  2275. },
  2276. {
  2277. "type": "string",
  2278. "description": "name of the repo",
  2279. "name": "repo",
  2280. "in": "path",
  2281. "required": true
  2282. }
  2283. ],
  2284. "responses": {
  2285. "200": {
  2286. "$ref": "#/responses/BranchProtectionList"
  2287. }
  2288. }
  2289. },
  2290. "post": {
  2291. "consumes": [
  2292. "application/json"
  2293. ],
  2294. "produces": [
  2295. "application/json"
  2296. ],
  2297. "tags": [
  2298. "repository"
  2299. ],
  2300. "summary": "Create a branch protections for a repository",
  2301. "operationId": "repoCreateBranchProtection",
  2302. "parameters": [
  2303. {
  2304. "type": "string",
  2305. "description": "owner of the repo",
  2306. "name": "owner",
  2307. "in": "path",
  2308. "required": true
  2309. },
  2310. {
  2311. "type": "string",
  2312. "description": "name of the repo",
  2313. "name": "repo",
  2314. "in": "path",
  2315. "required": true
  2316. },
  2317. {
  2318. "name": "body",
  2319. "in": "body",
  2320. "schema": {
  2321. "$ref": "#/definitions/CreateBranchProtectionOption"
  2322. }
  2323. }
  2324. ],
  2325. "responses": {
  2326. "201": {
  2327. "$ref": "#/responses/BranchProtection"
  2328. },
  2329. "403": {
  2330. "$ref": "#/responses/forbidden"
  2331. },
  2332. "404": {
  2333. "$ref": "#/responses/notFound"
  2334. },
  2335. "422": {
  2336. "$ref": "#/responses/validationError"
  2337. }
  2338. }
  2339. }
  2340. },
  2341. "/repos/{owner}/{repo}/branch_protections/{name}": {
  2342. "get": {
  2343. "produces": [
  2344. "application/json"
  2345. ],
  2346. "tags": [
  2347. "repository"
  2348. ],
  2349. "summary": "Get a specific branch protection for the repository",
  2350. "operationId": "repoGetBranchProtection",
  2351. "parameters": [
  2352. {
  2353. "type": "string",
  2354. "description": "owner of the repo",
  2355. "name": "owner",
  2356. "in": "path",
  2357. "required": true
  2358. },
  2359. {
  2360. "type": "string",
  2361. "description": "name of the repo",
  2362. "name": "repo",
  2363. "in": "path",
  2364. "required": true
  2365. },
  2366. {
  2367. "type": "string",
  2368. "description": "name of protected branch",
  2369. "name": "name",
  2370. "in": "path",
  2371. "required": true
  2372. }
  2373. ],
  2374. "responses": {
  2375. "200": {
  2376. "$ref": "#/responses/BranchProtection"
  2377. },
  2378. "404": {
  2379. "$ref": "#/responses/notFound"
  2380. }
  2381. }
  2382. },
  2383. "delete": {
  2384. "produces": [
  2385. "application/json"
  2386. ],
  2387. "tags": [
  2388. "repository"
  2389. ],
  2390. "summary": "Delete a specific branch protection for the repository",
  2391. "operationId": "repoDeleteBranchProtection",
  2392. "parameters": [
  2393. {
  2394. "type": "string",
  2395. "description": "owner of the repo",
  2396. "name": "owner",
  2397. "in": "path",
  2398. "required": true
  2399. },
  2400. {
  2401. "type": "string",
  2402. "description": "name of the repo",
  2403. "name": "repo",
  2404. "in": "path",
  2405. "required": true
  2406. },
  2407. {
  2408. "type": "string",
  2409. "description": "name of protected branch",
  2410. "name": "name",
  2411. "in": "path",
  2412. "required": true
  2413. }
  2414. ],
  2415. "responses": {
  2416. "204": {
  2417. "$ref": "#/responses/empty"
  2418. },
  2419. "404": {
  2420. "$ref": "#/responses/notFound"
  2421. }
  2422. }
  2423. },
  2424. "patch": {
  2425. "consumes": [
  2426. "application/json"
  2427. ],
  2428. "produces": [
  2429. "application/json"
  2430. ],
  2431. "tags": [
  2432. "repository"
  2433. ],
  2434. "summary": "Edit a branch protections for a repository. Only fields that are set will be changed",
  2435. "operationId": "repoEditBranchProtection",
  2436. "parameters": [
  2437. {
  2438. "type": "string",
  2439. "description": "owner of the repo",
  2440. "name": "owner",
  2441. "in": "path",
  2442. "required": true
  2443. },
  2444. {
  2445. "type": "string",
  2446. "description": "name of the repo",
  2447. "name": "repo",
  2448. "in": "path",
  2449. "required": true
  2450. },
  2451. {
  2452. "type": "string",
  2453. "description": "name of protected branch",
  2454. "name": "name",
  2455. "in": "path",
  2456. "required": true
  2457. },
  2458. {
  2459. "name": "body",
  2460. "in": "body",
  2461. "schema": {
  2462. "$ref": "#/definitions/EditBranchProtectionOption"
  2463. }
  2464. }
  2465. ],
  2466. "responses": {
  2467. "200": {
  2468. "$ref": "#/responses/BranchProtection"
  2469. },
  2470. "404": {
  2471. "$ref": "#/responses/notFound"
  2472. },
  2473. "422": {
  2474. "$ref": "#/responses/validationError"
  2475. }
  2476. }
  2477. }
  2478. },
  2479. "/repos/{owner}/{repo}/branches": {
  2480. "get": {
  2481. "produces": [
  2482. "application/json"
  2483. ],
  2484. "tags": [
  2485. "repository"
  2486. ],
  2487. "summary": "List a repository's branches",
  2488. "operationId": "repoListBranches",
  2489. "parameters": [
  2490. {
  2491. "type": "string",
  2492. "description": "owner of the repo",
  2493. "name": "owner",
  2494. "in": "path",
  2495. "required": true
  2496. },
  2497. {
  2498. "type": "string",
  2499. "description": "name of the repo",
  2500. "name": "repo",
  2501. "in": "path",
  2502. "required": true
  2503. },
  2504. {
  2505. "type": "integer",
  2506. "description": "page number of results to return (1-based)",
  2507. "name": "page",
  2508. "in": "query"
  2509. },
  2510. {
  2511. "type": "integer",
  2512. "description": "page size of results",
  2513. "name": "limit",
  2514. "in": "query"
  2515. }
  2516. ],
  2517. "responses": {
  2518. "200": {
  2519. "$ref": "#/responses/BranchList"
  2520. }
  2521. }
  2522. },
  2523. "post": {
  2524. "consumes": [
  2525. "application/json"
  2526. ],
  2527. "produces": [
  2528. "application/json"
  2529. ],
  2530. "tags": [
  2531. "repository"
  2532. ],
  2533. "summary": "Create a branch",
  2534. "operationId": "repoCreateBranch",
  2535. "parameters": [
  2536. {
  2537. "type": "string",
  2538. "description": "owner of the repo",
  2539. "name": "owner",
  2540. "in": "path",
  2541. "required": true
  2542. },
  2543. {
  2544. "type": "string",
  2545. "description": "name of the repo",
  2546. "name": "repo",
  2547. "in": "path",
  2548. "required": true
  2549. },
  2550. {
  2551. "name": "body",
  2552. "in": "body",
  2553. "schema": {
  2554. "$ref": "#/definitions/CreateBranchRepoOption"
  2555. }
  2556. }
  2557. ],
  2558. "responses": {
  2559. "201": {
  2560. "$ref": "#/responses/Branch"
  2561. },
  2562. "404": {
  2563. "description": "The old branch does not exist."
  2564. },
  2565. "409": {
  2566. "description": "The branch with the same name already exists."
  2567. }
  2568. }
  2569. }
  2570. },
  2571. "/repos/{owner}/{repo}/branches/{branch}": {
  2572. "get": {
  2573. "produces": [
  2574. "application/json"
  2575. ],
  2576. "tags": [
  2577. "repository"
  2578. ],
  2579. "summary": "Retrieve a specific branch from a repository, including its effective branch protection",
  2580. "operationId": "repoGetBranch",
  2581. "parameters": [
  2582. {
  2583. "type": "string",
  2584. "description": "owner of the repo",
  2585. "name": "owner",
  2586. "in": "path",
  2587. "required": true
  2588. },
  2589. {
  2590. "type": "string",
  2591. "description": "name of the repo",
  2592. "name": "repo",
  2593. "in": "path",
  2594. "required": true
  2595. },
  2596. {
  2597. "type": "string",
  2598. "description": "branch to get",
  2599. "name": "branch",
  2600. "in": "path",
  2601. "required": true
  2602. }
  2603. ],
  2604. "responses": {
  2605. "200": {
  2606. "$ref": "#/responses/Branch"
  2607. },
  2608. "404": {
  2609. "$ref": "#/responses/notFound"
  2610. }
  2611. }
  2612. },
  2613. "delete": {
  2614. "produces": [
  2615. "application/json"
  2616. ],
  2617. "tags": [
  2618. "repository"
  2619. ],
  2620. "summary": "Delete a specific branch from a repository",
  2621. "operationId": "repoDeleteBranch",
  2622. "parameters": [
  2623. {
  2624. "type": "string",
  2625. "description": "owner of the repo",
  2626. "name": "owner",
  2627. "in": "path",
  2628. "required": true
  2629. },
  2630. {
  2631. "type": "string",
  2632. "description": "name of the repo",
  2633. "name": "repo",
  2634. "in": "path",
  2635. "required": true
  2636. },
  2637. {
  2638. "type": "string",
  2639. "description": "branch to delete",
  2640. "name": "branch",
  2641. "in": "path",
  2642. "required": true
  2643. }
  2644. ],
  2645. "responses": {
  2646. "204": {
  2647. "$ref": "#/responses/empty"
  2648. },
  2649. "403": {
  2650. "$ref": "#/responses/error"
  2651. },
  2652. "404": {
  2653. "$ref": "#/responses/notFound"
  2654. }
  2655. }
  2656. }
  2657. },
  2658. "/repos/{owner}/{repo}/collaborators": {
  2659. "get": {
  2660. "produces": [
  2661. "application/json"
  2662. ],
  2663. "tags": [
  2664. "repository"
  2665. ],
  2666. "summary": "List a repository's collaborators",
  2667. "operationId": "repoListCollaborators",
  2668. "parameters": [
  2669. {
  2670. "type": "string",
  2671. "description": "owner of the repo",
  2672. "name": "owner",
  2673. "in": "path",
  2674. "required": true
  2675. },
  2676. {
  2677. "type": "string",
  2678. "description": "name of the repo",
  2679. "name": "repo",
  2680. "in": "path",
  2681. "required": true
  2682. },
  2683. {
  2684. "type": "integer",
  2685. "description": "page number of results to return (1-based)",
  2686. "name": "page",
  2687. "in": "query"
  2688. },
  2689. {
  2690. "type": "integer",
  2691. "description": "page size of results",
  2692. "name": "limit",
  2693. "in": "query"
  2694. }
  2695. ],
  2696. "responses": {
  2697. "200": {
  2698. "$ref": "#/responses/UserList"
  2699. }
  2700. }
  2701. }
  2702. },
  2703. "/repos/{owner}/{repo}/collaborators/{collaborator}": {
  2704. "get": {
  2705. "produces": [
  2706. "application/json"
  2707. ],
  2708. "tags": [
  2709. "repository"
  2710. ],
  2711. "summary": "Check if a user is a collaborator of a repository",
  2712. "operationId": "repoCheckCollaborator",
  2713. "parameters": [
  2714. {
  2715. "type": "string",
  2716. "description": "owner of the repo",
  2717. "name": "owner",
  2718. "in": "path",
  2719. "required": true
  2720. },
  2721. {
  2722. "type": "string",
  2723. "description": "name of the repo",
  2724. "name": "repo",
  2725. "in": "path",
  2726. "required": true
  2727. },
  2728. {
  2729. "type": "string",
  2730. "description": "username of the collaborator",
  2731. "name": "collaborator",
  2732. "in": "path",
  2733. "required": true
  2734. }
  2735. ],
  2736. "responses": {
  2737. "204": {
  2738. "$ref": "#/responses/empty"
  2739. },
  2740. "404": {
  2741. "$ref": "#/responses/notFound"
  2742. },
  2743. "422": {
  2744. "$ref": "#/responses/validationError"
  2745. }
  2746. }
  2747. },
  2748. "put": {
  2749. "produces": [
  2750. "application/json"
  2751. ],
  2752. "tags": [
  2753. "repository"
  2754. ],
  2755. "summary": "Add a collaborator to a repository",
  2756. "operationId": "repoAddCollaborator",
  2757. "parameters": [
  2758. {
  2759. "type": "string",
  2760. "description": "owner of the repo",
  2761. "name": "owner",
  2762. "in": "path",
  2763. "required": true
  2764. },
  2765. {
  2766. "type": "string",
  2767. "description": "name of the repo",
  2768. "name": "repo",
  2769. "in": "path",
  2770. "required": true
  2771. },
  2772. {
  2773. "type": "string",
  2774. "description": "username of the collaborator to add",
  2775. "name": "collaborator",
  2776. "in": "path",
  2777. "required": true
  2778. },
  2779. {
  2780. "name": "body",
  2781. "in": "body",
  2782. "schema": {
  2783. "$ref": "#/definitions/AddCollaboratorOption"
  2784. }
  2785. }
  2786. ],
  2787. "responses": {
  2788. "204": {
  2789. "$ref": "#/responses/empty"
  2790. },
  2791. "422": {
  2792. "$ref": "#/responses/validationError"
  2793. }
  2794. }
  2795. },
  2796. "delete": {
  2797. "produces": [
  2798. "application/json"
  2799. ],
  2800. "tags": [
  2801. "repository"
  2802. ],
  2803. "summary": "Delete a collaborator from a repository",
  2804. "operationId": "repoDeleteCollaborator",
  2805. "parameters": [
  2806. {
  2807. "type": "string",
  2808. "description": "owner of the repo",
  2809. "name": "owner",
  2810. "in": "path",
  2811. "required": true
  2812. },
  2813. {
  2814. "type": "string",
  2815. "description": "name of the repo",
  2816. "name": "repo",
  2817. "in": "path",
  2818. "required": true
  2819. },
  2820. {
  2821. "type": "string",
  2822. "description": "username of the collaborator to delete",
  2823. "name": "collaborator",
  2824. "in": "path",
  2825. "required": true
  2826. }
  2827. ],
  2828. "responses": {
  2829. "204": {
  2830. "$ref": "#/responses/empty"
  2831. },
  2832. "422": {
  2833. "$ref": "#/responses/validationError"
  2834. }
  2835. }
  2836. }
  2837. },
  2838. "/repos/{owner}/{repo}/commits": {
  2839. "get": {
  2840. "produces": [
  2841. "application/json"
  2842. ],
  2843. "tags": [
  2844. "repository"
  2845. ],
  2846. "summary": "Get a list of all commits from a repository",
  2847. "operationId": "repoGetAllCommits",
  2848. "parameters": [
  2849. {
  2850. "type": "string",
  2851. "description": "owner of the repo",
  2852. "name": "owner",
  2853. "in": "path",
  2854. "required": true
  2855. },
  2856. {
  2857. "type": "string",
  2858. "description": "name of the repo",
  2859. "name": "repo",
  2860. "in": "path",
  2861. "required": true
  2862. },
  2863. {
  2864. "type": "string",
  2865. "description": "SHA or branch to start listing commits from (usually 'master')",
  2866. "name": "sha",
  2867. "in": "query"
  2868. },
  2869. {
  2870. "type": "integer",
  2871. "description": "page number of results to return (1-based)",
  2872. "name": "page",
  2873. "in": "query"
  2874. },
  2875. {
  2876. "type": "integer",
  2877. "description": "page size of results",
  2878. "name": "limit",
  2879. "in": "query"
  2880. }
  2881. ],
  2882. "responses": {
  2883. "200": {
  2884. "$ref": "#/responses/CommitList"
  2885. },
  2886. "404": {
  2887. "$ref": "#/responses/notFound"
  2888. },
  2889. "409": {
  2890. "$ref": "#/responses/EmptyRepository"
  2891. }
  2892. }
  2893. }
  2894. },
  2895. "/repos/{owner}/{repo}/commits/{ref}/status": {
  2896. "get": {
  2897. "produces": [
  2898. "application/json"
  2899. ],
  2900. "tags": [
  2901. "repository"
  2902. ],
  2903. "summary": "Get a commit's combined status, by branch/tag/commit reference",
  2904. "operationId": "repoGetCombinedStatusByRef",
  2905. "parameters": [
  2906. {
  2907. "type": "string",
  2908. "description": "owner of the repo",
  2909. "name": "owner",
  2910. "in": "path",
  2911. "required": true
  2912. },
  2913. {
  2914. "type": "string",
  2915. "description": "name of the repo",
  2916. "name": "repo",
  2917. "in": "path",
  2918. "required": true
  2919. },
  2920. {
  2921. "type": "string",
  2922. "description": "name of branch/tag/commit",
  2923. "name": "ref",
  2924. "in": "path",
  2925. "required": true
  2926. },
  2927. {
  2928. "type": "integer",
  2929. "description": "page number of results to return (1-based)",
  2930. "name": "page",
  2931. "in": "query"
  2932. },
  2933. {
  2934. "type": "integer",
  2935. "description": "page size of results",
  2936. "name": "limit",
  2937. "in": "query"
  2938. }
  2939. ],
  2940. "responses": {
  2941. "200": {
  2942. "$ref": "#/responses/CombinedStatus"
  2943. },
  2944. "400": {
  2945. "$ref": "#/responses/error"
  2946. }
  2947. }
  2948. }
  2949. },
  2950. "/repos/{owner}/{repo}/commits/{ref}/statuses": {
  2951. "get": {
  2952. "produces": [
  2953. "application/json"
  2954. ],
  2955. "tags": [
  2956. "repository"
  2957. ],
  2958. "summary": "Get a commit's statuses, by branch/tag/commit reference",
  2959. "operationId": "repoListStatusesByRef",
  2960. "parameters": [
  2961. {
  2962. "type": "string",
  2963. "description": "owner of the repo",
  2964. "name": "owner",
  2965. "in": "path",
  2966. "required": true
  2967. },
  2968. {
  2969. "type": "string",
  2970. "description": "name of the repo",
  2971. "name": "repo",
  2972. "in": "path",
  2973. "required": true
  2974. },
  2975. {
  2976. "type": "string",
  2977. "description": "name of branch/tag/commit",
  2978. "name": "ref",
  2979. "in": "path",
  2980. "required": true
  2981. },
  2982. {
  2983. "enum": [
  2984. "oldest",
  2985. "recentupdate",
  2986. "leastupdate",
  2987. "leastindex",
  2988. "highestindex"
  2989. ],
  2990. "type": "string",
  2991. "description": "type of sort",
  2992. "name": "sort",
  2993. "in": "query"
  2994. },
  2995. {
  2996. "enum": [
  2997. "pending",
  2998. "success",
  2999. "error",
  3000. "failure",
  3001. "warning"
  3002. ],
  3003. "type": "string",
  3004. "description": "type of state",
  3005. "name": "state",
  3006. "in": "query"
  3007. },
  3008. {
  3009. "type": "integer",
  3010. "description": "page number of results to return (1-based)",
  3011. "name": "page",
  3012. "in": "query"
  3013. },
  3014. {
  3015. "type": "integer",
  3016. "description": "page size of results",
  3017. "name": "limit",
  3018. "in": "query"
  3019. }
  3020. ],
  3021. "responses": {
  3022. "200": {
  3023. "$ref": "#/responses/CommitStatusList"
  3024. },
  3025. "400": {
  3026. "$ref": "#/responses/error"
  3027. }
  3028. }
  3029. }
  3030. },
  3031. "/repos/{owner}/{repo}/contents": {
  3032. "get": {
  3033. "produces": [
  3034. "application/json"
  3035. ],
  3036. "tags": [
  3037. "repository"
  3038. ],
  3039. "summary": "Gets the metadata of all the entries of the root dir",
  3040. "operationId": "repoGetContentsList",
  3041. "parameters": [
  3042. {
  3043. "type": "string",
  3044. "description": "owner of the repo",
  3045. "name": "owner",
  3046. "in": "path",
  3047. "required": true
  3048. },
  3049. {
  3050. "type": "string",
  3051. "description": "name of the repo",
  3052. "name": "repo",
  3053. "in": "path",
  3054. "required": true
  3055. },
  3056. {
  3057. "type": "string",
  3058. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  3059. "name": "ref",
  3060. "in": "query"
  3061. }
  3062. ],
  3063. "responses": {
  3064. "200": {
  3065. "$ref": "#/responses/ContentsListResponse"
  3066. },
  3067. "404": {
  3068. "$ref": "#/responses/notFound"
  3069. }
  3070. }
  3071. }
  3072. },
  3073. "/repos/{owner}/{repo}/contents/{filepath}": {
  3074. "get": {
  3075. "produces": [
  3076. "application/json"
  3077. ],
  3078. "tags": [
  3079. "repository"
  3080. ],
  3081. "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir",
  3082. "operationId": "repoGetContents",
  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": "path of the dir, file, symlink or submodule in the repo",
  3101. "name": "filepath",
  3102. "in": "path",
  3103. "required": true
  3104. },
  3105. {
  3106. "type": "string",
  3107. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  3108. "name": "ref",
  3109. "in": "query"
  3110. }
  3111. ],
  3112. "responses": {
  3113. "200": {
  3114. "$ref": "#/responses/ContentsResponse"
  3115. },
  3116. "404": {
  3117. "$ref": "#/responses/notFound"
  3118. }
  3119. }
  3120. },
  3121. "put": {
  3122. "consumes": [
  3123. "application/json"
  3124. ],
  3125. "produces": [
  3126. "application/json"
  3127. ],
  3128. "tags": [
  3129. "repository"
  3130. ],
  3131. "summary": "Update a file in a repository",
  3132. "operationId": "repoUpdateFile",
  3133. "parameters": [
  3134. {
  3135. "type": "string",
  3136. "description": "owner of the repo",
  3137. "name": "owner",
  3138. "in": "path",
  3139. "required": true
  3140. },
  3141. {
  3142. "type": "string",
  3143. "description": "name of the repo",
  3144. "name": "repo",
  3145. "in": "path",
  3146. "required": true
  3147. },
  3148. {
  3149. "type": "string",
  3150. "description": "path of the file to update",
  3151. "name": "filepath",
  3152. "in": "path",
  3153. "required": true
  3154. },
  3155. {
  3156. "name": "body",
  3157. "in": "body",
  3158. "required": true,
  3159. "schema": {
  3160. "$ref": "#/definitions/UpdateFileOptions"
  3161. }
  3162. }
  3163. ],
  3164. "responses": {
  3165. "200": {
  3166. "$ref": "#/responses/FileResponse"
  3167. },
  3168. "403": {
  3169. "$ref": "#/responses/error"
  3170. },
  3171. "404": {
  3172. "$ref": "#/responses/notFound"
  3173. },
  3174. "422": {
  3175. "$ref": "#/responses/error"
  3176. }
  3177. }
  3178. },
  3179. "post": {
  3180. "consumes": [
  3181. "application/json"
  3182. ],
  3183. "produces": [
  3184. "application/json"
  3185. ],
  3186. "tags": [
  3187. "repository"
  3188. ],
  3189. "summary": "Create a file in a repository",
  3190. "operationId": "repoCreateFile",
  3191. "parameters": [
  3192. {
  3193. "type": "string",
  3194. "description": "owner of the repo",
  3195. "name": "owner",
  3196. "in": "path",
  3197. "required": true
  3198. },
  3199. {
  3200. "type": "string",
  3201. "description": "name of the repo",
  3202. "name": "repo",
  3203. "in": "path",
  3204. "required": true
  3205. },
  3206. {
  3207. "type": "string",
  3208. "description": "path of the file to create",
  3209. "name": "filepath",
  3210. "in": "path",
  3211. "required": true
  3212. },
  3213. {
  3214. "name": "body",
  3215. "in": "body",
  3216. "required": true,
  3217. "schema": {
  3218. "$ref": "#/definitions/CreateFileOptions"
  3219. }
  3220. }
  3221. ],
  3222. "responses": {
  3223. "201": {
  3224. "$ref": "#/responses/FileResponse"
  3225. },
  3226. "403": {
  3227. "$ref": "#/responses/error"
  3228. },
  3229. "404": {
  3230. "$ref": "#/responses/notFound"
  3231. },
  3232. "422": {
  3233. "$ref": "#/responses/error"
  3234. }
  3235. }
  3236. },
  3237. "delete": {
  3238. "consumes": [
  3239. "application/json"
  3240. ],
  3241. "produces": [
  3242. "application/json"
  3243. ],
  3244. "tags": [
  3245. "repository"
  3246. ],
  3247. "summary": "Delete a file in a repository",
  3248. "operationId": "repoDeleteFile",
  3249. "parameters": [
  3250. {
  3251. "type": "string",
  3252. "description": "owner of the repo",
  3253. "name": "owner",
  3254. "in": "path",
  3255. "required": true
  3256. },
  3257. {
  3258. "type": "string",
  3259. "description": "name of the repo",
  3260. "name": "repo",
  3261. "in": "path",
  3262. "required": true
  3263. },
  3264. {
  3265. "type": "string",
  3266. "description": "path of the file to delete",
  3267. "name": "filepath",
  3268. "in": "path",
  3269. "required": true
  3270. },
  3271. {
  3272. "name": "body",
  3273. "in": "body",
  3274. "required": true,
  3275. "schema": {
  3276. "$ref": "#/definitions/DeleteFileOptions"
  3277. }
  3278. }
  3279. ],
  3280. "responses": {
  3281. "200": {
  3282. "$ref": "#/responses/FileDeleteResponse"
  3283. },
  3284. "400": {
  3285. "$ref": "#/responses/error"
  3286. },
  3287. "403": {
  3288. "$ref": "#/responses/error"
  3289. },
  3290. "404": {
  3291. "$ref": "#/responses/error"
  3292. }
  3293. }
  3294. }
  3295. },
  3296. "/repos/{owner}/{repo}/editorconfig/{filepath}": {
  3297. "get": {
  3298. "produces": [
  3299. "application/json"
  3300. ],
  3301. "tags": [
  3302. "repository"
  3303. ],
  3304. "summary": "Get the EditorConfig definitions of a file in a repository",
  3305. "operationId": "repoGetEditorConfig",
  3306. "parameters": [
  3307. {
  3308. "type": "string",
  3309. "description": "owner of the repo",
  3310. "name": "owner",
  3311. "in": "path",
  3312. "required": true
  3313. },
  3314. {
  3315. "type": "string",
  3316. "description": "name of the repo",
  3317. "name": "repo",
  3318. "in": "path",
  3319. "required": true
  3320. },
  3321. {
  3322. "type": "string",
  3323. "description": "filepath of file to get",
  3324. "name": "filepath",
  3325. "in": "path",
  3326. "required": true
  3327. }
  3328. ],
  3329. "responses": {
  3330. "200": {
  3331. "description": "success"
  3332. },
  3333. "404": {
  3334. "$ref": "#/responses/notFound"
  3335. }
  3336. }
  3337. }
  3338. },
  3339. "/repos/{owner}/{repo}/forks": {
  3340. "get": {
  3341. "produces": [
  3342. "application/json"
  3343. ],
  3344. "tags": [
  3345. "repository"
  3346. ],
  3347. "summary": "List a repository's forks",
  3348. "operationId": "listForks",
  3349. "parameters": [
  3350. {
  3351. "type": "string",
  3352. "description": "owner of the repo",
  3353. "name": "owner",
  3354. "in": "path",
  3355. "required": true
  3356. },
  3357. {
  3358. "type": "string",
  3359. "description": "name of the repo",
  3360. "name": "repo",
  3361. "in": "path",
  3362. "required": true
  3363. },
  3364. {
  3365. "type": "integer",
  3366. "description": "page number of results to return (1-based)",
  3367. "name": "page",
  3368. "in": "query"
  3369. },
  3370. {
  3371. "type": "integer",
  3372. "description": "page size of results",
  3373. "name": "limit",
  3374. "in": "query"
  3375. }
  3376. ],
  3377. "responses": {
  3378. "200": {
  3379. "$ref": "#/responses/RepositoryList"
  3380. }
  3381. }
  3382. },
  3383. "post": {
  3384. "produces": [
  3385. "application/json"
  3386. ],
  3387. "tags": [
  3388. "repository"
  3389. ],
  3390. "summary": "Fork a repository",
  3391. "operationId": "createFork",
  3392. "parameters": [
  3393. {
  3394. "type": "string",
  3395. "description": "owner of the repo to fork",
  3396. "name": "owner",
  3397. "in": "path",
  3398. "required": true
  3399. },
  3400. {
  3401. "type": "string",
  3402. "description": "name of the repo to fork",
  3403. "name": "repo",
  3404. "in": "path",
  3405. "required": true
  3406. },
  3407. {
  3408. "name": "body",
  3409. "in": "body",
  3410. "schema": {
  3411. "$ref": "#/definitions/CreateForkOption"
  3412. }
  3413. }
  3414. ],
  3415. "responses": {
  3416. "202": {
  3417. "$ref": "#/responses/Repository"
  3418. },
  3419. "403": {
  3420. "$ref": "#/responses/forbidden"
  3421. },
  3422. "422": {
  3423. "$ref": "#/responses/validationError"
  3424. }
  3425. }
  3426. }
  3427. },
  3428. "/repos/{owner}/{repo}/git/blobs/{sha}": {
  3429. "get": {
  3430. "produces": [
  3431. "application/json"
  3432. ],
  3433. "tags": [
  3434. "repository"
  3435. ],
  3436. "summary": "Gets the blob of a repository.",
  3437. "operationId": "GetBlob",
  3438. "parameters": [
  3439. {
  3440. "type": "string",
  3441. "description": "owner of the repo",
  3442. "name": "owner",
  3443. "in": "path",
  3444. "required": true
  3445. },
  3446. {
  3447. "type": "string",
  3448. "description": "name of the repo",
  3449. "name": "repo",
  3450. "in": "path",
  3451. "required": true
  3452. },
  3453. {
  3454. "type": "string",
  3455. "description": "sha of the commit",
  3456. "name": "sha",
  3457. "in": "path",
  3458. "required": true
  3459. }
  3460. ],
  3461. "responses": {
  3462. "200": {
  3463. "$ref": "#/responses/GitBlobResponse"
  3464. },
  3465. "400": {
  3466. "$ref": "#/responses/error"
  3467. }
  3468. }
  3469. }
  3470. },
  3471. "/repos/{owner}/{repo}/git/commits/{sha}": {
  3472. "get": {
  3473. "produces": [
  3474. "application/json"
  3475. ],
  3476. "tags": [
  3477. "repository"
  3478. ],
  3479. "summary": "Get a single commit from a repository",
  3480. "operationId": "repoGetSingleCommit",
  3481. "parameters": [
  3482. {
  3483. "type": "string",
  3484. "description": "owner of the repo",
  3485. "name": "owner",
  3486. "in": "path",
  3487. "required": true
  3488. },
  3489. {
  3490. "type": "string",
  3491. "description": "name of the repo",
  3492. "name": "repo",
  3493. "in": "path",
  3494. "required": true
  3495. },
  3496. {
  3497. "type": "string",
  3498. "description": "a git ref or commit sha",
  3499. "name": "sha",
  3500. "in": "path",
  3501. "required": true
  3502. }
  3503. ],
  3504. "responses": {
  3505. "200": {
  3506. "$ref": "#/responses/Commit"
  3507. },
  3508. "404": {
  3509. "$ref": "#/responses/notFound"
  3510. },
  3511. "422": {
  3512. "$ref": "#/responses/validationError"
  3513. }
  3514. }
  3515. }
  3516. },
  3517. "/repos/{owner}/{repo}/git/refs": {
  3518. "get": {
  3519. "produces": [
  3520. "application/json"
  3521. ],
  3522. "tags": [
  3523. "repository"
  3524. ],
  3525. "summary": "Get specified ref or filtered repository's refs",
  3526. "operationId": "repoListAllGitRefs",
  3527. "parameters": [
  3528. {
  3529. "type": "string",
  3530. "description": "owner of the repo",
  3531. "name": "owner",
  3532. "in": "path",
  3533. "required": true
  3534. },
  3535. {
  3536. "type": "string",
  3537. "description": "name of the repo",
  3538. "name": "repo",
  3539. "in": "path",
  3540. "required": true
  3541. }
  3542. ],
  3543. "responses": {
  3544. "200": {
  3545. "$ref": "#/responses/ReferenceList"
  3546. },
  3547. "404": {
  3548. "$ref": "#/responses/notFound"
  3549. }
  3550. }
  3551. }
  3552. },
  3553. "/repos/{owner}/{repo}/git/refs/{ref}": {
  3554. "get": {
  3555. "produces": [
  3556. "application/json"
  3557. ],
  3558. "tags": [
  3559. "repository"
  3560. ],
  3561. "summary": "Get specified ref or filtered repository's refs",
  3562. "operationId": "repoListGitRefs",
  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": "string",
  3580. "description": "part or full name of the ref",
  3581. "name": "ref",
  3582. "in": "path",
  3583. "required": true
  3584. }
  3585. ],
  3586. "responses": {
  3587. "200": {
  3588. "$ref": "#/responses/ReferenceList"
  3589. },
  3590. "404": {
  3591. "$ref": "#/responses/notFound"
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "/repos/{owner}/{repo}/git/tags/{sha}": {
  3597. "get": {
  3598. "produces": [
  3599. "application/json"
  3600. ],
  3601. "tags": [
  3602. "repository"
  3603. ],
  3604. "summary": "Gets the tag object of an annotated tag (not lightweight tags)",
  3605. "operationId": "GetTag",
  3606. "parameters": [
  3607. {
  3608. "type": "string",
  3609. "description": "owner of the repo",
  3610. "name": "owner",
  3611. "in": "path",
  3612. "required": true
  3613. },
  3614. {
  3615. "type": "string",
  3616. "description": "name of the repo",
  3617. "name": "repo",
  3618. "in": "path",
  3619. "required": true
  3620. },
  3621. {
  3622. "type": "string",
  3623. "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.",
  3624. "name": "sha",
  3625. "in": "path",
  3626. "required": true
  3627. }
  3628. ],
  3629. "responses": {
  3630. "200": {
  3631. "$ref": "#/responses/AnnotatedTag"
  3632. },
  3633. "400": {
  3634. "$ref": "#/responses/error"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "/repos/{owner}/{repo}/git/trees/{sha}": {
  3640. "get": {
  3641. "produces": [
  3642. "application/json"
  3643. ],
  3644. "tags": [
  3645. "repository"
  3646. ],
  3647. "summary": "Gets the tree of a repository.",
  3648. "operationId": "GetTree",
  3649. "parameters": [
  3650. {
  3651. "type": "string",
  3652. "description": "owner of the repo",
  3653. "name": "owner",
  3654. "in": "path",
  3655. "required": true
  3656. },
  3657. {
  3658. "type": "string",
  3659. "description": "name of the repo",
  3660. "name": "repo",
  3661. "in": "path",
  3662. "required": true
  3663. },
  3664. {
  3665. "type": "string",
  3666. "description": "sha of the commit",
  3667. "name": "sha",
  3668. "in": "path",
  3669. "required": true
  3670. },
  3671. {
  3672. "type": "boolean",
  3673. "description": "show all directories and files",
  3674. "name": "recursive",
  3675. "in": "query"
  3676. },
  3677. {
  3678. "type": "integer",
  3679. "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",
  3680. "name": "page",
  3681. "in": "query"
  3682. },
  3683. {
  3684. "type": "integer",
  3685. "description": "number of items per page",
  3686. "name": "per_page",
  3687. "in": "query"
  3688. }
  3689. ],
  3690. "responses": {
  3691. "200": {
  3692. "$ref": "#/responses/GitTreeResponse"
  3693. },
  3694. "400": {
  3695. "$ref": "#/responses/error"
  3696. }
  3697. }
  3698. }
  3699. },
  3700. "/repos/{owner}/{repo}/hooks": {
  3701. "get": {
  3702. "produces": [
  3703. "application/json"
  3704. ],
  3705. "tags": [
  3706. "repository"
  3707. ],
  3708. "summary": "List the hooks in a repository",
  3709. "operationId": "repoListHooks",
  3710. "parameters": [
  3711. {
  3712. "type": "string",
  3713. "description": "owner of the repo",
  3714. "name": "owner",
  3715. "in": "path",
  3716. "required": true
  3717. },
  3718. {
  3719. "type": "string",
  3720. "description": "name of the repo",
  3721. "name": "repo",
  3722. "in": "path",
  3723. "required": true
  3724. },
  3725. {
  3726. "type": "integer",
  3727. "description": "page number of results to return (1-based)",
  3728. "name": "page",
  3729. "in": "query"
  3730. },
  3731. {
  3732. "type": "integer",
  3733. "description": "page size of results",
  3734. "name": "limit",
  3735. "in": "query"
  3736. }
  3737. ],
  3738. "responses": {
  3739. "200": {
  3740. "$ref": "#/responses/HookList"
  3741. }
  3742. }
  3743. },
  3744. "post": {
  3745. "consumes": [
  3746. "application/json"
  3747. ],
  3748. "produces": [
  3749. "application/json"
  3750. ],
  3751. "tags": [
  3752. "repository"
  3753. ],
  3754. "summary": "Create a hook",
  3755. "operationId": "repoCreateHook",
  3756. "parameters": [
  3757. {
  3758. "type": "string",
  3759. "description": "owner of the repo",
  3760. "name": "owner",
  3761. "in": "path",
  3762. "required": true
  3763. },
  3764. {
  3765. "type": "string",
  3766. "description": "name of the repo",
  3767. "name": "repo",
  3768. "in": "path",
  3769. "required": true
  3770. },
  3771. {
  3772. "name": "body",
  3773. "in": "body",
  3774. "schema": {
  3775. "$ref": "#/definitions/CreateHookOption"
  3776. }
  3777. }
  3778. ],
  3779. "responses": {
  3780. "201": {
  3781. "$ref": "#/responses/Hook"
  3782. }
  3783. }
  3784. }
  3785. },
  3786. "/repos/{owner}/{repo}/hooks/git": {
  3787. "get": {
  3788. "produces": [
  3789. "application/json"
  3790. ],
  3791. "tags": [
  3792. "repository"
  3793. ],
  3794. "summary": "List the Git hooks in a repository",
  3795. "operationId": "repoListGitHooks",
  3796. "parameters": [
  3797. {
  3798. "type": "string",
  3799. "description": "owner of the repo",
  3800. "name": "owner",
  3801. "in": "path",
  3802. "required": true
  3803. },
  3804. {
  3805. "type": "string",
  3806. "description": "name of the repo",
  3807. "name": "repo",
  3808. "in": "path",
  3809. "required": true
  3810. }
  3811. ],
  3812. "responses": {
  3813. "200": {
  3814. "$ref": "#/responses/GitHookList"
  3815. }
  3816. }
  3817. }
  3818. },
  3819. "/repos/{owner}/{repo}/hooks/git/{id}": {
  3820. "get": {
  3821. "produces": [
  3822. "application/json"
  3823. ],
  3824. "tags": [
  3825. "repository"
  3826. ],
  3827. "summary": "Get a Git hook",
  3828. "operationId": "repoGetGitHook",
  3829. "parameters": [
  3830. {
  3831. "type": "string",
  3832. "description": "owner of the repo",
  3833. "name": "owner",
  3834. "in": "path",
  3835. "required": true
  3836. },
  3837. {
  3838. "type": "string",
  3839. "description": "name of the repo",
  3840. "name": "repo",
  3841. "in": "path",
  3842. "required": true
  3843. },
  3844. {
  3845. "type": "string",
  3846. "description": "id of the hook to get",
  3847. "name": "id",
  3848. "in": "path",
  3849. "required": true
  3850. }
  3851. ],
  3852. "responses": {
  3853. "200": {
  3854. "$ref": "#/responses/GitHook"
  3855. },
  3856. "404": {
  3857. "$ref": "#/responses/notFound"
  3858. }
  3859. }
  3860. },
  3861. "delete": {
  3862. "produces": [
  3863. "application/json"
  3864. ],
  3865. "tags": [
  3866. "repository"
  3867. ],
  3868. "summary": "Delete a Git hook in a repository",
  3869. "operationId": "repoDeleteGitHook",
  3870. "parameters": [
  3871. {
  3872. "type": "string",
  3873. "description": "owner of the repo",
  3874. "name": "owner",
  3875. "in": "path",
  3876. "required": true
  3877. },
  3878. {
  3879. "type": "string",
  3880. "description": "name of the repo",
  3881. "name": "repo",
  3882. "in": "path",
  3883. "required": true
  3884. },
  3885. {
  3886. "type": "string",
  3887. "description": "id of the hook to get",
  3888. "name": "id",
  3889. "in": "path",
  3890. "required": true
  3891. }
  3892. ],
  3893. "responses": {
  3894. "204": {
  3895. "$ref": "#/responses/empty"
  3896. },
  3897. "404": {
  3898. "$ref": "#/responses/notFound"
  3899. }
  3900. }
  3901. },
  3902. "patch": {
  3903. "produces": [
  3904. "application/json"
  3905. ],
  3906. "tags": [
  3907. "repository"
  3908. ],
  3909. "summary": "Edit a Git hook in a repository",
  3910. "operationId": "repoEditGitHook",
  3911. "parameters": [
  3912. {
  3913. "type": "string",
  3914. "description": "owner of the repo",
  3915. "name": "owner",
  3916. "in": "path",
  3917. "required": true
  3918. },
  3919. {
  3920. "type": "string",
  3921. "description": "name of the repo",
  3922. "name": "repo",
  3923. "in": "path",
  3924. "required": true
  3925. },
  3926. {
  3927. "type": "string",
  3928. "description": "id of the hook to get",
  3929. "name": "id",
  3930. "in": "path",
  3931. "required": true
  3932. },
  3933. {
  3934. "name": "body",
  3935. "in": "body",
  3936. "schema": {
  3937. "$ref": "#/definitions/EditGitHookOption"
  3938. }
  3939. }
  3940. ],
  3941. "responses": {
  3942. "200": {
  3943. "$ref": "#/responses/GitHook"
  3944. },
  3945. "404": {
  3946. "$ref": "#/responses/notFound"
  3947. }
  3948. }
  3949. }
  3950. },
  3951. "/repos/{owner}/{repo}/hooks/{id}": {
  3952. "get": {
  3953. "produces": [
  3954. "application/json"
  3955. ],
  3956. "tags": [
  3957. "repository"
  3958. ],
  3959. "summary": "Get a hook",
  3960. "operationId": "repoGetHook",
  3961. "parameters": [
  3962. {
  3963. "type": "string",
  3964. "description": "owner of the repo",
  3965. "name": "owner",
  3966. "in": "path",
  3967. "required": true
  3968. },
  3969. {
  3970. "type": "string",
  3971. "description": "name of the repo",
  3972. "name": "repo",
  3973. "in": "path",
  3974. "required": true
  3975. },
  3976. {
  3977. "type": "integer",
  3978. "format": "int64",
  3979. "description": "id of the hook to get",
  3980. "name": "id",
  3981. "in": "path",
  3982. "required": true
  3983. }
  3984. ],
  3985. "responses": {
  3986. "200": {
  3987. "$ref": "#/responses/Hook"
  3988. },
  3989. "404": {
  3990. "$ref": "#/responses/notFound"
  3991. }
  3992. }
  3993. },
  3994. "delete": {
  3995. "produces": [
  3996. "application/json"
  3997. ],
  3998. "tags": [
  3999. "repository"
  4000. ],
  4001. "summary": "Delete a hook in a repository",
  4002. "operationId": "repoDeleteHook",
  4003. "parameters": [
  4004. {
  4005. "type": "string",
  4006. "description": "owner of the repo",
  4007. "name": "owner",
  4008. "in": "path",
  4009. "required": true
  4010. },
  4011. {
  4012. "type": "string",
  4013. "description": "name of the repo",
  4014. "name": "repo",
  4015. "in": "path",
  4016. "required": true
  4017. },
  4018. {
  4019. "type": "integer",
  4020. "format": "int64",
  4021. "description": "id of the hook to delete",
  4022. "name": "id",
  4023. "in": "path",
  4024. "required": true
  4025. }
  4026. ],
  4027. "responses": {
  4028. "204": {
  4029. "$ref": "#/responses/empty"
  4030. },
  4031. "404": {
  4032. "$ref": "#/responses/notFound"
  4033. }
  4034. }
  4035. },
  4036. "patch": {
  4037. "produces": [
  4038. "application/json"
  4039. ],
  4040. "tags": [
  4041. "repository"
  4042. ],
  4043. "summary": "Edit a hook in a repository",
  4044. "operationId": "repoEditHook",
  4045. "parameters": [
  4046. {
  4047. "type": "string",
  4048. "description": "owner of the repo",
  4049. "name": "owner",
  4050. "in": "path",
  4051. "required": true
  4052. },
  4053. {
  4054. "type": "string",
  4055. "description": "name of the repo",
  4056. "name": "repo",
  4057. "in": "path",
  4058. "required": true
  4059. },
  4060. {
  4061. "type": "integer",
  4062. "format": "int64",
  4063. "description": "index of the hook",
  4064. "name": "id",
  4065. "in": "path",
  4066. "required": true
  4067. },
  4068. {
  4069. "name": "body",
  4070. "in": "body",
  4071. "schema": {
  4072. "$ref": "#/definitions/EditHookOption"
  4073. }
  4074. }
  4075. ],
  4076. "responses": {
  4077. "200": {
  4078. "$ref": "#/responses/Hook"
  4079. }
  4080. }
  4081. }
  4082. },
  4083. "/repos/{owner}/{repo}/hooks/{id}/tests": {
  4084. "post": {
  4085. "produces": [
  4086. "application/json"
  4087. ],
  4088. "tags": [
  4089. "repository"
  4090. ],
  4091. "summary": "Test a push webhook",
  4092. "operationId": "repoTestHook",
  4093. "parameters": [
  4094. {
  4095. "type": "string",
  4096. "description": "owner of the repo",
  4097. "name": "owner",
  4098. "in": "path",
  4099. "required": true
  4100. },
  4101. {
  4102. "type": "string",
  4103. "description": "name of the repo",
  4104. "name": "repo",
  4105. "in": "path",
  4106. "required": true
  4107. },
  4108. {
  4109. "type": "integer",
  4110. "format": "int64",
  4111. "description": "id of the hook to test",
  4112. "name": "id",
  4113. "in": "path",
  4114. "required": true
  4115. }
  4116. ],
  4117. "responses": {
  4118. "204": {
  4119. "$ref": "#/responses/empty"
  4120. }
  4121. }
  4122. }
  4123. },
  4124. "/repos/{owner}/{repo}/issue_templates": {
  4125. "get": {
  4126. "produces": [
  4127. "application/json"
  4128. ],
  4129. "tags": [
  4130. "repository"
  4131. ],
  4132. "summary": "Get available issue templates for a repository",
  4133. "operationId": "repoGetIssueTemplates",
  4134. "parameters": [
  4135. {
  4136. "type": "string",
  4137. "description": "owner of the repo",
  4138. "name": "owner",
  4139. "in": "path",
  4140. "required": true
  4141. },
  4142. {
  4143. "type": "string",
  4144. "description": "name of the repo",
  4145. "name": "repo",
  4146. "in": "path",
  4147. "required": true
  4148. }
  4149. ],
  4150. "responses": {
  4151. "200": {
  4152. "$ref": "#/responses/IssueTemplates"
  4153. }
  4154. }
  4155. }
  4156. },
  4157. "/repos/{owner}/{repo}/issues": {
  4158. "get": {
  4159. "produces": [
  4160. "application/json"
  4161. ],
  4162. "tags": [
  4163. "issue"
  4164. ],
  4165. "summary": "List a repository's issues",
  4166. "operationId": "issueListIssues",
  4167. "parameters": [
  4168. {
  4169. "type": "string",
  4170. "description": "owner of the repo",
  4171. "name": "owner",
  4172. "in": "path",
  4173. "required": true
  4174. },
  4175. {
  4176. "type": "string",
  4177. "description": "name of the repo",
  4178. "name": "repo",
  4179. "in": "path",
  4180. "required": true
  4181. },
  4182. {
  4183. "enum": [
  4184. "closed",
  4185. "open",
  4186. "all"
  4187. ],
  4188. "type": "string",
  4189. "description": "whether issue is open or closed",
  4190. "name": "state",
  4191. "in": "query"
  4192. },
  4193. {
  4194. "type": "string",
  4195. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  4196. "name": "labels",
  4197. "in": "query"
  4198. },
  4199. {
  4200. "type": "string",
  4201. "description": "search string",
  4202. "name": "q",
  4203. "in": "query"
  4204. },
  4205. {
  4206. "enum": [
  4207. "issues",
  4208. "pulls"
  4209. ],
  4210. "type": "string",
  4211. "description": "filter by type (issues / pulls) if set",
  4212. "name": "type",
  4213. "in": "query"
  4214. },
  4215. {
  4216. "type": "string",
  4217. "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",
  4218. "name": "milestones",
  4219. "in": "query"
  4220. },
  4221. {
  4222. "type": "integer",
  4223. "description": "page number of results to return (1-based)",
  4224. "name": "page",
  4225. "in": "query"
  4226. },
  4227. {
  4228. "type": "integer",
  4229. "description": "page size of results",
  4230. "name": "limit",
  4231. "in": "query"
  4232. }
  4233. ],
  4234. "responses": {
  4235. "200": {
  4236. "$ref": "#/responses/IssueList"
  4237. }
  4238. }
  4239. },
  4240. "post": {
  4241. "consumes": [
  4242. "application/json"
  4243. ],
  4244. "produces": [
  4245. "application/json"
  4246. ],
  4247. "tags": [
  4248. "issue"
  4249. ],
  4250. "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  4251. "operationId": "issueCreateIssue",
  4252. "parameters": [
  4253. {
  4254. "type": "string",
  4255. "description": "owner of the repo",
  4256. "name": "owner",
  4257. "in": "path",
  4258. "required": true
  4259. },
  4260. {
  4261. "type": "string",
  4262. "description": "name of the repo",
  4263. "name": "repo",
  4264. "in": "path",
  4265. "required": true
  4266. },
  4267. {
  4268. "name": "body",
  4269. "in": "body",
  4270. "schema": {
  4271. "$ref": "#/definitions/CreateIssueOption"
  4272. }
  4273. }
  4274. ],
  4275. "responses": {
  4276. "201": {
  4277. "$ref": "#/responses/Issue"
  4278. },
  4279. "403": {
  4280. "$ref": "#/responses/forbidden"
  4281. },
  4282. "412": {
  4283. "$ref": "#/responses/error"
  4284. },
  4285. "422": {
  4286. "$ref": "#/responses/validationError"
  4287. }
  4288. }
  4289. }
  4290. },
  4291. "/repos/{owner}/{repo}/issues/comments": {
  4292. "get": {
  4293. "produces": [
  4294. "application/json"
  4295. ],
  4296. "tags": [
  4297. "issue"
  4298. ],
  4299. "summary": "List all comments in a repository",
  4300. "operationId": "issueGetRepoComments",
  4301. "parameters": [
  4302. {
  4303. "type": "string",
  4304. "description": "owner of the repo",
  4305. "name": "owner",
  4306. "in": "path",
  4307. "required": true
  4308. },
  4309. {
  4310. "type": "string",
  4311. "description": "name of the repo",
  4312. "name": "repo",
  4313. "in": "path",
  4314. "required": true
  4315. },
  4316. {
  4317. "type": "string",
  4318. "format": "date-time",
  4319. "description": "if provided, only comments updated since the provided time are returned.",
  4320. "name": "since",
  4321. "in": "query"
  4322. },
  4323. {
  4324. "type": "string",
  4325. "format": "date-time",
  4326. "description": "if provided, only comments updated before the provided time are returned.",
  4327. "name": "before",
  4328. "in": "query"
  4329. },
  4330. {
  4331. "type": "integer",
  4332. "description": "page number of results to return (1-based)",
  4333. "name": "page",
  4334. "in": "query"
  4335. },
  4336. {
  4337. "type": "integer",
  4338. "description": "page size of results",
  4339. "name": "limit",
  4340. "in": "query"
  4341. }
  4342. ],
  4343. "responses": {
  4344. "200": {
  4345. "$ref": "#/responses/CommentList"
  4346. }
  4347. }
  4348. }
  4349. },
  4350. "/repos/{owner}/{repo}/issues/comments/{id}": {
  4351. "get": {
  4352. "consumes": [
  4353. "application/json"
  4354. ],
  4355. "produces": [
  4356. "application/json"
  4357. ],
  4358. "tags": [
  4359. "issue"
  4360. ],
  4361. "summary": "Get a comment",
  4362. "operationId": "issueGetComment",
  4363. "parameters": [
  4364. {
  4365. "type": "string",
  4366. "description": "owner of the repo",
  4367. "name": "owner",
  4368. "in": "path",
  4369. "required": true
  4370. },
  4371. {
  4372. "type": "string",
  4373. "description": "name of the repo",
  4374. "name": "repo",
  4375. "in": "path",
  4376. "required": true
  4377. },
  4378. {
  4379. "type": "integer",
  4380. "format": "int64",
  4381. "description": "id of the comment",
  4382. "name": "id",
  4383. "in": "path",
  4384. "required": true
  4385. }
  4386. ],
  4387. "responses": {
  4388. "200": {
  4389. "$ref": "#/responses/Comment"
  4390. },
  4391. "204": {
  4392. "$ref": "#/responses/empty"
  4393. },
  4394. "403": {
  4395. "$ref": "#/responses/forbidden"
  4396. },
  4397. "404": {
  4398. "$ref": "#/responses/notFound"
  4399. }
  4400. }
  4401. },
  4402. "delete": {
  4403. "tags": [
  4404. "issue"
  4405. ],
  4406. "summary": "Delete a comment",
  4407. "operationId": "issueDeleteComment",
  4408. "parameters": [
  4409. {
  4410. "type": "string",
  4411. "description": "owner of the repo",
  4412. "name": "owner",
  4413. "in": "path",
  4414. "required": true
  4415. },
  4416. {
  4417. "type": "string",
  4418. "description": "name of the repo",
  4419. "name": "repo",
  4420. "in": "path",
  4421. "required": true
  4422. },
  4423. {
  4424. "type": "integer",
  4425. "format": "int64",
  4426. "description": "id of comment to delete",
  4427. "name": "id",
  4428. "in": "path",
  4429. "required": true
  4430. }
  4431. ],
  4432. "responses": {
  4433. "204": {
  4434. "$ref": "#/responses/empty"
  4435. },
  4436. "403": {
  4437. "$ref": "#/responses/forbidden"
  4438. },
  4439. "404": {
  4440. "$ref": "#/responses/notFound"
  4441. }
  4442. }
  4443. },
  4444. "patch": {
  4445. "consumes": [
  4446. "application/json"
  4447. ],
  4448. "produces": [
  4449. "application/json"
  4450. ],
  4451. "tags": [
  4452. "issue"
  4453. ],
  4454. "summary": "Edit a comment",
  4455. "operationId": "issueEditComment",
  4456. "parameters": [
  4457. {
  4458. "type": "string",
  4459. "description": "owner of the repo",
  4460. "name": "owner",
  4461. "in": "path",
  4462. "required": true
  4463. },
  4464. {
  4465. "type": "string",
  4466. "description": "name of the repo",
  4467. "name": "repo",
  4468. "in": "path",
  4469. "required": true
  4470. },
  4471. {
  4472. "type": "integer",
  4473. "format": "int64",
  4474. "description": "id of the comment to edit",
  4475. "name": "id",
  4476. "in": "path",
  4477. "required": true
  4478. },
  4479. {
  4480. "name": "body",
  4481. "in": "body",
  4482. "schema": {
  4483. "$ref": "#/definitions/EditIssueCommentOption"
  4484. }
  4485. }
  4486. ],
  4487. "responses": {
  4488. "200": {
  4489. "$ref": "#/responses/Comment"
  4490. },
  4491. "204": {
  4492. "$ref": "#/responses/empty"
  4493. },
  4494. "403": {
  4495. "$ref": "#/responses/forbidden"
  4496. },
  4497. "404": {
  4498. "$ref": "#/responses/notFound"
  4499. }
  4500. }
  4501. }
  4502. },
  4503. "/repos/{owner}/{repo}/issues/comments/{id}/reactions": {
  4504. "get": {
  4505. "consumes": [
  4506. "application/json"
  4507. ],
  4508. "produces": [
  4509. "application/json"
  4510. ],
  4511. "tags": [
  4512. "issue"
  4513. ],
  4514. "summary": "Get a list of reactions from a comment of an issue",
  4515. "operationId": "issueGetCommentReactions",
  4516. "parameters": [
  4517. {
  4518. "type": "string",
  4519. "description": "owner of the repo",
  4520. "name": "owner",
  4521. "in": "path",
  4522. "required": true
  4523. },
  4524. {
  4525. "type": "string",
  4526. "description": "name of the repo",
  4527. "name": "repo",
  4528. "in": "path",
  4529. "required": true
  4530. },
  4531. {
  4532. "type": "integer",
  4533. "format": "int64",
  4534. "description": "id of the comment to edit",
  4535. "name": "id",
  4536. "in": "path",
  4537. "required": true
  4538. }
  4539. ],
  4540. "responses": {
  4541. "200": {
  4542. "$ref": "#/responses/ReactionList"
  4543. },
  4544. "403": {
  4545. "$ref": "#/responses/forbidden"
  4546. }
  4547. }
  4548. },
  4549. "post": {
  4550. "consumes": [
  4551. "application/json"
  4552. ],
  4553. "produces": [
  4554. "application/json"
  4555. ],
  4556. "tags": [
  4557. "issue"
  4558. ],
  4559. "summary": "Add a reaction to a comment of an issue",
  4560. "operationId": "issuePostCommentReaction",
  4561. "parameters": [
  4562. {
  4563. "type": "string",
  4564. "description": "owner of the repo",
  4565. "name": "owner",
  4566. "in": "path",
  4567. "required": true
  4568. },
  4569. {
  4570. "type": "string",
  4571. "description": "name of the repo",
  4572. "name": "repo",
  4573. "in": "path",
  4574. "required": true
  4575. },
  4576. {
  4577. "type": "integer",
  4578. "format": "int64",
  4579. "description": "id of the comment to edit",
  4580. "name": "id",
  4581. "in": "path",
  4582. "required": true
  4583. },
  4584. {
  4585. "name": "content",
  4586. "in": "body",
  4587. "schema": {
  4588. "$ref": "#/definitions/EditReactionOption"
  4589. }
  4590. }
  4591. ],
  4592. "responses": {
  4593. "200": {
  4594. "$ref": "#/responses/Reaction"
  4595. },
  4596. "201": {
  4597. "$ref": "#/responses/Reaction"
  4598. },
  4599. "403": {
  4600. "$ref": "#/responses/forbidden"
  4601. }
  4602. }
  4603. },
  4604. "delete": {
  4605. "consumes": [
  4606. "application/json"
  4607. ],
  4608. "produces": [
  4609. "application/json"
  4610. ],
  4611. "tags": [
  4612. "issue"
  4613. ],
  4614. "summary": "Remove a reaction from a comment of an issue",
  4615. "operationId": "issueDeleteCommentReaction",
  4616. "parameters": [
  4617. {
  4618. "type": "string",
  4619. "description": "owner of the repo",
  4620. "name": "owner",
  4621. "in": "path",
  4622. "required": true
  4623. },
  4624. {
  4625. "type": "string",
  4626. "description": "name of the repo",
  4627. "name": "repo",
  4628. "in": "path",
  4629. "required": true
  4630. },
  4631. {
  4632. "type": "integer",
  4633. "format": "int64",
  4634. "description": "id of the comment to edit",
  4635. "name": "id",
  4636. "in": "path",
  4637. "required": true
  4638. },
  4639. {
  4640. "name": "content",
  4641. "in": "body",
  4642. "schema": {
  4643. "$ref": "#/definitions/EditReactionOption"
  4644. }
  4645. }
  4646. ],
  4647. "responses": {
  4648. "200": {
  4649. "$ref": "#/responses/empty"
  4650. },
  4651. "403": {
  4652. "$ref": "#/responses/forbidden"
  4653. }
  4654. }
  4655. }
  4656. },
  4657. "/repos/{owner}/{repo}/issues/{index}": {
  4658. "get": {
  4659. "produces": [
  4660. "application/json"
  4661. ],
  4662. "tags": [
  4663. "issue"
  4664. ],
  4665. "summary": "Get an issue",
  4666. "operationId": "issueGetIssue",
  4667. "parameters": [
  4668. {
  4669. "type": "string",
  4670. "description": "owner of the repo",
  4671. "name": "owner",
  4672. "in": "path",
  4673. "required": true
  4674. },
  4675. {
  4676. "type": "string",
  4677. "description": "name of the repo",
  4678. "name": "repo",
  4679. "in": "path",
  4680. "required": true
  4681. },
  4682. {
  4683. "type": "integer",
  4684. "format": "int64",
  4685. "description": "index of the issue to get",
  4686. "name": "index",
  4687. "in": "path",
  4688. "required": true
  4689. }
  4690. ],
  4691. "responses": {
  4692. "200": {
  4693. "$ref": "#/responses/Issue"
  4694. },
  4695. "404": {
  4696. "$ref": "#/responses/notFound"
  4697. }
  4698. }
  4699. },
  4700. "patch": {
  4701. "consumes": [
  4702. "application/json"
  4703. ],
  4704. "produces": [
  4705. "application/json"
  4706. ],
  4707. "tags": [
  4708. "issue"
  4709. ],
  4710. "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  4711. "operationId": "issueEditIssue",
  4712. "parameters": [
  4713. {
  4714. "type": "string",
  4715. "description": "owner of the repo",
  4716. "name": "owner",
  4717. "in": "path",
  4718. "required": true
  4719. },
  4720. {
  4721. "type": "string",
  4722. "description": "name of the repo",
  4723. "name": "repo",
  4724. "in": "path",
  4725. "required": true
  4726. },
  4727. {
  4728. "type": "integer",
  4729. "format": "int64",
  4730. "description": "index of the issue to edit",
  4731. "name": "index",
  4732. "in": "path",
  4733. "required": true
  4734. },
  4735. {
  4736. "name": "body",
  4737. "in": "body",
  4738. "schema": {
  4739. "$ref": "#/definitions/EditIssueOption"
  4740. }
  4741. }
  4742. ],
  4743. "responses": {
  4744. "201": {
  4745. "$ref": "#/responses/Issue"
  4746. },
  4747. "403": {
  4748. "$ref": "#/responses/forbidden"
  4749. },
  4750. "404": {
  4751. "$ref": "#/responses/notFound"
  4752. },
  4753. "412": {
  4754. "$ref": "#/responses/error"
  4755. }
  4756. }
  4757. }
  4758. },
  4759. "/repos/{owner}/{repo}/issues/{index}/comments": {
  4760. "get": {
  4761. "produces": [
  4762. "application/json"
  4763. ],
  4764. "tags": [
  4765. "issue"
  4766. ],
  4767. "summary": "List all comments on an issue",
  4768. "operationId": "issueGetComments",
  4769. "parameters": [
  4770. {
  4771. "type": "string",
  4772. "description": "owner of the repo",
  4773. "name": "owner",
  4774. "in": "path",
  4775. "required": true
  4776. },
  4777. {
  4778. "type": "string",
  4779. "description": "name of the repo",
  4780. "name": "repo",
  4781. "in": "path",
  4782. "required": true
  4783. },
  4784. {
  4785. "type": "integer",
  4786. "format": "int64",
  4787. "description": "index of the issue",
  4788. "name": "index",
  4789. "in": "path",
  4790. "required": true
  4791. },
  4792. {
  4793. "type": "string",
  4794. "format": "date-time",
  4795. "description": "if provided, only comments updated since the specified time are returned.",
  4796. "name": "since",
  4797. "in": "query"
  4798. },
  4799. {
  4800. "type": "string",
  4801. "format": "date-time",
  4802. "description": "if provided, only comments updated before the provided time are returned.",
  4803. "name": "before",
  4804. "in": "query"
  4805. }
  4806. ],
  4807. "responses": {
  4808. "200": {
  4809. "$ref": "#/responses/CommentList"
  4810. }
  4811. }
  4812. },
  4813. "post": {
  4814. "consumes": [
  4815. "application/json"
  4816. ],
  4817. "produces": [
  4818. "application/json"
  4819. ],
  4820. "tags": [
  4821. "issue"
  4822. ],
  4823. "summary": "Add a comment to an issue",
  4824. "operationId": "issueCreateComment",
  4825. "parameters": [
  4826. {
  4827. "type": "string",
  4828. "description": "owner of the repo",
  4829. "name": "owner",
  4830. "in": "path",
  4831. "required": true
  4832. },
  4833. {
  4834. "type": "string",
  4835. "description": "name of the repo",
  4836. "name": "repo",
  4837. "in": "path",
  4838. "required": true
  4839. },
  4840. {
  4841. "type": "integer",
  4842. "format": "int64",
  4843. "description": "index of the issue",
  4844. "name": "index",
  4845. "in": "path",
  4846. "required": true
  4847. },
  4848. {
  4849. "name": "body",
  4850. "in": "body",
  4851. "schema": {
  4852. "$ref": "#/definitions/CreateIssueCommentOption"
  4853. }
  4854. }
  4855. ],
  4856. "responses": {
  4857. "201": {
  4858. "$ref": "#/responses/Comment"
  4859. },
  4860. "403": {
  4861. "$ref": "#/responses/forbidden"
  4862. }
  4863. }
  4864. }
  4865. },
  4866. "/repos/{owner}/{repo}/issues/{index}/comments/{id}": {
  4867. "delete": {
  4868. "tags": [
  4869. "issue"
  4870. ],
  4871. "summary": "Delete a comment",
  4872. "operationId": "issueDeleteCommentDeprecated",
  4873. "deprecated": true,
  4874. "parameters": [
  4875. {
  4876. "type": "string",
  4877. "description": "owner of the repo",
  4878. "name": "owner",
  4879. "in": "path",
  4880. "required": true
  4881. },
  4882. {
  4883. "type": "string",
  4884. "description": "name of the repo",
  4885. "name": "repo",
  4886. "in": "path",
  4887. "required": true
  4888. },
  4889. {
  4890. "type": "integer",
  4891. "description": "this parameter is ignored",
  4892. "name": "index",
  4893. "in": "path",
  4894. "required": true
  4895. },
  4896. {
  4897. "type": "integer",
  4898. "format": "int64",
  4899. "description": "id of comment to delete",
  4900. "name": "id",
  4901. "in": "path",
  4902. "required": true
  4903. }
  4904. ],
  4905. "responses": {
  4906. "204": {
  4907. "$ref": "#/responses/empty"
  4908. },
  4909. "403": {
  4910. "$ref": "#/responses/forbidden"
  4911. },
  4912. "404": {
  4913. "$ref": "#/responses/notFound"
  4914. }
  4915. }
  4916. },
  4917. "patch": {
  4918. "consumes": [
  4919. "application/json"
  4920. ],
  4921. "produces": [
  4922. "application/json"
  4923. ],
  4924. "tags": [
  4925. "issue"
  4926. ],
  4927. "summary": "Edit a comment",
  4928. "operationId": "issueEditCommentDeprecated",
  4929. "deprecated": true,
  4930. "parameters": [
  4931. {
  4932. "type": "string",
  4933. "description": "owner of the repo",
  4934. "name": "owner",
  4935. "in": "path",
  4936. "required": true
  4937. },
  4938. {
  4939. "type": "string",
  4940. "description": "name of the repo",
  4941. "name": "repo",
  4942. "in": "path",
  4943. "required": true
  4944. },
  4945. {
  4946. "type": "integer",
  4947. "description": "this parameter is ignored",
  4948. "name": "index",
  4949. "in": "path",
  4950. "required": true
  4951. },
  4952. {
  4953. "type": "integer",
  4954. "format": "int64",
  4955. "description": "id of the comment to edit",
  4956. "name": "id",
  4957. "in": "path",
  4958. "required": true
  4959. },
  4960. {
  4961. "name": "body",
  4962. "in": "body",
  4963. "schema": {
  4964. "$ref": "#/definitions/EditIssueCommentOption"
  4965. }
  4966. }
  4967. ],
  4968. "responses": {
  4969. "200": {
  4970. "$ref": "#/responses/Comment"
  4971. },
  4972. "204": {
  4973. "$ref": "#/responses/empty"
  4974. },
  4975. "403": {
  4976. "$ref": "#/responses/forbidden"
  4977. },
  4978. "404": {
  4979. "$ref": "#/responses/notFound"
  4980. }
  4981. }
  4982. }
  4983. },
  4984. "/repos/{owner}/{repo}/issues/{index}/deadline": {
  4985. "post": {
  4986. "consumes": [
  4987. "application/json"
  4988. ],
  4989. "produces": [
  4990. "application/json"
  4991. ],
  4992. "tags": [
  4993. "issue"
  4994. ],
  4995. "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.",
  4996. "operationId": "issueEditIssueDeadline",
  4997. "parameters": [
  4998. {
  4999. "type": "string",
  5000. "description": "owner of the repo",
  5001. "name": "owner",
  5002. "in": "path",
  5003. "required": true
  5004. },
  5005. {
  5006. "type": "string",
  5007. "description": "name of the repo",
  5008. "name": "repo",
  5009. "in": "path",
  5010. "required": true
  5011. },
  5012. {
  5013. "type": "integer",
  5014. "format": "int64",
  5015. "description": "index of the issue to create or update a deadline on",
  5016. "name": "index",
  5017. "in": "path",
  5018. "required": true
  5019. },
  5020. {
  5021. "name": "body",
  5022. "in": "body",
  5023. "schema": {
  5024. "$ref": "#/definitions/EditDeadlineOption"
  5025. }
  5026. }
  5027. ],
  5028. "responses": {
  5029. "201": {
  5030. "$ref": "#/responses/IssueDeadline"
  5031. },
  5032. "403": {
  5033. "$ref": "#/responses/forbidden"
  5034. },
  5035. "404": {
  5036. "$ref": "#/responses/notFound"
  5037. }
  5038. }
  5039. }
  5040. },
  5041. "/repos/{owner}/{repo}/issues/{index}/labels": {
  5042. "get": {
  5043. "produces": [
  5044. "application/json"
  5045. ],
  5046. "tags": [
  5047. "issue"
  5048. ],
  5049. "summary": "Get an issue's labels",
  5050. "operationId": "issueGetLabels",
  5051. "parameters": [
  5052. {
  5053. "type": "string",
  5054. "description": "owner of the repo",
  5055. "name": "owner",
  5056. "in": "path",
  5057. "required": true
  5058. },
  5059. {
  5060. "type": "string",
  5061. "description": "name of the repo",
  5062. "name": "repo",
  5063. "in": "path",
  5064. "required": true
  5065. },
  5066. {
  5067. "type": "integer",
  5068. "format": "int64",
  5069. "description": "index of the issue",
  5070. "name": "index",
  5071. "in": "path",
  5072. "required": true
  5073. }
  5074. ],
  5075. "responses": {
  5076. "200": {
  5077. "$ref": "#/responses/LabelList"
  5078. },
  5079. "404": {
  5080. "$ref": "#/responses/notFound"
  5081. }
  5082. }
  5083. },
  5084. "put": {
  5085. "consumes": [
  5086. "application/json"
  5087. ],
  5088. "produces": [
  5089. "application/json"
  5090. ],
  5091. "tags": [
  5092. "issue"
  5093. ],
  5094. "summary": "Replace an issue's labels",
  5095. "operationId": "issueReplaceLabels",
  5096. "parameters": [
  5097. {
  5098. "type": "string",
  5099. "description": "owner of the repo",
  5100. "name": "owner",
  5101. "in": "path",
  5102. "required": true
  5103. },
  5104. {
  5105. "type": "string",
  5106. "description": "name of the repo",
  5107. "name": "repo",
  5108. "in": "path",
  5109. "required": true
  5110. },
  5111. {
  5112. "type": "integer",
  5113. "format": "int64",
  5114. "description": "index of the issue",
  5115. "name": "index",
  5116. "in": "path",
  5117. "required": true
  5118. },
  5119. {
  5120. "name": "body",
  5121. "in": "body",
  5122. "schema": {
  5123. "$ref": "#/definitions/IssueLabelsOption"
  5124. }
  5125. }
  5126. ],
  5127. "responses": {
  5128. "200": {
  5129. "$ref": "#/responses/LabelList"
  5130. },
  5131. "403": {
  5132. "$ref": "#/responses/forbidden"
  5133. }
  5134. }
  5135. },
  5136. "post": {
  5137. "consumes": [
  5138. "application/json"
  5139. ],
  5140. "produces": [
  5141. "application/json"
  5142. ],
  5143. "tags": [
  5144. "issue"
  5145. ],
  5146. "summary": "Add a label to an issue",
  5147. "operationId": "issueAddLabel",
  5148. "parameters": [
  5149. {
  5150. "type": "string",
  5151. "description": "owner of the repo",
  5152. "name": "owner",
  5153. "in": "path",
  5154. "required": true
  5155. },
  5156. {
  5157. "type": "string",
  5158. "description": "name of the repo",
  5159. "name": "repo",
  5160. "in": "path",
  5161. "required": true
  5162. },
  5163. {
  5164. "type": "integer",
  5165. "format": "int64",
  5166. "description": "index of the issue",
  5167. "name": "index",
  5168. "in": "path",
  5169. "required": true
  5170. },
  5171. {
  5172. "name": "body",
  5173. "in": "body",
  5174. "schema": {
  5175. "$ref": "#/definitions/IssueLabelsOption"
  5176. }
  5177. }
  5178. ],
  5179. "responses": {
  5180. "200": {
  5181. "$ref": "#/responses/LabelList"
  5182. },
  5183. "403": {
  5184. "$ref": "#/responses/forbidden"
  5185. }
  5186. }
  5187. },
  5188. "delete": {
  5189. "produces": [
  5190. "application/json"
  5191. ],
  5192. "tags": [
  5193. "issue"
  5194. ],
  5195. "summary": "Remove all labels from an issue",
  5196. "operationId": "issueClearLabels",
  5197. "parameters": [
  5198. {
  5199. "type": "string",
  5200. "description": "owner of the repo",
  5201. "name": "owner",
  5202. "in": "path",
  5203. "required": true
  5204. },
  5205. {
  5206. "type": "string",
  5207. "description": "name of the repo",
  5208. "name": "repo",
  5209. "in": "path",
  5210. "required": true
  5211. },
  5212. {
  5213. "type": "integer",
  5214. "format": "int64",
  5215. "description": "index of the issue",
  5216. "name": "index",
  5217. "in": "path",
  5218. "required": true
  5219. }
  5220. ],
  5221. "responses": {
  5222. "204": {
  5223. "$ref": "#/responses/empty"
  5224. },
  5225. "403": {
  5226. "$ref": "#/responses/forbidden"
  5227. }
  5228. }
  5229. }
  5230. },
  5231. "/repos/{owner}/{repo}/issues/{index}/labels/{id}": {
  5232. "delete": {
  5233. "produces": [
  5234. "application/json"
  5235. ],
  5236. "tags": [
  5237. "issue"
  5238. ],
  5239. "summary": "Remove a label from an issue",
  5240. "operationId": "issueRemoveLabel",
  5241. "parameters": [
  5242. {
  5243. "type": "string",
  5244. "description": "owner of the repo",
  5245. "name": "owner",
  5246. "in": "path",
  5247. "required": true
  5248. },
  5249. {
  5250. "type": "string",
  5251. "description": "name of the repo",
  5252. "name": "repo",
  5253. "in": "path",
  5254. "required": true
  5255. },
  5256. {
  5257. "type": "integer",
  5258. "format": "int64",
  5259. "description": "index of the issue",
  5260. "name": "index",
  5261. "in": "path",
  5262. "required": true
  5263. },
  5264. {
  5265. "type": "integer",
  5266. "format": "int64",
  5267. "description": "id of the label to remove",
  5268. "name": "id",
  5269. "in": "path",
  5270. "required": true
  5271. }
  5272. ],
  5273. "responses": {
  5274. "204": {
  5275. "$ref": "#/responses/empty"
  5276. },
  5277. "403": {
  5278. "$ref": "#/responses/forbidden"
  5279. },
  5280. "422": {
  5281. "$ref": "#/responses/validationError"
  5282. }
  5283. }
  5284. }
  5285. },
  5286. "/repos/{owner}/{repo}/issues/{index}/reactions": {
  5287. "get": {
  5288. "consumes": [
  5289. "application/json"
  5290. ],
  5291. "produces": [
  5292. "application/json"
  5293. ],
  5294. "tags": [
  5295. "issue"
  5296. ],
  5297. "summary": "Get a list reactions of an issue",
  5298. "operationId": "issueGetIssueReactions",
  5299. "parameters": [
  5300. {
  5301. "type": "string",
  5302. "description": "owner of the repo",
  5303. "name": "owner",
  5304. "in": "path",
  5305. "required": true
  5306. },
  5307. {
  5308. "type": "string",
  5309. "description": "name of the repo",
  5310. "name": "repo",
  5311. "in": "path",
  5312. "required": true
  5313. },
  5314. {
  5315. "type": "integer",
  5316. "format": "int64",
  5317. "description": "index of the issue",
  5318. "name": "index",
  5319. "in": "path",
  5320. "required": true
  5321. },
  5322. {
  5323. "type": "integer",
  5324. "description": "page number of results to return (1-based)",
  5325. "name": "page",
  5326. "in": "query"
  5327. },
  5328. {
  5329. "type": "integer",
  5330. "description": "page size of results",
  5331. "name": "limit",
  5332. "in": "query"
  5333. }
  5334. ],
  5335. "responses": {
  5336. "200": {
  5337. "$ref": "#/responses/ReactionList"
  5338. },
  5339. "403": {
  5340. "$ref": "#/responses/forbidden"
  5341. }
  5342. }
  5343. },
  5344. "post": {
  5345. "consumes": [
  5346. "application/json"
  5347. ],
  5348. "produces": [
  5349. "application/json"
  5350. ],
  5351. "tags": [
  5352. "issue"
  5353. ],
  5354. "summary": "Add a reaction to an issue",
  5355. "operationId": "issuePostIssueReaction",
  5356. "parameters": [
  5357. {
  5358. "type": "string",
  5359. "description": "owner of the repo",
  5360. "name": "owner",
  5361. "in": "path",
  5362. "required": true
  5363. },
  5364. {
  5365. "type": "string",
  5366. "description": "name of the repo",
  5367. "name": "repo",
  5368. "in": "path",
  5369. "required": true
  5370. },
  5371. {
  5372. "type": "integer",
  5373. "format": "int64",
  5374. "description": "index of the issue",
  5375. "name": "index",
  5376. "in": "path",
  5377. "required": true
  5378. },
  5379. {
  5380. "name": "content",
  5381. "in": "body",
  5382. "schema": {
  5383. "$ref": "#/definitions/EditReactionOption"
  5384. }
  5385. }
  5386. ],
  5387. "responses": {
  5388. "200": {
  5389. "$ref": "#/responses/Reaction"
  5390. },
  5391. "201": {
  5392. "$ref": "#/responses/Reaction"
  5393. },
  5394. "403": {
  5395. "$ref": "#/responses/forbidden"
  5396. }
  5397. }
  5398. },
  5399. "delete": {
  5400. "consumes": [
  5401. "application/json"
  5402. ],
  5403. "produces": [
  5404. "application/json"
  5405. ],
  5406. "tags": [
  5407. "issue"
  5408. ],
  5409. "summary": "Remove a reaction from an issue",
  5410. "operationId": "issueDeleteIssueReaction",
  5411. "parameters": [
  5412. {
  5413. "type": "string",
  5414. "description": "owner of the repo",
  5415. "name": "owner",
  5416. "in": "path",
  5417. "required": true
  5418. },
  5419. {
  5420. "type": "string",
  5421. "description": "name of the repo",
  5422. "name": "repo",
  5423. "in": "path",
  5424. "required": true
  5425. },
  5426. {
  5427. "type": "integer",
  5428. "format": "int64",
  5429. "description": "index of the issue",
  5430. "name": "index",
  5431. "in": "path",
  5432. "required": true
  5433. },
  5434. {
  5435. "name": "content",
  5436. "in": "body",
  5437. "schema": {
  5438. "$ref": "#/definitions/EditReactionOption"
  5439. }
  5440. }
  5441. ],
  5442. "responses": {
  5443. "200": {
  5444. "$ref": "#/responses/empty"
  5445. },
  5446. "403": {
  5447. "$ref": "#/responses/forbidden"
  5448. }
  5449. }
  5450. }
  5451. },
  5452. "/repos/{owner}/{repo}/issues/{index}/stopwatch/delete": {
  5453. "delete": {
  5454. "consumes": [
  5455. "application/json"
  5456. ],
  5457. "produces": [
  5458. "application/json"
  5459. ],
  5460. "tags": [
  5461. "issue"
  5462. ],
  5463. "summary": "Delete an issue's existing stopwatch.",
  5464. "operationId": "issueDeleteStopWatch",
  5465. "parameters": [
  5466. {
  5467. "type": "string",
  5468. "description": "owner of the repo",
  5469. "name": "owner",
  5470. "in": "path",
  5471. "required": true
  5472. },
  5473. {
  5474. "type": "string",
  5475. "description": "name of the repo",
  5476. "name": "repo",
  5477. "in": "path",
  5478. "required": true
  5479. },
  5480. {
  5481. "type": "integer",
  5482. "format": "int64",
  5483. "description": "index of the issue to stop the stopwatch on",
  5484. "name": "index",
  5485. "in": "path",
  5486. "required": true
  5487. }
  5488. ],
  5489. "responses": {
  5490. "204": {
  5491. "$ref": "#/responses/empty"
  5492. },
  5493. "403": {
  5494. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5495. },
  5496. "404": {
  5497. "$ref": "#/responses/notFound"
  5498. },
  5499. "409": {
  5500. "description": "Cannot cancel a non existent stopwatch"
  5501. }
  5502. }
  5503. }
  5504. },
  5505. "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": {
  5506. "post": {
  5507. "consumes": [
  5508. "application/json"
  5509. ],
  5510. "produces": [
  5511. "application/json"
  5512. ],
  5513. "tags": [
  5514. "issue"
  5515. ],
  5516. "summary": "Start stopwatch on an issue.",
  5517. "operationId": "issueStartStopWatch",
  5518. "parameters": [
  5519. {
  5520. "type": "string",
  5521. "description": "owner of the repo",
  5522. "name": "owner",
  5523. "in": "path",
  5524. "required": true
  5525. },
  5526. {
  5527. "type": "string",
  5528. "description": "name of the repo",
  5529. "name": "repo",
  5530. "in": "path",
  5531. "required": true
  5532. },
  5533. {
  5534. "type": "integer",
  5535. "format": "int64",
  5536. "description": "index of the issue to create the stopwatch on",
  5537. "name": "index",
  5538. "in": "path",
  5539. "required": true
  5540. }
  5541. ],
  5542. "responses": {
  5543. "201": {
  5544. "$ref": "#/responses/empty"
  5545. },
  5546. "403": {
  5547. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5548. },
  5549. "404": {
  5550. "$ref": "#/responses/notFound"
  5551. },
  5552. "409": {
  5553. "description": "Cannot start a stopwatch again if it already exists"
  5554. }
  5555. }
  5556. }
  5557. },
  5558. "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": {
  5559. "post": {
  5560. "consumes": [
  5561. "application/json"
  5562. ],
  5563. "produces": [
  5564. "application/json"
  5565. ],
  5566. "tags": [
  5567. "issue"
  5568. ],
  5569. "summary": "Stop an issue's existing stopwatch.",
  5570. "operationId": "issueStopStopWatch",
  5571. "parameters": [
  5572. {
  5573. "type": "string",
  5574. "description": "owner of the repo",
  5575. "name": "owner",
  5576. "in": "path",
  5577. "required": true
  5578. },
  5579. {
  5580. "type": "string",
  5581. "description": "name of the repo",
  5582. "name": "repo",
  5583. "in": "path",
  5584. "required": true
  5585. },
  5586. {
  5587. "type": "integer",
  5588. "format": "int64",
  5589. "description": "index of the issue to stop the stopwatch on",
  5590. "name": "index",
  5591. "in": "path",
  5592. "required": true
  5593. }
  5594. ],
  5595. "responses": {
  5596. "201": {
  5597. "$ref": "#/responses/empty"
  5598. },
  5599. "403": {
  5600. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5601. },
  5602. "404": {
  5603. "$ref": "#/responses/notFound"
  5604. },
  5605. "409": {
  5606. "description": "Cannot stop a non existent stopwatch"
  5607. }
  5608. }
  5609. }
  5610. },
  5611. "/repos/{owner}/{repo}/issues/{index}/subscriptions": {
  5612. "get": {
  5613. "consumes": [
  5614. "application/json"
  5615. ],
  5616. "produces": [
  5617. "application/json"
  5618. ],
  5619. "tags": [
  5620. "issue"
  5621. ],
  5622. "summary": "Get users who subscribed on an issue.",
  5623. "operationId": "issueSubscriptions",
  5624. "parameters": [
  5625. {
  5626. "type": "string",
  5627. "description": "owner of the repo",
  5628. "name": "owner",
  5629. "in": "path",
  5630. "required": true
  5631. },
  5632. {
  5633. "type": "string",
  5634. "description": "name of the repo",
  5635. "name": "repo",
  5636. "in": "path",
  5637. "required": true
  5638. },
  5639. {
  5640. "type": "integer",
  5641. "format": "int64",
  5642. "description": "index of the issue",
  5643. "name": "index",
  5644. "in": "path",
  5645. "required": true
  5646. },
  5647. {
  5648. "type": "integer",
  5649. "description": "page number of results to return (1-based)",
  5650. "name": "page",
  5651. "in": "query"
  5652. },
  5653. {
  5654. "type": "integer",
  5655. "description": "page size of results",
  5656. "name": "limit",
  5657. "in": "query"
  5658. }
  5659. ],
  5660. "responses": {
  5661. "200": {
  5662. "$ref": "#/responses/UserList"
  5663. },
  5664. "404": {
  5665. "$ref": "#/responses/notFound"
  5666. }
  5667. }
  5668. }
  5669. },
  5670. "/repos/{owner}/{repo}/issues/{index}/subscriptions/check": {
  5671. "get": {
  5672. "consumes": [
  5673. "application/json"
  5674. ],
  5675. "produces": [
  5676. "application/json"
  5677. ],
  5678. "tags": [
  5679. "issue"
  5680. ],
  5681. "summary": "Check if user is subscribed to an issue",
  5682. "operationId": "issueCheckSubscription",
  5683. "parameters": [
  5684. {
  5685. "type": "string",
  5686. "description": "owner of the repo",
  5687. "name": "owner",
  5688. "in": "path",
  5689. "required": true
  5690. },
  5691. {
  5692. "type": "string",
  5693. "description": "name of the repo",
  5694. "name": "repo",
  5695. "in": "path",
  5696. "required": true
  5697. },
  5698. {
  5699. "type": "integer",
  5700. "format": "int64",
  5701. "description": "index of the issue",
  5702. "name": "index",
  5703. "in": "path",
  5704. "required": true
  5705. }
  5706. ],
  5707. "responses": {
  5708. "200": {
  5709. "$ref": "#/responses/WatchInfo"
  5710. },
  5711. "404": {
  5712. "$ref": "#/responses/notFound"
  5713. }
  5714. }
  5715. }
  5716. },
  5717. "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}": {
  5718. "put": {
  5719. "consumes": [
  5720. "application/json"
  5721. ],
  5722. "produces": [
  5723. "application/json"
  5724. ],
  5725. "tags": [
  5726. "issue"
  5727. ],
  5728. "summary": "Subscribe user to issue",
  5729. "operationId": "issueAddSubscription",
  5730. "parameters": [
  5731. {
  5732. "type": "string",
  5733. "description": "owner of the repo",
  5734. "name": "owner",
  5735. "in": "path",
  5736. "required": true
  5737. },
  5738. {
  5739. "type": "string",
  5740. "description": "name of the repo",
  5741. "name": "repo",
  5742. "in": "path",
  5743. "required": true
  5744. },
  5745. {
  5746. "type": "integer",
  5747. "format": "int64",
  5748. "description": "index of the issue",
  5749. "name": "index",
  5750. "in": "path",
  5751. "required": true
  5752. },
  5753. {
  5754. "type": "string",
  5755. "description": "user to subscribe",
  5756. "name": "user",
  5757. "in": "path",
  5758. "required": true
  5759. }
  5760. ],
  5761. "responses": {
  5762. "200": {
  5763. "description": "Already subscribed"
  5764. },
  5765. "201": {
  5766. "description": "Successfully Subscribed"
  5767. },
  5768. "304": {
  5769. "description": "User can only subscribe itself if he is no admin"
  5770. },
  5771. "404": {
  5772. "$ref": "#/responses/notFound"
  5773. }
  5774. }
  5775. },
  5776. "delete": {
  5777. "consumes": [
  5778. "application/json"
  5779. ],
  5780. "produces": [
  5781. "application/json"
  5782. ],
  5783. "tags": [
  5784. "issue"
  5785. ],
  5786. "summary": "Unsubscribe user from issue",
  5787. "operationId": "issueDeleteSubscription",
  5788. "parameters": [
  5789. {
  5790. "type": "string",
  5791. "description": "owner of the repo",
  5792. "name": "owner",
  5793. "in": "path",
  5794. "required": true
  5795. },
  5796. {
  5797. "type": "string",
  5798. "description": "name of the repo",
  5799. "name": "repo",
  5800. "in": "path",
  5801. "required": true
  5802. },
  5803. {
  5804. "type": "integer",
  5805. "format": "int64",
  5806. "description": "index of the issue",
  5807. "name": "index",
  5808. "in": "path",
  5809. "required": true
  5810. },
  5811. {
  5812. "type": "string",
  5813. "description": "user witch unsubscribe",
  5814. "name": "user",
  5815. "in": "path",
  5816. "required": true
  5817. }
  5818. ],
  5819. "responses": {
  5820. "200": {
  5821. "description": "Already unsubscribed"
  5822. },
  5823. "201": {
  5824. "description": "Successfully Unsubscribed"
  5825. },
  5826. "304": {
  5827. "description": "User can only subscribe itself if he is no admin"
  5828. },
  5829. "404": {
  5830. "$ref": "#/responses/notFound"
  5831. }
  5832. }
  5833. }
  5834. },
  5835. "/repos/{owner}/{repo}/issues/{index}/times": {
  5836. "get": {
  5837. "produces": [
  5838. "application/json"
  5839. ],
  5840. "tags": [
  5841. "issue"
  5842. ],
  5843. "summary": "List an issue's tracked times",
  5844. "operationId": "issueTrackedTimes",
  5845. "parameters": [
  5846. {
  5847. "type": "string",
  5848. "description": "owner of the repo",
  5849. "name": "owner",
  5850. "in": "path",
  5851. "required": true
  5852. },
  5853. {
  5854. "type": "string",
  5855. "description": "name of the repo",
  5856. "name": "repo",
  5857. "in": "path",
  5858. "required": true
  5859. },
  5860. {
  5861. "type": "integer",
  5862. "format": "int64",
  5863. "description": "index of the issue",
  5864. "name": "index",
  5865. "in": "path",
  5866. "required": true
  5867. },
  5868. {
  5869. "type": "string",
  5870. "description": "optional filter by user (available for issue managers)",
  5871. "name": "user",
  5872. "in": "query"
  5873. },
  5874. {
  5875. "type": "string",
  5876. "format": "date-time",
  5877. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  5878. "name": "since",
  5879. "in": "query"
  5880. },
  5881. {
  5882. "type": "string",
  5883. "format": "date-time",
  5884. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  5885. "name": "before",
  5886. "in": "query"
  5887. },
  5888. {
  5889. "type": "integer",
  5890. "description": "page number of results to return (1-based)",
  5891. "name": "page",
  5892. "in": "query"
  5893. },
  5894. {
  5895. "type": "integer",
  5896. "description": "page size of results",
  5897. "name": "limit",
  5898. "in": "query"
  5899. }
  5900. ],
  5901. "responses": {
  5902. "200": {
  5903. "$ref": "#/responses/TrackedTimeList"
  5904. },
  5905. "404": {
  5906. "$ref": "#/responses/notFound"
  5907. }
  5908. }
  5909. },
  5910. "post": {
  5911. "consumes": [
  5912. "application/json"
  5913. ],
  5914. "produces": [
  5915. "application/json"
  5916. ],
  5917. "tags": [
  5918. "issue"
  5919. ],
  5920. "summary": "Add tracked time to a issue",
  5921. "operationId": "issueAddTime",
  5922. "parameters": [
  5923. {
  5924. "type": "string",
  5925. "description": "owner of the repo",
  5926. "name": "owner",
  5927. "in": "path",
  5928. "required": true
  5929. },
  5930. {
  5931. "type": "string",
  5932. "description": "name of the repo",
  5933. "name": "repo",
  5934. "in": "path",
  5935. "required": true
  5936. },
  5937. {
  5938. "type": "integer",
  5939. "format": "int64",
  5940. "description": "index of the issue",
  5941. "name": "index",
  5942. "in": "path",
  5943. "required": true
  5944. },
  5945. {
  5946. "name": "body",
  5947. "in": "body",
  5948. "schema": {
  5949. "$ref": "#/definitions/AddTimeOption"
  5950. }
  5951. }
  5952. ],
  5953. "responses": {
  5954. "200": {
  5955. "$ref": "#/responses/TrackedTime"
  5956. },
  5957. "400": {
  5958. "$ref": "#/responses/error"
  5959. },
  5960. "403": {
  5961. "$ref": "#/responses/forbidden"
  5962. }
  5963. }
  5964. },
  5965. "delete": {
  5966. "consumes": [
  5967. "application/json"
  5968. ],
  5969. "produces": [
  5970. "application/json"
  5971. ],
  5972. "tags": [
  5973. "issue"
  5974. ],
  5975. "summary": "Reset a tracked time of an issue",
  5976. "operationId": "issueResetTime",
  5977. "parameters": [
  5978. {
  5979. "type": "string",
  5980. "description": "owner of the repo",
  5981. "name": "owner",
  5982. "in": "path",
  5983. "required": true
  5984. },
  5985. {
  5986. "type": "string",
  5987. "description": "name of the repo",
  5988. "name": "repo",
  5989. "in": "path",
  5990. "required": true
  5991. },
  5992. {
  5993. "type": "integer",
  5994. "format": "int64",
  5995. "description": "index of the issue to add tracked time to",
  5996. "name": "index",
  5997. "in": "path",
  5998. "required": true
  5999. }
  6000. ],
  6001. "responses": {
  6002. "204": {
  6003. "$ref": "#/responses/empty"
  6004. },
  6005. "400": {
  6006. "$ref": "#/responses/error"
  6007. },
  6008. "403": {
  6009. "$ref": "#/responses/forbidden"
  6010. }
  6011. }
  6012. }
  6013. },
  6014. "/repos/{owner}/{repo}/issues/{index}/times/{id}": {
  6015. "delete": {
  6016. "consumes": [
  6017. "application/json"
  6018. ],
  6019. "produces": [
  6020. "application/json"
  6021. ],
  6022. "tags": [
  6023. "issue"
  6024. ],
  6025. "summary": "Delete specific tracked time",
  6026. "operationId": "issueDeleteTime",
  6027. "parameters": [
  6028. {
  6029. "type": "string",
  6030. "description": "owner of the repo",
  6031. "name": "owner",
  6032. "in": "path",
  6033. "required": true
  6034. },
  6035. {
  6036. "type": "string",
  6037. "description": "name of the repo",
  6038. "name": "repo",
  6039. "in": "path",
  6040. "required": true
  6041. },
  6042. {
  6043. "type": "integer",
  6044. "format": "int64",
  6045. "description": "index of the issue",
  6046. "name": "index",
  6047. "in": "path",
  6048. "required": true
  6049. },
  6050. {
  6051. "type": "integer",
  6052. "format": "int64",
  6053. "description": "id of time to delete",
  6054. "name": "id",
  6055. "in": "path",
  6056. "required": true
  6057. }
  6058. ],
  6059. "responses": {
  6060. "204": {
  6061. "$ref": "#/responses/empty"
  6062. },
  6063. "400": {
  6064. "$ref": "#/responses/error"
  6065. },
  6066. "403": {
  6067. "$ref": "#/responses/forbidden"
  6068. }
  6069. }
  6070. }
  6071. },
  6072. "/repos/{owner}/{repo}/keys": {
  6073. "get": {
  6074. "produces": [
  6075. "application/json"
  6076. ],
  6077. "tags": [
  6078. "repository"
  6079. ],
  6080. "summary": "List a repository's keys",
  6081. "operationId": "repoListKeys",
  6082. "parameters": [
  6083. {
  6084. "type": "string",
  6085. "description": "owner of the repo",
  6086. "name": "owner",
  6087. "in": "path",
  6088. "required": true
  6089. },
  6090. {
  6091. "type": "string",
  6092. "description": "name of the repo",
  6093. "name": "repo",
  6094. "in": "path",
  6095. "required": true
  6096. },
  6097. {
  6098. "type": "integer",
  6099. "description": "the key_id to search for",
  6100. "name": "key_id",
  6101. "in": "query"
  6102. },
  6103. {
  6104. "type": "string",
  6105. "description": "fingerprint of the key",
  6106. "name": "fingerprint",
  6107. "in": "query"
  6108. },
  6109. {
  6110. "type": "integer",
  6111. "description": "page number of results to return (1-based)",
  6112. "name": "page",
  6113. "in": "query"
  6114. },
  6115. {
  6116. "type": "integer",
  6117. "description": "page size of results",
  6118. "name": "limit",
  6119. "in": "query"
  6120. }
  6121. ],
  6122. "responses": {
  6123. "200": {
  6124. "$ref": "#/responses/DeployKeyList"
  6125. }
  6126. }
  6127. },
  6128. "post": {
  6129. "consumes": [
  6130. "application/json"
  6131. ],
  6132. "produces": [
  6133. "application/json"
  6134. ],
  6135. "tags": [
  6136. "repository"
  6137. ],
  6138. "summary": "Add a key to a repository",
  6139. "operationId": "repoCreateKey",
  6140. "parameters": [
  6141. {
  6142. "type": "string",
  6143. "description": "owner of the repo",
  6144. "name": "owner",
  6145. "in": "path",
  6146. "required": true
  6147. },
  6148. {
  6149. "type": "string",
  6150. "description": "name of the repo",
  6151. "name": "repo",
  6152. "in": "path",
  6153. "required": true
  6154. },
  6155. {
  6156. "name": "body",
  6157. "in": "body",
  6158. "schema": {
  6159. "$ref": "#/definitions/CreateKeyOption"
  6160. }
  6161. }
  6162. ],
  6163. "responses": {
  6164. "201": {
  6165. "$ref": "#/responses/DeployKey"
  6166. },
  6167. "422": {
  6168. "$ref": "#/responses/validationError"
  6169. }
  6170. }
  6171. }
  6172. },
  6173. "/repos/{owner}/{repo}/keys/{id}": {
  6174. "get": {
  6175. "produces": [
  6176. "application/json"
  6177. ],
  6178. "tags": [
  6179. "repository"
  6180. ],
  6181. "summary": "Get a repository's key by id",
  6182. "operationId": "repoGetKey",
  6183. "parameters": [
  6184. {
  6185. "type": "string",
  6186. "description": "owner of the repo",
  6187. "name": "owner",
  6188. "in": "path",
  6189. "required": true
  6190. },
  6191. {
  6192. "type": "string",
  6193. "description": "name of the repo",
  6194. "name": "repo",
  6195. "in": "path",
  6196. "required": true
  6197. },
  6198. {
  6199. "type": "integer",
  6200. "format": "int64",
  6201. "description": "id of the key to get",
  6202. "name": "id",
  6203. "in": "path",
  6204. "required": true
  6205. }
  6206. ],
  6207. "responses": {
  6208. "200": {
  6209. "$ref": "#/responses/DeployKey"
  6210. }
  6211. }
  6212. },
  6213. "delete": {
  6214. "tags": [
  6215. "repository"
  6216. ],
  6217. "summary": "Delete a key from a repository",
  6218. "operationId": "repoDeleteKey",
  6219. "parameters": [
  6220. {
  6221. "type": "string",
  6222. "description": "owner of the repo",
  6223. "name": "owner",
  6224. "in": "path",
  6225. "required": true
  6226. },
  6227. {
  6228. "type": "string",
  6229. "description": "name of the repo",
  6230. "name": "repo",
  6231. "in": "path",
  6232. "required": true
  6233. },
  6234. {
  6235. "type": "integer",
  6236. "format": "int64",
  6237. "description": "id of the key to delete",
  6238. "name": "id",
  6239. "in": "path",
  6240. "required": true
  6241. }
  6242. ],
  6243. "responses": {
  6244. "204": {
  6245. "$ref": "#/responses/empty"
  6246. },
  6247. "403": {
  6248. "$ref": "#/responses/forbidden"
  6249. }
  6250. }
  6251. }
  6252. },
  6253. "/repos/{owner}/{repo}/labels": {
  6254. "get": {
  6255. "produces": [
  6256. "application/json"
  6257. ],
  6258. "tags": [
  6259. "issue"
  6260. ],
  6261. "summary": "Get all of a repository's labels",
  6262. "operationId": "issueListLabels",
  6263. "parameters": [
  6264. {
  6265. "type": "string",
  6266. "description": "owner of the repo",
  6267. "name": "owner",
  6268. "in": "path",
  6269. "required": true
  6270. },
  6271. {
  6272. "type": "string",
  6273. "description": "name of the repo",
  6274. "name": "repo",
  6275. "in": "path",
  6276. "required": true
  6277. },
  6278. {
  6279. "type": "integer",
  6280. "description": "page number of results to return (1-based)",
  6281. "name": "page",
  6282. "in": "query"
  6283. },
  6284. {
  6285. "type": "integer",
  6286. "description": "page size of results",
  6287. "name": "limit",
  6288. "in": "query"
  6289. }
  6290. ],
  6291. "responses": {
  6292. "200": {
  6293. "$ref": "#/responses/LabelList"
  6294. }
  6295. }
  6296. },
  6297. "post": {
  6298. "consumes": [
  6299. "application/json"
  6300. ],
  6301. "produces": [
  6302. "application/json"
  6303. ],
  6304. "tags": [
  6305. "issue"
  6306. ],
  6307. "summary": "Create a label",
  6308. "operationId": "issueCreateLabel",
  6309. "parameters": [
  6310. {
  6311. "type": "string",
  6312. "description": "owner of the repo",
  6313. "name": "owner",
  6314. "in": "path",
  6315. "required": true
  6316. },
  6317. {
  6318. "type": "string",
  6319. "description": "name of the repo",
  6320. "name": "repo",
  6321. "in": "path",
  6322. "required": true
  6323. },
  6324. {
  6325. "name": "body",
  6326. "in": "body",
  6327. "schema": {
  6328. "$ref": "#/definitions/CreateLabelOption"
  6329. }
  6330. }
  6331. ],
  6332. "responses": {
  6333. "201": {
  6334. "$ref": "#/responses/Label"
  6335. },
  6336. "422": {
  6337. "$ref": "#/responses/validationError"
  6338. }
  6339. }
  6340. }
  6341. },
  6342. "/repos/{owner}/{repo}/labels/{id}": {
  6343. "get": {
  6344. "produces": [
  6345. "application/json"
  6346. ],
  6347. "tags": [
  6348. "issue"
  6349. ],
  6350. "summary": "Get a single label",
  6351. "operationId": "issueGetLabel",
  6352. "parameters": [
  6353. {
  6354. "type": "string",
  6355. "description": "owner of the repo",
  6356. "name": "owner",
  6357. "in": "path",
  6358. "required": true
  6359. },
  6360. {
  6361. "type": "string",
  6362. "description": "name of the repo",
  6363. "name": "repo",
  6364. "in": "path",
  6365. "required": true
  6366. },
  6367. {
  6368. "type": "integer",
  6369. "format": "int64",
  6370. "description": "id of the label to get",
  6371. "name": "id",
  6372. "in": "path",
  6373. "required": true
  6374. }
  6375. ],
  6376. "responses": {
  6377. "200": {
  6378. "$ref": "#/responses/Label"
  6379. }
  6380. }
  6381. },
  6382. "delete": {
  6383. "tags": [
  6384. "issue"
  6385. ],
  6386. "summary": "Delete a label",
  6387. "operationId": "issueDeleteLabel",
  6388. "parameters": [
  6389. {
  6390. "type": "string",
  6391. "description": "owner of the repo",
  6392. "name": "owner",
  6393. "in": "path",
  6394. "required": true
  6395. },
  6396. {
  6397. "type": "string",
  6398. "description": "name of the repo",
  6399. "name": "repo",
  6400. "in": "path",
  6401. "required": true
  6402. },
  6403. {
  6404. "type": "integer",
  6405. "format": "int64",
  6406. "description": "id of the label to delete",
  6407. "name": "id",
  6408. "in": "path",
  6409. "required": true
  6410. }
  6411. ],
  6412. "responses": {
  6413. "204": {
  6414. "$ref": "#/responses/empty"
  6415. }
  6416. }
  6417. },
  6418. "patch": {
  6419. "consumes": [
  6420. "application/json"
  6421. ],
  6422. "produces": [
  6423. "application/json"
  6424. ],
  6425. "tags": [
  6426. "issue"
  6427. ],
  6428. "summary": "Update a label",
  6429. "operationId": "issueEditLabel",
  6430. "parameters": [
  6431. {
  6432. "type": "string",
  6433. "description": "owner of the repo",
  6434. "name": "owner",
  6435. "in": "path",
  6436. "required": true
  6437. },
  6438. {
  6439. "type": "string",
  6440. "description": "name of the repo",
  6441. "name": "repo",
  6442. "in": "path",
  6443. "required": true
  6444. },
  6445. {
  6446. "type": "integer",
  6447. "format": "int64",
  6448. "description": "id of the label to edit",
  6449. "name": "id",
  6450. "in": "path",
  6451. "required": true
  6452. },
  6453. {
  6454. "name": "body",
  6455. "in": "body",
  6456. "schema": {
  6457. "$ref": "#/definitions/EditLabelOption"
  6458. }
  6459. }
  6460. ],
  6461. "responses": {
  6462. "200": {
  6463. "$ref": "#/responses/Label"
  6464. },
  6465. "422": {
  6466. "$ref": "#/responses/validationError"
  6467. }
  6468. }
  6469. }
  6470. },
  6471. "/repos/{owner}/{repo}/languages": {
  6472. "get": {
  6473. "produces": [
  6474. "application/json"
  6475. ],
  6476. "tags": [
  6477. "repository"
  6478. ],
  6479. "summary": "Get languages and number of bytes of code written",
  6480. "operationId": "repoGetLanguages",
  6481. "parameters": [
  6482. {
  6483. "type": "string",
  6484. "description": "owner of the repo",
  6485. "name": "owner",
  6486. "in": "path",
  6487. "required": true
  6488. },
  6489. {
  6490. "type": "string",
  6491. "description": "name of the repo",
  6492. "name": "repo",
  6493. "in": "path",
  6494. "required": true
  6495. }
  6496. ],
  6497. "responses": {
  6498. "200": {
  6499. "$ref": "#/responses/LanguageStatistics"
  6500. },
  6501. "404": {
  6502. "$ref": "#/responses/notFound"
  6503. }
  6504. }
  6505. }
  6506. },
  6507. "/repos/{owner}/{repo}/milestones": {
  6508. "get": {
  6509. "produces": [
  6510. "application/json"
  6511. ],
  6512. "tags": [
  6513. "issue"
  6514. ],
  6515. "summary": "Get all of a repository's opened milestones",
  6516. "operationId": "issueGetMilestonesList",
  6517. "parameters": [
  6518. {
  6519. "type": "string",
  6520. "description": "owner of the repo",
  6521. "name": "owner",
  6522. "in": "path",
  6523. "required": true
  6524. },
  6525. {
  6526. "type": "string",
  6527. "description": "name of the repo",
  6528. "name": "repo",
  6529. "in": "path",
  6530. "required": true
  6531. },
  6532. {
  6533. "type": "string",
  6534. "description": "Milestone state, Recognised values are open, closed and all. Defaults to \"open\"",
  6535. "name": "state",
  6536. "in": "query"
  6537. },
  6538. {
  6539. "type": "string",
  6540. "description": "filter by milestone name",
  6541. "name": "name",
  6542. "in": "query"
  6543. },
  6544. {
  6545. "type": "integer",
  6546. "description": "page number of results to return (1-based)",
  6547. "name": "page",
  6548. "in": "query"
  6549. },
  6550. {
  6551. "type": "integer",
  6552. "description": "page size of results",
  6553. "name": "limit",
  6554. "in": "query"
  6555. }
  6556. ],
  6557. "responses": {
  6558. "200": {
  6559. "$ref": "#/responses/MilestoneList"
  6560. }
  6561. }
  6562. },
  6563. "post": {
  6564. "consumes": [
  6565. "application/json"
  6566. ],
  6567. "produces": [
  6568. "application/json"
  6569. ],
  6570. "tags": [
  6571. "issue"
  6572. ],
  6573. "summary": "Create a milestone",
  6574. "operationId": "issueCreateMilestone",
  6575. "parameters": [
  6576. {
  6577. "type": "string",
  6578. "description": "owner of the repo",
  6579. "name": "owner",
  6580. "in": "path",
  6581. "required": true
  6582. },
  6583. {
  6584. "type": "string",
  6585. "description": "name of the repo",
  6586. "name": "repo",
  6587. "in": "path",
  6588. "required": true
  6589. },
  6590. {
  6591. "name": "body",
  6592. "in": "body",
  6593. "schema": {
  6594. "$ref": "#/definitions/CreateMilestoneOption"
  6595. }
  6596. }
  6597. ],
  6598. "responses": {
  6599. "201": {
  6600. "$ref": "#/responses/Milestone"
  6601. }
  6602. }
  6603. }
  6604. },
  6605. "/repos/{owner}/{repo}/milestones/{id}": {
  6606. "get": {
  6607. "produces": [
  6608. "application/json"
  6609. ],
  6610. "tags": [
  6611. "issue"
  6612. ],
  6613. "summary": "Get a milestone",
  6614. "operationId": "issueGetMilestone",
  6615. "parameters": [
  6616. {
  6617. "type": "string",
  6618. "description": "owner of the repo",
  6619. "name": "owner",
  6620. "in": "path",
  6621. "required": true
  6622. },
  6623. {
  6624. "type": "string",
  6625. "description": "name of the repo",
  6626. "name": "repo",
  6627. "in": "path",
  6628. "required": true
  6629. },
  6630. {
  6631. "type": "string",
  6632. "description": "the milestone to get, identified by ID and if not available by name",
  6633. "name": "id",
  6634. "in": "path",
  6635. "required": true
  6636. }
  6637. ],
  6638. "responses": {
  6639. "200": {
  6640. "$ref": "#/responses/Milestone"
  6641. }
  6642. }
  6643. },
  6644. "delete": {
  6645. "tags": [
  6646. "issue"
  6647. ],
  6648. "summary": "Delete a milestone",
  6649. "operationId": "issueDeleteMilestone",
  6650. "parameters": [
  6651. {
  6652. "type": "string",
  6653. "description": "owner of the repo",
  6654. "name": "owner",
  6655. "in": "path",
  6656. "required": true
  6657. },
  6658. {
  6659. "type": "string",
  6660. "description": "name of the repo",
  6661. "name": "repo",
  6662. "in": "path",
  6663. "required": true
  6664. },
  6665. {
  6666. "type": "string",
  6667. "description": "the milestone to delete, identified by ID and if not available by name",
  6668. "name": "id",
  6669. "in": "path",
  6670. "required": true
  6671. }
  6672. ],
  6673. "responses": {
  6674. "204": {
  6675. "$ref": "#/responses/empty"
  6676. }
  6677. }
  6678. },
  6679. "patch": {
  6680. "consumes": [
  6681. "application/json"
  6682. ],
  6683. "produces": [
  6684. "application/json"
  6685. ],
  6686. "tags": [
  6687. "issue"
  6688. ],
  6689. "summary": "Update a milestone",
  6690. "operationId": "issueEditMilestone",
  6691. "parameters": [
  6692. {
  6693. "type": "string",
  6694. "description": "owner of the repo",
  6695. "name": "owner",
  6696. "in": "path",
  6697. "required": true
  6698. },
  6699. {
  6700. "type": "string",
  6701. "description": "name of the repo",
  6702. "name": "repo",
  6703. "in": "path",
  6704. "required": true
  6705. },
  6706. {
  6707. "type": "string",
  6708. "description": "the milestone to edit, identified by ID and if not available by name",
  6709. "name": "id",
  6710. "in": "path",
  6711. "required": true
  6712. },
  6713. {
  6714. "name": "body",
  6715. "in": "body",
  6716. "schema": {
  6717. "$ref": "#/definitions/EditMilestoneOption"
  6718. }
  6719. }
  6720. ],
  6721. "responses": {
  6722. "200": {
  6723. "$ref": "#/responses/Milestone"
  6724. }
  6725. }
  6726. }
  6727. },
  6728. "/repos/{owner}/{repo}/mirror-sync": {
  6729. "post": {
  6730. "produces": [
  6731. "application/json"
  6732. ],
  6733. "tags": [
  6734. "repository"
  6735. ],
  6736. "summary": "Sync a mirrored repository",
  6737. "operationId": "repoMirrorSync",
  6738. "parameters": [
  6739. {
  6740. "type": "string",
  6741. "description": "owner of the repo to sync",
  6742. "name": "owner",
  6743. "in": "path",
  6744. "required": true
  6745. },
  6746. {
  6747. "type": "string",
  6748. "description": "name of the repo to sync",
  6749. "name": "repo",
  6750. "in": "path",
  6751. "required": true
  6752. }
  6753. ],
  6754. "responses": {
  6755. "200": {
  6756. "$ref": "#/responses/empty"
  6757. },
  6758. "403": {
  6759. "$ref": "#/responses/forbidden"
  6760. }
  6761. }
  6762. }
  6763. },
  6764. "/repos/{owner}/{repo}/notifications": {
  6765. "get": {
  6766. "consumes": [
  6767. "application/json"
  6768. ],
  6769. "produces": [
  6770. "application/json"
  6771. ],
  6772. "tags": [
  6773. "notification"
  6774. ],
  6775. "summary": "List users's notification threads on a specific repo",
  6776. "operationId": "notifyGetRepoList",
  6777. "parameters": [
  6778. {
  6779. "type": "string",
  6780. "description": "owner of the repo",
  6781. "name": "owner",
  6782. "in": "path",
  6783. "required": true
  6784. },
  6785. {
  6786. "type": "string",
  6787. "description": "name of the repo",
  6788. "name": "repo",
  6789. "in": "path",
  6790. "required": true
  6791. },
  6792. {
  6793. "type": "string",
  6794. "description": "If true, show notifications marked as read. Default value is false",
  6795. "name": "all",
  6796. "in": "query"
  6797. },
  6798. {
  6799. "type": "array",
  6800. "items": {
  6801. "type": "string"
  6802. },
  6803. "collectionFormat": "multi",
  6804. "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned",
  6805. "name": "status-types",
  6806. "in": "query"
  6807. },
  6808. {
  6809. "type": "string",
  6810. "format": "date-time",
  6811. "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
  6812. "name": "since",
  6813. "in": "query"
  6814. },
  6815. {
  6816. "type": "string",
  6817. "format": "date-time",
  6818. "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
  6819. "name": "before",
  6820. "in": "query"
  6821. },
  6822. {
  6823. "type": "integer",
  6824. "description": "page number of results to return (1-based)",
  6825. "name": "page",
  6826. "in": "query"
  6827. },
  6828. {
  6829. "type": "integer",
  6830. "description": "page size of results",
  6831. "name": "limit",
  6832. "in": "query"
  6833. }
  6834. ],
  6835. "responses": {
  6836. "200": {
  6837. "$ref": "#/responses/NotificationThreadList"
  6838. }
  6839. }
  6840. },
  6841. "put": {
  6842. "consumes": [
  6843. "application/json"
  6844. ],
  6845. "produces": [
  6846. "application/json"
  6847. ],
  6848. "tags": [
  6849. "notification"
  6850. ],
  6851. "summary": "Mark notification threads as read, pinned or unread on a specific repo",
  6852. "operationId": "notifyReadRepoList",
  6853. "parameters": [
  6854. {
  6855. "type": "string",
  6856. "description": "owner of the repo",
  6857. "name": "owner",
  6858. "in": "path",
  6859. "required": true
  6860. },
  6861. {
  6862. "type": "string",
  6863. "description": "name of the repo",
  6864. "name": "repo",
  6865. "in": "path",
  6866. "required": true
  6867. },
  6868. {
  6869. "type": "string",
  6870. "description": "If true, mark all notifications on this repo. Default value is false",
  6871. "name": "all",
  6872. "in": "query"
  6873. },
  6874. {
  6875. "type": "array",
  6876. "items": {
  6877. "type": "string"
  6878. },
  6879. "collectionFormat": "multi",
  6880. "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.",
  6881. "name": "status-types",
  6882. "in": "query"
  6883. },
  6884. {
  6885. "type": "string",
  6886. "description": "Status to mark notifications as. Defaults to read.",
  6887. "name": "to-status",
  6888. "in": "query"
  6889. },
  6890. {
  6891. "type": "string",
  6892. "format": "date-time",
  6893. "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
  6894. "name": "last_read_at",
  6895. "in": "query"
  6896. }
  6897. ],
  6898. "responses": {
  6899. "205": {
  6900. "$ref": "#/responses/empty"
  6901. }
  6902. }
  6903. }
  6904. },
  6905. "/repos/{owner}/{repo}/pulls": {
  6906. "get": {
  6907. "produces": [
  6908. "application/json"
  6909. ],
  6910. "tags": [
  6911. "repository"
  6912. ],
  6913. "summary": "List a repo's pull requests",
  6914. "operationId": "repoListPullRequests",
  6915. "parameters": [
  6916. {
  6917. "type": "string",
  6918. "description": "owner of the repo",
  6919. "name": "owner",
  6920. "in": "path",
  6921. "required": true
  6922. },
  6923. {
  6924. "type": "string",
  6925. "description": "name of the repo",
  6926. "name": "repo",
  6927. "in": "path",
  6928. "required": true
  6929. },
  6930. {
  6931. "enum": [
  6932. "closed",
  6933. "open",
  6934. "all"
  6935. ],
  6936. "type": "string",
  6937. "description": "State of pull request: open or closed (optional)",
  6938. "name": "state",
  6939. "in": "query"
  6940. },
  6941. {
  6942. "enum": [
  6943. "oldest",
  6944. "recentupdate",
  6945. "leastupdate",
  6946. "mostcomment",
  6947. "leastcomment",
  6948. "priority"
  6949. ],
  6950. "type": "string",
  6951. "description": "Type of sort",
  6952. "name": "sort",
  6953. "in": "query"
  6954. },
  6955. {
  6956. "type": "integer",
  6957. "format": "int64",
  6958. "description": "ID of the milestone",
  6959. "name": "milestone",
  6960. "in": "query"
  6961. },
  6962. {
  6963. "type": "array",
  6964. "items": {
  6965. "type": "integer",
  6966. "format": "int64"
  6967. },
  6968. "collectionFormat": "multi",
  6969. "description": "Label IDs",
  6970. "name": "labels",
  6971. "in": "query"
  6972. },
  6973. {
  6974. "type": "integer",
  6975. "description": "page number of results to return (1-based)",
  6976. "name": "page",
  6977. "in": "query"
  6978. },
  6979. {
  6980. "type": "integer",
  6981. "description": "page size of results",
  6982. "name": "limit",
  6983. "in": "query"
  6984. }
  6985. ],
  6986. "responses": {
  6987. "200": {
  6988. "$ref": "#/responses/PullRequestList"
  6989. }
  6990. }
  6991. },
  6992. "post": {
  6993. "consumes": [
  6994. "application/json"
  6995. ],
  6996. "produces": [
  6997. "application/json"
  6998. ],
  6999. "tags": [
  7000. "repository"
  7001. ],
  7002. "summary": "Create a pull request",
  7003. "operationId": "repoCreatePullRequest",
  7004. "parameters": [
  7005. {
  7006. "type": "string",
  7007. "description": "owner of the repo",
  7008. "name": "owner",
  7009. "in": "path",
  7010. "required": true
  7011. },
  7012. {
  7013. "type": "string",
  7014. "description": "name of the repo",
  7015. "name": "repo",
  7016. "in": "path",
  7017. "required": true
  7018. },
  7019. {
  7020. "name": "body",
  7021. "in": "body",
  7022. "schema": {
  7023. "$ref": "#/definitions/CreatePullRequestOption"
  7024. }
  7025. }
  7026. ],
  7027. "responses": {
  7028. "201": {
  7029. "$ref": "#/responses/PullRequest"
  7030. },
  7031. "409": {
  7032. "$ref": "#/responses/error"
  7033. },
  7034. "422": {
  7035. "$ref": "#/responses/validationError"
  7036. }
  7037. }
  7038. }
  7039. },
  7040. "/repos/{owner}/{repo}/pulls/{index}": {
  7041. "get": {
  7042. "produces": [
  7043. "application/json"
  7044. ],
  7045. "tags": [
  7046. "repository"
  7047. ],
  7048. "summary": "Get a pull request",
  7049. "operationId": "repoGetPullRequest",
  7050. "parameters": [
  7051. {
  7052. "type": "string",
  7053. "description": "owner of the repo",
  7054. "name": "owner",
  7055. "in": "path",
  7056. "required": true
  7057. },
  7058. {
  7059. "type": "string",
  7060. "description": "name of the repo",
  7061. "name": "repo",
  7062. "in": "path",
  7063. "required": true
  7064. },
  7065. {
  7066. "type": "integer",
  7067. "format": "int64",
  7068. "description": "index of the pull request to get",
  7069. "name": "index",
  7070. "in": "path",
  7071. "required": true
  7072. }
  7073. ],
  7074. "responses": {
  7075. "200": {
  7076. "$ref": "#/responses/PullRequest"
  7077. },
  7078. "404": {
  7079. "$ref": "#/responses/notFound"
  7080. }
  7081. }
  7082. },
  7083. "patch": {
  7084. "consumes": [
  7085. "application/json"
  7086. ],
  7087. "produces": [
  7088. "application/json"
  7089. ],
  7090. "tags": [
  7091. "repository"
  7092. ],
  7093. "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.",
  7094. "operationId": "repoEditPullRequest",
  7095. "parameters": [
  7096. {
  7097. "type": "string",
  7098. "description": "owner of the repo",
  7099. "name": "owner",
  7100. "in": "path",
  7101. "required": true
  7102. },
  7103. {
  7104. "type": "string",
  7105. "description": "name of the repo",
  7106. "name": "repo",
  7107. "in": "path",
  7108. "required": true
  7109. },
  7110. {
  7111. "type": "integer",
  7112. "format": "int64",
  7113. "description": "index of the pull request to edit",
  7114. "name": "index",
  7115. "in": "path",
  7116. "required": true
  7117. },
  7118. {
  7119. "name": "body",
  7120. "in": "body",
  7121. "schema": {
  7122. "$ref": "#/definitions/EditPullRequestOption"
  7123. }
  7124. }
  7125. ],
  7126. "responses": {
  7127. "201": {
  7128. "$ref": "#/responses/PullRequest"
  7129. },
  7130. "403": {
  7131. "$ref": "#/responses/forbidden"
  7132. },
  7133. "409": {
  7134. "$ref": "#/responses/error"
  7135. },
  7136. "412": {
  7137. "$ref": "#/responses/error"
  7138. },
  7139. "422": {
  7140. "$ref": "#/responses/validationError"
  7141. }
  7142. }
  7143. }
  7144. },
  7145. "/repos/{owner}/{repo}/pulls/{index}.diff": {
  7146. "get": {
  7147. "produces": [
  7148. "text/plain"
  7149. ],
  7150. "tags": [
  7151. "repository"
  7152. ],
  7153. "summary": "Get a pull request diff",
  7154. "operationId": "repoDownloadPullDiff",
  7155. "parameters": [
  7156. {
  7157. "type": "string",
  7158. "description": "owner of the repo",
  7159. "name": "owner",
  7160. "in": "path",
  7161. "required": true
  7162. },
  7163. {
  7164. "type": "string",
  7165. "description": "name of the repo",
  7166. "name": "repo",
  7167. "in": "path",
  7168. "required": true
  7169. },
  7170. {
  7171. "type": "integer",
  7172. "format": "int64",
  7173. "description": "index of the pull request to get",
  7174. "name": "index",
  7175. "in": "path",
  7176. "required": true
  7177. }
  7178. ],
  7179. "responses": {
  7180. "200": {
  7181. "$ref": "#/responses/string"
  7182. },
  7183. "404": {
  7184. "$ref": "#/responses/notFound"
  7185. }
  7186. }
  7187. }
  7188. },
  7189. "/repos/{owner}/{repo}/pulls/{index}.patch": {
  7190. "get": {
  7191. "produces": [
  7192. "text/plain"
  7193. ],
  7194. "tags": [
  7195. "repository"
  7196. ],
  7197. "summary": "Get a pull request patch file",
  7198. "operationId": "repoDownloadPullPatch",
  7199. "parameters": [
  7200. {
  7201. "type": "string",
  7202. "description": "owner of the repo",
  7203. "name": "owner",
  7204. "in": "path",
  7205. "required": true
  7206. },
  7207. {
  7208. "type": "string",
  7209. "description": "name of the repo",
  7210. "name": "repo",
  7211. "in": "path",
  7212. "required": true
  7213. },
  7214. {
  7215. "type": "integer",
  7216. "format": "int64",
  7217. "description": "index of the pull request to get",
  7218. "name": "index",
  7219. "in": "path",
  7220. "required": true
  7221. }
  7222. ],
  7223. "responses": {
  7224. "200": {
  7225. "$ref": "#/responses/string"
  7226. },
  7227. "404": {
  7228. "$ref": "#/responses/notFound"
  7229. }
  7230. }
  7231. }
  7232. },
  7233. "/repos/{owner}/{repo}/pulls/{index}/merge": {
  7234. "get": {
  7235. "produces": [
  7236. "application/json"
  7237. ],
  7238. "tags": [
  7239. "repository"
  7240. ],
  7241. "summary": "Check if a pull request has been merged",
  7242. "operationId": "repoPullRequestIsMerged",
  7243. "parameters": [
  7244. {
  7245. "type": "string",
  7246. "description": "owner of the repo",
  7247. "name": "owner",
  7248. "in": "path",
  7249. "required": true
  7250. },
  7251. {
  7252. "type": "string",
  7253. "description": "name of the repo",
  7254. "name": "repo",
  7255. "in": "path",
  7256. "required": true
  7257. },
  7258. {
  7259. "type": "integer",
  7260. "format": "int64",
  7261. "description": "index of the pull request",
  7262. "name": "index",
  7263. "in": "path",
  7264. "required": true
  7265. }
  7266. ],
  7267. "responses": {
  7268. "204": {
  7269. "description": "pull request has been merged"
  7270. },
  7271. "404": {
  7272. "description": "pull request has not been merged"
  7273. }
  7274. }
  7275. },
  7276. "post": {
  7277. "produces": [
  7278. "application/json"
  7279. ],
  7280. "tags": [
  7281. "repository"
  7282. ],
  7283. "summary": "Merge a pull request",
  7284. "operationId": "repoMergePullRequest",
  7285. "parameters": [
  7286. {
  7287. "type": "string",
  7288. "description": "owner of the repo",
  7289. "name": "owner",
  7290. "in": "path",
  7291. "required": true
  7292. },
  7293. {
  7294. "type": "string",
  7295. "description": "name of the repo",
  7296. "name": "repo",
  7297. "in": "path",
  7298. "required": true
  7299. },
  7300. {
  7301. "type": "integer",
  7302. "format": "int64",
  7303. "description": "index of the pull request to merge",
  7304. "name": "index",
  7305. "in": "path",
  7306. "required": true
  7307. },
  7308. {
  7309. "name": "body",
  7310. "in": "body",
  7311. "schema": {
  7312. "$ref": "#/definitions/MergePullRequestOption"
  7313. }
  7314. }
  7315. ],
  7316. "responses": {
  7317. "200": {
  7318. "$ref": "#/responses/empty"
  7319. },
  7320. "405": {
  7321. "$ref": "#/responses/empty"
  7322. },
  7323. "409": {
  7324. "$ref": "#/responses/error"
  7325. }
  7326. }
  7327. }
  7328. },
  7329. "/repos/{owner}/{repo}/pulls/{index}/requested_reviewers": {
  7330. "post": {
  7331. "produces": [
  7332. "application/json"
  7333. ],
  7334. "tags": [
  7335. "repository"
  7336. ],
  7337. "summary": "create review requests for a pull request",
  7338. "operationId": "repoCreatePullReviewRequests",
  7339. "parameters": [
  7340. {
  7341. "type": "string",
  7342. "description": "owner of the repo",
  7343. "name": "owner",
  7344. "in": "path",
  7345. "required": true
  7346. },
  7347. {
  7348. "type": "string",
  7349. "description": "name of the repo",
  7350. "name": "repo",
  7351. "in": "path",
  7352. "required": true
  7353. },
  7354. {
  7355. "type": "integer",
  7356. "format": "int64",
  7357. "description": "index of the pull request",
  7358. "name": "index",
  7359. "in": "path",
  7360. "required": true
  7361. },
  7362. {
  7363. "name": "body",
  7364. "in": "body",
  7365. "required": true,
  7366. "schema": {
  7367. "$ref": "#/definitions/PullReviewRequestOptions"
  7368. }
  7369. }
  7370. ],
  7371. "responses": {
  7372. "201": {
  7373. "$ref": "#/responses/PullReviewList"
  7374. },
  7375. "404": {
  7376. "$ref": "#/responses/notFound"
  7377. },
  7378. "422": {
  7379. "$ref": "#/responses/validationError"
  7380. }
  7381. }
  7382. },
  7383. "delete": {
  7384. "produces": [
  7385. "application/json"
  7386. ],
  7387. "tags": [
  7388. "repository"
  7389. ],
  7390. "summary": "cancel review requests for a pull request",
  7391. "operationId": "repoDeletePullReviewRequests",
  7392. "parameters": [
  7393. {
  7394. "type": "string",
  7395. "description": "owner of the repo",
  7396. "name": "owner",
  7397. "in": "path",
  7398. "required": true
  7399. },
  7400. {
  7401. "type": "string",
  7402. "description": "name of the repo",
  7403. "name": "repo",
  7404. "in": "path",
  7405. "required": true
  7406. },
  7407. {
  7408. "type": "integer",
  7409. "format": "int64",
  7410. "description": "index of the pull request",
  7411. "name": "index",
  7412. "in": "path",
  7413. "required": true
  7414. },
  7415. {
  7416. "name": "body",
  7417. "in": "body",
  7418. "required": true,
  7419. "schema": {
  7420. "$ref": "#/definitions/PullReviewRequestOptions"
  7421. }
  7422. }
  7423. ],
  7424. "responses": {
  7425. "204": {
  7426. "$ref": "#/responses/empty"
  7427. },
  7428. "404": {
  7429. "$ref": "#/responses/notFound"
  7430. },
  7431. "422": {
  7432. "$ref": "#/responses/validationError"
  7433. }
  7434. }
  7435. }
  7436. },
  7437. "/repos/{owner}/{repo}/pulls/{index}/reviews": {
  7438. "get": {
  7439. "produces": [
  7440. "application/json"
  7441. ],
  7442. "tags": [
  7443. "repository"
  7444. ],
  7445. "summary": "List all reviews for a pull request",
  7446. "operationId": "repoListPullReviews",
  7447. "parameters": [
  7448. {
  7449. "type": "string",
  7450. "description": "owner of the repo",
  7451. "name": "owner",
  7452. "in": "path",
  7453. "required": true
  7454. },
  7455. {
  7456. "type": "string",
  7457. "description": "name of the repo",
  7458. "name": "repo",
  7459. "in": "path",
  7460. "required": true
  7461. },
  7462. {
  7463. "type": "integer",
  7464. "format": "int64",
  7465. "description": "index of the pull request",
  7466. "name": "index",
  7467. "in": "path",
  7468. "required": true
  7469. },
  7470. {
  7471. "type": "integer",
  7472. "description": "page number of results to return (1-based)",
  7473. "name": "page",
  7474. "in": "query"
  7475. },
  7476. {
  7477. "type": "integer",
  7478. "description": "page size of results",
  7479. "name": "limit",
  7480. "in": "query"
  7481. }
  7482. ],
  7483. "responses": {
  7484. "200": {
  7485. "$ref": "#/responses/PullReviewList"
  7486. },
  7487. "404": {
  7488. "$ref": "#/responses/notFound"
  7489. }
  7490. }
  7491. },
  7492. "post": {
  7493. "produces": [
  7494. "application/json"
  7495. ],
  7496. "tags": [
  7497. "repository"
  7498. ],
  7499. "summary": "Create a review to an pull request",
  7500. "operationId": "repoCreatePullReview",
  7501. "parameters": [
  7502. {
  7503. "type": "string",
  7504. "description": "owner of the repo",
  7505. "name": "owner",
  7506. "in": "path",
  7507. "required": true
  7508. },
  7509. {
  7510. "type": "string",
  7511. "description": "name of the repo",
  7512. "name": "repo",
  7513. "in": "path",
  7514. "required": true
  7515. },
  7516. {
  7517. "type": "integer",
  7518. "format": "int64",
  7519. "description": "index of the pull request",
  7520. "name": "index",
  7521. "in": "path",
  7522. "required": true
  7523. },
  7524. {
  7525. "name": "body",
  7526. "in": "body",
  7527. "required": true,
  7528. "schema": {
  7529. "$ref": "#/definitions/CreatePullReviewOptions"
  7530. }
  7531. }
  7532. ],
  7533. "responses": {
  7534. "200": {
  7535. "$ref": "#/responses/PullReview"
  7536. },
  7537. "404": {
  7538. "$ref": "#/responses/notFound"
  7539. },
  7540. "422": {
  7541. "$ref": "#/responses/validationError"
  7542. }
  7543. }
  7544. }
  7545. },
  7546. "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}": {
  7547. "get": {
  7548. "produces": [
  7549. "application/json"
  7550. ],
  7551. "tags": [
  7552. "repository"
  7553. ],
  7554. "summary": "Get a specific review for a pull request",
  7555. "operationId": "repoGetPullReview",
  7556. "parameters": [
  7557. {
  7558. "type": "string",
  7559. "description": "owner of the repo",
  7560. "name": "owner",
  7561. "in": "path",
  7562. "required": true
  7563. },
  7564. {
  7565. "type": "string",
  7566. "description": "name of the repo",
  7567. "name": "repo",
  7568. "in": "path",
  7569. "required": true
  7570. },
  7571. {
  7572. "type": "integer",
  7573. "format": "int64",
  7574. "description": "index of the pull request",
  7575. "name": "index",
  7576. "in": "path",
  7577. "required": true
  7578. },
  7579. {
  7580. "type": "integer",
  7581. "format": "int64",
  7582. "description": "id of the review",
  7583. "name": "id",
  7584. "in": "path",
  7585. "required": true
  7586. }
  7587. ],
  7588. "responses": {
  7589. "200": {
  7590. "$ref": "#/responses/PullReview"
  7591. },
  7592. "404": {
  7593. "$ref": "#/responses/notFound"
  7594. }
  7595. }
  7596. },
  7597. "post": {
  7598. "produces": [
  7599. "application/json"
  7600. ],
  7601. "tags": [
  7602. "repository"
  7603. ],
  7604. "summary": "Submit a pending review to an pull request",
  7605. "operationId": "repoSubmitPullReview",
  7606. "parameters": [
  7607. {
  7608. "type": "string",
  7609. "description": "owner of the repo",
  7610. "name": "owner",
  7611. "in": "path",
  7612. "required": true
  7613. },
  7614. {
  7615. "type": "string",
  7616. "description": "name of the repo",
  7617. "name": "repo",
  7618. "in": "path",
  7619. "required": true
  7620. },
  7621. {
  7622. "type": "integer",
  7623. "format": "int64",
  7624. "description": "index of the pull request",
  7625. "name": "index",
  7626. "in": "path",
  7627. "required": true
  7628. },
  7629. {
  7630. "type": "integer",
  7631. "format": "int64",
  7632. "description": "id of the review",
  7633. "name": "id",
  7634. "in": "path",
  7635. "required": true
  7636. },
  7637. {
  7638. "name": "body",
  7639. "in": "body",
  7640. "required": true,
  7641. "schema": {
  7642. "$ref": "#/definitions/SubmitPullReviewOptions"
  7643. }
  7644. }
  7645. ],
  7646. "responses": {
  7647. "200": {
  7648. "$ref": "#/responses/PullReview"
  7649. },
  7650. "404": {
  7651. "$ref": "#/responses/notFound"
  7652. },
  7653. "422": {
  7654. "$ref": "#/responses/validationError"
  7655. }
  7656. }
  7657. },
  7658. "delete": {
  7659. "produces": [
  7660. "application/json"
  7661. ],
  7662. "tags": [
  7663. "repository"
  7664. ],
  7665. "summary": "Delete a specific review from a pull request",
  7666. "operationId": "repoDeletePullReview",
  7667. "parameters": [
  7668. {
  7669. "type": "string",
  7670. "description": "owner of the repo",
  7671. "name": "owner",
  7672. "in": "path",
  7673. "required": true
  7674. },
  7675. {
  7676. "type": "string",
  7677. "description": "name of the repo",
  7678. "name": "repo",
  7679. "in": "path",
  7680. "required": true
  7681. },
  7682. {
  7683. "type": "integer",
  7684. "format": "int64",
  7685. "description": "index of the pull request",
  7686. "name": "index",
  7687. "in": "path",
  7688. "required": true
  7689. },
  7690. {
  7691. "type": "integer",
  7692. "format": "int64",
  7693. "description": "id of the review",
  7694. "name": "id",
  7695. "in": "path",
  7696. "required": true
  7697. }
  7698. ],
  7699. "responses": {
  7700. "204": {
  7701. "$ref": "#/responses/empty"
  7702. },
  7703. "403": {
  7704. "$ref": "#/responses/forbidden"
  7705. },
  7706. "404": {
  7707. "$ref": "#/responses/notFound"
  7708. }
  7709. }
  7710. }
  7711. },
  7712. "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments": {
  7713. "get": {
  7714. "produces": [
  7715. "application/json"
  7716. ],
  7717. "tags": [
  7718. "repository"
  7719. ],
  7720. "summary": "Get a specific review for a pull request",
  7721. "operationId": "repoGetPullReviewComments",
  7722. "parameters": [
  7723. {
  7724. "type": "string",
  7725. "description": "owner of the repo",
  7726. "name": "owner",
  7727. "in": "path",
  7728. "required": true
  7729. },
  7730. {
  7731. "type": "string",
  7732. "description": "name of the repo",
  7733. "name": "repo",
  7734. "in": "path",
  7735. "required": true
  7736. },
  7737. {
  7738. "type": "integer",
  7739. "format": "int64",
  7740. "description": "index of the pull request",
  7741. "name": "index",
  7742. "in": "path",
  7743. "required": true
  7744. },
  7745. {
  7746. "type": "integer",
  7747. "format": "int64",
  7748. "description": "id of the review",
  7749. "name": "id",
  7750. "in": "path",
  7751. "required": true
  7752. }
  7753. ],
  7754. "responses": {
  7755. "200": {
  7756. "$ref": "#/responses/PullReviewCommentList"
  7757. },
  7758. "404": {
  7759. "$ref": "#/responses/notFound"
  7760. }
  7761. }
  7762. }
  7763. },
  7764. "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals": {
  7765. "post": {
  7766. "produces": [
  7767. "application/json"
  7768. ],
  7769. "tags": [
  7770. "repository"
  7771. ],
  7772. "summary": "Dismiss a review for a pull request",
  7773. "operationId": "repoDismissPullReview",
  7774. "parameters": [
  7775. {
  7776. "type": "string",
  7777. "description": "owner of the repo",
  7778. "name": "owner",
  7779. "in": "path",
  7780. "required": true
  7781. },
  7782. {
  7783. "type": "string",
  7784. "description": "name of the repo",
  7785. "name": "repo",
  7786. "in": "path",
  7787. "required": true
  7788. },
  7789. {
  7790. "type": "integer",
  7791. "format": "int64",
  7792. "description": "index of the pull request",
  7793. "name": "index",
  7794. "in": "path",
  7795. "required": true
  7796. },
  7797. {
  7798. "type": "integer",
  7799. "format": "int64",
  7800. "description": "id of the review",
  7801. "name": "id",
  7802. "in": "path",
  7803. "required": true
  7804. },
  7805. {
  7806. "name": "body",
  7807. "in": "body",
  7808. "required": true,
  7809. "schema": {
  7810. "$ref": "#/definitions/DismissPullReviewOptions"
  7811. }
  7812. }
  7813. ],
  7814. "responses": {
  7815. "200": {
  7816. "$ref": "#/responses/PullReview"
  7817. },
  7818. "403": {
  7819. "$ref": "#/responses/forbidden"
  7820. },
  7821. "422": {
  7822. "$ref": "#/responses/validationError"
  7823. }
  7824. }
  7825. }
  7826. },
  7827. "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals": {
  7828. "post": {
  7829. "produces": [
  7830. "application/json"
  7831. ],
  7832. "tags": [
  7833. "repository"
  7834. ],
  7835. "summary": "Cancel to dismiss a review for a pull request",
  7836. "operationId": "repoUnDismissPullReview",
  7837. "parameters": [
  7838. {
  7839. "type": "string",
  7840. "description": "owner of the repo",
  7841. "name": "owner",
  7842. "in": "path",
  7843. "required": true
  7844. },
  7845. {
  7846. "type": "string",
  7847. "description": "name of the repo",
  7848. "name": "repo",
  7849. "in": "path",
  7850. "required": true
  7851. },
  7852. {
  7853. "type": "integer",
  7854. "format": "int64",
  7855. "description": "index of the pull request",
  7856. "name": "index",
  7857. "in": "path",
  7858. "required": true
  7859. },
  7860. {
  7861. "type": "integer",
  7862. "format": "int64",
  7863. "description": "id of the review",
  7864. "name": "id",
  7865. "in": "path",
  7866. "required": true
  7867. }
  7868. ],
  7869. "responses": {
  7870. "200": {
  7871. "$ref": "#/responses/PullReview"
  7872. },
  7873. "403": {
  7874. "$ref": "#/responses/forbidden"
  7875. },
  7876. "422": {
  7877. "$ref": "#/responses/validationError"
  7878. }
  7879. }
  7880. }
  7881. },
  7882. "/repos/{owner}/{repo}/pulls/{index}/update": {
  7883. "post": {
  7884. "produces": [
  7885. "application/json"
  7886. ],
  7887. "tags": [
  7888. "repository"
  7889. ],
  7890. "summary": "Merge PR's baseBranch into headBranch",
  7891. "operationId": "repoUpdatePullRequest",
  7892. "parameters": [
  7893. {
  7894. "type": "string",
  7895. "description": "owner of the repo",
  7896. "name": "owner",
  7897. "in": "path",
  7898. "required": true
  7899. },
  7900. {
  7901. "type": "string",
  7902. "description": "name of the repo",
  7903. "name": "repo",
  7904. "in": "path",
  7905. "required": true
  7906. },
  7907. {
  7908. "type": "integer",
  7909. "format": "int64",
  7910. "description": "index of the pull request to get",
  7911. "name": "index",
  7912. "in": "path",
  7913. "required": true
  7914. }
  7915. ],
  7916. "responses": {
  7917. "200": {
  7918. "$ref": "#/responses/empty"
  7919. },
  7920. "403": {
  7921. "$ref": "#/responses/forbidden"
  7922. },
  7923. "404": {
  7924. "$ref": "#/responses/notFound"
  7925. },
  7926. "409": {
  7927. "$ref": "#/responses/error"
  7928. },
  7929. "422": {
  7930. "$ref": "#/responses/validationError"
  7931. }
  7932. }
  7933. }
  7934. },
  7935. "/repos/{owner}/{repo}/raw/{filepath}": {
  7936. "get": {
  7937. "produces": [
  7938. "application/json"
  7939. ],
  7940. "tags": [
  7941. "repository"
  7942. ],
  7943. "summary": "Get a file from a repository",
  7944. "operationId": "repoGetRawFile",
  7945. "parameters": [
  7946. {
  7947. "type": "string",
  7948. "description": "owner of the repo",
  7949. "name": "owner",
  7950. "in": "path",
  7951. "required": true
  7952. },
  7953. {
  7954. "type": "string",
  7955. "description": "name of the repo",
  7956. "name": "repo",
  7957. "in": "path",
  7958. "required": true
  7959. },
  7960. {
  7961. "type": "string",
  7962. "description": "filepath of the file to get",
  7963. "name": "filepath",
  7964. "in": "path",
  7965. "required": true
  7966. },
  7967. {
  7968. "type": "string",
  7969. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  7970. "name": "ref",
  7971. "in": "query"
  7972. }
  7973. ],
  7974. "responses": {
  7975. "200": {
  7976. "description": "success"
  7977. },
  7978. "404": {
  7979. "$ref": "#/responses/notFound"
  7980. }
  7981. }
  7982. }
  7983. },
  7984. "/repos/{owner}/{repo}/releases": {
  7985. "get": {
  7986. "produces": [
  7987. "application/json"
  7988. ],
  7989. "tags": [
  7990. "repository"
  7991. ],
  7992. "summary": "List a repo's releases",
  7993. "operationId": "repoListReleases",
  7994. "parameters": [
  7995. {
  7996. "type": "string",
  7997. "description": "owner of the repo",
  7998. "name": "owner",
  7999. "in": "path",
  8000. "required": true
  8001. },
  8002. {
  8003. "type": "string",
  8004. "description": "name of the repo",
  8005. "name": "repo",
  8006. "in": "path",
  8007. "required": true
  8008. },
  8009. {
  8010. "type": "integer",
  8011. "description": "page size of results, deprecated - use limit",
  8012. "name": "per_page",
  8013. "in": "query"
  8014. },
  8015. {
  8016. "type": "integer",
  8017. "description": "page number of results to return (1-based)",
  8018. "name": "page",
  8019. "in": "query"
  8020. },
  8021. {
  8022. "type": "integer",
  8023. "description": "page size of results",
  8024. "name": "limit",
  8025. "in": "query"
  8026. }
  8027. ],
  8028. "responses": {
  8029. "200": {
  8030. "$ref": "#/responses/ReleaseList"
  8031. }
  8032. }
  8033. },
  8034. "post": {
  8035. "consumes": [
  8036. "application/json"
  8037. ],
  8038. "produces": [
  8039. "application/json"
  8040. ],
  8041. "tags": [
  8042. "repository"
  8043. ],
  8044. "summary": "Create a release",
  8045. "operationId": "repoCreateRelease",
  8046. "parameters": [
  8047. {
  8048. "type": "string",
  8049. "description": "owner of the repo",
  8050. "name": "owner",
  8051. "in": "path",
  8052. "required": true
  8053. },
  8054. {
  8055. "type": "string",
  8056. "description": "name of the repo",
  8057. "name": "repo",
  8058. "in": "path",
  8059. "required": true
  8060. },
  8061. {
  8062. "name": "body",
  8063. "in": "body",
  8064. "schema": {
  8065. "$ref": "#/definitions/CreateReleaseOption"
  8066. }
  8067. }
  8068. ],
  8069. "responses": {
  8070. "201": {
  8071. "$ref": "#/responses/Release"
  8072. },
  8073. "404": {
  8074. "$ref": "#/responses/notFound"
  8075. },
  8076. "409": {
  8077. "$ref": "#/responses/error"
  8078. }
  8079. }
  8080. }
  8081. },
  8082. "/repos/{owner}/{repo}/releases/tags/{tag}": {
  8083. "get": {
  8084. "produces": [
  8085. "application/json"
  8086. ],
  8087. "tags": [
  8088. "repository"
  8089. ],
  8090. "summary": "Get a release by tag name",
  8091. "operationId": "repoGetReleaseByTag",
  8092. "parameters": [
  8093. {
  8094. "type": "string",
  8095. "description": "owner of the repo",
  8096. "name": "owner",
  8097. "in": "path",
  8098. "required": true
  8099. },
  8100. {
  8101. "type": "string",
  8102. "description": "name of the repo",
  8103. "name": "repo",
  8104. "in": "path",
  8105. "required": true
  8106. },
  8107. {
  8108. "type": "string",
  8109. "description": "tag name of the release to get",
  8110. "name": "tag",
  8111. "in": "path",
  8112. "required": true
  8113. }
  8114. ],
  8115. "responses": {
  8116. "200": {
  8117. "$ref": "#/responses/Release"
  8118. },
  8119. "404": {
  8120. "$ref": "#/responses/notFound"
  8121. }
  8122. }
  8123. },
  8124. "delete": {
  8125. "tags": [
  8126. "repository"
  8127. ],
  8128. "summary": "Delete a release by tag name",
  8129. "operationId": "repoDeleteReleaseByTag",
  8130. "parameters": [
  8131. {
  8132. "type": "string",
  8133. "description": "owner of the repo",
  8134. "name": "owner",
  8135. "in": "path",
  8136. "required": true
  8137. },
  8138. {
  8139. "type": "string",
  8140. "description": "name of the repo",
  8141. "name": "repo",
  8142. "in": "path",
  8143. "required": true
  8144. },
  8145. {
  8146. "type": "string",
  8147. "description": "tag name of the release to delete",
  8148. "name": "tag",
  8149. "in": "path",
  8150. "required": true
  8151. }
  8152. ],
  8153. "responses": {
  8154. "204": {
  8155. "$ref": "#/responses/empty"
  8156. },
  8157. "404": {
  8158. "$ref": "#/responses/notFound"
  8159. }
  8160. }
  8161. }
  8162. },
  8163. "/repos/{owner}/{repo}/releases/{id}": {
  8164. "get": {
  8165. "produces": [
  8166. "application/json"
  8167. ],
  8168. "tags": [
  8169. "repository"
  8170. ],
  8171. "summary": "Get a release",
  8172. "operationId": "repoGetRelease",
  8173. "parameters": [
  8174. {
  8175. "type": "string",
  8176. "description": "owner of the repo",
  8177. "name": "owner",
  8178. "in": "path",
  8179. "required": true
  8180. },
  8181. {
  8182. "type": "string",
  8183. "description": "name of the repo",
  8184. "name": "repo",
  8185. "in": "path",
  8186. "required": true
  8187. },
  8188. {
  8189. "type": "integer",
  8190. "format": "int64",
  8191. "description": "id of the release to get",
  8192. "name": "id",
  8193. "in": "path",
  8194. "required": true
  8195. }
  8196. ],
  8197. "responses": {
  8198. "200": {
  8199. "$ref": "#/responses/Release"
  8200. },
  8201. "404": {
  8202. "$ref": "#/responses/notFound"
  8203. }
  8204. }
  8205. },
  8206. "delete": {
  8207. "tags": [
  8208. "repository"
  8209. ],
  8210. "summary": "Delete a release",
  8211. "operationId": "repoDeleteRelease",
  8212. "parameters": [
  8213. {
  8214. "type": "string",
  8215. "description": "owner of the repo",
  8216. "name": "owner",
  8217. "in": "path",
  8218. "required": true
  8219. },
  8220. {
  8221. "type": "string",
  8222. "description": "name of the repo",
  8223. "name": "repo",
  8224. "in": "path",
  8225. "required": true
  8226. },
  8227. {
  8228. "type": "integer",
  8229. "format": "int64",
  8230. "description": "id of the release to delete",
  8231. "name": "id",
  8232. "in": "path",
  8233. "required": true
  8234. }
  8235. ],
  8236. "responses": {
  8237. "204": {
  8238. "$ref": "#/responses/empty"
  8239. },
  8240. "404": {
  8241. "$ref": "#/responses/notFound"
  8242. }
  8243. }
  8244. },
  8245. "patch": {
  8246. "consumes": [
  8247. "application/json"
  8248. ],
  8249. "produces": [
  8250. "application/json"
  8251. ],
  8252. "tags": [
  8253. "repository"
  8254. ],
  8255. "summary": "Update a release",
  8256. "operationId": "repoEditRelease",
  8257. "parameters": [
  8258. {
  8259. "type": "string",
  8260. "description": "owner of the repo",
  8261. "name": "owner",
  8262. "in": "path",
  8263. "required": true
  8264. },
  8265. {
  8266. "type": "string",
  8267. "description": "name of the repo",
  8268. "name": "repo",
  8269. "in": "path",
  8270. "required": true
  8271. },
  8272. {
  8273. "type": "integer",
  8274. "format": "int64",
  8275. "description": "id of the release to edit",
  8276. "name": "id",
  8277. "in": "path",
  8278. "required": true
  8279. },
  8280. {
  8281. "name": "body",
  8282. "in": "body",
  8283. "schema": {
  8284. "$ref": "#/definitions/EditReleaseOption"
  8285. }
  8286. }
  8287. ],
  8288. "responses": {
  8289. "200": {
  8290. "$ref": "#/responses/Release"
  8291. },
  8292. "404": {
  8293. "$ref": "#/responses/notFound"
  8294. }
  8295. }
  8296. }
  8297. },
  8298. "/repos/{owner}/{repo}/releases/{id}/assets": {
  8299. "get": {
  8300. "produces": [
  8301. "application/json"
  8302. ],
  8303. "tags": [
  8304. "repository"
  8305. ],
  8306. "summary": "List release's attachments",
  8307. "operationId": "repoListReleaseAttachments",
  8308. "parameters": [
  8309. {
  8310. "type": "string",
  8311. "description": "owner of the repo",
  8312. "name": "owner",
  8313. "in": "path",
  8314. "required": true
  8315. },
  8316. {
  8317. "type": "string",
  8318. "description": "name of the repo",
  8319. "name": "repo",
  8320. "in": "path",
  8321. "required": true
  8322. },
  8323. {
  8324. "type": "integer",
  8325. "format": "int64",
  8326. "description": "id of the release",
  8327. "name": "id",
  8328. "in": "path",
  8329. "required": true
  8330. }
  8331. ],
  8332. "responses": {
  8333. "200": {
  8334. "$ref": "#/responses/AttachmentList"
  8335. }
  8336. }
  8337. },
  8338. "post": {
  8339. "consumes": [
  8340. "multipart/form-data"
  8341. ],
  8342. "produces": [
  8343. "application/json"
  8344. ],
  8345. "tags": [
  8346. "repository"
  8347. ],
  8348. "summary": "Create a release attachment",
  8349. "operationId": "repoCreateReleaseAttachment",
  8350. "parameters": [
  8351. {
  8352. "type": "string",
  8353. "description": "owner of the repo",
  8354. "name": "owner",
  8355. "in": "path",
  8356. "required": true
  8357. },
  8358. {
  8359. "type": "string",
  8360. "description": "name of the repo",
  8361. "name": "repo",
  8362. "in": "path",
  8363. "required": true
  8364. },
  8365. {
  8366. "type": "integer",
  8367. "format": "int64",
  8368. "description": "id of the release",
  8369. "name": "id",
  8370. "in": "path",
  8371. "required": true
  8372. },
  8373. {
  8374. "type": "string",
  8375. "description": "name of the attachment",
  8376. "name": "name",
  8377. "in": "query"
  8378. },
  8379. {
  8380. "type": "file",
  8381. "description": "attachment to upload",
  8382. "name": "attachment",
  8383. "in": "formData",
  8384. "required": true
  8385. }
  8386. ],
  8387. "responses": {
  8388. "201": {
  8389. "$ref": "#/responses/Attachment"
  8390. },
  8391. "400": {
  8392. "$ref": "#/responses/error"
  8393. }
  8394. }
  8395. }
  8396. },
  8397. "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": {
  8398. "get": {
  8399. "produces": [
  8400. "application/json"
  8401. ],
  8402. "tags": [
  8403. "repository"
  8404. ],
  8405. "summary": "Get a release attachment",
  8406. "operationId": "repoGetReleaseAttachment",
  8407. "parameters": [
  8408. {
  8409. "type": "string",
  8410. "description": "owner of the repo",
  8411. "name": "owner",
  8412. "in": "path",
  8413. "required": true
  8414. },
  8415. {
  8416. "type": "string",
  8417. "description": "name of the repo",
  8418. "name": "repo",
  8419. "in": "path",
  8420. "required": true
  8421. },
  8422. {
  8423. "type": "integer",
  8424. "format": "int64",
  8425. "description": "id of the release",
  8426. "name": "id",
  8427. "in": "path",
  8428. "required": true
  8429. },
  8430. {
  8431. "type": "integer",
  8432. "format": "int64",
  8433. "description": "id of the attachment to get",
  8434. "name": "attachment_id",
  8435. "in": "path",
  8436. "required": true
  8437. }
  8438. ],
  8439. "responses": {
  8440. "200": {
  8441. "$ref": "#/responses/Attachment"
  8442. }
  8443. }
  8444. },
  8445. "delete": {
  8446. "produces": [
  8447. "application/json"
  8448. ],
  8449. "tags": [
  8450. "repository"
  8451. ],
  8452. "summary": "Delete a release attachment",
  8453. "operationId": "repoDeleteReleaseAttachment",
  8454. "parameters": [
  8455. {
  8456. "type": "string",
  8457. "description": "owner of the repo",
  8458. "name": "owner",
  8459. "in": "path",
  8460. "required": true
  8461. },
  8462. {
  8463. "type": "string",
  8464. "description": "name of the repo",
  8465. "name": "repo",
  8466. "in": "path",
  8467. "required": true
  8468. },
  8469. {
  8470. "type": "integer",
  8471. "format": "int64",
  8472. "description": "id of the release",
  8473. "name": "id",
  8474. "in": "path",
  8475. "required": true
  8476. },
  8477. {
  8478. "type": "integer",
  8479. "format": "int64",
  8480. "description": "id of the attachment to delete",
  8481. "name": "attachment_id",
  8482. "in": "path",
  8483. "required": true
  8484. }
  8485. ],
  8486. "responses": {
  8487. "204": {
  8488. "$ref": "#/responses/empty"
  8489. }
  8490. }
  8491. },
  8492. "patch": {
  8493. "consumes": [
  8494. "application/json"
  8495. ],
  8496. "produces": [
  8497. "application/json"
  8498. ],
  8499. "tags": [
  8500. "repository"
  8501. ],
  8502. "summary": "Edit a release attachment",
  8503. "operationId": "repoEditReleaseAttachment",
  8504. "parameters": [
  8505. {
  8506. "type": "string",
  8507. "description": "owner of the repo",
  8508. "name": "owner",
  8509. "in": "path",
  8510. "required": true
  8511. },
  8512. {
  8513. "type": "string",
  8514. "description": "name of the repo",
  8515. "name": "repo",
  8516. "in": "path",
  8517. "required": true
  8518. },
  8519. {
  8520. "type": "integer",
  8521. "format": "int64",
  8522. "description": "id of the release",
  8523. "name": "id",
  8524. "in": "path",
  8525. "required": true
  8526. },
  8527. {
  8528. "type": "integer",
  8529. "format": "int64",
  8530. "description": "id of the attachment to edit",
  8531. "name": "attachment_id",
  8532. "in": "path",
  8533. "required": true
  8534. },
  8535. {
  8536. "name": "body",
  8537. "in": "body",
  8538. "schema": {
  8539. "$ref": "#/definitions/EditAttachmentOptions"
  8540. }
  8541. }
  8542. ],
  8543. "responses": {
  8544. "201": {
  8545. "$ref": "#/responses/Attachment"
  8546. }
  8547. }
  8548. }
  8549. },
  8550. "/repos/{owner}/{repo}/signing-key.gpg": {
  8551. "get": {
  8552. "produces": [
  8553. "text/plain"
  8554. ],
  8555. "tags": [
  8556. "repository"
  8557. ],
  8558. "summary": "Get signing-key.gpg for given repository",
  8559. "operationId": "repoSigningKey",
  8560. "parameters": [
  8561. {
  8562. "type": "string",
  8563. "description": "owner of the repo",
  8564. "name": "owner",
  8565. "in": "path",
  8566. "required": true
  8567. },
  8568. {
  8569. "type": "string",
  8570. "description": "name of the repo",
  8571. "name": "repo",
  8572. "in": "path",
  8573. "required": true
  8574. }
  8575. ],
  8576. "responses": {
  8577. "200": {
  8578. "description": "GPG armored public key",
  8579. "schema": {
  8580. "type": "string"
  8581. }
  8582. }
  8583. }
  8584. }
  8585. },
  8586. "/repos/{owner}/{repo}/stargazers": {
  8587. "get": {
  8588. "produces": [
  8589. "application/json"
  8590. ],
  8591. "tags": [
  8592. "repository"
  8593. ],
  8594. "summary": "List a repo's stargazers",
  8595. "operationId": "repoListStargazers",
  8596. "parameters": [
  8597. {
  8598. "type": "string",
  8599. "description": "owner of the repo",
  8600. "name": "owner",
  8601. "in": "path",
  8602. "required": true
  8603. },
  8604. {
  8605. "type": "string",
  8606. "description": "name of the repo",
  8607. "name": "repo",
  8608. "in": "path",
  8609. "required": true
  8610. },
  8611. {
  8612. "type": "integer",
  8613. "description": "page number of results to return (1-based)",
  8614. "name": "page",
  8615. "in": "query"
  8616. },
  8617. {
  8618. "type": "integer",
  8619. "description": "page size of results",
  8620. "name": "limit",
  8621. "in": "query"
  8622. }
  8623. ],
  8624. "responses": {
  8625. "200": {
  8626. "$ref": "#/responses/UserList"
  8627. }
  8628. }
  8629. }
  8630. },
  8631. "/repos/{owner}/{repo}/statuses/{sha}": {
  8632. "get": {
  8633. "produces": [
  8634. "application/json"
  8635. ],
  8636. "tags": [
  8637. "repository"
  8638. ],
  8639. "summary": "Get a commit's statuses",
  8640. "operationId": "repoListStatuses",
  8641. "parameters": [
  8642. {
  8643. "type": "string",
  8644. "description": "owner of the repo",
  8645. "name": "owner",
  8646. "in": "path",
  8647. "required": true
  8648. },
  8649. {
  8650. "type": "string",
  8651. "description": "name of the repo",
  8652. "name": "repo",
  8653. "in": "path",
  8654. "required": true
  8655. },
  8656. {
  8657. "type": "string",
  8658. "description": "sha of the commit",
  8659. "name": "sha",
  8660. "in": "path",
  8661. "required": true
  8662. },
  8663. {
  8664. "enum": [
  8665. "oldest",
  8666. "recentupdate",
  8667. "leastupdate",
  8668. "leastindex",
  8669. "highestindex"
  8670. ],
  8671. "type": "string",
  8672. "description": "type of sort",
  8673. "name": "sort",
  8674. "in": "query"
  8675. },
  8676. {
  8677. "enum": [
  8678. "pending",
  8679. "success",
  8680. "error",
  8681. "failure",
  8682. "warning"
  8683. ],
  8684. "type": "string",
  8685. "description": "type of state",
  8686. "name": "state",
  8687. "in": "query"
  8688. },
  8689. {
  8690. "type": "integer",
  8691. "description": "page number of results to return (1-based)",
  8692. "name": "page",
  8693. "in": "query"
  8694. },
  8695. {
  8696. "type": "integer",
  8697. "description": "page size of results",
  8698. "name": "limit",
  8699. "in": "query"
  8700. }
  8701. ],
  8702. "responses": {
  8703. "200": {
  8704. "$ref": "#/responses/CommitStatusList"
  8705. },
  8706. "400": {
  8707. "$ref": "#/responses/error"
  8708. }
  8709. }
  8710. },
  8711. "post": {
  8712. "produces": [
  8713. "application/json"
  8714. ],
  8715. "tags": [
  8716. "repository"
  8717. ],
  8718. "summary": "Create a commit status",
  8719. "operationId": "repoCreateStatus",
  8720. "parameters": [
  8721. {
  8722. "type": "string",
  8723. "description": "owner of the repo",
  8724. "name": "owner",
  8725. "in": "path",
  8726. "required": true
  8727. },
  8728. {
  8729. "type": "string",
  8730. "description": "name of the repo",
  8731. "name": "repo",
  8732. "in": "path",
  8733. "required": true
  8734. },
  8735. {
  8736. "type": "string",
  8737. "description": "sha of the commit",
  8738. "name": "sha",
  8739. "in": "path",
  8740. "required": true
  8741. },
  8742. {
  8743. "name": "body",
  8744. "in": "body",
  8745. "schema": {
  8746. "$ref": "#/definitions/CreateStatusOption"
  8747. }
  8748. }
  8749. ],
  8750. "responses": {
  8751. "201": {
  8752. "$ref": "#/responses/CommitStatus"
  8753. },
  8754. "400": {
  8755. "$ref": "#/responses/error"
  8756. }
  8757. }
  8758. }
  8759. },
  8760. "/repos/{owner}/{repo}/subscribers": {
  8761. "get": {
  8762. "produces": [
  8763. "application/json"
  8764. ],
  8765. "tags": [
  8766. "repository"
  8767. ],
  8768. "summary": "List a repo's watchers",
  8769. "operationId": "repoListSubscribers",
  8770. "parameters": [
  8771. {
  8772. "type": "string",
  8773. "description": "owner of the repo",
  8774. "name": "owner",
  8775. "in": "path",
  8776. "required": true
  8777. },
  8778. {
  8779. "type": "string",
  8780. "description": "name of the repo",
  8781. "name": "repo",
  8782. "in": "path",
  8783. "required": true
  8784. },
  8785. {
  8786. "type": "integer",
  8787. "description": "page number of results to return (1-based)",
  8788. "name": "page",
  8789. "in": "query"
  8790. },
  8791. {
  8792. "type": "integer",
  8793. "description": "page size of results",
  8794. "name": "limit",
  8795. "in": "query"
  8796. }
  8797. ],
  8798. "responses": {
  8799. "200": {
  8800. "$ref": "#/responses/UserList"
  8801. }
  8802. }
  8803. }
  8804. },
  8805. "/repos/{owner}/{repo}/subscription": {
  8806. "get": {
  8807. "tags": [
  8808. "repository"
  8809. ],
  8810. "summary": "Check if the current user is watching a repo",
  8811. "operationId": "userCurrentCheckSubscription",
  8812. "parameters": [
  8813. {
  8814. "type": "string",
  8815. "description": "owner of the repo",
  8816. "name": "owner",
  8817. "in": "path",
  8818. "required": true
  8819. },
  8820. {
  8821. "type": "string",
  8822. "description": "name of the repo",
  8823. "name": "repo",
  8824. "in": "path",
  8825. "required": true
  8826. }
  8827. ],
  8828. "responses": {
  8829. "200": {
  8830. "$ref": "#/responses/WatchInfo"
  8831. },
  8832. "404": {
  8833. "description": "User is not watching this repo or repo do not exist"
  8834. }
  8835. }
  8836. },
  8837. "put": {
  8838. "tags": [
  8839. "repository"
  8840. ],
  8841. "summary": "Watch a repo",
  8842. "operationId": "userCurrentPutSubscription",
  8843. "parameters": [
  8844. {
  8845. "type": "string",
  8846. "description": "owner of the repo",
  8847. "name": "owner",
  8848. "in": "path",
  8849. "required": true
  8850. },
  8851. {
  8852. "type": "string",
  8853. "description": "name of the repo",
  8854. "name": "repo",
  8855. "in": "path",
  8856. "required": true
  8857. }
  8858. ],
  8859. "responses": {
  8860. "200": {
  8861. "$ref": "#/responses/WatchInfo"
  8862. }
  8863. }
  8864. },
  8865. "delete": {
  8866. "tags": [
  8867. "repository"
  8868. ],
  8869. "summary": "Unwatch a repo",
  8870. "operationId": "userCurrentDeleteSubscription",
  8871. "parameters": [
  8872. {
  8873. "type": "string",
  8874. "description": "owner of the repo",
  8875. "name": "owner",
  8876. "in": "path",
  8877. "required": true
  8878. },
  8879. {
  8880. "type": "string",
  8881. "description": "name of the repo",
  8882. "name": "repo",
  8883. "in": "path",
  8884. "required": true
  8885. }
  8886. ],
  8887. "responses": {
  8888. "204": {
  8889. "$ref": "#/responses/empty"
  8890. }
  8891. }
  8892. }
  8893. },
  8894. "/repos/{owner}/{repo}/tags": {
  8895. "get": {
  8896. "produces": [
  8897. "application/json"
  8898. ],
  8899. "tags": [
  8900. "repository"
  8901. ],
  8902. "summary": "List a repository's tags",
  8903. "operationId": "repoListTags",
  8904. "parameters": [
  8905. {
  8906. "type": "string",
  8907. "description": "owner of the repo",
  8908. "name": "owner",
  8909. "in": "path",
  8910. "required": true
  8911. },
  8912. {
  8913. "type": "string",
  8914. "description": "name of the repo",
  8915. "name": "repo",
  8916. "in": "path",
  8917. "required": true
  8918. },
  8919. {
  8920. "type": "integer",
  8921. "description": "page number of results to return (1-based)",
  8922. "name": "page",
  8923. "in": "query"
  8924. },
  8925. {
  8926. "type": "integer",
  8927. "description": "page size of results, default maximum page size is 50",
  8928. "name": "limit",
  8929. "in": "query"
  8930. }
  8931. ],
  8932. "responses": {
  8933. "200": {
  8934. "$ref": "#/responses/TagList"
  8935. }
  8936. }
  8937. }
  8938. },
  8939. "/repos/{owner}/{repo}/tags/{tag}": {
  8940. "delete": {
  8941. "produces": [
  8942. "application/json"
  8943. ],
  8944. "tags": [
  8945. "repository"
  8946. ],
  8947. "summary": "Delete a repository's tag by name",
  8948. "operationId": "repoDeleteTag",
  8949. "parameters": [
  8950. {
  8951. "type": "string",
  8952. "description": "owner of the repo",
  8953. "name": "owner",
  8954. "in": "path",
  8955. "required": true
  8956. },
  8957. {
  8958. "type": "string",
  8959. "description": "name of the repo",
  8960. "name": "repo",
  8961. "in": "path",
  8962. "required": true
  8963. },
  8964. {
  8965. "type": "string",
  8966. "description": "name of tag to delete",
  8967. "name": "tag",
  8968. "in": "path",
  8969. "required": true
  8970. }
  8971. ],
  8972. "responses": {
  8973. "204": {
  8974. "$ref": "#/responses/empty"
  8975. },
  8976. "404": {
  8977. "$ref": "#/responses/notFound"
  8978. },
  8979. "409": {
  8980. "$ref": "#/responses/conflict"
  8981. }
  8982. }
  8983. }
  8984. },
  8985. "/repos/{owner}/{repo}/teams": {
  8986. "get": {
  8987. "produces": [
  8988. "application/json"
  8989. ],
  8990. "tags": [
  8991. "repository"
  8992. ],
  8993. "summary": "List a repository's teams",
  8994. "operationId": "repoListTeams",
  8995. "parameters": [
  8996. {
  8997. "type": "string",
  8998. "description": "owner of the repo",
  8999. "name": "owner",
  9000. "in": "path",
  9001. "required": true
  9002. },
  9003. {
  9004. "type": "string",
  9005. "description": "name of the repo",
  9006. "name": "repo",
  9007. "in": "path",
  9008. "required": true
  9009. }
  9010. ],
  9011. "responses": {
  9012. "200": {
  9013. "$ref": "#/responses/TeamList"
  9014. }
  9015. }
  9016. }
  9017. },
  9018. "/repos/{owner}/{repo}/teams/{team}": {
  9019. "get": {
  9020. "produces": [
  9021. "application/json"
  9022. ],
  9023. "tags": [
  9024. "repository"
  9025. ],
  9026. "summary": "Check if a team is assigned to a repository",
  9027. "operationId": "repoCheckTeam",
  9028. "parameters": [
  9029. {
  9030. "type": "string",
  9031. "description": "owner of the repo",
  9032. "name": "owner",
  9033. "in": "path",
  9034. "required": true
  9035. },
  9036. {
  9037. "type": "string",
  9038. "description": "name of the repo",
  9039. "name": "repo",
  9040. "in": "path",
  9041. "required": true
  9042. },
  9043. {
  9044. "type": "string",
  9045. "description": "team name",
  9046. "name": "team",
  9047. "in": "path",
  9048. "required": true
  9049. }
  9050. ],
  9051. "responses": {
  9052. "200": {
  9053. "$ref": "#/responses/Team"
  9054. },
  9055. "404": {
  9056. "$ref": "#/responses/notFound"
  9057. },
  9058. "405": {
  9059. "$ref": "#/responses/error"
  9060. }
  9061. }
  9062. },
  9063. "put": {
  9064. "produces": [
  9065. "application/json"
  9066. ],
  9067. "tags": [
  9068. "repository"
  9069. ],
  9070. "summary": "Add a team to a repository",
  9071. "operationId": "repoAddTeam",
  9072. "parameters": [
  9073. {
  9074. "type": "string",
  9075. "description": "owner of the repo",
  9076. "name": "owner",
  9077. "in": "path",
  9078. "required": true
  9079. },
  9080. {
  9081. "type": "string",
  9082. "description": "name of the repo",
  9083. "name": "repo",
  9084. "in": "path",
  9085. "required": true
  9086. },
  9087. {
  9088. "type": "string",
  9089. "description": "team name",
  9090. "name": "team",
  9091. "in": "path",
  9092. "required": true
  9093. }
  9094. ],
  9095. "responses": {
  9096. "204": {
  9097. "$ref": "#/responses/empty"
  9098. },
  9099. "405": {
  9100. "$ref": "#/responses/error"
  9101. },
  9102. "422": {
  9103. "$ref": "#/responses/validationError"
  9104. }
  9105. }
  9106. },
  9107. "delete": {
  9108. "produces": [
  9109. "application/json"
  9110. ],
  9111. "tags": [
  9112. "repository"
  9113. ],
  9114. "summary": "Delete a team from a repository",
  9115. "operationId": "repoDeleteTeam",
  9116. "parameters": [
  9117. {
  9118. "type": "string",
  9119. "description": "owner of the repo",
  9120. "name": "owner",
  9121. "in": "path",
  9122. "required": true
  9123. },
  9124. {
  9125. "type": "string",
  9126. "description": "name of the repo",
  9127. "name": "repo",
  9128. "in": "path",
  9129. "required": true
  9130. },
  9131. {
  9132. "type": "string",
  9133. "description": "team name",
  9134. "name": "team",
  9135. "in": "path",
  9136. "required": true
  9137. }
  9138. ],
  9139. "responses": {
  9140. "204": {
  9141. "$ref": "#/responses/empty"
  9142. },
  9143. "405": {
  9144. "$ref": "#/responses/error"
  9145. },
  9146. "422": {
  9147. "$ref": "#/responses/validationError"
  9148. }
  9149. }
  9150. }
  9151. },
  9152. "/repos/{owner}/{repo}/times": {
  9153. "get": {
  9154. "produces": [
  9155. "application/json"
  9156. ],
  9157. "tags": [
  9158. "repository"
  9159. ],
  9160. "summary": "List a repo's tracked times",
  9161. "operationId": "repoTrackedTimes",
  9162. "parameters": [
  9163. {
  9164. "type": "string",
  9165. "description": "owner of the repo",
  9166. "name": "owner",
  9167. "in": "path",
  9168. "required": true
  9169. },
  9170. {
  9171. "type": "string",
  9172. "description": "name of the repo",
  9173. "name": "repo",
  9174. "in": "path",
  9175. "required": true
  9176. },
  9177. {
  9178. "type": "string",
  9179. "description": "optional filter by user (available for issue managers)",
  9180. "name": "user",
  9181. "in": "query"
  9182. },
  9183. {
  9184. "type": "string",
  9185. "format": "date-time",
  9186. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  9187. "name": "since",
  9188. "in": "query"
  9189. },
  9190. {
  9191. "type": "string",
  9192. "format": "date-time",
  9193. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  9194. "name": "before",
  9195. "in": "query"
  9196. },
  9197. {
  9198. "type": "integer",
  9199. "description": "page number of results to return (1-based)",
  9200. "name": "page",
  9201. "in": "query"
  9202. },
  9203. {
  9204. "type": "integer",
  9205. "description": "page size of results",
  9206. "name": "limit",
  9207. "in": "query"
  9208. }
  9209. ],
  9210. "responses": {
  9211. "200": {
  9212. "$ref": "#/responses/TrackedTimeList"
  9213. },
  9214. "400": {
  9215. "$ref": "#/responses/error"
  9216. },
  9217. "403": {
  9218. "$ref": "#/responses/forbidden"
  9219. }
  9220. }
  9221. }
  9222. },
  9223. "/repos/{owner}/{repo}/times/{user}": {
  9224. "get": {
  9225. "produces": [
  9226. "application/json"
  9227. ],
  9228. "tags": [
  9229. "repository"
  9230. ],
  9231. "summary": "List a user's tracked times in a repo",
  9232. "operationId": "userTrackedTimes",
  9233. "deprecated": true,
  9234. "parameters": [
  9235. {
  9236. "type": "string",
  9237. "description": "owner of the repo",
  9238. "name": "owner",
  9239. "in": "path",
  9240. "required": true
  9241. },
  9242. {
  9243. "type": "string",
  9244. "description": "name of the repo",
  9245. "name": "repo",
  9246. "in": "path",
  9247. "required": true
  9248. },
  9249. {
  9250. "type": "string",
  9251. "description": "username of user",
  9252. "name": "user",
  9253. "in": "path",
  9254. "required": true
  9255. }
  9256. ],
  9257. "responses": {
  9258. "200": {
  9259. "$ref": "#/responses/TrackedTimeList"
  9260. },
  9261. "400": {
  9262. "$ref": "#/responses/error"
  9263. },
  9264. "403": {
  9265. "$ref": "#/responses/forbidden"
  9266. }
  9267. }
  9268. }
  9269. },
  9270. "/repos/{owner}/{repo}/topics": {
  9271. "get": {
  9272. "produces": [
  9273. "application/json"
  9274. ],
  9275. "tags": [
  9276. "repository"
  9277. ],
  9278. "summary": "Get list of topics that a repository has",
  9279. "operationId": "repoListTopics",
  9280. "parameters": [
  9281. {
  9282. "type": "string",
  9283. "description": "owner of the repo",
  9284. "name": "owner",
  9285. "in": "path",
  9286. "required": true
  9287. },
  9288. {
  9289. "type": "string",
  9290. "description": "name of the repo",
  9291. "name": "repo",
  9292. "in": "path",
  9293. "required": true
  9294. },
  9295. {
  9296. "type": "integer",
  9297. "description": "page number of results to return (1-based)",
  9298. "name": "page",
  9299. "in": "query"
  9300. },
  9301. {
  9302. "type": "integer",
  9303. "description": "page size of results",
  9304. "name": "limit",
  9305. "in": "query"
  9306. }
  9307. ],
  9308. "responses": {
  9309. "200": {
  9310. "$ref": "#/responses/TopicNames"
  9311. }
  9312. }
  9313. },
  9314. "put": {
  9315. "produces": [
  9316. "application/json"
  9317. ],
  9318. "tags": [
  9319. "repository"
  9320. ],
  9321. "summary": "Replace list of topics for a repository",
  9322. "operationId": "repoUpdateTopics",
  9323. "parameters": [
  9324. {
  9325. "type": "string",
  9326. "description": "owner of the repo",
  9327. "name": "owner",
  9328. "in": "path",
  9329. "required": true
  9330. },
  9331. {
  9332. "type": "string",
  9333. "description": "name of the repo",
  9334. "name": "repo",
  9335. "in": "path",
  9336. "required": true
  9337. },
  9338. {
  9339. "name": "body",
  9340. "in": "body",
  9341. "schema": {
  9342. "$ref": "#/definitions/RepoTopicOptions"
  9343. }
  9344. }
  9345. ],
  9346. "responses": {
  9347. "204": {
  9348. "$ref": "#/responses/empty"
  9349. },
  9350. "422": {
  9351. "$ref": "#/responses/invalidTopicsError"
  9352. }
  9353. }
  9354. }
  9355. },
  9356. "/repos/{owner}/{repo}/topics/{topic}": {
  9357. "put": {
  9358. "produces": [
  9359. "application/json"
  9360. ],
  9361. "tags": [
  9362. "repository"
  9363. ],
  9364. "summary": "Add a topic to a repository",
  9365. "operationId": "repoAddTopíc",
  9366. "parameters": [
  9367. {
  9368. "type": "string",
  9369. "description": "owner of the repo",
  9370. "name": "owner",
  9371. "in": "path",
  9372. "required": true
  9373. },
  9374. {
  9375. "type": "string",
  9376. "description": "name of the repo",
  9377. "name": "repo",
  9378. "in": "path",
  9379. "required": true
  9380. },
  9381. {
  9382. "type": "string",
  9383. "description": "name of the topic to add",
  9384. "name": "topic",
  9385. "in": "path",
  9386. "required": true
  9387. }
  9388. ],
  9389. "responses": {
  9390. "204": {
  9391. "$ref": "#/responses/empty"
  9392. },
  9393. "422": {
  9394. "$ref": "#/responses/invalidTopicsError"
  9395. }
  9396. }
  9397. },
  9398. "delete": {
  9399. "produces": [
  9400. "application/json"
  9401. ],
  9402. "tags": [
  9403. "repository"
  9404. ],
  9405. "summary": "Delete a topic from a repository",
  9406. "operationId": "repoDeleteTopic",
  9407. "parameters": [
  9408. {
  9409. "type": "string",
  9410. "description": "owner of the repo",
  9411. "name": "owner",
  9412. "in": "path",
  9413. "required": true
  9414. },
  9415. {
  9416. "type": "string",
  9417. "description": "name of the repo",
  9418. "name": "repo",
  9419. "in": "path",
  9420. "required": true
  9421. },
  9422. {
  9423. "type": "string",
  9424. "description": "name of the topic to delete",
  9425. "name": "topic",
  9426. "in": "path",
  9427. "required": true
  9428. }
  9429. ],
  9430. "responses": {
  9431. "204": {
  9432. "$ref": "#/responses/empty"
  9433. },
  9434. "422": {
  9435. "$ref": "#/responses/invalidTopicsError"
  9436. }
  9437. }
  9438. }
  9439. },
  9440. "/repos/{owner}/{repo}/transfer": {
  9441. "post": {
  9442. "produces": [
  9443. "application/json"
  9444. ],
  9445. "tags": [
  9446. "repository"
  9447. ],
  9448. "summary": "Transfer a repo ownership",
  9449. "operationId": "repoTransfer",
  9450. "parameters": [
  9451. {
  9452. "type": "string",
  9453. "description": "owner of the repo to transfer",
  9454. "name": "owner",
  9455. "in": "path",
  9456. "required": true
  9457. },
  9458. {
  9459. "type": "string",
  9460. "description": "name of the repo to transfer",
  9461. "name": "repo",
  9462. "in": "path",
  9463. "required": true
  9464. },
  9465. {
  9466. "description": "Transfer Options",
  9467. "name": "body",
  9468. "in": "body",
  9469. "required": true,
  9470. "schema": {
  9471. "$ref": "#/definitions/TransferRepoOption"
  9472. }
  9473. }
  9474. ],
  9475. "responses": {
  9476. "202": {
  9477. "$ref": "#/responses/Repository"
  9478. },
  9479. "403": {
  9480. "$ref": "#/responses/forbidden"
  9481. },
  9482. "404": {
  9483. "$ref": "#/responses/notFound"
  9484. },
  9485. "422": {
  9486. "$ref": "#/responses/validationError"
  9487. }
  9488. }
  9489. }
  9490. },
  9491. "/repositories/{id}": {
  9492. "get": {
  9493. "produces": [
  9494. "application/json"
  9495. ],
  9496. "tags": [
  9497. "repository"
  9498. ],
  9499. "summary": "Get a repository by id",
  9500. "operationId": "repoGetByID",
  9501. "parameters": [
  9502. {
  9503. "type": "integer",
  9504. "format": "int64",
  9505. "description": "id of the repo to get",
  9506. "name": "id",
  9507. "in": "path",
  9508. "required": true
  9509. }
  9510. ],
  9511. "responses": {
  9512. "200": {
  9513. "$ref": "#/responses/Repository"
  9514. }
  9515. }
  9516. }
  9517. },
  9518. "/settings/api": {
  9519. "get": {
  9520. "produces": [
  9521. "application/json"
  9522. ],
  9523. "tags": [
  9524. "settings"
  9525. ],
  9526. "summary": "Get instance's global settings for api",
  9527. "operationId": "getGeneralAPISettings",
  9528. "responses": {
  9529. "200": {
  9530. "$ref": "#/responses/GeneralAPISettings"
  9531. }
  9532. }
  9533. }
  9534. },
  9535. "/settings/attachment": {
  9536. "get": {
  9537. "produces": [
  9538. "application/json"
  9539. ],
  9540. "tags": [
  9541. "settings"
  9542. ],
  9543. "summary": "Get instance's global settings for Attachment",
  9544. "operationId": "getGeneralAttachmentSettings",
  9545. "responses": {
  9546. "200": {
  9547. "$ref": "#/responses/GeneralAttachmentSettings"
  9548. }
  9549. }
  9550. }
  9551. },
  9552. "/settings/repository": {
  9553. "get": {
  9554. "produces": [
  9555. "application/json"
  9556. ],
  9557. "tags": [
  9558. "settings"
  9559. ],
  9560. "summary": "Get instance's global settings for repositories",
  9561. "operationId": "getGeneralRepositorySettings",
  9562. "responses": {
  9563. "200": {
  9564. "$ref": "#/responses/GeneralRepoSettings"
  9565. }
  9566. }
  9567. }
  9568. },
  9569. "/settings/ui": {
  9570. "get": {
  9571. "produces": [
  9572. "application/json"
  9573. ],
  9574. "tags": [
  9575. "settings"
  9576. ],
  9577. "summary": "Get instance's global settings for ui",
  9578. "operationId": "getGeneralUISettings",
  9579. "responses": {
  9580. "200": {
  9581. "$ref": "#/responses/GeneralUISettings"
  9582. }
  9583. }
  9584. }
  9585. },
  9586. "/signing-key.gpg": {
  9587. "get": {
  9588. "produces": [
  9589. "text/plain"
  9590. ],
  9591. "tags": [
  9592. "miscellaneous"
  9593. ],
  9594. "summary": "Get default signing-key.gpg",
  9595. "operationId": "getSigningKey",
  9596. "responses": {
  9597. "200": {
  9598. "description": "GPG armored public key",
  9599. "schema": {
  9600. "type": "string"
  9601. }
  9602. }
  9603. }
  9604. }
  9605. },
  9606. "/teams/{id}": {
  9607. "get": {
  9608. "produces": [
  9609. "application/json"
  9610. ],
  9611. "tags": [
  9612. "organization"
  9613. ],
  9614. "summary": "Get a team",
  9615. "operationId": "orgGetTeam",
  9616. "parameters": [
  9617. {
  9618. "type": "integer",
  9619. "format": "int64",
  9620. "description": "id of the team to get",
  9621. "name": "id",
  9622. "in": "path",
  9623. "required": true
  9624. }
  9625. ],
  9626. "responses": {
  9627. "200": {
  9628. "$ref": "#/responses/Team"
  9629. }
  9630. }
  9631. },
  9632. "delete": {
  9633. "tags": [
  9634. "organization"
  9635. ],
  9636. "summary": "Delete a team",
  9637. "operationId": "orgDeleteTeam",
  9638. "parameters": [
  9639. {
  9640. "type": "integer",
  9641. "format": "int64",
  9642. "description": "id of the team to delete",
  9643. "name": "id",
  9644. "in": "path",
  9645. "required": true
  9646. }
  9647. ],
  9648. "responses": {
  9649. "204": {
  9650. "description": "team deleted"
  9651. }
  9652. }
  9653. },
  9654. "patch": {
  9655. "consumes": [
  9656. "application/json"
  9657. ],
  9658. "produces": [
  9659. "application/json"
  9660. ],
  9661. "tags": [
  9662. "organization"
  9663. ],
  9664. "summary": "Edit a team",
  9665. "operationId": "orgEditTeam",
  9666. "parameters": [
  9667. {
  9668. "type": "integer",
  9669. "description": "id of the team to edit",
  9670. "name": "id",
  9671. "in": "path",
  9672. "required": true
  9673. },
  9674. {
  9675. "name": "body",
  9676. "in": "body",
  9677. "schema": {
  9678. "$ref": "#/definitions/EditTeamOption"
  9679. }
  9680. }
  9681. ],
  9682. "responses": {
  9683. "200": {
  9684. "$ref": "#/responses/Team"
  9685. }
  9686. }
  9687. }
  9688. },
  9689. "/teams/{id}/members": {
  9690. "get": {
  9691. "produces": [
  9692. "application/json"
  9693. ],
  9694. "tags": [
  9695. "organization"
  9696. ],
  9697. "summary": "List a team's members",
  9698. "operationId": "orgListTeamMembers",
  9699. "parameters": [
  9700. {
  9701. "type": "integer",
  9702. "format": "int64",
  9703. "description": "id of the team",
  9704. "name": "id",
  9705. "in": "path",
  9706. "required": true
  9707. },
  9708. {
  9709. "type": "integer",
  9710. "description": "page number of results to return (1-based)",
  9711. "name": "page",
  9712. "in": "query"
  9713. },
  9714. {
  9715. "type": "integer",
  9716. "description": "page size of results",
  9717. "name": "limit",
  9718. "in": "query"
  9719. }
  9720. ],
  9721. "responses": {
  9722. "200": {
  9723. "$ref": "#/responses/UserList"
  9724. }
  9725. }
  9726. }
  9727. },
  9728. "/teams/{id}/members/{username}": {
  9729. "get": {
  9730. "produces": [
  9731. "application/json"
  9732. ],
  9733. "tags": [
  9734. "organization"
  9735. ],
  9736. "summary": "List a particular member of team",
  9737. "operationId": "orgListTeamMember",
  9738. "parameters": [
  9739. {
  9740. "type": "integer",
  9741. "format": "int64",
  9742. "description": "id of the team",
  9743. "name": "id",
  9744. "in": "path",
  9745. "required": true
  9746. },
  9747. {
  9748. "type": "string",
  9749. "description": "username of the member to list",
  9750. "name": "username",
  9751. "in": "path",
  9752. "required": true
  9753. }
  9754. ],
  9755. "responses": {
  9756. "200": {
  9757. "$ref": "#/responses/User"
  9758. },
  9759. "404": {
  9760. "$ref": "#/responses/notFound"
  9761. }
  9762. }
  9763. },
  9764. "put": {
  9765. "produces": [
  9766. "application/json"
  9767. ],
  9768. "tags": [
  9769. "organization"
  9770. ],
  9771. "summary": "Add a team member",
  9772. "operationId": "orgAddTeamMember",
  9773. "parameters": [
  9774. {
  9775. "type": "integer",
  9776. "format": "int64",
  9777. "description": "id of the team",
  9778. "name": "id",
  9779. "in": "path",
  9780. "required": true
  9781. },
  9782. {
  9783. "type": "string",
  9784. "description": "username of the user to add",
  9785. "name": "username",
  9786. "in": "path",
  9787. "required": true
  9788. }
  9789. ],
  9790. "responses": {
  9791. "204": {
  9792. "$ref": "#/responses/empty"
  9793. },
  9794. "404": {
  9795. "$ref": "#/responses/notFound"
  9796. }
  9797. }
  9798. },
  9799. "delete": {
  9800. "produces": [
  9801. "application/json"
  9802. ],
  9803. "tags": [
  9804. "organization"
  9805. ],
  9806. "summary": "Remove a team member",
  9807. "operationId": "orgRemoveTeamMember",
  9808. "parameters": [
  9809. {
  9810. "type": "integer",
  9811. "format": "int64",
  9812. "description": "id of the team",
  9813. "name": "id",
  9814. "in": "path",
  9815. "required": true
  9816. },
  9817. {
  9818. "type": "string",
  9819. "description": "username of the user to remove",
  9820. "name": "username",
  9821. "in": "path",
  9822. "required": true
  9823. }
  9824. ],
  9825. "responses": {
  9826. "204": {
  9827. "$ref": "#/responses/empty"
  9828. },
  9829. "404": {
  9830. "$ref": "#/responses/notFound"
  9831. }
  9832. }
  9833. }
  9834. },
  9835. "/teams/{id}/repos": {
  9836. "get": {
  9837. "produces": [
  9838. "application/json"
  9839. ],
  9840. "tags": [
  9841. "organization"
  9842. ],
  9843. "summary": "List a team's repos",
  9844. "operationId": "orgListTeamRepos",
  9845. "parameters": [
  9846. {
  9847. "type": "integer",
  9848. "format": "int64",
  9849. "description": "id of the team",
  9850. "name": "id",
  9851. "in": "path",
  9852. "required": true
  9853. },
  9854. {
  9855. "type": "integer",
  9856. "description": "page number of results to return (1-based)",
  9857. "name": "page",
  9858. "in": "query"
  9859. },
  9860. {
  9861. "type": "integer",
  9862. "description": "page size of results",
  9863. "name": "limit",
  9864. "in": "query"
  9865. }
  9866. ],
  9867. "responses": {
  9868. "200": {
  9869. "$ref": "#/responses/RepositoryList"
  9870. }
  9871. }
  9872. }
  9873. },
  9874. "/teams/{id}/repos/{org}/{repo}": {
  9875. "put": {
  9876. "produces": [
  9877. "application/json"
  9878. ],
  9879. "tags": [
  9880. "organization"
  9881. ],
  9882. "summary": "Add a repository to a team",
  9883. "operationId": "orgAddTeamRepository",
  9884. "parameters": [
  9885. {
  9886. "type": "integer",
  9887. "format": "int64",
  9888. "description": "id of the team",
  9889. "name": "id",
  9890. "in": "path",
  9891. "required": true
  9892. },
  9893. {
  9894. "type": "string",
  9895. "description": "organization that owns the repo to add",
  9896. "name": "org",
  9897. "in": "path",
  9898. "required": true
  9899. },
  9900. {
  9901. "type": "string",
  9902. "description": "name of the repo to add",
  9903. "name": "repo",
  9904. "in": "path",
  9905. "required": true
  9906. }
  9907. ],
  9908. "responses": {
  9909. "204": {
  9910. "$ref": "#/responses/empty"
  9911. },
  9912. "403": {
  9913. "$ref": "#/responses/forbidden"
  9914. }
  9915. }
  9916. },
  9917. "delete": {
  9918. "description": "This does not delete the repository, it only removes the repository from the team.",
  9919. "produces": [
  9920. "application/json"
  9921. ],
  9922. "tags": [
  9923. "organization"
  9924. ],
  9925. "summary": "Remove a repository from a team",
  9926. "operationId": "orgRemoveTeamRepository",
  9927. "parameters": [
  9928. {
  9929. "type": "integer",
  9930. "format": "int64",
  9931. "description": "id of the team",
  9932. "name": "id",
  9933. "in": "path",
  9934. "required": true
  9935. },
  9936. {
  9937. "type": "string",
  9938. "description": "organization that owns the repo to remove",
  9939. "name": "org",
  9940. "in": "path",
  9941. "required": true
  9942. },
  9943. {
  9944. "type": "string",
  9945. "description": "name of the repo to remove",
  9946. "name": "repo",
  9947. "in": "path",
  9948. "required": true
  9949. }
  9950. ],
  9951. "responses": {
  9952. "204": {
  9953. "$ref": "#/responses/empty"
  9954. },
  9955. "403": {
  9956. "$ref": "#/responses/forbidden"
  9957. }
  9958. }
  9959. }
  9960. },
  9961. "/topics/search": {
  9962. "get": {
  9963. "produces": [
  9964. "application/json"
  9965. ],
  9966. "tags": [
  9967. "repository"
  9968. ],
  9969. "summary": "search topics via keyword",
  9970. "operationId": "topicSearch",
  9971. "parameters": [
  9972. {
  9973. "type": "string",
  9974. "description": "keywords to search",
  9975. "name": "q",
  9976. "in": "query",
  9977. "required": true
  9978. },
  9979. {
  9980. "type": "integer",
  9981. "description": "page number of results to return (1-based)",
  9982. "name": "page",
  9983. "in": "query"
  9984. },
  9985. {
  9986. "type": "integer",
  9987. "description": "page size of results",
  9988. "name": "limit",
  9989. "in": "query"
  9990. }
  9991. ],
  9992. "responses": {
  9993. "200": {
  9994. "$ref": "#/responses/TopicListResponse"
  9995. },
  9996. "403": {
  9997. "$ref": "#/responses/forbidden"
  9998. }
  9999. }
  10000. }
  10001. },
  10002. "/user": {
  10003. "get": {
  10004. "produces": [
  10005. "application/json"
  10006. ],
  10007. "tags": [
  10008. "user"
  10009. ],
  10010. "summary": "Get the authenticated user",
  10011. "operationId": "userGetCurrent",
  10012. "responses": {
  10013. "200": {
  10014. "$ref": "#/responses/User"
  10015. }
  10016. }
  10017. }
  10018. },
  10019. "/user/applications/oauth2": {
  10020. "get": {
  10021. "produces": [
  10022. "application/json"
  10023. ],
  10024. "tags": [
  10025. "user"
  10026. ],
  10027. "summary": "List the authenticated user's oauth2 applications",
  10028. "operationId": "userGetOauth2Application",
  10029. "parameters": [
  10030. {
  10031. "type": "integer",
  10032. "description": "page number of results to return (1-based)",
  10033. "name": "page",
  10034. "in": "query"
  10035. },
  10036. {
  10037. "type": "integer",
  10038. "description": "page size of results",
  10039. "name": "limit",
  10040. "in": "query"
  10041. }
  10042. ],
  10043. "responses": {
  10044. "200": {
  10045. "$ref": "#/responses/OAuth2ApplicationList"
  10046. }
  10047. }
  10048. },
  10049. "post": {
  10050. "produces": [
  10051. "application/json"
  10052. ],
  10053. "tags": [
  10054. "user"
  10055. ],
  10056. "summary": "creates a new OAuth2 application",
  10057. "operationId": "userCreateOAuth2Application",
  10058. "parameters": [
  10059. {
  10060. "name": "body",
  10061. "in": "body",
  10062. "required": true,
  10063. "schema": {
  10064. "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
  10065. }
  10066. }
  10067. ],
  10068. "responses": {
  10069. "201": {
  10070. "$ref": "#/responses/OAuth2Application"
  10071. }
  10072. }
  10073. }
  10074. },
  10075. "/user/applications/oauth2/{id}": {
  10076. "get": {
  10077. "produces": [
  10078. "application/json"
  10079. ],
  10080. "tags": [
  10081. "user"
  10082. ],
  10083. "summary": "get an OAuth2 Application",
  10084. "operationId": "userGetOAuth2Application",
  10085. "parameters": [
  10086. {
  10087. "type": "integer",
  10088. "format": "int64",
  10089. "description": "Application ID to be found",
  10090. "name": "id",
  10091. "in": "path",
  10092. "required": true
  10093. }
  10094. ],
  10095. "responses": {
  10096. "200": {
  10097. "$ref": "#/responses/OAuth2Application"
  10098. }
  10099. }
  10100. },
  10101. "delete": {
  10102. "produces": [
  10103. "application/json"
  10104. ],
  10105. "tags": [
  10106. "user"
  10107. ],
  10108. "summary": "delete an OAuth2 Application",
  10109. "operationId": "userDeleteOAuth2Application",
  10110. "parameters": [
  10111. {
  10112. "type": "integer",
  10113. "format": "int64",
  10114. "description": "token to be deleted",
  10115. "name": "id",
  10116. "in": "path",
  10117. "required": true
  10118. }
  10119. ],
  10120. "responses": {
  10121. "204": {
  10122. "$ref": "#/responses/empty"
  10123. }
  10124. }
  10125. },
  10126. "patch": {
  10127. "produces": [
  10128. "application/json"
  10129. ],
  10130. "tags": [
  10131. "user"
  10132. ],
  10133. "summary": "update an OAuth2 Application, this includes regenerating the client secret",
  10134. "operationId": "userUpdateOAuth2Application",
  10135. "parameters": [
  10136. {
  10137. "type": "integer",
  10138. "format": "int64",
  10139. "description": "application to be updated",
  10140. "name": "id",
  10141. "in": "path",
  10142. "required": true
  10143. },
  10144. {
  10145. "name": "body",
  10146. "in": "body",
  10147. "required": true,
  10148. "schema": {
  10149. "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
  10150. }
  10151. }
  10152. ],
  10153. "responses": {
  10154. "200": {
  10155. "$ref": "#/responses/OAuth2Application"
  10156. }
  10157. }
  10158. }
  10159. },
  10160. "/user/emails": {
  10161. "get": {
  10162. "produces": [
  10163. "application/json"
  10164. ],
  10165. "tags": [
  10166. "user"
  10167. ],
  10168. "summary": "List the authenticated user's email addresses",
  10169. "operationId": "userListEmails",
  10170. "responses": {
  10171. "200": {
  10172. "$ref": "#/responses/EmailList"
  10173. }
  10174. }
  10175. },
  10176. "post": {
  10177. "produces": [
  10178. "application/json"
  10179. ],
  10180. "tags": [
  10181. "user"
  10182. ],
  10183. "summary": "Add email addresses",
  10184. "operationId": "userAddEmail",
  10185. "parameters": [
  10186. {
  10187. "name": "body",
  10188. "in": "body",
  10189. "schema": {
  10190. "$ref": "#/definitions/CreateEmailOption"
  10191. }
  10192. }
  10193. ],
  10194. "responses": {
  10195. "201": {
  10196. "$ref": "#/responses/EmailList"
  10197. },
  10198. "422": {
  10199. "$ref": "#/responses/validationError"
  10200. }
  10201. }
  10202. },
  10203. "delete": {
  10204. "produces": [
  10205. "application/json"
  10206. ],
  10207. "tags": [
  10208. "user"
  10209. ],
  10210. "summary": "Delete email addresses",
  10211. "operationId": "userDeleteEmail",
  10212. "parameters": [
  10213. {
  10214. "name": "body",
  10215. "in": "body",
  10216. "schema": {
  10217. "$ref": "#/definitions/DeleteEmailOption"
  10218. }
  10219. }
  10220. ],
  10221. "responses": {
  10222. "204": {
  10223. "$ref": "#/responses/empty"
  10224. }
  10225. }
  10226. }
  10227. },
  10228. "/user/followers": {
  10229. "get": {
  10230. "produces": [
  10231. "application/json"
  10232. ],
  10233. "tags": [
  10234. "user"
  10235. ],
  10236. "summary": "List the authenticated user's followers",
  10237. "operationId": "userCurrentListFollowers",
  10238. "parameters": [
  10239. {
  10240. "type": "integer",
  10241. "description": "page number of results to return (1-based)",
  10242. "name": "page",
  10243. "in": "query"
  10244. },
  10245. {
  10246. "type": "integer",
  10247. "description": "page size of results",
  10248. "name": "limit",
  10249. "in": "query"
  10250. }
  10251. ],
  10252. "responses": {
  10253. "200": {
  10254. "$ref": "#/responses/UserList"
  10255. }
  10256. }
  10257. }
  10258. },
  10259. "/user/following": {
  10260. "get": {
  10261. "produces": [
  10262. "application/json"
  10263. ],
  10264. "tags": [
  10265. "user"
  10266. ],
  10267. "summary": "List the users that the authenticated user is following",
  10268. "operationId": "userCurrentListFollowing",
  10269. "parameters": [
  10270. {
  10271. "type": "integer",
  10272. "description": "page number of results to return (1-based)",
  10273. "name": "page",
  10274. "in": "query"
  10275. },
  10276. {
  10277. "type": "integer",
  10278. "description": "page size of results",
  10279. "name": "limit",
  10280. "in": "query"
  10281. }
  10282. ],
  10283. "responses": {
  10284. "200": {
  10285. "$ref": "#/responses/UserList"
  10286. }
  10287. }
  10288. }
  10289. },
  10290. "/user/following/{username}": {
  10291. "get": {
  10292. "tags": [
  10293. "user"
  10294. ],
  10295. "summary": "Check whether a user is followed by the authenticated user",
  10296. "operationId": "userCurrentCheckFollowing",
  10297. "parameters": [
  10298. {
  10299. "type": "string",
  10300. "description": "username of followed user",
  10301. "name": "username",
  10302. "in": "path",
  10303. "required": true
  10304. }
  10305. ],
  10306. "responses": {
  10307. "204": {
  10308. "$ref": "#/responses/empty"
  10309. },
  10310. "404": {
  10311. "$ref": "#/responses/notFound"
  10312. }
  10313. }
  10314. },
  10315. "put": {
  10316. "tags": [
  10317. "user"
  10318. ],
  10319. "summary": "Follow a user",
  10320. "operationId": "userCurrentPutFollow",
  10321. "parameters": [
  10322. {
  10323. "type": "string",
  10324. "description": "username of user to follow",
  10325. "name": "username",
  10326. "in": "path",
  10327. "required": true
  10328. }
  10329. ],
  10330. "responses": {
  10331. "204": {
  10332. "$ref": "#/responses/empty"
  10333. }
  10334. }
  10335. },
  10336. "delete": {
  10337. "tags": [
  10338. "user"
  10339. ],
  10340. "summary": "Unfollow a user",
  10341. "operationId": "userCurrentDeleteFollow",
  10342. "parameters": [
  10343. {
  10344. "type": "string",
  10345. "description": "username of user to unfollow",
  10346. "name": "username",
  10347. "in": "path",
  10348. "required": true
  10349. }
  10350. ],
  10351. "responses": {
  10352. "204": {
  10353. "$ref": "#/responses/empty"
  10354. }
  10355. }
  10356. }
  10357. },
  10358. "/user/gpg_keys": {
  10359. "get": {
  10360. "produces": [
  10361. "application/json"
  10362. ],
  10363. "tags": [
  10364. "user"
  10365. ],
  10366. "summary": "List the authenticated user's GPG keys",
  10367. "operationId": "userCurrentListGPGKeys",
  10368. "parameters": [
  10369. {
  10370. "type": "integer",
  10371. "description": "page number of results to return (1-based)",
  10372. "name": "page",
  10373. "in": "query"
  10374. },
  10375. {
  10376. "type": "integer",
  10377. "description": "page size of results",
  10378. "name": "limit",
  10379. "in": "query"
  10380. }
  10381. ],
  10382. "responses": {
  10383. "200": {
  10384. "$ref": "#/responses/GPGKeyList"
  10385. }
  10386. }
  10387. },
  10388. "post": {
  10389. "consumes": [
  10390. "application/json"
  10391. ],
  10392. "produces": [
  10393. "application/json"
  10394. ],
  10395. "tags": [
  10396. "user"
  10397. ],
  10398. "summary": "Create a GPG key",
  10399. "operationId": "userCurrentPostGPGKey",
  10400. "parameters": [
  10401. {
  10402. "name": "Form",
  10403. "in": "body",
  10404. "schema": {
  10405. "$ref": "#/definitions/CreateGPGKeyOption"
  10406. }
  10407. }
  10408. ],
  10409. "responses": {
  10410. "201": {
  10411. "$ref": "#/responses/GPGKey"
  10412. },
  10413. "404": {
  10414. "$ref": "#/responses/notFound"
  10415. },
  10416. "422": {
  10417. "$ref": "#/responses/validationError"
  10418. }
  10419. }
  10420. }
  10421. },
  10422. "/user/gpg_keys/{id}": {
  10423. "get": {
  10424. "produces": [
  10425. "application/json"
  10426. ],
  10427. "tags": [
  10428. "user"
  10429. ],
  10430. "summary": "Get a GPG key",
  10431. "operationId": "userCurrentGetGPGKey",
  10432. "parameters": [
  10433. {
  10434. "type": "integer",
  10435. "format": "int64",
  10436. "description": "id of key to get",
  10437. "name": "id",
  10438. "in": "path",
  10439. "required": true
  10440. }
  10441. ],
  10442. "responses": {
  10443. "200": {
  10444. "$ref": "#/responses/GPGKey"
  10445. },
  10446. "404": {
  10447. "$ref": "#/responses/notFound"
  10448. }
  10449. }
  10450. },
  10451. "delete": {
  10452. "produces": [
  10453. "application/json"
  10454. ],
  10455. "tags": [
  10456. "user"
  10457. ],
  10458. "summary": "Remove a GPG key",
  10459. "operationId": "userCurrentDeleteGPGKey",
  10460. "parameters": [
  10461. {
  10462. "type": "integer",
  10463. "format": "int64",
  10464. "description": "id of key to delete",
  10465. "name": "id",
  10466. "in": "path",
  10467. "required": true
  10468. }
  10469. ],
  10470. "responses": {
  10471. "204": {
  10472. "$ref": "#/responses/empty"
  10473. },
  10474. "403": {
  10475. "$ref": "#/responses/forbidden"
  10476. },
  10477. "404": {
  10478. "$ref": "#/responses/notFound"
  10479. }
  10480. }
  10481. }
  10482. },
  10483. "/user/keys": {
  10484. "get": {
  10485. "produces": [
  10486. "application/json"
  10487. ],
  10488. "tags": [
  10489. "user"
  10490. ],
  10491. "summary": "List the authenticated user's public keys",
  10492. "operationId": "userCurrentListKeys",
  10493. "parameters": [
  10494. {
  10495. "type": "string",
  10496. "description": "fingerprint of the key",
  10497. "name": "fingerprint",
  10498. "in": "query"
  10499. },
  10500. {
  10501. "type": "integer",
  10502. "description": "page number of results to return (1-based)",
  10503. "name": "page",
  10504. "in": "query"
  10505. },
  10506. {
  10507. "type": "integer",
  10508. "description": "page size of results",
  10509. "name": "limit",
  10510. "in": "query"
  10511. }
  10512. ],
  10513. "responses": {
  10514. "200": {
  10515. "$ref": "#/responses/PublicKeyList"
  10516. }
  10517. }
  10518. },
  10519. "post": {
  10520. "consumes": [
  10521. "application/json"
  10522. ],
  10523. "produces": [
  10524. "application/json"
  10525. ],
  10526. "tags": [
  10527. "user"
  10528. ],
  10529. "summary": "Create a public key",
  10530. "operationId": "userCurrentPostKey",
  10531. "parameters": [
  10532. {
  10533. "name": "body",
  10534. "in": "body",
  10535. "schema": {
  10536. "$ref": "#/definitions/CreateKeyOption"
  10537. }
  10538. }
  10539. ],
  10540. "responses": {
  10541. "201": {
  10542. "$ref": "#/responses/PublicKey"
  10543. },
  10544. "422": {
  10545. "$ref": "#/responses/validationError"
  10546. }
  10547. }
  10548. }
  10549. },
  10550. "/user/keys/{id}": {
  10551. "get": {
  10552. "produces": [
  10553. "application/json"
  10554. ],
  10555. "tags": [
  10556. "user"
  10557. ],
  10558. "summary": "Get a public key",
  10559. "operationId": "userCurrentGetKey",
  10560. "parameters": [
  10561. {
  10562. "type": "integer",
  10563. "format": "int64",
  10564. "description": "id of key to get",
  10565. "name": "id",
  10566. "in": "path",
  10567. "required": true
  10568. }
  10569. ],
  10570. "responses": {
  10571. "200": {
  10572. "$ref": "#/responses/PublicKey"
  10573. },
  10574. "404": {
  10575. "$ref": "#/responses/notFound"
  10576. }
  10577. }
  10578. },
  10579. "delete": {
  10580. "produces": [
  10581. "application/json"
  10582. ],
  10583. "tags": [
  10584. "user"
  10585. ],
  10586. "summary": "Delete a public key",
  10587. "operationId": "userCurrentDeleteKey",
  10588. "parameters": [
  10589. {
  10590. "type": "integer",
  10591. "format": "int64",
  10592. "description": "id of key to delete",
  10593. "name": "id",
  10594. "in": "path",
  10595. "required": true
  10596. }
  10597. ],
  10598. "responses": {
  10599. "204": {
  10600. "$ref": "#/responses/empty"
  10601. },
  10602. "403": {
  10603. "$ref": "#/responses/forbidden"
  10604. },
  10605. "404": {
  10606. "$ref": "#/responses/notFound"
  10607. }
  10608. }
  10609. }
  10610. },
  10611. "/user/orgs": {
  10612. "get": {
  10613. "produces": [
  10614. "application/json"
  10615. ],
  10616. "tags": [
  10617. "organization"
  10618. ],
  10619. "summary": "List the current user's organizations",
  10620. "operationId": "orgListCurrentUserOrgs",
  10621. "parameters": [
  10622. {
  10623. "type": "integer",
  10624. "description": "page number of results to return (1-based)",
  10625. "name": "page",
  10626. "in": "query"
  10627. },
  10628. {
  10629. "type": "integer",
  10630. "description": "page size of results",
  10631. "name": "limit",
  10632. "in": "query"
  10633. }
  10634. ],
  10635. "responses": {
  10636. "200": {
  10637. "$ref": "#/responses/OrganizationList"
  10638. }
  10639. }
  10640. }
  10641. },
  10642. "/user/repos": {
  10643. "get": {
  10644. "produces": [
  10645. "application/json"
  10646. ],
  10647. "tags": [
  10648. "user"
  10649. ],
  10650. "summary": "List the repos that the authenticated user owns or has access to",
  10651. "operationId": "userCurrentListRepos",
  10652. "parameters": [
  10653. {
  10654. "type": "integer",
  10655. "description": "page number of results to return (1-based)",
  10656. "name": "page",
  10657. "in": "query"
  10658. },
  10659. {
  10660. "type": "integer",
  10661. "description": "page size of results",
  10662. "name": "limit",
  10663. "in": "query"
  10664. }
  10665. ],
  10666. "responses": {
  10667. "200": {
  10668. "$ref": "#/responses/RepositoryList"
  10669. }
  10670. }
  10671. },
  10672. "post": {
  10673. "consumes": [
  10674. "application/json"
  10675. ],
  10676. "produces": [
  10677. "application/json"
  10678. ],
  10679. "tags": [
  10680. "repository",
  10681. "user"
  10682. ],
  10683. "summary": "Create a repository",
  10684. "operationId": "createCurrentUserRepo",
  10685. "parameters": [
  10686. {
  10687. "name": "body",
  10688. "in": "body",
  10689. "schema": {
  10690. "$ref": "#/definitions/CreateRepoOption"
  10691. }
  10692. }
  10693. ],
  10694. "responses": {
  10695. "201": {
  10696. "$ref": "#/responses/Repository"
  10697. },
  10698. "409": {
  10699. "description": "The repository with the same name already exists."
  10700. },
  10701. "422": {
  10702. "$ref": "#/responses/validationError"
  10703. }
  10704. }
  10705. }
  10706. },
  10707. "/user/starred": {
  10708. "get": {
  10709. "produces": [
  10710. "application/json"
  10711. ],
  10712. "tags": [
  10713. "user"
  10714. ],
  10715. "summary": "The repos that the authenticated user has starred",
  10716. "operationId": "userCurrentListStarred",
  10717. "parameters": [
  10718. {
  10719. "type": "integer",
  10720. "description": "page number of results to return (1-based)",
  10721. "name": "page",
  10722. "in": "query"
  10723. },
  10724. {
  10725. "type": "integer",
  10726. "description": "page size of results",
  10727. "name": "limit",
  10728. "in": "query"
  10729. }
  10730. ],
  10731. "responses": {
  10732. "200": {
  10733. "$ref": "#/responses/RepositoryList"
  10734. }
  10735. }
  10736. }
  10737. },
  10738. "/user/starred/{owner}/{repo}": {
  10739. "get": {
  10740. "tags": [
  10741. "user"
  10742. ],
  10743. "summary": "Whether the authenticated is starring the repo",
  10744. "operationId": "userCurrentCheckStarring",
  10745. "parameters": [
  10746. {
  10747. "type": "string",
  10748. "description": "owner of the repo",
  10749. "name": "owner",
  10750. "in": "path",
  10751. "required": true
  10752. },
  10753. {
  10754. "type": "string",
  10755. "description": "name of the repo",
  10756. "name": "repo",
  10757. "in": "path",
  10758. "required": true
  10759. }
  10760. ],
  10761. "responses": {
  10762. "204": {
  10763. "$ref": "#/responses/empty"
  10764. },
  10765. "404": {
  10766. "$ref": "#/responses/notFound"
  10767. }
  10768. }
  10769. },
  10770. "put": {
  10771. "tags": [
  10772. "user"
  10773. ],
  10774. "summary": "Star the given repo",
  10775. "operationId": "userCurrentPutStar",
  10776. "parameters": [
  10777. {
  10778. "type": "string",
  10779. "description": "owner of the repo to star",
  10780. "name": "owner",
  10781. "in": "path",
  10782. "required": true
  10783. },
  10784. {
  10785. "type": "string",
  10786. "description": "name of the repo to star",
  10787. "name": "repo",
  10788. "in": "path",
  10789. "required": true
  10790. }
  10791. ],
  10792. "responses": {
  10793. "204": {
  10794. "$ref": "#/responses/empty"
  10795. }
  10796. }
  10797. },
  10798. "delete": {
  10799. "tags": [
  10800. "user"
  10801. ],
  10802. "summary": "Unstar the given repo",
  10803. "operationId": "userCurrentDeleteStar",
  10804. "parameters": [
  10805. {
  10806. "type": "string",
  10807. "description": "owner of the repo to unstar",
  10808. "name": "owner",
  10809. "in": "path",
  10810. "required": true
  10811. },
  10812. {
  10813. "type": "string",
  10814. "description": "name of the repo to unstar",
  10815. "name": "repo",
  10816. "in": "path",
  10817. "required": true
  10818. }
  10819. ],
  10820. "responses": {
  10821. "204": {
  10822. "$ref": "#/responses/empty"
  10823. }
  10824. }
  10825. }
  10826. },
  10827. "/user/stopwatches": {
  10828. "get": {
  10829. "consumes": [
  10830. "application/json"
  10831. ],
  10832. "produces": [
  10833. "application/json"
  10834. ],
  10835. "tags": [
  10836. "user"
  10837. ],
  10838. "summary": "Get list of all existing stopwatches",
  10839. "operationId": "userGetStopWatches",
  10840. "parameters": [
  10841. {
  10842. "type": "integer",
  10843. "description": "page number of results to return (1-based)",
  10844. "name": "page",
  10845. "in": "query"
  10846. },
  10847. {
  10848. "type": "integer",
  10849. "description": "page size of results",
  10850. "name": "limit",
  10851. "in": "query"
  10852. }
  10853. ],
  10854. "responses": {
  10855. "200": {
  10856. "$ref": "#/responses/StopWatchList"
  10857. }
  10858. }
  10859. }
  10860. },
  10861. "/user/subscriptions": {
  10862. "get": {
  10863. "produces": [
  10864. "application/json"
  10865. ],
  10866. "tags": [
  10867. "user"
  10868. ],
  10869. "summary": "List repositories watched by the authenticated user",
  10870. "operationId": "userCurrentListSubscriptions",
  10871. "parameters": [
  10872. {
  10873. "type": "integer",
  10874. "description": "page number of results to return (1-based)",
  10875. "name": "page",
  10876. "in": "query"
  10877. },
  10878. {
  10879. "type": "integer",
  10880. "description": "page size of results",
  10881. "name": "limit",
  10882. "in": "query"
  10883. }
  10884. ],
  10885. "responses": {
  10886. "200": {
  10887. "$ref": "#/responses/RepositoryList"
  10888. }
  10889. }
  10890. }
  10891. },
  10892. "/user/teams": {
  10893. "get": {
  10894. "produces": [
  10895. "application/json"
  10896. ],
  10897. "tags": [
  10898. "user"
  10899. ],
  10900. "summary": "List all the teams a user belongs to",
  10901. "operationId": "userListTeams",
  10902. "parameters": [
  10903. {
  10904. "type": "integer",
  10905. "description": "page number of results to return (1-based)",
  10906. "name": "page",
  10907. "in": "query"
  10908. },
  10909. {
  10910. "type": "integer",
  10911. "description": "page size of results",
  10912. "name": "limit",
  10913. "in": "query"
  10914. }
  10915. ],
  10916. "responses": {
  10917. "200": {
  10918. "$ref": "#/responses/TeamList"
  10919. }
  10920. }
  10921. }
  10922. },
  10923. "/user/times": {
  10924. "get": {
  10925. "produces": [
  10926. "application/json"
  10927. ],
  10928. "tags": [
  10929. "user"
  10930. ],
  10931. "summary": "List the current user's tracked times",
  10932. "operationId": "userCurrentTrackedTimes",
  10933. "parameters": [
  10934. {
  10935. "type": "string",
  10936. "format": "date-time",
  10937. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  10938. "name": "since",
  10939. "in": "query"
  10940. },
  10941. {
  10942. "type": "string",
  10943. "format": "date-time",
  10944. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  10945. "name": "before",
  10946. "in": "query"
  10947. }
  10948. ],
  10949. "responses": {
  10950. "200": {
  10951. "$ref": "#/responses/TrackedTimeList"
  10952. }
  10953. }
  10954. }
  10955. },
  10956. "/users/search": {
  10957. "get": {
  10958. "produces": [
  10959. "application/json"
  10960. ],
  10961. "tags": [
  10962. "user"
  10963. ],
  10964. "summary": "Search for users",
  10965. "operationId": "userSearch",
  10966. "parameters": [
  10967. {
  10968. "type": "string",
  10969. "description": "keyword",
  10970. "name": "q",
  10971. "in": "query"
  10972. },
  10973. {
  10974. "type": "integer",
  10975. "format": "int64",
  10976. "description": "ID of the user to search for",
  10977. "name": "uid",
  10978. "in": "query"
  10979. },
  10980. {
  10981. "type": "integer",
  10982. "description": "page number of results to return (1-based)",
  10983. "name": "page",
  10984. "in": "query"
  10985. },
  10986. {
  10987. "type": "integer",
  10988. "description": "page size of results",
  10989. "name": "limit",
  10990. "in": "query"
  10991. }
  10992. ],
  10993. "responses": {
  10994. "200": {
  10995. "description": "SearchResults of a successful search",
  10996. "schema": {
  10997. "type": "object",
  10998. "properties": {
  10999. "data": {
  11000. "type": "array",
  11001. "items": {
  11002. "$ref": "#/definitions/User"
  11003. }
  11004. },
  11005. "ok": {
  11006. "type": "boolean"
  11007. }
  11008. }
  11009. }
  11010. }
  11011. }
  11012. }
  11013. },
  11014. "/users/{follower}/following/{followee}": {
  11015. "get": {
  11016. "tags": [
  11017. "user"
  11018. ],
  11019. "summary": "Check if one user is following another user",
  11020. "operationId": "userCheckFollowing",
  11021. "parameters": [
  11022. {
  11023. "type": "string",
  11024. "description": "username of following user",
  11025. "name": "follower",
  11026. "in": "path",
  11027. "required": true
  11028. },
  11029. {
  11030. "type": "string",
  11031. "description": "username of followed user",
  11032. "name": "followee",
  11033. "in": "path",
  11034. "required": true
  11035. }
  11036. ],
  11037. "responses": {
  11038. "204": {
  11039. "$ref": "#/responses/empty"
  11040. },
  11041. "404": {
  11042. "$ref": "#/responses/notFound"
  11043. }
  11044. }
  11045. }
  11046. },
  11047. "/users/{username}": {
  11048. "get": {
  11049. "produces": [
  11050. "application/json"
  11051. ],
  11052. "tags": [
  11053. "user"
  11054. ],
  11055. "summary": "Get a user",
  11056. "operationId": "userGet",
  11057. "parameters": [
  11058. {
  11059. "type": "string",
  11060. "description": "username of user to get",
  11061. "name": "username",
  11062. "in": "path",
  11063. "required": true
  11064. }
  11065. ],
  11066. "responses": {
  11067. "200": {
  11068. "$ref": "#/responses/User"
  11069. },
  11070. "404": {
  11071. "$ref": "#/responses/notFound"
  11072. }
  11073. }
  11074. }
  11075. },
  11076. "/users/{username}/followers": {
  11077. "get": {
  11078. "produces": [
  11079. "application/json"
  11080. ],
  11081. "tags": [
  11082. "user"
  11083. ],
  11084. "summary": "List the given user's followers",
  11085. "operationId": "userListFollowers",
  11086. "parameters": [
  11087. {
  11088. "type": "string",
  11089. "description": "username of user",
  11090. "name": "username",
  11091. "in": "path",
  11092. "required": true
  11093. },
  11094. {
  11095. "type": "integer",
  11096. "description": "page number of results to return (1-based)",
  11097. "name": "page",
  11098. "in": "query"
  11099. },
  11100. {
  11101. "type": "integer",
  11102. "description": "page size of results",
  11103. "name": "limit",
  11104. "in": "query"
  11105. }
  11106. ],
  11107. "responses": {
  11108. "200": {
  11109. "$ref": "#/responses/UserList"
  11110. }
  11111. }
  11112. }
  11113. },
  11114. "/users/{username}/following": {
  11115. "get": {
  11116. "produces": [
  11117. "application/json"
  11118. ],
  11119. "tags": [
  11120. "user"
  11121. ],
  11122. "summary": "List the users that the given user is following",
  11123. "operationId": "userListFollowing",
  11124. "parameters": [
  11125. {
  11126. "type": "string",
  11127. "description": "username of user",
  11128. "name": "username",
  11129. "in": "path",
  11130. "required": true
  11131. },
  11132. {
  11133. "type": "integer",
  11134. "description": "page number of results to return (1-based)",
  11135. "name": "page",
  11136. "in": "query"
  11137. },
  11138. {
  11139. "type": "integer",
  11140. "description": "page size of results",
  11141. "name": "limit",
  11142. "in": "query"
  11143. }
  11144. ],
  11145. "responses": {
  11146. "200": {
  11147. "$ref": "#/responses/UserList"
  11148. }
  11149. }
  11150. }
  11151. },
  11152. "/users/{username}/gpg_keys": {
  11153. "get": {
  11154. "produces": [
  11155. "application/json"
  11156. ],
  11157. "tags": [
  11158. "user"
  11159. ],
  11160. "summary": "List the given user's GPG keys",
  11161. "operationId": "userListGPGKeys",
  11162. "parameters": [
  11163. {
  11164. "type": "string",
  11165. "description": "username of user",
  11166. "name": "username",
  11167. "in": "path",
  11168. "required": true
  11169. },
  11170. {
  11171. "type": "integer",
  11172. "description": "page number of results to return (1-based)",
  11173. "name": "page",
  11174. "in": "query"
  11175. },
  11176. {
  11177. "type": "integer",
  11178. "description": "page size of results",
  11179. "name": "limit",
  11180. "in": "query"
  11181. }
  11182. ],
  11183. "responses": {
  11184. "200": {
  11185. "$ref": "#/responses/GPGKeyList"
  11186. }
  11187. }
  11188. }
  11189. },
  11190. "/users/{username}/heatmap": {
  11191. "get": {
  11192. "produces": [
  11193. "application/json"
  11194. ],
  11195. "tags": [
  11196. "user"
  11197. ],
  11198. "summary": "Get a user's heatmap",
  11199. "operationId": "userGetHeatmapData",
  11200. "parameters": [
  11201. {
  11202. "type": "string",
  11203. "description": "username of user to get",
  11204. "name": "username",
  11205. "in": "path",
  11206. "required": true
  11207. }
  11208. ],
  11209. "responses": {
  11210. "200": {
  11211. "$ref": "#/responses/UserHeatmapData"
  11212. },
  11213. "404": {
  11214. "$ref": "#/responses/notFound"
  11215. }
  11216. }
  11217. }
  11218. },
  11219. "/users/{username}/keys": {
  11220. "get": {
  11221. "produces": [
  11222. "application/json"
  11223. ],
  11224. "tags": [
  11225. "user"
  11226. ],
  11227. "summary": "List the given user's public keys",
  11228. "operationId": "userListKeys",
  11229. "parameters": [
  11230. {
  11231. "type": "string",
  11232. "description": "username of user",
  11233. "name": "username",
  11234. "in": "path",
  11235. "required": true
  11236. },
  11237. {
  11238. "type": "string",
  11239. "description": "fingerprint of the key",
  11240. "name": "fingerprint",
  11241. "in": "query"
  11242. },
  11243. {
  11244. "type": "integer",
  11245. "description": "page number of results to return (1-based)",
  11246. "name": "page",
  11247. "in": "query"
  11248. },
  11249. {
  11250. "type": "integer",
  11251. "description": "page size of results",
  11252. "name": "limit",
  11253. "in": "query"
  11254. }
  11255. ],
  11256. "responses": {
  11257. "200": {
  11258. "$ref": "#/responses/PublicKeyList"
  11259. }
  11260. }
  11261. }
  11262. },
  11263. "/users/{username}/orgs": {
  11264. "get": {
  11265. "produces": [
  11266. "application/json"
  11267. ],
  11268. "tags": [
  11269. "organization"
  11270. ],
  11271. "summary": "List a user's organizations",
  11272. "operationId": "orgListUserOrgs",
  11273. "parameters": [
  11274. {
  11275. "type": "string",
  11276. "description": "username of user",
  11277. "name": "username",
  11278. "in": "path",
  11279. "required": true
  11280. },
  11281. {
  11282. "type": "integer",
  11283. "description": "page number of results to return (1-based)",
  11284. "name": "page",
  11285. "in": "query"
  11286. },
  11287. {
  11288. "type": "integer",
  11289. "description": "page size of results",
  11290. "name": "limit",
  11291. "in": "query"
  11292. }
  11293. ],
  11294. "responses": {
  11295. "200": {
  11296. "$ref": "#/responses/OrganizationList"
  11297. }
  11298. }
  11299. }
  11300. },
  11301. "/users/{username}/repos": {
  11302. "get": {
  11303. "produces": [
  11304. "application/json"
  11305. ],
  11306. "tags": [
  11307. "user"
  11308. ],
  11309. "summary": "List the repos owned by the given user",
  11310. "operationId": "userListRepos",
  11311. "parameters": [
  11312. {
  11313. "type": "string",
  11314. "description": "username of user",
  11315. "name": "username",
  11316. "in": "path",
  11317. "required": true
  11318. },
  11319. {
  11320. "type": "integer",
  11321. "description": "page number of results to return (1-based)",
  11322. "name": "page",
  11323. "in": "query"
  11324. },
  11325. {
  11326. "type": "integer",
  11327. "description": "page size of results",
  11328. "name": "limit",
  11329. "in": "query"
  11330. }
  11331. ],
  11332. "responses": {
  11333. "200": {
  11334. "$ref": "#/responses/RepositoryList"
  11335. }
  11336. }
  11337. }
  11338. },
  11339. "/users/{username}/starred": {
  11340. "get": {
  11341. "produces": [
  11342. "application/json"
  11343. ],
  11344. "tags": [
  11345. "user"
  11346. ],
  11347. "summary": "The repos that the given user has starred",
  11348. "operationId": "userListStarred",
  11349. "parameters": [
  11350. {
  11351. "type": "string",
  11352. "description": "username of user",
  11353. "name": "username",
  11354. "in": "path",
  11355. "required": true
  11356. },
  11357. {
  11358. "type": "integer",
  11359. "description": "page number of results to return (1-based)",
  11360. "name": "page",
  11361. "in": "query"
  11362. },
  11363. {
  11364. "type": "integer",
  11365. "description": "page size of results",
  11366. "name": "limit",
  11367. "in": "query"
  11368. }
  11369. ],
  11370. "responses": {
  11371. "200": {
  11372. "$ref": "#/responses/RepositoryList"
  11373. }
  11374. }
  11375. }
  11376. },
  11377. "/users/{username}/subscriptions": {
  11378. "get": {
  11379. "produces": [
  11380. "application/json"
  11381. ],
  11382. "tags": [
  11383. "user"
  11384. ],
  11385. "summary": "List the repositories watched by a user",
  11386. "operationId": "userListSubscriptions",
  11387. "parameters": [
  11388. {
  11389. "type": "string",
  11390. "description": "username of the user",
  11391. "name": "username",
  11392. "in": "path",
  11393. "required": true
  11394. },
  11395. {
  11396. "type": "integer",
  11397. "description": "page number of results to return (1-based)",
  11398. "name": "page",
  11399. "in": "query"
  11400. },
  11401. {
  11402. "type": "integer",
  11403. "description": "page size of results",
  11404. "name": "limit",
  11405. "in": "query"
  11406. }
  11407. ],
  11408. "responses": {
  11409. "200": {
  11410. "$ref": "#/responses/RepositoryList"
  11411. }
  11412. }
  11413. }
  11414. },
  11415. "/users/{username}/tokens": {
  11416. "get": {
  11417. "produces": [
  11418. "application/json"
  11419. ],
  11420. "tags": [
  11421. "user"
  11422. ],
  11423. "summary": "List the authenticated user's access tokens",
  11424. "operationId": "userGetTokens",
  11425. "parameters": [
  11426. {
  11427. "type": "string",
  11428. "description": "username of user",
  11429. "name": "username",
  11430. "in": "path",
  11431. "required": true
  11432. },
  11433. {
  11434. "type": "integer",
  11435. "description": "page number of results to return (1-based)",
  11436. "name": "page",
  11437. "in": "query"
  11438. },
  11439. {
  11440. "type": "integer",
  11441. "description": "page size of results",
  11442. "name": "limit",
  11443. "in": "query"
  11444. }
  11445. ],
  11446. "responses": {
  11447. "200": {
  11448. "$ref": "#/responses/AccessTokenList"
  11449. }
  11450. }
  11451. },
  11452. "post": {
  11453. "consumes": [
  11454. "application/json"
  11455. ],
  11456. "produces": [
  11457. "application/json"
  11458. ],
  11459. "tags": [
  11460. "user"
  11461. ],
  11462. "summary": "Create an access token",
  11463. "operationId": "userCreateToken",
  11464. "parameters": [
  11465. {
  11466. "type": "string",
  11467. "x-go-name": "Name",
  11468. "description": "username of user",
  11469. "name": "username",
  11470. "in": "path",
  11471. "required": true
  11472. },
  11473. {
  11474. "name": "accessToken",
  11475. "in": "body",
  11476. "schema": {
  11477. "type": "object",
  11478. "required": [
  11479. "name"
  11480. ],
  11481. "properties": {
  11482. "name": {
  11483. "type": "string"
  11484. }
  11485. }
  11486. }
  11487. }
  11488. ],
  11489. "responses": {
  11490. "201": {
  11491. "$ref": "#/responses/AccessToken"
  11492. }
  11493. }
  11494. }
  11495. },
  11496. "/users/{username}/tokens/{token}": {
  11497. "delete": {
  11498. "produces": [
  11499. "application/json"
  11500. ],
  11501. "tags": [
  11502. "user"
  11503. ],
  11504. "summary": "delete an access token",
  11505. "operationId": "userDeleteAccessToken",
  11506. "parameters": [
  11507. {
  11508. "type": "string",
  11509. "description": "username of user",
  11510. "name": "username",
  11511. "in": "path",
  11512. "required": true
  11513. },
  11514. {
  11515. "type": "string",
  11516. "description": "token to be deleted, identified by ID and if not available by name",
  11517. "name": "token",
  11518. "in": "path",
  11519. "required": true
  11520. }
  11521. ],
  11522. "responses": {
  11523. "204": {
  11524. "$ref": "#/responses/empty"
  11525. },
  11526. "422": {
  11527. "$ref": "#/responses/error"
  11528. }
  11529. }
  11530. }
  11531. },
  11532. "/version": {
  11533. "get": {
  11534. "produces": [
  11535. "application/json"
  11536. ],
  11537. "tags": [
  11538. "miscellaneous"
  11539. ],
  11540. "summary": "Returns the version of the Gitea application",
  11541. "operationId": "getVersion",
  11542. "responses": {
  11543. "200": {
  11544. "$ref": "#/responses/ServerVersion"
  11545. }
  11546. }
  11547. }
  11548. }
  11549. },
  11550. "definitions": {
  11551. "APIError": {
  11552. "description": "APIError is an api error with a message",
  11553. "type": "object",
  11554. "properties": {
  11555. "message": {
  11556. "type": "string",
  11557. "x-go-name": "Message"
  11558. },
  11559. "url": {
  11560. "type": "string",
  11561. "x-go-name": "URL"
  11562. }
  11563. },
  11564. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11565. },
  11566. "AccessToken": {
  11567. "type": "object",
  11568. "title": "AccessToken represents an API access token.",
  11569. "properties": {
  11570. "id": {
  11571. "type": "integer",
  11572. "format": "int64",
  11573. "x-go-name": "ID"
  11574. },
  11575. "name": {
  11576. "type": "string",
  11577. "x-go-name": "Name"
  11578. },
  11579. "sha1": {
  11580. "type": "string",
  11581. "x-go-name": "Token"
  11582. },
  11583. "token_last_eight": {
  11584. "type": "string",
  11585. "x-go-name": "TokenLastEight"
  11586. }
  11587. },
  11588. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11589. },
  11590. "AddCollaboratorOption": {
  11591. "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository",
  11592. "type": "object",
  11593. "properties": {
  11594. "permission": {
  11595. "type": "string",
  11596. "x-go-name": "Permission"
  11597. }
  11598. },
  11599. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11600. },
  11601. "AddTimeOption": {
  11602. "description": "AddTimeOption options for adding time to an issue",
  11603. "type": "object",
  11604. "required": [
  11605. "time"
  11606. ],
  11607. "properties": {
  11608. "created": {
  11609. "type": "string",
  11610. "format": "date-time",
  11611. "x-go-name": "Created"
  11612. },
  11613. "time": {
  11614. "description": "time in seconds",
  11615. "type": "integer",
  11616. "format": "int64",
  11617. "x-go-name": "Time"
  11618. },
  11619. "user_name": {
  11620. "description": "User who spent the time (optional)",
  11621. "type": "string",
  11622. "x-go-name": "User"
  11623. }
  11624. },
  11625. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11626. },
  11627. "AnnotatedTag": {
  11628. "description": "AnnotatedTag represents an annotated tag",
  11629. "type": "object",
  11630. "properties": {
  11631. "message": {
  11632. "type": "string",
  11633. "x-go-name": "Message"
  11634. },
  11635. "object": {
  11636. "$ref": "#/definitions/AnnotatedTagObject"
  11637. },
  11638. "sha": {
  11639. "type": "string",
  11640. "x-go-name": "SHA"
  11641. },
  11642. "tag": {
  11643. "type": "string",
  11644. "x-go-name": "Tag"
  11645. },
  11646. "tagger": {
  11647. "$ref": "#/definitions/CommitUser"
  11648. },
  11649. "url": {
  11650. "type": "string",
  11651. "x-go-name": "URL"
  11652. },
  11653. "verification": {
  11654. "$ref": "#/definitions/PayloadCommitVerification"
  11655. }
  11656. },
  11657. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11658. },
  11659. "AnnotatedTagObject": {
  11660. "description": "AnnotatedTagObject contains meta information of the tag object",
  11661. "type": "object",
  11662. "properties": {
  11663. "sha": {
  11664. "type": "string",
  11665. "x-go-name": "SHA"
  11666. },
  11667. "type": {
  11668. "type": "string",
  11669. "x-go-name": "Type"
  11670. },
  11671. "url": {
  11672. "type": "string",
  11673. "x-go-name": "URL"
  11674. }
  11675. },
  11676. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11677. },
  11678. "Attachment": {
  11679. "description": "Attachment a generic attachment",
  11680. "type": "object",
  11681. "properties": {
  11682. "browser_download_url": {
  11683. "type": "string",
  11684. "x-go-name": "DownloadURL"
  11685. },
  11686. "created_at": {
  11687. "type": "string",
  11688. "format": "date-time",
  11689. "x-go-name": "Created"
  11690. },
  11691. "download_count": {
  11692. "type": "integer",
  11693. "format": "int64",
  11694. "x-go-name": "DownloadCount"
  11695. },
  11696. "id": {
  11697. "type": "integer",
  11698. "format": "int64",
  11699. "x-go-name": "ID"
  11700. },
  11701. "name": {
  11702. "type": "string",
  11703. "x-go-name": "Name"
  11704. },
  11705. "size": {
  11706. "type": "integer",
  11707. "format": "int64",
  11708. "x-go-name": "Size"
  11709. },
  11710. "uuid": {
  11711. "type": "string",
  11712. "x-go-name": "UUID"
  11713. }
  11714. },
  11715. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11716. },
  11717. "Branch": {
  11718. "description": "Branch represents a repository branch",
  11719. "type": "object",
  11720. "properties": {
  11721. "commit": {
  11722. "$ref": "#/definitions/PayloadCommit"
  11723. },
  11724. "effective_branch_protection_name": {
  11725. "type": "string",
  11726. "x-go-name": "EffectiveBranchProtectionName"
  11727. },
  11728. "enable_status_check": {
  11729. "type": "boolean",
  11730. "x-go-name": "EnableStatusCheck"
  11731. },
  11732. "name": {
  11733. "type": "string",
  11734. "x-go-name": "Name"
  11735. },
  11736. "protected": {
  11737. "type": "boolean",
  11738. "x-go-name": "Protected"
  11739. },
  11740. "required_approvals": {
  11741. "type": "integer",
  11742. "format": "int64",
  11743. "x-go-name": "RequiredApprovals"
  11744. },
  11745. "status_check_contexts": {
  11746. "type": "array",
  11747. "items": {
  11748. "type": "string"
  11749. },
  11750. "x-go-name": "StatusCheckContexts"
  11751. },
  11752. "user_can_merge": {
  11753. "type": "boolean",
  11754. "x-go-name": "UserCanMerge"
  11755. },
  11756. "user_can_push": {
  11757. "type": "boolean",
  11758. "x-go-name": "UserCanPush"
  11759. }
  11760. },
  11761. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11762. },
  11763. "BranchProtection": {
  11764. "description": "BranchProtection represents a branch protection for a repository",
  11765. "type": "object",
  11766. "properties": {
  11767. "approvals_whitelist_teams": {
  11768. "type": "array",
  11769. "items": {
  11770. "type": "string"
  11771. },
  11772. "x-go-name": "ApprovalsWhitelistTeams"
  11773. },
  11774. "approvals_whitelist_username": {
  11775. "type": "array",
  11776. "items": {
  11777. "type": "string"
  11778. },
  11779. "x-go-name": "ApprovalsWhitelistUsernames"
  11780. },
  11781. "block_on_official_review_requests": {
  11782. "type": "boolean",
  11783. "x-go-name": "BlockOnOfficialReviewRequests"
  11784. },
  11785. "block_on_outdated_branch": {
  11786. "type": "boolean",
  11787. "x-go-name": "BlockOnOutdatedBranch"
  11788. },
  11789. "block_on_rejected_reviews": {
  11790. "type": "boolean",
  11791. "x-go-name": "BlockOnRejectedReviews"
  11792. },
  11793. "branch_name": {
  11794. "type": "string",
  11795. "x-go-name": "BranchName"
  11796. },
  11797. "created_at": {
  11798. "type": "string",
  11799. "format": "date-time",
  11800. "x-go-name": "Created"
  11801. },
  11802. "dismiss_stale_approvals": {
  11803. "type": "boolean",
  11804. "x-go-name": "DismissStaleApprovals"
  11805. },
  11806. "enable_approvals_whitelist": {
  11807. "type": "boolean",
  11808. "x-go-name": "EnableApprovalsWhitelist"
  11809. },
  11810. "enable_merge_whitelist": {
  11811. "type": "boolean",
  11812. "x-go-name": "EnableMergeWhitelist"
  11813. },
  11814. "enable_push": {
  11815. "type": "boolean",
  11816. "x-go-name": "EnablePush"
  11817. },
  11818. "enable_push_whitelist": {
  11819. "type": "boolean",
  11820. "x-go-name": "EnablePushWhitelist"
  11821. },
  11822. "enable_status_check": {
  11823. "type": "boolean",
  11824. "x-go-name": "EnableStatusCheck"
  11825. },
  11826. "merge_whitelist_teams": {
  11827. "type": "array",
  11828. "items": {
  11829. "type": "string"
  11830. },
  11831. "x-go-name": "MergeWhitelistTeams"
  11832. },
  11833. "merge_whitelist_usernames": {
  11834. "type": "array",
  11835. "items": {
  11836. "type": "string"
  11837. },
  11838. "x-go-name": "MergeWhitelistUsernames"
  11839. },
  11840. "protected_file_patterns": {
  11841. "type": "string",
  11842. "x-go-name": "ProtectedFilePatterns"
  11843. },
  11844. "push_whitelist_deploy_keys": {
  11845. "type": "boolean",
  11846. "x-go-name": "PushWhitelistDeployKeys"
  11847. },
  11848. "push_whitelist_teams": {
  11849. "type": "array",
  11850. "items": {
  11851. "type": "string"
  11852. },
  11853. "x-go-name": "PushWhitelistTeams"
  11854. },
  11855. "push_whitelist_usernames": {
  11856. "type": "array",
  11857. "items": {
  11858. "type": "string"
  11859. },
  11860. "x-go-name": "PushWhitelistUsernames"
  11861. },
  11862. "require_signed_commits": {
  11863. "type": "boolean",
  11864. "x-go-name": "RequireSignedCommits"
  11865. },
  11866. "required_approvals": {
  11867. "type": "integer",
  11868. "format": "int64",
  11869. "x-go-name": "RequiredApprovals"
  11870. },
  11871. "status_check_contexts": {
  11872. "type": "array",
  11873. "items": {
  11874. "type": "string"
  11875. },
  11876. "x-go-name": "StatusCheckContexts"
  11877. },
  11878. "updated_at": {
  11879. "type": "string",
  11880. "format": "date-time",
  11881. "x-go-name": "Updated"
  11882. }
  11883. },
  11884. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11885. },
  11886. "CombinedStatus": {
  11887. "description": "CombinedStatus holds the combined state of several statuses for a single commit",
  11888. "type": "object",
  11889. "properties": {
  11890. "commit_url": {
  11891. "type": "string",
  11892. "x-go-name": "CommitURL"
  11893. },
  11894. "repository": {
  11895. "$ref": "#/definitions/Repository"
  11896. },
  11897. "sha": {
  11898. "type": "string",
  11899. "x-go-name": "SHA"
  11900. },
  11901. "state": {
  11902. "$ref": "#/definitions/CommitStatusState"
  11903. },
  11904. "statuses": {
  11905. "type": "array",
  11906. "items": {
  11907. "$ref": "#/definitions/CommitStatus"
  11908. },
  11909. "x-go-name": "Statuses"
  11910. },
  11911. "total_count": {
  11912. "type": "integer",
  11913. "format": "int64",
  11914. "x-go-name": "TotalCount"
  11915. },
  11916. "url": {
  11917. "type": "string",
  11918. "x-go-name": "URL"
  11919. }
  11920. },
  11921. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11922. },
  11923. "Comment": {
  11924. "description": "Comment represents a comment on a commit or issue",
  11925. "type": "object",
  11926. "properties": {
  11927. "body": {
  11928. "type": "string",
  11929. "x-go-name": "Body"
  11930. },
  11931. "created_at": {
  11932. "type": "string",
  11933. "format": "date-time",
  11934. "x-go-name": "Created"
  11935. },
  11936. "html_url": {
  11937. "type": "string",
  11938. "x-go-name": "HTMLURL"
  11939. },
  11940. "id": {
  11941. "type": "integer",
  11942. "format": "int64",
  11943. "x-go-name": "ID"
  11944. },
  11945. "issue_url": {
  11946. "type": "string",
  11947. "x-go-name": "IssueURL"
  11948. },
  11949. "original_author": {
  11950. "type": "string",
  11951. "x-go-name": "OriginalAuthor"
  11952. },
  11953. "original_author_id": {
  11954. "type": "integer",
  11955. "format": "int64",
  11956. "x-go-name": "OriginalAuthorID"
  11957. },
  11958. "pull_request_url": {
  11959. "type": "string",
  11960. "x-go-name": "PRURL"
  11961. },
  11962. "updated_at": {
  11963. "type": "string",
  11964. "format": "date-time",
  11965. "x-go-name": "Updated"
  11966. },
  11967. "user": {
  11968. "$ref": "#/definitions/User"
  11969. }
  11970. },
  11971. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11972. },
  11973. "Commit": {
  11974. "type": "object",
  11975. "title": "Commit contains information generated from a Git commit.",
  11976. "properties": {
  11977. "author": {
  11978. "$ref": "#/definitions/User"
  11979. },
  11980. "commit": {
  11981. "$ref": "#/definitions/RepoCommit"
  11982. },
  11983. "committer": {
  11984. "$ref": "#/definitions/User"
  11985. },
  11986. "created": {
  11987. "type": "string",
  11988. "format": "date-time",
  11989. "x-go-name": "Created"
  11990. },
  11991. "files": {
  11992. "type": "array",
  11993. "items": {
  11994. "$ref": "#/definitions/CommitAffectedFiles"
  11995. },
  11996. "x-go-name": "Files"
  11997. },
  11998. "html_url": {
  11999. "type": "string",
  12000. "x-go-name": "HTMLURL"
  12001. },
  12002. "parents": {
  12003. "type": "array",
  12004. "items": {
  12005. "$ref": "#/definitions/CommitMeta"
  12006. },
  12007. "x-go-name": "Parents"
  12008. },
  12009. "sha": {
  12010. "type": "string",
  12011. "x-go-name": "SHA"
  12012. },
  12013. "url": {
  12014. "type": "string",
  12015. "x-go-name": "URL"
  12016. }
  12017. },
  12018. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12019. },
  12020. "CommitAffectedFiles": {
  12021. "description": "CommitAffectedFiles store information about files affected by the commit",
  12022. "type": "object",
  12023. "properties": {
  12024. "filename": {
  12025. "type": "string",
  12026. "x-go-name": "Filename"
  12027. }
  12028. },
  12029. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12030. },
  12031. "CommitDateOptions": {
  12032. "description": "CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE",
  12033. "type": "object",
  12034. "properties": {
  12035. "author": {
  12036. "type": "string",
  12037. "format": "date-time",
  12038. "x-go-name": "Author"
  12039. },
  12040. "committer": {
  12041. "type": "string",
  12042. "format": "date-time",
  12043. "x-go-name": "Committer"
  12044. }
  12045. },
  12046. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12047. },
  12048. "CommitMeta": {
  12049. "type": "object",
  12050. "title": "CommitMeta contains meta information of a commit in terms of API.",
  12051. "properties": {
  12052. "created": {
  12053. "type": "string",
  12054. "format": "date-time",
  12055. "x-go-name": "Created"
  12056. },
  12057. "sha": {
  12058. "type": "string",
  12059. "x-go-name": "SHA"
  12060. },
  12061. "url": {
  12062. "type": "string",
  12063. "x-go-name": "URL"
  12064. }
  12065. },
  12066. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12067. },
  12068. "CommitStatus": {
  12069. "description": "CommitStatus holds a single status of a single Commit",
  12070. "type": "object",
  12071. "properties": {
  12072. "context": {
  12073. "type": "string",
  12074. "x-go-name": "Context"
  12075. },
  12076. "created_at": {
  12077. "type": "string",
  12078. "format": "date-time",
  12079. "x-go-name": "Created"
  12080. },
  12081. "creator": {
  12082. "$ref": "#/definitions/User"
  12083. },
  12084. "description": {
  12085. "type": "string",
  12086. "x-go-name": "Description"
  12087. },
  12088. "id": {
  12089. "type": "integer",
  12090. "format": "int64",
  12091. "x-go-name": "ID"
  12092. },
  12093. "status": {
  12094. "$ref": "#/definitions/CommitStatusState"
  12095. },
  12096. "target_url": {
  12097. "type": "string",
  12098. "x-go-name": "TargetURL"
  12099. },
  12100. "updated_at": {
  12101. "type": "string",
  12102. "format": "date-time",
  12103. "x-go-name": "Updated"
  12104. },
  12105. "url": {
  12106. "type": "string",
  12107. "x-go-name": "URL"
  12108. }
  12109. },
  12110. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12111. },
  12112. "CommitStatusState": {
  12113. "description": "CommitStatusState holds the state of a CommitStatus\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"",
  12114. "type": "string",
  12115. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12116. },
  12117. "CommitUser": {
  12118. "type": "object",
  12119. "title": "CommitUser contains information of a user in the context of a commit.",
  12120. "properties": {
  12121. "date": {
  12122. "type": "string",
  12123. "x-go-name": "Date"
  12124. },
  12125. "email": {
  12126. "type": "string",
  12127. "format": "email",
  12128. "x-go-name": "Email"
  12129. },
  12130. "name": {
  12131. "type": "string",
  12132. "x-go-name": "Name"
  12133. }
  12134. },
  12135. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12136. },
  12137. "ContentsResponse": {
  12138. "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content",
  12139. "type": "object",
  12140. "properties": {
  12141. "_links": {
  12142. "$ref": "#/definitions/FileLinksResponse"
  12143. },
  12144. "content": {
  12145. "description": "`content` is populated when `type` is `file`, otherwise null",
  12146. "type": "string",
  12147. "x-go-name": "Content"
  12148. },
  12149. "download_url": {
  12150. "type": "string",
  12151. "x-go-name": "DownloadURL"
  12152. },
  12153. "encoding": {
  12154. "description": "`encoding` is populated when `type` is `file`, otherwise null",
  12155. "type": "string",
  12156. "x-go-name": "Encoding"
  12157. },
  12158. "git_url": {
  12159. "type": "string",
  12160. "x-go-name": "GitURL"
  12161. },
  12162. "html_url": {
  12163. "type": "string",
  12164. "x-go-name": "HTMLURL"
  12165. },
  12166. "name": {
  12167. "type": "string",
  12168. "x-go-name": "Name"
  12169. },
  12170. "path": {
  12171. "type": "string",
  12172. "x-go-name": "Path"
  12173. },
  12174. "sha": {
  12175. "type": "string",
  12176. "x-go-name": "SHA"
  12177. },
  12178. "size": {
  12179. "type": "integer",
  12180. "format": "int64",
  12181. "x-go-name": "Size"
  12182. },
  12183. "submodule_git_url": {
  12184. "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null",
  12185. "type": "string",
  12186. "x-go-name": "SubmoduleGitURL"
  12187. },
  12188. "target": {
  12189. "description": "`target` is populated when `type` is `symlink`, otherwise null",
  12190. "type": "string",
  12191. "x-go-name": "Target"
  12192. },
  12193. "type": {
  12194. "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`",
  12195. "type": "string",
  12196. "x-go-name": "Type"
  12197. },
  12198. "url": {
  12199. "type": "string",
  12200. "x-go-name": "URL"
  12201. }
  12202. },
  12203. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12204. },
  12205. "CreateBranchProtectionOption": {
  12206. "description": "CreateBranchProtectionOption options for creating a branch protection",
  12207. "type": "object",
  12208. "properties": {
  12209. "approvals_whitelist_teams": {
  12210. "type": "array",
  12211. "items": {
  12212. "type": "string"
  12213. },
  12214. "x-go-name": "ApprovalsWhitelistTeams"
  12215. },
  12216. "approvals_whitelist_username": {
  12217. "type": "array",
  12218. "items": {
  12219. "type": "string"
  12220. },
  12221. "x-go-name": "ApprovalsWhitelistUsernames"
  12222. },
  12223. "block_on_official_review_requests": {
  12224. "type": "boolean",
  12225. "x-go-name": "BlockOnOfficialReviewRequests"
  12226. },
  12227. "block_on_outdated_branch": {
  12228. "type": "boolean",
  12229. "x-go-name": "BlockOnOutdatedBranch"
  12230. },
  12231. "block_on_rejected_reviews": {
  12232. "type": "boolean",
  12233. "x-go-name": "BlockOnRejectedReviews"
  12234. },
  12235. "branch_name": {
  12236. "type": "string",
  12237. "x-go-name": "BranchName"
  12238. },
  12239. "dismiss_stale_approvals": {
  12240. "type": "boolean",
  12241. "x-go-name": "DismissStaleApprovals"
  12242. },
  12243. "enable_approvals_whitelist": {
  12244. "type": "boolean",
  12245. "x-go-name": "EnableApprovalsWhitelist"
  12246. },
  12247. "enable_merge_whitelist": {
  12248. "type": "boolean",
  12249. "x-go-name": "EnableMergeWhitelist"
  12250. },
  12251. "enable_push": {
  12252. "type": "boolean",
  12253. "x-go-name": "EnablePush"
  12254. },
  12255. "enable_push_whitelist": {
  12256. "type": "boolean",
  12257. "x-go-name": "EnablePushWhitelist"
  12258. },
  12259. "enable_status_check": {
  12260. "type": "boolean",
  12261. "x-go-name": "EnableStatusCheck"
  12262. },
  12263. "merge_whitelist_teams": {
  12264. "type": "array",
  12265. "items": {
  12266. "type": "string"
  12267. },
  12268. "x-go-name": "MergeWhitelistTeams"
  12269. },
  12270. "merge_whitelist_usernames": {
  12271. "type": "array",
  12272. "items": {
  12273. "type": "string"
  12274. },
  12275. "x-go-name": "MergeWhitelistUsernames"
  12276. },
  12277. "protected_file_patterns": {
  12278. "type": "string",
  12279. "x-go-name": "ProtectedFilePatterns"
  12280. },
  12281. "push_whitelist_deploy_keys": {
  12282. "type": "boolean",
  12283. "x-go-name": "PushWhitelistDeployKeys"
  12284. },
  12285. "push_whitelist_teams": {
  12286. "type": "array",
  12287. "items": {
  12288. "type": "string"
  12289. },
  12290. "x-go-name": "PushWhitelistTeams"
  12291. },
  12292. "push_whitelist_usernames": {
  12293. "type": "array",
  12294. "items": {
  12295. "type": "string"
  12296. },
  12297. "x-go-name": "PushWhitelistUsernames"
  12298. },
  12299. "require_signed_commits": {
  12300. "type": "boolean",
  12301. "x-go-name": "RequireSignedCommits"
  12302. },
  12303. "required_approvals": {
  12304. "type": "integer",
  12305. "format": "int64",
  12306. "x-go-name": "RequiredApprovals"
  12307. },
  12308. "status_check_contexts": {
  12309. "type": "array",
  12310. "items": {
  12311. "type": "string"
  12312. },
  12313. "x-go-name": "StatusCheckContexts"
  12314. }
  12315. },
  12316. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12317. },
  12318. "CreateBranchRepoOption": {
  12319. "description": "CreateBranchRepoOption options when creating a branch in a repository",
  12320. "type": "object",
  12321. "required": [
  12322. "new_branch_name"
  12323. ],
  12324. "properties": {
  12325. "new_branch_name": {
  12326. "description": "Name of the branch to create",
  12327. "type": "string",
  12328. "uniqueItems": true,
  12329. "x-go-name": "BranchName"
  12330. },
  12331. "old_branch_name": {
  12332. "description": "Name of the old branch to create from",
  12333. "type": "string",
  12334. "uniqueItems": true,
  12335. "x-go-name": "OldBranchName"
  12336. }
  12337. },
  12338. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12339. },
  12340. "CreateEmailOption": {
  12341. "description": "CreateEmailOption options when creating email addresses",
  12342. "type": "object",
  12343. "properties": {
  12344. "emails": {
  12345. "description": "email addresses to add",
  12346. "type": "array",
  12347. "items": {
  12348. "type": "string"
  12349. },
  12350. "x-go-name": "Emails"
  12351. }
  12352. },
  12353. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12354. },
  12355. "CreateFileOptions": {
  12356. "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)",
  12357. "type": "object",
  12358. "required": [
  12359. "content"
  12360. ],
  12361. "properties": {
  12362. "author": {
  12363. "$ref": "#/definitions/Identity"
  12364. },
  12365. "branch": {
  12366. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  12367. "type": "string",
  12368. "x-go-name": "BranchName"
  12369. },
  12370. "committer": {
  12371. "$ref": "#/definitions/Identity"
  12372. },
  12373. "content": {
  12374. "description": "content must be base64 encoded",
  12375. "type": "string",
  12376. "x-go-name": "Content"
  12377. },
  12378. "dates": {
  12379. "$ref": "#/definitions/CommitDateOptions"
  12380. },
  12381. "message": {
  12382. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  12383. "type": "string",
  12384. "x-go-name": "Message"
  12385. },
  12386. "new_branch": {
  12387. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  12388. "type": "string",
  12389. "x-go-name": "NewBranchName"
  12390. },
  12391. "signoff": {
  12392. "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.",
  12393. "type": "boolean",
  12394. "x-go-name": "Signoff"
  12395. }
  12396. },
  12397. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12398. },
  12399. "CreateForkOption": {
  12400. "description": "CreateForkOption options for creating a fork",
  12401. "type": "object",
  12402. "properties": {
  12403. "organization": {
  12404. "description": "organization name, if forking into an organization",
  12405. "type": "string",
  12406. "x-go-name": "Organization"
  12407. }
  12408. },
  12409. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12410. },
  12411. "CreateGPGKeyOption": {
  12412. "description": "CreateGPGKeyOption options create user GPG key",
  12413. "type": "object",
  12414. "required": [
  12415. "armored_public_key"
  12416. ],
  12417. "properties": {
  12418. "armored_public_key": {
  12419. "description": "An armored GPG key to add",
  12420. "type": "string",
  12421. "uniqueItems": true,
  12422. "x-go-name": "ArmoredKey"
  12423. }
  12424. },
  12425. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12426. },
  12427. "CreateHookOption": {
  12428. "description": "CreateHookOption options when create a hook",
  12429. "type": "object",
  12430. "required": [
  12431. "type",
  12432. "config"
  12433. ],
  12434. "properties": {
  12435. "active": {
  12436. "type": "boolean",
  12437. "default": false,
  12438. "x-go-name": "Active"
  12439. },
  12440. "branch_filter": {
  12441. "type": "string",
  12442. "x-go-name": "BranchFilter"
  12443. },
  12444. "config": {
  12445. "$ref": "#/definitions/CreateHookOptionConfig"
  12446. },
  12447. "events": {
  12448. "type": "array",
  12449. "items": {
  12450. "type": "string"
  12451. },
  12452. "x-go-name": "Events"
  12453. },
  12454. "type": {
  12455. "type": "string",
  12456. "enum": [
  12457. "dingtalk",
  12458. "discord",
  12459. "gitea",
  12460. "gogs",
  12461. "msteams",
  12462. "slack",
  12463. "telegram",
  12464. "feishu"
  12465. ],
  12466. "x-go-name": "Type"
  12467. }
  12468. },
  12469. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12470. },
  12471. "CreateHookOptionConfig": {
  12472. "description": "CreateHookOptionConfig has all config options in it\nrequired are \"content_type\" and \"url\" Required",
  12473. "type": "object",
  12474. "additionalProperties": {
  12475. "type": "string"
  12476. },
  12477. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12478. },
  12479. "CreateIssueCommentOption": {
  12480. "description": "CreateIssueCommentOption options for creating a comment on an issue",
  12481. "type": "object",
  12482. "required": [
  12483. "body"
  12484. ],
  12485. "properties": {
  12486. "body": {
  12487. "type": "string",
  12488. "x-go-name": "Body"
  12489. }
  12490. },
  12491. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12492. },
  12493. "CreateIssueOption": {
  12494. "description": "CreateIssueOption options to create one issue",
  12495. "type": "object",
  12496. "required": [
  12497. "title"
  12498. ],
  12499. "properties": {
  12500. "assignee": {
  12501. "description": "deprecated",
  12502. "type": "string",
  12503. "x-go-name": "Assignee"
  12504. },
  12505. "assignees": {
  12506. "type": "array",
  12507. "items": {
  12508. "type": "string"
  12509. },
  12510. "x-go-name": "Assignees"
  12511. },
  12512. "body": {
  12513. "type": "string",
  12514. "x-go-name": "Body"
  12515. },
  12516. "closed": {
  12517. "type": "boolean",
  12518. "x-go-name": "Closed"
  12519. },
  12520. "due_date": {
  12521. "type": "string",
  12522. "format": "date-time",
  12523. "x-go-name": "Deadline"
  12524. },
  12525. "labels": {
  12526. "description": "list of label ids",
  12527. "type": "array",
  12528. "items": {
  12529. "type": "integer",
  12530. "format": "int64"
  12531. },
  12532. "x-go-name": "Labels"
  12533. },
  12534. "milestone": {
  12535. "description": "milestone id",
  12536. "type": "integer",
  12537. "format": "int64",
  12538. "x-go-name": "Milestone"
  12539. },
  12540. "ref": {
  12541. "type": "string",
  12542. "x-go-name": "Ref"
  12543. },
  12544. "title": {
  12545. "type": "string",
  12546. "x-go-name": "Title"
  12547. }
  12548. },
  12549. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12550. },
  12551. "CreateKeyOption": {
  12552. "description": "CreateKeyOption options when creating a key",
  12553. "type": "object",
  12554. "required": [
  12555. "title",
  12556. "key"
  12557. ],
  12558. "properties": {
  12559. "key": {
  12560. "description": "An armored SSH key to add",
  12561. "type": "string",
  12562. "uniqueItems": true,
  12563. "x-go-name": "Key"
  12564. },
  12565. "read_only": {
  12566. "description": "Describe if the key has only read access or read/write",
  12567. "type": "boolean",
  12568. "x-go-name": "ReadOnly"
  12569. },
  12570. "title": {
  12571. "description": "Title of the key to add",
  12572. "type": "string",
  12573. "uniqueItems": true,
  12574. "x-go-name": "Title"
  12575. }
  12576. },
  12577. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12578. },
  12579. "CreateLabelOption": {
  12580. "description": "CreateLabelOption options for creating a label",
  12581. "type": "object",
  12582. "required": [
  12583. "name",
  12584. "color"
  12585. ],
  12586. "properties": {
  12587. "color": {
  12588. "type": "string",
  12589. "x-go-name": "Color",
  12590. "example": "#00aabb"
  12591. },
  12592. "description": {
  12593. "type": "string",
  12594. "x-go-name": "Description"
  12595. },
  12596. "name": {
  12597. "type": "string",
  12598. "x-go-name": "Name"
  12599. }
  12600. },
  12601. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12602. },
  12603. "CreateMilestoneOption": {
  12604. "description": "CreateMilestoneOption options for creating a milestone",
  12605. "type": "object",
  12606. "properties": {
  12607. "description": {
  12608. "type": "string",
  12609. "x-go-name": "Description"
  12610. },
  12611. "due_on": {
  12612. "type": "string",
  12613. "format": "date-time",
  12614. "x-go-name": "Deadline"
  12615. },
  12616. "state": {
  12617. "type": "string",
  12618. "enum": [
  12619. "open",
  12620. "closed"
  12621. ],
  12622. "x-go-name": "State"
  12623. },
  12624. "title": {
  12625. "type": "string",
  12626. "x-go-name": "Title"
  12627. }
  12628. },
  12629. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12630. },
  12631. "CreateOAuth2ApplicationOptions": {
  12632. "description": "CreateOAuth2ApplicationOptions holds options to create an oauth2 application",
  12633. "type": "object",
  12634. "properties": {
  12635. "name": {
  12636. "type": "string",
  12637. "x-go-name": "Name"
  12638. },
  12639. "redirect_uris": {
  12640. "type": "array",
  12641. "items": {
  12642. "type": "string"
  12643. },
  12644. "x-go-name": "RedirectURIs"
  12645. }
  12646. },
  12647. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12648. },
  12649. "CreateOrgOption": {
  12650. "description": "CreateOrgOption options for creating an organization",
  12651. "type": "object",
  12652. "required": [
  12653. "username"
  12654. ],
  12655. "properties": {
  12656. "description": {
  12657. "type": "string",
  12658. "x-go-name": "Description"
  12659. },
  12660. "full_name": {
  12661. "type": "string",
  12662. "x-go-name": "FullName"
  12663. },
  12664. "location": {
  12665. "type": "string",
  12666. "x-go-name": "Location"
  12667. },
  12668. "repo_admin_change_team_access": {
  12669. "type": "boolean",
  12670. "x-go-name": "RepoAdminChangeTeamAccess"
  12671. },
  12672. "username": {
  12673. "type": "string",
  12674. "x-go-name": "UserName"
  12675. },
  12676. "visibility": {
  12677. "description": "possible values are `public` (default), `limited` or `private`",
  12678. "type": "string",
  12679. "enum": [
  12680. "public",
  12681. "limited",
  12682. "private"
  12683. ],
  12684. "x-go-name": "Visibility"
  12685. },
  12686. "website": {
  12687. "type": "string",
  12688. "x-go-name": "Website"
  12689. }
  12690. },
  12691. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12692. },
  12693. "CreatePullRequestOption": {
  12694. "description": "CreatePullRequestOption options when creating a pull request",
  12695. "type": "object",
  12696. "properties": {
  12697. "assignee": {
  12698. "type": "string",
  12699. "x-go-name": "Assignee"
  12700. },
  12701. "assignees": {
  12702. "type": "array",
  12703. "items": {
  12704. "type": "string"
  12705. },
  12706. "x-go-name": "Assignees"
  12707. },
  12708. "base": {
  12709. "type": "string",
  12710. "x-go-name": "Base"
  12711. },
  12712. "body": {
  12713. "type": "string",
  12714. "x-go-name": "Body"
  12715. },
  12716. "due_date": {
  12717. "type": "string",
  12718. "format": "date-time",
  12719. "x-go-name": "Deadline"
  12720. },
  12721. "head": {
  12722. "type": "string",
  12723. "x-go-name": "Head"
  12724. },
  12725. "labels": {
  12726. "type": "array",
  12727. "items": {
  12728. "type": "integer",
  12729. "format": "int64"
  12730. },
  12731. "x-go-name": "Labels"
  12732. },
  12733. "milestone": {
  12734. "type": "integer",
  12735. "format": "int64",
  12736. "x-go-name": "Milestone"
  12737. },
  12738. "title": {
  12739. "type": "string",
  12740. "x-go-name": "Title"
  12741. }
  12742. },
  12743. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12744. },
  12745. "CreatePullReviewComment": {
  12746. "description": "CreatePullReviewComment represent a review comment for creation api",
  12747. "type": "object",
  12748. "properties": {
  12749. "body": {
  12750. "type": "string",
  12751. "x-go-name": "Body"
  12752. },
  12753. "new_position": {
  12754. "description": "if comment to new file line or 0",
  12755. "type": "integer",
  12756. "format": "int64",
  12757. "x-go-name": "NewLineNum"
  12758. },
  12759. "old_position": {
  12760. "description": "if comment to old file line or 0",
  12761. "type": "integer",
  12762. "format": "int64",
  12763. "x-go-name": "OldLineNum"
  12764. },
  12765. "path": {
  12766. "description": "the tree path",
  12767. "type": "string",
  12768. "x-go-name": "Path"
  12769. }
  12770. },
  12771. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12772. },
  12773. "CreatePullReviewOptions": {
  12774. "description": "CreatePullReviewOptions are options to create a pull review",
  12775. "type": "object",
  12776. "properties": {
  12777. "body": {
  12778. "type": "string",
  12779. "x-go-name": "Body"
  12780. },
  12781. "comments": {
  12782. "type": "array",
  12783. "items": {
  12784. "$ref": "#/definitions/CreatePullReviewComment"
  12785. },
  12786. "x-go-name": "Comments"
  12787. },
  12788. "commit_id": {
  12789. "type": "string",
  12790. "x-go-name": "CommitID"
  12791. },
  12792. "event": {
  12793. "$ref": "#/definitions/ReviewStateType"
  12794. }
  12795. },
  12796. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12797. },
  12798. "CreateReleaseOption": {
  12799. "description": "CreateReleaseOption options when creating a release",
  12800. "type": "object",
  12801. "required": [
  12802. "tag_name"
  12803. ],
  12804. "properties": {
  12805. "body": {
  12806. "type": "string",
  12807. "x-go-name": "Note"
  12808. },
  12809. "draft": {
  12810. "type": "boolean",
  12811. "x-go-name": "IsDraft"
  12812. },
  12813. "name": {
  12814. "type": "string",
  12815. "x-go-name": "Title"
  12816. },
  12817. "prerelease": {
  12818. "type": "boolean",
  12819. "x-go-name": "IsPrerelease"
  12820. },
  12821. "tag_name": {
  12822. "type": "string",
  12823. "x-go-name": "TagName"
  12824. },
  12825. "target_commitish": {
  12826. "type": "string",
  12827. "x-go-name": "Target"
  12828. }
  12829. },
  12830. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12831. },
  12832. "CreateRepoOption": {
  12833. "description": "CreateRepoOption options when creating repository",
  12834. "type": "object",
  12835. "required": [
  12836. "name"
  12837. ],
  12838. "properties": {
  12839. "auto_init": {
  12840. "description": "Whether the repository should be auto-intialized?",
  12841. "type": "boolean",
  12842. "x-go-name": "AutoInit"
  12843. },
  12844. "default_branch": {
  12845. "description": "DefaultBranch of the repository (used when initializes and in template)",
  12846. "type": "string",
  12847. "x-go-name": "DefaultBranch"
  12848. },
  12849. "description": {
  12850. "description": "Description of the repository to create",
  12851. "type": "string",
  12852. "x-go-name": "Description"
  12853. },
  12854. "gitignores": {
  12855. "description": "Gitignores to use",
  12856. "type": "string",
  12857. "x-go-name": "Gitignores"
  12858. },
  12859. "issue_labels": {
  12860. "description": "Label-Set to use",
  12861. "type": "string",
  12862. "x-go-name": "IssueLabels"
  12863. },
  12864. "license": {
  12865. "description": "License to use",
  12866. "type": "string",
  12867. "x-go-name": "License"
  12868. },
  12869. "name": {
  12870. "description": "Name of the repository to create",
  12871. "type": "string",
  12872. "uniqueItems": true,
  12873. "x-go-name": "Name"
  12874. },
  12875. "private": {
  12876. "description": "Whether the repository is private",
  12877. "type": "boolean",
  12878. "x-go-name": "Private"
  12879. },
  12880. "readme": {
  12881. "description": "Readme of the repository to create",
  12882. "type": "string",
  12883. "x-go-name": "Readme"
  12884. },
  12885. "template": {
  12886. "description": "Whether the repository is template",
  12887. "type": "boolean",
  12888. "x-go-name": "Template"
  12889. },
  12890. "trust_model": {
  12891. "description": "TrustModel of the repository",
  12892. "type": "string",
  12893. "enum": [
  12894. "default",
  12895. "collaborator",
  12896. "committer",
  12897. "collaboratorcommitter"
  12898. ],
  12899. "x-go-name": "TrustModel"
  12900. }
  12901. },
  12902. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12903. },
  12904. "CreateStatusOption": {
  12905. "description": "CreateStatusOption holds the information needed to create a new CommitStatus for a Commit",
  12906. "type": "object",
  12907. "properties": {
  12908. "context": {
  12909. "type": "string",
  12910. "x-go-name": "Context"
  12911. },
  12912. "description": {
  12913. "type": "string",
  12914. "x-go-name": "Description"
  12915. },
  12916. "state": {
  12917. "$ref": "#/definitions/CommitStatusState"
  12918. },
  12919. "target_url": {
  12920. "type": "string",
  12921. "x-go-name": "TargetURL"
  12922. }
  12923. },
  12924. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12925. },
  12926. "CreateTeamOption": {
  12927. "description": "CreateTeamOption options for creating a team",
  12928. "type": "object",
  12929. "required": [
  12930. "name"
  12931. ],
  12932. "properties": {
  12933. "can_create_org_repo": {
  12934. "type": "boolean",
  12935. "x-go-name": "CanCreateOrgRepo"
  12936. },
  12937. "description": {
  12938. "type": "string",
  12939. "x-go-name": "Description"
  12940. },
  12941. "includes_all_repositories": {
  12942. "type": "boolean",
  12943. "x-go-name": "IncludesAllRepositories"
  12944. },
  12945. "name": {
  12946. "type": "string",
  12947. "x-go-name": "Name"
  12948. },
  12949. "permission": {
  12950. "type": "string",
  12951. "enum": [
  12952. "read",
  12953. "write",
  12954. "admin"
  12955. ],
  12956. "x-go-name": "Permission"
  12957. },
  12958. "units": {
  12959. "type": "array",
  12960. "items": {
  12961. "type": "string"
  12962. },
  12963. "x-go-name": "Units",
  12964. "example": [
  12965. "repo.code",
  12966. "repo.issues",
  12967. "repo.ext_issues",
  12968. "repo.wiki",
  12969. "repo.pulls",
  12970. "repo.releases",
  12971. "repo.projects",
  12972. "repo.ext_wiki"
  12973. ]
  12974. }
  12975. },
  12976. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12977. },
  12978. "CreateUserOption": {
  12979. "description": "CreateUserOption create user options",
  12980. "type": "object",
  12981. "required": [
  12982. "username",
  12983. "email",
  12984. "password"
  12985. ],
  12986. "properties": {
  12987. "email": {
  12988. "type": "string",
  12989. "format": "email",
  12990. "x-go-name": "Email"
  12991. },
  12992. "full_name": {
  12993. "type": "string",
  12994. "x-go-name": "FullName"
  12995. },
  12996. "login_name": {
  12997. "type": "string",
  12998. "x-go-name": "LoginName"
  12999. },
  13000. "must_change_password": {
  13001. "type": "boolean",
  13002. "x-go-name": "MustChangePassword"
  13003. },
  13004. "password": {
  13005. "type": "string",
  13006. "x-go-name": "Password"
  13007. },
  13008. "send_notify": {
  13009. "type": "boolean",
  13010. "x-go-name": "SendNotify"
  13011. },
  13012. "source_id": {
  13013. "type": "integer",
  13014. "format": "int64",
  13015. "x-go-name": "SourceID"
  13016. },
  13017. "username": {
  13018. "type": "string",
  13019. "x-go-name": "Username"
  13020. }
  13021. },
  13022. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13023. },
  13024. "Cron": {
  13025. "description": "Cron represents a Cron task",
  13026. "type": "object",
  13027. "properties": {
  13028. "exec_times": {
  13029. "type": "integer",
  13030. "format": "int64",
  13031. "x-go-name": "ExecTimes"
  13032. },
  13033. "name": {
  13034. "type": "string",
  13035. "x-go-name": "Name"
  13036. },
  13037. "next": {
  13038. "type": "string",
  13039. "format": "date-time",
  13040. "x-go-name": "Next"
  13041. },
  13042. "prev": {
  13043. "type": "string",
  13044. "format": "date-time",
  13045. "x-go-name": "Prev"
  13046. },
  13047. "schedule": {
  13048. "type": "string",
  13049. "x-go-name": "Schedule"
  13050. }
  13051. },
  13052. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13053. },
  13054. "DeleteEmailOption": {
  13055. "description": "DeleteEmailOption options when deleting email addresses",
  13056. "type": "object",
  13057. "properties": {
  13058. "emails": {
  13059. "description": "email addresses to delete",
  13060. "type": "array",
  13061. "items": {
  13062. "type": "string"
  13063. },
  13064. "x-go-name": "Emails"
  13065. }
  13066. },
  13067. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13068. },
  13069. "DeleteFileOptions": {
  13070. "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)",
  13071. "type": "object",
  13072. "required": [
  13073. "sha"
  13074. ],
  13075. "properties": {
  13076. "author": {
  13077. "$ref": "#/definitions/Identity"
  13078. },
  13079. "branch": {
  13080. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  13081. "type": "string",
  13082. "x-go-name": "BranchName"
  13083. },
  13084. "committer": {
  13085. "$ref": "#/definitions/Identity"
  13086. },
  13087. "dates": {
  13088. "$ref": "#/definitions/CommitDateOptions"
  13089. },
  13090. "message": {
  13091. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  13092. "type": "string",
  13093. "x-go-name": "Message"
  13094. },
  13095. "new_branch": {
  13096. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  13097. "type": "string",
  13098. "x-go-name": "NewBranchName"
  13099. },
  13100. "sha": {
  13101. "description": "sha is the SHA for the file that already exists",
  13102. "type": "string",
  13103. "x-go-name": "SHA"
  13104. },
  13105. "signoff": {
  13106. "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.",
  13107. "type": "boolean",
  13108. "x-go-name": "Signoff"
  13109. }
  13110. },
  13111. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13112. },
  13113. "DeployKey": {
  13114. "description": "DeployKey a deploy key",
  13115. "type": "object",
  13116. "properties": {
  13117. "created_at": {
  13118. "type": "string",
  13119. "format": "date-time",
  13120. "x-go-name": "Created"
  13121. },
  13122. "fingerprint": {
  13123. "type": "string",
  13124. "x-go-name": "Fingerprint"
  13125. },
  13126. "id": {
  13127. "type": "integer",
  13128. "format": "int64",
  13129. "x-go-name": "ID"
  13130. },
  13131. "key": {
  13132. "type": "string",
  13133. "x-go-name": "Key"
  13134. },
  13135. "key_id": {
  13136. "type": "integer",
  13137. "format": "int64",
  13138. "x-go-name": "KeyID"
  13139. },
  13140. "read_only": {
  13141. "type": "boolean",
  13142. "x-go-name": "ReadOnly"
  13143. },
  13144. "repository": {
  13145. "$ref": "#/definitions/Repository"
  13146. },
  13147. "title": {
  13148. "type": "string",
  13149. "x-go-name": "Title"
  13150. },
  13151. "url": {
  13152. "type": "string",
  13153. "x-go-name": "URL"
  13154. }
  13155. },
  13156. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13157. },
  13158. "DismissPullReviewOptions": {
  13159. "description": "DismissPullReviewOptions are options to dismiss a pull review",
  13160. "type": "object",
  13161. "properties": {
  13162. "message": {
  13163. "type": "string",
  13164. "x-go-name": "Message"
  13165. }
  13166. },
  13167. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13168. },
  13169. "EditAttachmentOptions": {
  13170. "description": "EditAttachmentOptions options for editing attachments",
  13171. "type": "object",
  13172. "properties": {
  13173. "name": {
  13174. "type": "string",
  13175. "x-go-name": "Name"
  13176. }
  13177. },
  13178. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13179. },
  13180. "EditBranchProtectionOption": {
  13181. "description": "EditBranchProtectionOption options for editing a branch protection",
  13182. "type": "object",
  13183. "properties": {
  13184. "approvals_whitelist_teams": {
  13185. "type": "array",
  13186. "items": {
  13187. "type": "string"
  13188. },
  13189. "x-go-name": "ApprovalsWhitelistTeams"
  13190. },
  13191. "approvals_whitelist_username": {
  13192. "type": "array",
  13193. "items": {
  13194. "type": "string"
  13195. },
  13196. "x-go-name": "ApprovalsWhitelistUsernames"
  13197. },
  13198. "block_on_official_review_requests": {
  13199. "type": "boolean",
  13200. "x-go-name": "BlockOnOfficialReviewRequests"
  13201. },
  13202. "block_on_outdated_branch": {
  13203. "type": "boolean",
  13204. "x-go-name": "BlockOnOutdatedBranch"
  13205. },
  13206. "block_on_rejected_reviews": {
  13207. "type": "boolean",
  13208. "x-go-name": "BlockOnRejectedReviews"
  13209. },
  13210. "dismiss_stale_approvals": {
  13211. "type": "boolean",
  13212. "x-go-name": "DismissStaleApprovals"
  13213. },
  13214. "enable_approvals_whitelist": {
  13215. "type": "boolean",
  13216. "x-go-name": "EnableApprovalsWhitelist"
  13217. },
  13218. "enable_merge_whitelist": {
  13219. "type": "boolean",
  13220. "x-go-name": "EnableMergeWhitelist"
  13221. },
  13222. "enable_push": {
  13223. "type": "boolean",
  13224. "x-go-name": "EnablePush"
  13225. },
  13226. "enable_push_whitelist": {
  13227. "type": "boolean",
  13228. "x-go-name": "EnablePushWhitelist"
  13229. },
  13230. "enable_status_check": {
  13231. "type": "boolean",
  13232. "x-go-name": "EnableStatusCheck"
  13233. },
  13234. "merge_whitelist_teams": {
  13235. "type": "array",
  13236. "items": {
  13237. "type": "string"
  13238. },
  13239. "x-go-name": "MergeWhitelistTeams"
  13240. },
  13241. "merge_whitelist_usernames": {
  13242. "type": "array",
  13243. "items": {
  13244. "type": "string"
  13245. },
  13246. "x-go-name": "MergeWhitelistUsernames"
  13247. },
  13248. "protected_file_patterns": {
  13249. "type": "string",
  13250. "x-go-name": "ProtectedFilePatterns"
  13251. },
  13252. "push_whitelist_deploy_keys": {
  13253. "type": "boolean",
  13254. "x-go-name": "PushWhitelistDeployKeys"
  13255. },
  13256. "push_whitelist_teams": {
  13257. "type": "array",
  13258. "items": {
  13259. "type": "string"
  13260. },
  13261. "x-go-name": "PushWhitelistTeams"
  13262. },
  13263. "push_whitelist_usernames": {
  13264. "type": "array",
  13265. "items": {
  13266. "type": "string"
  13267. },
  13268. "x-go-name": "PushWhitelistUsernames"
  13269. },
  13270. "require_signed_commits": {
  13271. "type": "boolean",
  13272. "x-go-name": "RequireSignedCommits"
  13273. },
  13274. "required_approvals": {
  13275. "type": "integer",
  13276. "format": "int64",
  13277. "x-go-name": "RequiredApprovals"
  13278. },
  13279. "status_check_contexts": {
  13280. "type": "array",
  13281. "items": {
  13282. "type": "string"
  13283. },
  13284. "x-go-name": "StatusCheckContexts"
  13285. }
  13286. },
  13287. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13288. },
  13289. "EditDeadlineOption": {
  13290. "description": "EditDeadlineOption options for creating a deadline",
  13291. "type": "object",
  13292. "required": [
  13293. "due_date"
  13294. ],
  13295. "properties": {
  13296. "due_date": {
  13297. "type": "string",
  13298. "format": "date-time",
  13299. "x-go-name": "Deadline"
  13300. }
  13301. },
  13302. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13303. },
  13304. "EditGitHookOption": {
  13305. "description": "EditGitHookOption options when modifying one Git hook",
  13306. "type": "object",
  13307. "properties": {
  13308. "content": {
  13309. "type": "string",
  13310. "x-go-name": "Content"
  13311. }
  13312. },
  13313. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13314. },
  13315. "EditHookOption": {
  13316. "description": "EditHookOption options when modify one hook",
  13317. "type": "object",
  13318. "properties": {
  13319. "active": {
  13320. "type": "boolean",
  13321. "x-go-name": "Active"
  13322. },
  13323. "branch_filter": {
  13324. "type": "string",
  13325. "x-go-name": "BranchFilter"
  13326. },
  13327. "config": {
  13328. "type": "object",
  13329. "additionalProperties": {
  13330. "type": "string"
  13331. },
  13332. "x-go-name": "Config"
  13333. },
  13334. "events": {
  13335. "type": "array",
  13336. "items": {
  13337. "type": "string"
  13338. },
  13339. "x-go-name": "Events"
  13340. }
  13341. },
  13342. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13343. },
  13344. "EditIssueCommentOption": {
  13345. "description": "EditIssueCommentOption options for editing a comment",
  13346. "type": "object",
  13347. "required": [
  13348. "body"
  13349. ],
  13350. "properties": {
  13351. "body": {
  13352. "type": "string",
  13353. "x-go-name": "Body"
  13354. }
  13355. },
  13356. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13357. },
  13358. "EditIssueOption": {
  13359. "description": "EditIssueOption options for editing an issue",
  13360. "type": "object",
  13361. "properties": {
  13362. "assignee": {
  13363. "description": "deprecated",
  13364. "type": "string",
  13365. "x-go-name": "Assignee"
  13366. },
  13367. "assignees": {
  13368. "type": "array",
  13369. "items": {
  13370. "type": "string"
  13371. },
  13372. "x-go-name": "Assignees"
  13373. },
  13374. "body": {
  13375. "type": "string",
  13376. "x-go-name": "Body"
  13377. },
  13378. "due_date": {
  13379. "type": "string",
  13380. "format": "date-time",
  13381. "x-go-name": "Deadline"
  13382. },
  13383. "milestone": {
  13384. "type": "integer",
  13385. "format": "int64",
  13386. "x-go-name": "Milestone"
  13387. },
  13388. "ref": {
  13389. "type": "string",
  13390. "x-go-name": "Ref"
  13391. },
  13392. "state": {
  13393. "type": "string",
  13394. "x-go-name": "State"
  13395. },
  13396. "title": {
  13397. "type": "string",
  13398. "x-go-name": "Title"
  13399. },
  13400. "unset_due_date": {
  13401. "type": "boolean",
  13402. "x-go-name": "RemoveDeadline"
  13403. }
  13404. },
  13405. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13406. },
  13407. "EditLabelOption": {
  13408. "description": "EditLabelOption options for editing a label",
  13409. "type": "object",
  13410. "properties": {
  13411. "color": {
  13412. "type": "string",
  13413. "x-go-name": "Color"
  13414. },
  13415. "description": {
  13416. "type": "string",
  13417. "x-go-name": "Description"
  13418. },
  13419. "name": {
  13420. "type": "string",
  13421. "x-go-name": "Name"
  13422. }
  13423. },
  13424. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13425. },
  13426. "EditMilestoneOption": {
  13427. "description": "EditMilestoneOption options for editing a milestone",
  13428. "type": "object",
  13429. "properties": {
  13430. "description": {
  13431. "type": "string",
  13432. "x-go-name": "Description"
  13433. },
  13434. "due_on": {
  13435. "type": "string",
  13436. "format": "date-time",
  13437. "x-go-name": "Deadline"
  13438. },
  13439. "state": {
  13440. "type": "string",
  13441. "x-go-name": "State"
  13442. },
  13443. "title": {
  13444. "type": "string",
  13445. "x-go-name": "Title"
  13446. }
  13447. },
  13448. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13449. },
  13450. "EditOrgOption": {
  13451. "description": "EditOrgOption options for editing an organization",
  13452. "type": "object",
  13453. "properties": {
  13454. "description": {
  13455. "type": "string",
  13456. "x-go-name": "Description"
  13457. },
  13458. "full_name": {
  13459. "type": "string",
  13460. "x-go-name": "FullName"
  13461. },
  13462. "location": {
  13463. "type": "string",
  13464. "x-go-name": "Location"
  13465. },
  13466. "repo_admin_change_team_access": {
  13467. "type": "boolean",
  13468. "x-go-name": "RepoAdminChangeTeamAccess"
  13469. },
  13470. "visibility": {
  13471. "description": "possible values are `public`, `limited` or `private`",
  13472. "type": "string",
  13473. "enum": [
  13474. "public",
  13475. "limited",
  13476. "private"
  13477. ],
  13478. "x-go-name": "Visibility"
  13479. },
  13480. "website": {
  13481. "type": "string",
  13482. "x-go-name": "Website"
  13483. }
  13484. },
  13485. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13486. },
  13487. "EditPullRequestOption": {
  13488. "description": "EditPullRequestOption options when modify pull request",
  13489. "type": "object",
  13490. "properties": {
  13491. "assignee": {
  13492. "type": "string",
  13493. "x-go-name": "Assignee"
  13494. },
  13495. "assignees": {
  13496. "type": "array",
  13497. "items": {
  13498. "type": "string"
  13499. },
  13500. "x-go-name": "Assignees"
  13501. },
  13502. "base": {
  13503. "type": "string",
  13504. "x-go-name": "Base"
  13505. },
  13506. "body": {
  13507. "type": "string",
  13508. "x-go-name": "Body"
  13509. },
  13510. "due_date": {
  13511. "type": "string",
  13512. "format": "date-time",
  13513. "x-go-name": "Deadline"
  13514. },
  13515. "labels": {
  13516. "type": "array",
  13517. "items": {
  13518. "type": "integer",
  13519. "format": "int64"
  13520. },
  13521. "x-go-name": "Labels"
  13522. },
  13523. "milestone": {
  13524. "type": "integer",
  13525. "format": "int64",
  13526. "x-go-name": "Milestone"
  13527. },
  13528. "state": {
  13529. "type": "string",
  13530. "x-go-name": "State"
  13531. },
  13532. "title": {
  13533. "type": "string",
  13534. "x-go-name": "Title"
  13535. },
  13536. "unset_due_date": {
  13537. "type": "boolean",
  13538. "x-go-name": "RemoveDeadline"
  13539. }
  13540. },
  13541. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13542. },
  13543. "EditReactionOption": {
  13544. "description": "EditReactionOption contain the reaction type",
  13545. "type": "object",
  13546. "properties": {
  13547. "content": {
  13548. "type": "string",
  13549. "x-go-name": "Reaction"
  13550. }
  13551. },
  13552. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13553. },
  13554. "EditReleaseOption": {
  13555. "description": "EditReleaseOption options when editing a release",
  13556. "type": "object",
  13557. "properties": {
  13558. "body": {
  13559. "type": "string",
  13560. "x-go-name": "Note"
  13561. },
  13562. "draft": {
  13563. "type": "boolean",
  13564. "x-go-name": "IsDraft"
  13565. },
  13566. "name": {
  13567. "type": "string",
  13568. "x-go-name": "Title"
  13569. },
  13570. "prerelease": {
  13571. "type": "boolean",
  13572. "x-go-name": "IsPrerelease"
  13573. },
  13574. "tag_name": {
  13575. "type": "string",
  13576. "x-go-name": "TagName"
  13577. },
  13578. "target_commitish": {
  13579. "type": "string",
  13580. "x-go-name": "Target"
  13581. }
  13582. },
  13583. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13584. },
  13585. "EditRepoOption": {
  13586. "description": "EditRepoOption options when editing a repository's properties",
  13587. "type": "object",
  13588. "properties": {
  13589. "allow_manual_merge": {
  13590. "description": "either `true` to allow mark pr as merged manually, or `false` to prevent it. `has_pull_requests` must be `true`.",
  13591. "type": "boolean",
  13592. "x-go-name": "AllowManualMerge"
  13593. },
  13594. "allow_merge_commits": {
  13595. "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`.",
  13596. "type": "boolean",
  13597. "x-go-name": "AllowMerge"
  13598. },
  13599. "allow_rebase": {
  13600. "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.",
  13601. "type": "boolean",
  13602. "x-go-name": "AllowRebase"
  13603. },
  13604. "allow_rebase_explicit": {
  13605. "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`.",
  13606. "type": "boolean",
  13607. "x-go-name": "AllowRebaseMerge"
  13608. },
  13609. "allow_squash_merge": {
  13610. "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.",
  13611. "type": "boolean",
  13612. "x-go-name": "AllowSquash"
  13613. },
  13614. "archived": {
  13615. "description": "set to `true` to archive this repository.",
  13616. "type": "boolean",
  13617. "x-go-name": "Archived"
  13618. },
  13619. "autodetect_manual_merge": {
  13620. "description": "either `true` to enable AutodetectManualMerge, or `false` to prevent it. `has_pull_requests` must be `true`, Note: In some special cases, misjudgments can occur.",
  13621. "type": "boolean",
  13622. "x-go-name": "AutodetectManualMerge"
  13623. },
  13624. "default_branch": {
  13625. "description": "sets the default branch for this repository.",
  13626. "type": "string",
  13627. "x-go-name": "DefaultBranch"
  13628. },
  13629. "description": {
  13630. "description": "a short description of the repository.",
  13631. "type": "string",
  13632. "x-go-name": "Description"
  13633. },
  13634. "external_tracker": {
  13635. "$ref": "#/definitions/ExternalTracker"
  13636. },
  13637. "external_wiki": {
  13638. "$ref": "#/definitions/ExternalWiki"
  13639. },
  13640. "has_issues": {
  13641. "description": "either `true` to enable issues for this repository or `false` to disable them.",
  13642. "type": "boolean",
  13643. "x-go-name": "HasIssues"
  13644. },
  13645. "has_projects": {
  13646. "description": "either `true` to enable project unit, or `false` to disable them.",
  13647. "type": "boolean",
  13648. "x-go-name": "HasProjects"
  13649. },
  13650. "has_pull_requests": {
  13651. "description": "either `true` to allow pull requests, or `false` to prevent pull request.",
  13652. "type": "boolean",
  13653. "x-go-name": "HasPullRequests"
  13654. },
  13655. "has_wiki": {
  13656. "description": "either `true` to enable the wiki for this repository or `false` to disable it.",
  13657. "type": "boolean",
  13658. "x-go-name": "HasWiki"
  13659. },
  13660. "ignore_whitespace_conflicts": {
  13661. "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.",
  13662. "type": "boolean",
  13663. "x-go-name": "IgnoreWhitespaceConflicts"
  13664. },
  13665. "internal_tracker": {
  13666. "$ref": "#/definitions/InternalTracker"
  13667. },
  13668. "mirror_interval": {
  13669. "description": "set to a string like `8h30m0s` to set the mirror interval time",
  13670. "type": "string",
  13671. "x-go-name": "MirrorInterval"
  13672. },
  13673. "name": {
  13674. "description": "name of the repository",
  13675. "type": "string",
  13676. "uniqueItems": true,
  13677. "x-go-name": "Name"
  13678. },
  13679. "private": {
  13680. "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.",
  13681. "type": "boolean",
  13682. "x-go-name": "Private"
  13683. },
  13684. "template": {
  13685. "description": "either `true` to make this repository a template or `false` to make it a normal repository",
  13686. "type": "boolean",
  13687. "x-go-name": "Template"
  13688. },
  13689. "website": {
  13690. "description": "a URL with more information about the repository.",
  13691. "type": "string",
  13692. "x-go-name": "Website"
  13693. }
  13694. },
  13695. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13696. },
  13697. "EditTeamOption": {
  13698. "description": "EditTeamOption options for editing a team",
  13699. "type": "object",
  13700. "required": [
  13701. "name"
  13702. ],
  13703. "properties": {
  13704. "can_create_org_repo": {
  13705. "type": "boolean",
  13706. "x-go-name": "CanCreateOrgRepo"
  13707. },
  13708. "description": {
  13709. "type": "string",
  13710. "x-go-name": "Description"
  13711. },
  13712. "includes_all_repositories": {
  13713. "type": "boolean",
  13714. "x-go-name": "IncludesAllRepositories"
  13715. },
  13716. "name": {
  13717. "type": "string",
  13718. "x-go-name": "Name"
  13719. },
  13720. "permission": {
  13721. "type": "string",
  13722. "enum": [
  13723. "read",
  13724. "write",
  13725. "admin"
  13726. ],
  13727. "x-go-name": "Permission"
  13728. },
  13729. "units": {
  13730. "type": "array",
  13731. "items": {
  13732. "type": "string"
  13733. },
  13734. "x-go-name": "Units",
  13735. "example": [
  13736. "repo.code",
  13737. "repo.issues",
  13738. "repo.ext_issues",
  13739. "repo.wiki",
  13740. "repo.pulls",
  13741. "repo.releases",
  13742. "repo.projects",
  13743. "repo.ext_wiki"
  13744. ]
  13745. }
  13746. },
  13747. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13748. },
  13749. "EditUserOption": {
  13750. "description": "EditUserOption edit user options",
  13751. "type": "object",
  13752. "required": [
  13753. "source_id",
  13754. "login_name"
  13755. ],
  13756. "properties": {
  13757. "active": {
  13758. "type": "boolean",
  13759. "x-go-name": "Active"
  13760. },
  13761. "admin": {
  13762. "type": "boolean",
  13763. "x-go-name": "Admin"
  13764. },
  13765. "allow_create_organization": {
  13766. "type": "boolean",
  13767. "x-go-name": "AllowCreateOrganization"
  13768. },
  13769. "allow_git_hook": {
  13770. "type": "boolean",
  13771. "x-go-name": "AllowGitHook"
  13772. },
  13773. "allow_import_local": {
  13774. "type": "boolean",
  13775. "x-go-name": "AllowImportLocal"
  13776. },
  13777. "email": {
  13778. "type": "string",
  13779. "format": "email",
  13780. "x-go-name": "Email"
  13781. },
  13782. "full_name": {
  13783. "type": "string",
  13784. "x-go-name": "FullName"
  13785. },
  13786. "location": {
  13787. "type": "string",
  13788. "x-go-name": "Location"
  13789. },
  13790. "login_name": {
  13791. "type": "string",
  13792. "x-go-name": "LoginName"
  13793. },
  13794. "max_repo_creation": {
  13795. "type": "integer",
  13796. "format": "int64",
  13797. "x-go-name": "MaxRepoCreation"
  13798. },
  13799. "must_change_password": {
  13800. "type": "boolean",
  13801. "x-go-name": "MustChangePassword"
  13802. },
  13803. "password": {
  13804. "type": "string",
  13805. "x-go-name": "Password"
  13806. },
  13807. "prohibit_login": {
  13808. "type": "boolean",
  13809. "x-go-name": "ProhibitLogin"
  13810. },
  13811. "restricted": {
  13812. "type": "boolean",
  13813. "x-go-name": "Restricted"
  13814. },
  13815. "source_id": {
  13816. "type": "integer",
  13817. "format": "int64",
  13818. "x-go-name": "SourceID"
  13819. },
  13820. "website": {
  13821. "type": "string",
  13822. "x-go-name": "Website"
  13823. }
  13824. },
  13825. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13826. },
  13827. "Email": {
  13828. "description": "Email an email address belonging to a user",
  13829. "type": "object",
  13830. "properties": {
  13831. "email": {
  13832. "type": "string",
  13833. "format": "email",
  13834. "x-go-name": "Email"
  13835. },
  13836. "primary": {
  13837. "type": "boolean",
  13838. "x-go-name": "Primary"
  13839. },
  13840. "verified": {
  13841. "type": "boolean",
  13842. "x-go-name": "Verified"
  13843. }
  13844. },
  13845. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13846. },
  13847. "ExternalTracker": {
  13848. "description": "ExternalTracker represents settings for external tracker",
  13849. "type": "object",
  13850. "properties": {
  13851. "external_tracker_format": {
  13852. "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.",
  13853. "type": "string",
  13854. "x-go-name": "ExternalTrackerFormat"
  13855. },
  13856. "external_tracker_style": {
  13857. "description": "External Issue Tracker Number Format, either `numeric` or `alphanumeric`",
  13858. "type": "string",
  13859. "x-go-name": "ExternalTrackerStyle"
  13860. },
  13861. "external_tracker_url": {
  13862. "description": "URL of external issue tracker.",
  13863. "type": "string",
  13864. "x-go-name": "ExternalTrackerURL"
  13865. }
  13866. },
  13867. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13868. },
  13869. "ExternalWiki": {
  13870. "description": "ExternalWiki represents setting for external wiki",
  13871. "type": "object",
  13872. "properties": {
  13873. "external_wiki_url": {
  13874. "description": "URL of external wiki.",
  13875. "type": "string",
  13876. "x-go-name": "ExternalWikiURL"
  13877. }
  13878. },
  13879. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13880. },
  13881. "FileCommitResponse": {
  13882. "type": "object",
  13883. "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.",
  13884. "properties": {
  13885. "author": {
  13886. "$ref": "#/definitions/CommitUser"
  13887. },
  13888. "committer": {
  13889. "$ref": "#/definitions/CommitUser"
  13890. },
  13891. "created": {
  13892. "type": "string",
  13893. "format": "date-time",
  13894. "x-go-name": "Created"
  13895. },
  13896. "html_url": {
  13897. "type": "string",
  13898. "x-go-name": "HTMLURL"
  13899. },
  13900. "message": {
  13901. "type": "string",
  13902. "x-go-name": "Message"
  13903. },
  13904. "parents": {
  13905. "type": "array",
  13906. "items": {
  13907. "$ref": "#/definitions/CommitMeta"
  13908. },
  13909. "x-go-name": "Parents"
  13910. },
  13911. "sha": {
  13912. "type": "string",
  13913. "x-go-name": "SHA"
  13914. },
  13915. "tree": {
  13916. "$ref": "#/definitions/CommitMeta"
  13917. },
  13918. "url": {
  13919. "type": "string",
  13920. "x-go-name": "URL"
  13921. }
  13922. },
  13923. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13924. },
  13925. "FileDeleteResponse": {
  13926. "description": "FileDeleteResponse contains information about a repo's file that was deleted",
  13927. "type": "object",
  13928. "properties": {
  13929. "commit": {
  13930. "$ref": "#/definitions/FileCommitResponse"
  13931. },
  13932. "content": {
  13933. "type": "object",
  13934. "x-go-name": "Content"
  13935. },
  13936. "verification": {
  13937. "$ref": "#/definitions/PayloadCommitVerification"
  13938. }
  13939. },
  13940. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13941. },
  13942. "FileLinksResponse": {
  13943. "description": "FileLinksResponse contains the links for a repo's file",
  13944. "type": "object",
  13945. "properties": {
  13946. "git": {
  13947. "type": "string",
  13948. "x-go-name": "GitURL"
  13949. },
  13950. "html": {
  13951. "type": "string",
  13952. "x-go-name": "HTMLURL"
  13953. },
  13954. "self": {
  13955. "type": "string",
  13956. "x-go-name": "Self"
  13957. }
  13958. },
  13959. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13960. },
  13961. "FileResponse": {
  13962. "description": "FileResponse contains information about a repo's file",
  13963. "type": "object",
  13964. "properties": {
  13965. "commit": {
  13966. "$ref": "#/definitions/FileCommitResponse"
  13967. },
  13968. "content": {
  13969. "$ref": "#/definitions/ContentsResponse"
  13970. },
  13971. "verification": {
  13972. "$ref": "#/definitions/PayloadCommitVerification"
  13973. }
  13974. },
  13975. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13976. },
  13977. "GPGKey": {
  13978. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  13979. "type": "object",
  13980. "properties": {
  13981. "can_certify": {
  13982. "type": "boolean",
  13983. "x-go-name": "CanCertify"
  13984. },
  13985. "can_encrypt_comms": {
  13986. "type": "boolean",
  13987. "x-go-name": "CanEncryptComms"
  13988. },
  13989. "can_encrypt_storage": {
  13990. "type": "boolean",
  13991. "x-go-name": "CanEncryptStorage"
  13992. },
  13993. "can_sign": {
  13994. "type": "boolean",
  13995. "x-go-name": "CanSign"
  13996. },
  13997. "created_at": {
  13998. "type": "string",
  13999. "format": "date-time",
  14000. "x-go-name": "Created"
  14001. },
  14002. "emails": {
  14003. "type": "array",
  14004. "items": {
  14005. "$ref": "#/definitions/GPGKeyEmail"
  14006. },
  14007. "x-go-name": "Emails"
  14008. },
  14009. "expires_at": {
  14010. "type": "string",
  14011. "format": "date-time",
  14012. "x-go-name": "Expires"
  14013. },
  14014. "id": {
  14015. "type": "integer",
  14016. "format": "int64",
  14017. "x-go-name": "ID"
  14018. },
  14019. "key_id": {
  14020. "type": "string",
  14021. "x-go-name": "KeyID"
  14022. },
  14023. "primary_key_id": {
  14024. "type": "string",
  14025. "x-go-name": "PrimaryKeyID"
  14026. },
  14027. "public_key": {
  14028. "type": "string",
  14029. "x-go-name": "PublicKey"
  14030. },
  14031. "subkeys": {
  14032. "type": "array",
  14033. "items": {
  14034. "$ref": "#/definitions/GPGKey"
  14035. },
  14036. "x-go-name": "SubsKey"
  14037. }
  14038. },
  14039. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14040. },
  14041. "GPGKeyEmail": {
  14042. "description": "GPGKeyEmail an email attached to a GPGKey",
  14043. "type": "object",
  14044. "properties": {
  14045. "email": {
  14046. "type": "string",
  14047. "x-go-name": "Email"
  14048. },
  14049. "verified": {
  14050. "type": "boolean",
  14051. "x-go-name": "Verified"
  14052. }
  14053. },
  14054. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14055. },
  14056. "GeneralAPISettings": {
  14057. "description": "GeneralAPISettings contains global api settings exposed by it",
  14058. "type": "object",
  14059. "properties": {
  14060. "default_git_trees_per_page": {
  14061. "type": "integer",
  14062. "format": "int64",
  14063. "x-go-name": "DefaultGitTreesPerPage"
  14064. },
  14065. "default_max_blob_size": {
  14066. "type": "integer",
  14067. "format": "int64",
  14068. "x-go-name": "DefaultMaxBlobSize"
  14069. },
  14070. "default_paging_num": {
  14071. "type": "integer",
  14072. "format": "int64",
  14073. "x-go-name": "DefaultPagingNum"
  14074. },
  14075. "max_response_items": {
  14076. "type": "integer",
  14077. "format": "int64",
  14078. "x-go-name": "MaxResponseItems"
  14079. }
  14080. },
  14081. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14082. },
  14083. "GeneralAttachmentSettings": {
  14084. "description": "GeneralAttachmentSettings contains global Attachment settings exposed by API",
  14085. "type": "object",
  14086. "properties": {
  14087. "allowed_types": {
  14088. "type": "string",
  14089. "x-go-name": "AllowedTypes"
  14090. },
  14091. "enabled": {
  14092. "type": "boolean",
  14093. "x-go-name": "Enabled"
  14094. },
  14095. "max_files": {
  14096. "type": "integer",
  14097. "format": "int64",
  14098. "x-go-name": "MaxFiles"
  14099. },
  14100. "max_size": {
  14101. "type": "integer",
  14102. "format": "int64",
  14103. "x-go-name": "MaxSize"
  14104. }
  14105. },
  14106. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14107. },
  14108. "GeneralRepoSettings": {
  14109. "description": "GeneralRepoSettings contains global repository settings exposed by API",
  14110. "type": "object",
  14111. "properties": {
  14112. "http_git_disabled": {
  14113. "type": "boolean",
  14114. "x-go-name": "HTTPGitDisabled"
  14115. },
  14116. "lfs_disabled": {
  14117. "type": "boolean",
  14118. "x-go-name": "LFSDisabled"
  14119. },
  14120. "migrations_disabled": {
  14121. "type": "boolean",
  14122. "x-go-name": "MigrationsDisabled"
  14123. },
  14124. "mirrors_disabled": {
  14125. "type": "boolean",
  14126. "x-go-name": "MirrorsDisabled"
  14127. },
  14128. "time_tracking_disabled": {
  14129. "type": "boolean",
  14130. "x-go-name": "TimeTrackingDisabled"
  14131. }
  14132. },
  14133. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14134. },
  14135. "GeneralUISettings": {
  14136. "description": "GeneralUISettings contains global ui settings exposed by API",
  14137. "type": "object",
  14138. "properties": {
  14139. "allowed_reactions": {
  14140. "type": "array",
  14141. "items": {
  14142. "type": "string"
  14143. },
  14144. "x-go-name": "AllowedReactions"
  14145. },
  14146. "default_theme": {
  14147. "type": "string",
  14148. "x-go-name": "DefaultTheme"
  14149. }
  14150. },
  14151. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14152. },
  14153. "GitBlobResponse": {
  14154. "description": "GitBlobResponse represents a git blob",
  14155. "type": "object",
  14156. "properties": {
  14157. "content": {
  14158. "type": "string",
  14159. "x-go-name": "Content"
  14160. },
  14161. "encoding": {
  14162. "type": "string",
  14163. "x-go-name": "Encoding"
  14164. },
  14165. "sha": {
  14166. "type": "string",
  14167. "x-go-name": "SHA"
  14168. },
  14169. "size": {
  14170. "type": "integer",
  14171. "format": "int64",
  14172. "x-go-name": "Size"
  14173. },
  14174. "url": {
  14175. "type": "string",
  14176. "x-go-name": "URL"
  14177. }
  14178. },
  14179. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14180. },
  14181. "GitEntry": {
  14182. "description": "GitEntry represents a git tree",
  14183. "type": "object",
  14184. "properties": {
  14185. "mode": {
  14186. "type": "string",
  14187. "x-go-name": "Mode"
  14188. },
  14189. "path": {
  14190. "type": "string",
  14191. "x-go-name": "Path"
  14192. },
  14193. "sha": {
  14194. "type": "string",
  14195. "x-go-name": "SHA"
  14196. },
  14197. "size": {
  14198. "type": "integer",
  14199. "format": "int64",
  14200. "x-go-name": "Size"
  14201. },
  14202. "type": {
  14203. "type": "string",
  14204. "x-go-name": "Type"
  14205. },
  14206. "url": {
  14207. "type": "string",
  14208. "x-go-name": "URL"
  14209. }
  14210. },
  14211. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14212. },
  14213. "GitHook": {
  14214. "description": "GitHook represents a Git repository hook",
  14215. "type": "object",
  14216. "properties": {
  14217. "content": {
  14218. "type": "string",
  14219. "x-go-name": "Content"
  14220. },
  14221. "is_active": {
  14222. "type": "boolean",
  14223. "x-go-name": "IsActive"
  14224. },
  14225. "name": {
  14226. "type": "string",
  14227. "x-go-name": "Name"
  14228. }
  14229. },
  14230. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14231. },
  14232. "GitObject": {
  14233. "type": "object",
  14234. "title": "GitObject represents a Git object.",
  14235. "properties": {
  14236. "sha": {
  14237. "type": "string",
  14238. "x-go-name": "SHA"
  14239. },
  14240. "type": {
  14241. "type": "string",
  14242. "x-go-name": "Type"
  14243. },
  14244. "url": {
  14245. "type": "string",
  14246. "x-go-name": "URL"
  14247. }
  14248. },
  14249. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14250. },
  14251. "GitServiceType": {
  14252. "description": "GitServiceType represents a git service",
  14253. "type": "integer",
  14254. "format": "int64",
  14255. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14256. },
  14257. "GitTreeResponse": {
  14258. "description": "GitTreeResponse returns a git tree",
  14259. "type": "object",
  14260. "properties": {
  14261. "page": {
  14262. "type": "integer",
  14263. "format": "int64",
  14264. "x-go-name": "Page"
  14265. },
  14266. "sha": {
  14267. "type": "string",
  14268. "x-go-name": "SHA"
  14269. },
  14270. "total_count": {
  14271. "type": "integer",
  14272. "format": "int64",
  14273. "x-go-name": "TotalCount"
  14274. },
  14275. "tree": {
  14276. "type": "array",
  14277. "items": {
  14278. "$ref": "#/definitions/GitEntry"
  14279. },
  14280. "x-go-name": "Entries"
  14281. },
  14282. "truncated": {
  14283. "type": "boolean",
  14284. "x-go-name": "Truncated"
  14285. },
  14286. "url": {
  14287. "type": "string",
  14288. "x-go-name": "URL"
  14289. }
  14290. },
  14291. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14292. },
  14293. "Hook": {
  14294. "description": "Hook a hook is a web hook when one repository changed",
  14295. "type": "object",
  14296. "properties": {
  14297. "active": {
  14298. "type": "boolean",
  14299. "x-go-name": "Active"
  14300. },
  14301. "config": {
  14302. "type": "object",
  14303. "additionalProperties": {
  14304. "type": "string"
  14305. },
  14306. "x-go-name": "Config"
  14307. },
  14308. "created_at": {
  14309. "type": "string",
  14310. "format": "date-time",
  14311. "x-go-name": "Created"
  14312. },
  14313. "events": {
  14314. "type": "array",
  14315. "items": {
  14316. "type": "string"
  14317. },
  14318. "x-go-name": "Events"
  14319. },
  14320. "id": {
  14321. "type": "integer",
  14322. "format": "int64",
  14323. "x-go-name": "ID"
  14324. },
  14325. "type": {
  14326. "type": "string",
  14327. "x-go-name": "Type"
  14328. },
  14329. "updated_at": {
  14330. "type": "string",
  14331. "format": "date-time",
  14332. "x-go-name": "Updated"
  14333. }
  14334. },
  14335. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14336. },
  14337. "Identity": {
  14338. "description": "Identity for a person's identity like an author or committer",
  14339. "type": "object",
  14340. "properties": {
  14341. "email": {
  14342. "type": "string",
  14343. "format": "email",
  14344. "x-go-name": "Email"
  14345. },
  14346. "name": {
  14347. "type": "string",
  14348. "x-go-name": "Name"
  14349. }
  14350. },
  14351. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14352. },
  14353. "InternalTracker": {
  14354. "description": "InternalTracker represents settings for internal tracker",
  14355. "type": "object",
  14356. "properties": {
  14357. "allow_only_contributors_to_track_time": {
  14358. "description": "Let only contributors track time (Built-in issue tracker)",
  14359. "type": "boolean",
  14360. "x-go-name": "AllowOnlyContributorsToTrackTime"
  14361. },
  14362. "enable_issue_dependencies": {
  14363. "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)",
  14364. "type": "boolean",
  14365. "x-go-name": "EnableIssueDependencies"
  14366. },
  14367. "enable_time_tracker": {
  14368. "description": "Enable time tracking (Built-in issue tracker)",
  14369. "type": "boolean",
  14370. "x-go-name": "EnableTimeTracker"
  14371. }
  14372. },
  14373. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14374. },
  14375. "Issue": {
  14376. "description": "Issue represents an issue in a repository",
  14377. "type": "object",
  14378. "properties": {
  14379. "assignee": {
  14380. "$ref": "#/definitions/User"
  14381. },
  14382. "assignees": {
  14383. "type": "array",
  14384. "items": {
  14385. "$ref": "#/definitions/User"
  14386. },
  14387. "x-go-name": "Assignees"
  14388. },
  14389. "body": {
  14390. "type": "string",
  14391. "x-go-name": "Body"
  14392. },
  14393. "closed_at": {
  14394. "type": "string",
  14395. "format": "date-time",
  14396. "x-go-name": "Closed"
  14397. },
  14398. "comments": {
  14399. "type": "integer",
  14400. "format": "int64",
  14401. "x-go-name": "Comments"
  14402. },
  14403. "created_at": {
  14404. "type": "string",
  14405. "format": "date-time",
  14406. "x-go-name": "Created"
  14407. },
  14408. "due_date": {
  14409. "type": "string",
  14410. "format": "date-time",
  14411. "x-go-name": "Deadline"
  14412. },
  14413. "html_url": {
  14414. "type": "string",
  14415. "x-go-name": "HTMLURL"
  14416. },
  14417. "id": {
  14418. "type": "integer",
  14419. "format": "int64",
  14420. "x-go-name": "ID"
  14421. },
  14422. "is_locked": {
  14423. "type": "boolean",
  14424. "x-go-name": "IsLocked"
  14425. },
  14426. "labels": {
  14427. "type": "array",
  14428. "items": {
  14429. "$ref": "#/definitions/Label"
  14430. },
  14431. "x-go-name": "Labels"
  14432. },
  14433. "milestone": {
  14434. "$ref": "#/definitions/Milestone"
  14435. },
  14436. "number": {
  14437. "type": "integer",
  14438. "format": "int64",
  14439. "x-go-name": "Index"
  14440. },
  14441. "original_author": {
  14442. "type": "string",
  14443. "x-go-name": "OriginalAuthor"
  14444. },
  14445. "original_author_id": {
  14446. "type": "integer",
  14447. "format": "int64",
  14448. "x-go-name": "OriginalAuthorID"
  14449. },
  14450. "pull_request": {
  14451. "$ref": "#/definitions/PullRequestMeta"
  14452. },
  14453. "ref": {
  14454. "type": "string",
  14455. "x-go-name": "Ref"
  14456. },
  14457. "repository": {
  14458. "$ref": "#/definitions/RepositoryMeta"
  14459. },
  14460. "state": {
  14461. "$ref": "#/definitions/StateType"
  14462. },
  14463. "title": {
  14464. "type": "string",
  14465. "x-go-name": "Title"
  14466. },
  14467. "updated_at": {
  14468. "type": "string",
  14469. "format": "date-time",
  14470. "x-go-name": "Updated"
  14471. },
  14472. "url": {
  14473. "type": "string",
  14474. "x-go-name": "URL"
  14475. },
  14476. "user": {
  14477. "$ref": "#/definitions/User"
  14478. }
  14479. },
  14480. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14481. },
  14482. "IssueDeadline": {
  14483. "description": "IssueDeadline represents an issue deadline",
  14484. "type": "object",
  14485. "properties": {
  14486. "due_date": {
  14487. "type": "string",
  14488. "format": "date-time",
  14489. "x-go-name": "Deadline"
  14490. }
  14491. },
  14492. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14493. },
  14494. "IssueLabelsOption": {
  14495. "description": "IssueLabelsOption a collection of labels",
  14496. "type": "object",
  14497. "properties": {
  14498. "labels": {
  14499. "description": "list of label IDs",
  14500. "type": "array",
  14501. "items": {
  14502. "type": "integer",
  14503. "format": "int64"
  14504. },
  14505. "x-go-name": "Labels"
  14506. }
  14507. },
  14508. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14509. },
  14510. "IssueTemplate": {
  14511. "description": "IssueTemplate represents an issue template for a repository",
  14512. "type": "object",
  14513. "properties": {
  14514. "about": {
  14515. "type": "string",
  14516. "x-go-name": "About"
  14517. },
  14518. "content": {
  14519. "type": "string",
  14520. "x-go-name": "Content"
  14521. },
  14522. "file_name": {
  14523. "type": "string",
  14524. "x-go-name": "FileName"
  14525. },
  14526. "labels": {
  14527. "type": "array",
  14528. "items": {
  14529. "type": "string"
  14530. },
  14531. "x-go-name": "Labels"
  14532. },
  14533. "name": {
  14534. "type": "string",
  14535. "x-go-name": "Name"
  14536. },
  14537. "title": {
  14538. "type": "string",
  14539. "x-go-name": "Title"
  14540. }
  14541. },
  14542. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14543. },
  14544. "Label": {
  14545. "description": "Label a label to an issue or a pr",
  14546. "type": "object",
  14547. "properties": {
  14548. "color": {
  14549. "type": "string",
  14550. "x-go-name": "Color",
  14551. "example": "00aabb"
  14552. },
  14553. "description": {
  14554. "type": "string",
  14555. "x-go-name": "Description"
  14556. },
  14557. "id": {
  14558. "type": "integer",
  14559. "format": "int64",
  14560. "x-go-name": "ID"
  14561. },
  14562. "name": {
  14563. "type": "string",
  14564. "x-go-name": "Name"
  14565. },
  14566. "url": {
  14567. "type": "string",
  14568. "x-go-name": "URL"
  14569. }
  14570. },
  14571. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14572. },
  14573. "MarkdownOption": {
  14574. "description": "MarkdownOption markdown options",
  14575. "type": "object",
  14576. "properties": {
  14577. "Context": {
  14578. "description": "Context to render\n\nin: body",
  14579. "type": "string"
  14580. },
  14581. "Mode": {
  14582. "description": "Mode to render\n\nin: body",
  14583. "type": "string"
  14584. },
  14585. "Text": {
  14586. "description": "Text markdown to render\n\nin: body",
  14587. "type": "string"
  14588. },
  14589. "Wiki": {
  14590. "description": "Is it a wiki page ?\n\nin: body",
  14591. "type": "boolean"
  14592. }
  14593. },
  14594. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14595. },
  14596. "MergePullRequestOption": {
  14597. "description": "MergePullRequestForm form for merging Pull Request",
  14598. "type": "object",
  14599. "required": [
  14600. "Do"
  14601. ],
  14602. "properties": {
  14603. "Do": {
  14604. "type": "string",
  14605. "enum": [
  14606. "merge",
  14607. "rebase",
  14608. "rebase-merge",
  14609. "squash",
  14610. "manually-merged"
  14611. ]
  14612. },
  14613. "MergeCommitID": {
  14614. "type": "string"
  14615. },
  14616. "MergeMessageField": {
  14617. "type": "string"
  14618. },
  14619. "MergeTitleField": {
  14620. "type": "string"
  14621. },
  14622. "force_merge": {
  14623. "type": "boolean",
  14624. "x-go-name": "ForceMerge"
  14625. }
  14626. },
  14627. "x-go-name": "MergePullRequestForm",
  14628. "x-go-package": "code.gitea.io/gitea/modules/forms"
  14629. },
  14630. "MigrateRepoForm": {
  14631. "description": "MigrateRepoForm form for migrating repository\nthis is used to interact with web ui",
  14632. "type": "object",
  14633. "required": [
  14634. "clone_addr",
  14635. "uid",
  14636. "repo_name"
  14637. ],
  14638. "properties": {
  14639. "auth_password": {
  14640. "type": "string",
  14641. "x-go-name": "AuthPassword"
  14642. },
  14643. "auth_token": {
  14644. "type": "string",
  14645. "x-go-name": "AuthToken"
  14646. },
  14647. "auth_username": {
  14648. "type": "string",
  14649. "x-go-name": "AuthUsername"
  14650. },
  14651. "clone_addr": {
  14652. "type": "string",
  14653. "x-go-name": "CloneAddr"
  14654. },
  14655. "description": {
  14656. "type": "string",
  14657. "x-go-name": "Description"
  14658. },
  14659. "issues": {
  14660. "type": "boolean",
  14661. "x-go-name": "Issues"
  14662. },
  14663. "labels": {
  14664. "type": "boolean",
  14665. "x-go-name": "Labels"
  14666. },
  14667. "milestones": {
  14668. "type": "boolean",
  14669. "x-go-name": "Milestones"
  14670. },
  14671. "mirror": {
  14672. "type": "boolean",
  14673. "x-go-name": "Mirror"
  14674. },
  14675. "mirror_interval": {
  14676. "type": "string",
  14677. "x-go-name": "MirrorInterval"
  14678. },
  14679. "private": {
  14680. "type": "boolean",
  14681. "x-go-name": "Private"
  14682. },
  14683. "pull_requests": {
  14684. "type": "boolean",
  14685. "x-go-name": "PullRequests"
  14686. },
  14687. "releases": {
  14688. "type": "boolean",
  14689. "x-go-name": "Releases"
  14690. },
  14691. "repo_name": {
  14692. "type": "string",
  14693. "x-go-name": "RepoName"
  14694. },
  14695. "service": {
  14696. "$ref": "#/definitions/GitServiceType"
  14697. },
  14698. "uid": {
  14699. "type": "integer",
  14700. "format": "int64",
  14701. "x-go-name": "UID"
  14702. },
  14703. "wiki": {
  14704. "type": "boolean",
  14705. "x-go-name": "Wiki"
  14706. }
  14707. },
  14708. "x-go-package": "code.gitea.io/gitea/modules/forms"
  14709. },
  14710. "MigrateRepoOptions": {
  14711. "description": "MigrateRepoOptions options for migrating repository's\nthis is used to interact with api v1",
  14712. "type": "object",
  14713. "required": [
  14714. "clone_addr",
  14715. "repo_name"
  14716. ],
  14717. "properties": {
  14718. "auth_password": {
  14719. "type": "string",
  14720. "x-go-name": "AuthPassword"
  14721. },
  14722. "auth_token": {
  14723. "type": "string",
  14724. "x-go-name": "AuthToken"
  14725. },
  14726. "auth_username": {
  14727. "type": "string",
  14728. "x-go-name": "AuthUsername"
  14729. },
  14730. "clone_addr": {
  14731. "type": "string",
  14732. "x-go-name": "CloneAddr"
  14733. },
  14734. "description": {
  14735. "type": "string",
  14736. "x-go-name": "Description"
  14737. },
  14738. "issues": {
  14739. "type": "boolean",
  14740. "x-go-name": "Issues"
  14741. },
  14742. "labels": {
  14743. "type": "boolean",
  14744. "x-go-name": "Labels"
  14745. },
  14746. "milestones": {
  14747. "type": "boolean",
  14748. "x-go-name": "Milestones"
  14749. },
  14750. "mirror": {
  14751. "type": "boolean",
  14752. "x-go-name": "Mirror"
  14753. },
  14754. "mirror_interval": {
  14755. "type": "string",
  14756. "x-go-name": "MirrorInterval"
  14757. },
  14758. "private": {
  14759. "type": "boolean",
  14760. "x-go-name": "Private"
  14761. },
  14762. "pull_requests": {
  14763. "type": "boolean",
  14764. "x-go-name": "PullRequests"
  14765. },
  14766. "releases": {
  14767. "type": "boolean",
  14768. "x-go-name": "Releases"
  14769. },
  14770. "repo_name": {
  14771. "type": "string",
  14772. "x-go-name": "RepoName"
  14773. },
  14774. "repo_owner": {
  14775. "description": "Name of User or Organisation who will own Repo after migration",
  14776. "type": "string",
  14777. "x-go-name": "RepoOwner"
  14778. },
  14779. "service": {
  14780. "type": "string",
  14781. "enum": [
  14782. "git",
  14783. "github",
  14784. "gitea",
  14785. "gitlab"
  14786. ],
  14787. "x-go-name": "Service"
  14788. },
  14789. "uid": {
  14790. "description": "deprecated (only for backwards compatibility)",
  14791. "type": "integer",
  14792. "format": "int64",
  14793. "x-go-name": "RepoOwnerID"
  14794. },
  14795. "wiki": {
  14796. "type": "boolean",
  14797. "x-go-name": "Wiki"
  14798. }
  14799. },
  14800. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14801. },
  14802. "Milestone": {
  14803. "description": "Milestone milestone is a collection of issues on one repository",
  14804. "type": "object",
  14805. "properties": {
  14806. "closed_at": {
  14807. "type": "string",
  14808. "format": "date-time",
  14809. "x-go-name": "Closed"
  14810. },
  14811. "closed_issues": {
  14812. "type": "integer",
  14813. "format": "int64",
  14814. "x-go-name": "ClosedIssues"
  14815. },
  14816. "created_at": {
  14817. "type": "string",
  14818. "format": "date-time",
  14819. "x-go-name": "Created"
  14820. },
  14821. "description": {
  14822. "type": "string",
  14823. "x-go-name": "Description"
  14824. },
  14825. "due_on": {
  14826. "type": "string",
  14827. "format": "date-time",
  14828. "x-go-name": "Deadline"
  14829. },
  14830. "id": {
  14831. "type": "integer",
  14832. "format": "int64",
  14833. "x-go-name": "ID"
  14834. },
  14835. "open_issues": {
  14836. "type": "integer",
  14837. "format": "int64",
  14838. "x-go-name": "OpenIssues"
  14839. },
  14840. "state": {
  14841. "$ref": "#/definitions/StateType"
  14842. },
  14843. "title": {
  14844. "type": "string",
  14845. "x-go-name": "Title"
  14846. },
  14847. "updated_at": {
  14848. "type": "string",
  14849. "format": "date-time",
  14850. "x-go-name": "Updated"
  14851. }
  14852. },
  14853. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14854. },
  14855. "NotificationCount": {
  14856. "description": "NotificationCount number of unread notifications",
  14857. "type": "object",
  14858. "properties": {
  14859. "new": {
  14860. "type": "integer",
  14861. "format": "int64",
  14862. "x-go-name": "New"
  14863. }
  14864. },
  14865. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14866. },
  14867. "NotificationSubject": {
  14868. "description": "NotificationSubject contains the notification subject (Issue/Pull/Commit)",
  14869. "type": "object",
  14870. "properties": {
  14871. "latest_comment_url": {
  14872. "type": "string",
  14873. "x-go-name": "LatestCommentURL"
  14874. },
  14875. "state": {
  14876. "$ref": "#/definitions/StateType"
  14877. },
  14878. "title": {
  14879. "type": "string",
  14880. "x-go-name": "Title"
  14881. },
  14882. "type": {
  14883. "type": "string",
  14884. "x-go-name": "Type"
  14885. },
  14886. "url": {
  14887. "type": "string",
  14888. "x-go-name": "URL"
  14889. }
  14890. },
  14891. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14892. },
  14893. "NotificationThread": {
  14894. "description": "NotificationThread expose Notification on API",
  14895. "type": "object",
  14896. "properties": {
  14897. "id": {
  14898. "type": "integer",
  14899. "format": "int64",
  14900. "x-go-name": "ID"
  14901. },
  14902. "pinned": {
  14903. "type": "boolean",
  14904. "x-go-name": "Pinned"
  14905. },
  14906. "repository": {
  14907. "$ref": "#/definitions/Repository"
  14908. },
  14909. "subject": {
  14910. "$ref": "#/definitions/NotificationSubject"
  14911. },
  14912. "unread": {
  14913. "type": "boolean",
  14914. "x-go-name": "Unread"
  14915. },
  14916. "updated_at": {
  14917. "type": "string",
  14918. "format": "date-time",
  14919. "x-go-name": "UpdatedAt"
  14920. },
  14921. "url": {
  14922. "type": "string",
  14923. "x-go-name": "URL"
  14924. }
  14925. },
  14926. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14927. },
  14928. "OAuth2Application": {
  14929. "type": "object",
  14930. "title": "OAuth2Application represents an OAuth2 application.",
  14931. "properties": {
  14932. "client_id": {
  14933. "type": "string",
  14934. "x-go-name": "ClientID"
  14935. },
  14936. "client_secret": {
  14937. "type": "string",
  14938. "x-go-name": "ClientSecret"
  14939. },
  14940. "created": {
  14941. "type": "string",
  14942. "format": "date-time",
  14943. "x-go-name": "Created"
  14944. },
  14945. "id": {
  14946. "type": "integer",
  14947. "format": "int64",
  14948. "x-go-name": "ID"
  14949. },
  14950. "name": {
  14951. "type": "string",
  14952. "x-go-name": "Name"
  14953. },
  14954. "redirect_uris": {
  14955. "type": "array",
  14956. "items": {
  14957. "type": "string"
  14958. },
  14959. "x-go-name": "RedirectURIs"
  14960. }
  14961. },
  14962. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14963. },
  14964. "Organization": {
  14965. "description": "Organization represents an organization",
  14966. "type": "object",
  14967. "properties": {
  14968. "avatar_url": {
  14969. "type": "string",
  14970. "x-go-name": "AvatarURL"
  14971. },
  14972. "description": {
  14973. "type": "string",
  14974. "x-go-name": "Description"
  14975. },
  14976. "full_name": {
  14977. "type": "string",
  14978. "x-go-name": "FullName"
  14979. },
  14980. "id": {
  14981. "type": "integer",
  14982. "format": "int64",
  14983. "x-go-name": "ID"
  14984. },
  14985. "location": {
  14986. "type": "string",
  14987. "x-go-name": "Location"
  14988. },
  14989. "repo_admin_change_team_access": {
  14990. "type": "boolean",
  14991. "x-go-name": "RepoAdminChangeTeamAccess"
  14992. },
  14993. "username": {
  14994. "type": "string",
  14995. "x-go-name": "UserName"
  14996. },
  14997. "visibility": {
  14998. "type": "string",
  14999. "x-go-name": "Visibility"
  15000. },
  15001. "website": {
  15002. "type": "string",
  15003. "x-go-name": "Website"
  15004. }
  15005. },
  15006. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15007. },
  15008. "PRBranchInfo": {
  15009. "description": "PRBranchInfo information about a branch",
  15010. "type": "object",
  15011. "properties": {
  15012. "label": {
  15013. "type": "string",
  15014. "x-go-name": "Name"
  15015. },
  15016. "ref": {
  15017. "type": "string",
  15018. "x-go-name": "Ref"
  15019. },
  15020. "repo": {
  15021. "$ref": "#/definitions/Repository"
  15022. },
  15023. "repo_id": {
  15024. "type": "integer",
  15025. "format": "int64",
  15026. "x-go-name": "RepoID"
  15027. },
  15028. "sha": {
  15029. "type": "string",
  15030. "x-go-name": "Sha"
  15031. }
  15032. },
  15033. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15034. },
  15035. "PayloadCommit": {
  15036. "description": "PayloadCommit represents a commit",
  15037. "type": "object",
  15038. "properties": {
  15039. "added": {
  15040. "type": "array",
  15041. "items": {
  15042. "type": "string"
  15043. },
  15044. "x-go-name": "Added"
  15045. },
  15046. "author": {
  15047. "$ref": "#/definitions/PayloadUser"
  15048. },
  15049. "committer": {
  15050. "$ref": "#/definitions/PayloadUser"
  15051. },
  15052. "id": {
  15053. "description": "sha1 hash of the commit",
  15054. "type": "string",
  15055. "x-go-name": "ID"
  15056. },
  15057. "message": {
  15058. "type": "string",
  15059. "x-go-name": "Message"
  15060. },
  15061. "modified": {
  15062. "type": "array",
  15063. "items": {
  15064. "type": "string"
  15065. },
  15066. "x-go-name": "Modified"
  15067. },
  15068. "removed": {
  15069. "type": "array",
  15070. "items": {
  15071. "type": "string"
  15072. },
  15073. "x-go-name": "Removed"
  15074. },
  15075. "timestamp": {
  15076. "type": "string",
  15077. "format": "date-time",
  15078. "x-go-name": "Timestamp"
  15079. },
  15080. "url": {
  15081. "type": "string",
  15082. "x-go-name": "URL"
  15083. },
  15084. "verification": {
  15085. "$ref": "#/definitions/PayloadCommitVerification"
  15086. }
  15087. },
  15088. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15089. },
  15090. "PayloadCommitVerification": {
  15091. "description": "PayloadCommitVerification represents the GPG verification of a commit",
  15092. "type": "object",
  15093. "properties": {
  15094. "payload": {
  15095. "type": "string",
  15096. "x-go-name": "Payload"
  15097. },
  15098. "reason": {
  15099. "type": "string",
  15100. "x-go-name": "Reason"
  15101. },
  15102. "signature": {
  15103. "type": "string",
  15104. "x-go-name": "Signature"
  15105. },
  15106. "signer": {
  15107. "$ref": "#/definitions/PayloadUser"
  15108. },
  15109. "verified": {
  15110. "type": "boolean",
  15111. "x-go-name": "Verified"
  15112. }
  15113. },
  15114. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15115. },
  15116. "PayloadUser": {
  15117. "description": "PayloadUser represents the author or committer of a commit",
  15118. "type": "object",
  15119. "properties": {
  15120. "email": {
  15121. "type": "string",
  15122. "format": "email",
  15123. "x-go-name": "Email"
  15124. },
  15125. "name": {
  15126. "description": "Full name of the commit author",
  15127. "type": "string",
  15128. "x-go-name": "Name"
  15129. },
  15130. "username": {
  15131. "type": "string",
  15132. "x-go-name": "UserName"
  15133. }
  15134. },
  15135. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15136. },
  15137. "Permission": {
  15138. "description": "Permission represents a set of permissions",
  15139. "type": "object",
  15140. "properties": {
  15141. "admin": {
  15142. "type": "boolean",
  15143. "x-go-name": "Admin"
  15144. },
  15145. "pull": {
  15146. "type": "boolean",
  15147. "x-go-name": "Pull"
  15148. },
  15149. "push": {
  15150. "type": "boolean",
  15151. "x-go-name": "Push"
  15152. }
  15153. },
  15154. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15155. },
  15156. "PublicKey": {
  15157. "description": "PublicKey publickey is a user key to push code to repository",
  15158. "type": "object",
  15159. "properties": {
  15160. "created_at": {
  15161. "type": "string",
  15162. "format": "date-time",
  15163. "x-go-name": "Created"
  15164. },
  15165. "fingerprint": {
  15166. "type": "string",
  15167. "x-go-name": "Fingerprint"
  15168. },
  15169. "id": {
  15170. "type": "integer",
  15171. "format": "int64",
  15172. "x-go-name": "ID"
  15173. },
  15174. "key": {
  15175. "type": "string",
  15176. "x-go-name": "Key"
  15177. },
  15178. "key_type": {
  15179. "type": "string",
  15180. "x-go-name": "KeyType"
  15181. },
  15182. "read_only": {
  15183. "type": "boolean",
  15184. "x-go-name": "ReadOnly"
  15185. },
  15186. "title": {
  15187. "type": "string",
  15188. "x-go-name": "Title"
  15189. },
  15190. "url": {
  15191. "type": "string",
  15192. "x-go-name": "URL"
  15193. },
  15194. "user": {
  15195. "$ref": "#/definitions/User"
  15196. }
  15197. },
  15198. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15199. },
  15200. "PullRequest": {
  15201. "description": "PullRequest represents a pull request",
  15202. "type": "object",
  15203. "properties": {
  15204. "assignee": {
  15205. "$ref": "#/definitions/User"
  15206. },
  15207. "assignees": {
  15208. "type": "array",
  15209. "items": {
  15210. "$ref": "#/definitions/User"
  15211. },
  15212. "x-go-name": "Assignees"
  15213. },
  15214. "base": {
  15215. "$ref": "#/definitions/PRBranchInfo"
  15216. },
  15217. "body": {
  15218. "type": "string",
  15219. "x-go-name": "Body"
  15220. },
  15221. "closed_at": {
  15222. "type": "string",
  15223. "format": "date-time",
  15224. "x-go-name": "Closed"
  15225. },
  15226. "comments": {
  15227. "type": "integer",
  15228. "format": "int64",
  15229. "x-go-name": "Comments"
  15230. },
  15231. "created_at": {
  15232. "type": "string",
  15233. "format": "date-time",
  15234. "x-go-name": "Created"
  15235. },
  15236. "diff_url": {
  15237. "type": "string",
  15238. "x-go-name": "DiffURL"
  15239. },
  15240. "due_date": {
  15241. "type": "string",
  15242. "format": "date-time",
  15243. "x-go-name": "Deadline"
  15244. },
  15245. "head": {
  15246. "$ref": "#/definitions/PRBranchInfo"
  15247. },
  15248. "html_url": {
  15249. "type": "string",
  15250. "x-go-name": "HTMLURL"
  15251. },
  15252. "id": {
  15253. "type": "integer",
  15254. "format": "int64",
  15255. "x-go-name": "ID"
  15256. },
  15257. "is_locked": {
  15258. "type": "boolean",
  15259. "x-go-name": "IsLocked"
  15260. },
  15261. "labels": {
  15262. "type": "array",
  15263. "items": {
  15264. "$ref": "#/definitions/Label"
  15265. },
  15266. "x-go-name": "Labels"
  15267. },
  15268. "merge_base": {
  15269. "type": "string",
  15270. "x-go-name": "MergeBase"
  15271. },
  15272. "merge_commit_sha": {
  15273. "type": "string",
  15274. "x-go-name": "MergedCommitID"
  15275. },
  15276. "mergeable": {
  15277. "type": "boolean",
  15278. "x-go-name": "Mergeable"
  15279. },
  15280. "merged": {
  15281. "type": "boolean",
  15282. "x-go-name": "HasMerged"
  15283. },
  15284. "merged_at": {
  15285. "type": "string",
  15286. "format": "date-time",
  15287. "x-go-name": "Merged"
  15288. },
  15289. "merged_by": {
  15290. "$ref": "#/definitions/User"
  15291. },
  15292. "milestone": {
  15293. "$ref": "#/definitions/Milestone"
  15294. },
  15295. "number": {
  15296. "type": "integer",
  15297. "format": "int64",
  15298. "x-go-name": "Index"
  15299. },
  15300. "patch_url": {
  15301. "type": "string",
  15302. "x-go-name": "PatchURL"
  15303. },
  15304. "state": {
  15305. "$ref": "#/definitions/StateType"
  15306. },
  15307. "title": {
  15308. "type": "string",
  15309. "x-go-name": "Title"
  15310. },
  15311. "updated_at": {
  15312. "type": "string",
  15313. "format": "date-time",
  15314. "x-go-name": "Updated"
  15315. },
  15316. "url": {
  15317. "type": "string",
  15318. "x-go-name": "URL"
  15319. },
  15320. "user": {
  15321. "$ref": "#/definitions/User"
  15322. }
  15323. },
  15324. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15325. },
  15326. "PullRequestMeta": {
  15327. "description": "PullRequestMeta PR info if an issue is a PR",
  15328. "type": "object",
  15329. "properties": {
  15330. "merged": {
  15331. "type": "boolean",
  15332. "x-go-name": "HasMerged"
  15333. },
  15334. "merged_at": {
  15335. "type": "string",
  15336. "format": "date-time",
  15337. "x-go-name": "Merged"
  15338. }
  15339. },
  15340. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15341. },
  15342. "PullReview": {
  15343. "description": "PullReview represents a pull request review",
  15344. "type": "object",
  15345. "properties": {
  15346. "body": {
  15347. "type": "string",
  15348. "x-go-name": "Body"
  15349. },
  15350. "comments_count": {
  15351. "type": "integer",
  15352. "format": "int64",
  15353. "x-go-name": "CodeCommentsCount"
  15354. },
  15355. "commit_id": {
  15356. "type": "string",
  15357. "x-go-name": "CommitID"
  15358. },
  15359. "dismissed": {
  15360. "type": "boolean",
  15361. "x-go-name": "Dismissed"
  15362. },
  15363. "html_url": {
  15364. "type": "string",
  15365. "x-go-name": "HTMLURL"
  15366. },
  15367. "id": {
  15368. "type": "integer",
  15369. "format": "int64",
  15370. "x-go-name": "ID"
  15371. },
  15372. "official": {
  15373. "type": "boolean",
  15374. "x-go-name": "Official"
  15375. },
  15376. "pull_request_url": {
  15377. "type": "string",
  15378. "x-go-name": "HTMLPullURL"
  15379. },
  15380. "stale": {
  15381. "type": "boolean",
  15382. "x-go-name": "Stale"
  15383. },
  15384. "state": {
  15385. "$ref": "#/definitions/ReviewStateType"
  15386. },
  15387. "submitted_at": {
  15388. "type": "string",
  15389. "format": "date-time",
  15390. "x-go-name": "Submitted"
  15391. },
  15392. "team": {
  15393. "$ref": "#/definitions/Team"
  15394. },
  15395. "user": {
  15396. "$ref": "#/definitions/User"
  15397. }
  15398. },
  15399. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15400. },
  15401. "PullReviewComment": {
  15402. "description": "PullReviewComment represents a comment on a pull request review",
  15403. "type": "object",
  15404. "properties": {
  15405. "body": {
  15406. "type": "string",
  15407. "x-go-name": "Body"
  15408. },
  15409. "commit_id": {
  15410. "type": "string",
  15411. "x-go-name": "CommitID"
  15412. },
  15413. "created_at": {
  15414. "type": "string",
  15415. "format": "date-time",
  15416. "x-go-name": "Created"
  15417. },
  15418. "diff_hunk": {
  15419. "type": "string",
  15420. "x-go-name": "DiffHunk"
  15421. },
  15422. "html_url": {
  15423. "type": "string",
  15424. "x-go-name": "HTMLURL"
  15425. },
  15426. "id": {
  15427. "type": "integer",
  15428. "format": "int64",
  15429. "x-go-name": "ID"
  15430. },
  15431. "original_commit_id": {
  15432. "type": "string",
  15433. "x-go-name": "OrigCommitID"
  15434. },
  15435. "original_position": {
  15436. "type": "integer",
  15437. "format": "uint64",
  15438. "x-go-name": "OldLineNum"
  15439. },
  15440. "path": {
  15441. "type": "string",
  15442. "x-go-name": "Path"
  15443. },
  15444. "position": {
  15445. "type": "integer",
  15446. "format": "uint64",
  15447. "x-go-name": "LineNum"
  15448. },
  15449. "pull_request_review_id": {
  15450. "type": "integer",
  15451. "format": "int64",
  15452. "x-go-name": "ReviewID"
  15453. },
  15454. "pull_request_url": {
  15455. "type": "string",
  15456. "x-go-name": "HTMLPullURL"
  15457. },
  15458. "updated_at": {
  15459. "type": "string",
  15460. "format": "date-time",
  15461. "x-go-name": "Updated"
  15462. },
  15463. "user": {
  15464. "$ref": "#/definitions/User"
  15465. }
  15466. },
  15467. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15468. },
  15469. "PullReviewRequestOptions": {
  15470. "description": "PullReviewRequestOptions are options to add or remove pull review requests",
  15471. "type": "object",
  15472. "properties": {
  15473. "reviewers": {
  15474. "type": "array",
  15475. "items": {
  15476. "type": "string"
  15477. },
  15478. "x-go-name": "Reviewers"
  15479. },
  15480. "team_reviewers": {
  15481. "type": "array",
  15482. "items": {
  15483. "type": "string"
  15484. },
  15485. "x-go-name": "TeamReviewers"
  15486. }
  15487. },
  15488. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15489. },
  15490. "Reaction": {
  15491. "description": "Reaction contain one reaction",
  15492. "type": "object",
  15493. "properties": {
  15494. "content": {
  15495. "type": "string",
  15496. "x-go-name": "Reaction"
  15497. },
  15498. "created_at": {
  15499. "type": "string",
  15500. "format": "date-time",
  15501. "x-go-name": "Created"
  15502. },
  15503. "user": {
  15504. "$ref": "#/definitions/User"
  15505. }
  15506. },
  15507. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15508. },
  15509. "Reference": {
  15510. "type": "object",
  15511. "title": "Reference represents a Git reference.",
  15512. "properties": {
  15513. "object": {
  15514. "$ref": "#/definitions/GitObject"
  15515. },
  15516. "ref": {
  15517. "type": "string",
  15518. "x-go-name": "Ref"
  15519. },
  15520. "url": {
  15521. "type": "string",
  15522. "x-go-name": "URL"
  15523. }
  15524. },
  15525. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15526. },
  15527. "Release": {
  15528. "description": "Release represents a repository release",
  15529. "type": "object",
  15530. "properties": {
  15531. "assets": {
  15532. "type": "array",
  15533. "items": {
  15534. "$ref": "#/definitions/Attachment"
  15535. },
  15536. "x-go-name": "Attachments"
  15537. },
  15538. "author": {
  15539. "$ref": "#/definitions/User"
  15540. },
  15541. "body": {
  15542. "type": "string",
  15543. "x-go-name": "Note"
  15544. },
  15545. "created_at": {
  15546. "type": "string",
  15547. "format": "date-time",
  15548. "x-go-name": "CreatedAt"
  15549. },
  15550. "draft": {
  15551. "type": "boolean",
  15552. "x-go-name": "IsDraft"
  15553. },
  15554. "html_url": {
  15555. "type": "string",
  15556. "x-go-name": "HTMLURL"
  15557. },
  15558. "id": {
  15559. "type": "integer",
  15560. "format": "int64",
  15561. "x-go-name": "ID"
  15562. },
  15563. "name": {
  15564. "type": "string",
  15565. "x-go-name": "Title"
  15566. },
  15567. "prerelease": {
  15568. "type": "boolean",
  15569. "x-go-name": "IsPrerelease"
  15570. },
  15571. "published_at": {
  15572. "type": "string",
  15573. "format": "date-time",
  15574. "x-go-name": "PublishedAt"
  15575. },
  15576. "tag_name": {
  15577. "type": "string",
  15578. "x-go-name": "TagName"
  15579. },
  15580. "tarball_url": {
  15581. "type": "string",
  15582. "x-go-name": "TarURL"
  15583. },
  15584. "target_commitish": {
  15585. "type": "string",
  15586. "x-go-name": "Target"
  15587. },
  15588. "url": {
  15589. "type": "string",
  15590. "x-go-name": "URL"
  15591. },
  15592. "zipball_url": {
  15593. "type": "string",
  15594. "x-go-name": "ZipURL"
  15595. }
  15596. },
  15597. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15598. },
  15599. "RepoCommit": {
  15600. "type": "object",
  15601. "title": "RepoCommit contains information of a commit in the context of a repository.",
  15602. "properties": {
  15603. "author": {
  15604. "$ref": "#/definitions/CommitUser"
  15605. },
  15606. "committer": {
  15607. "$ref": "#/definitions/CommitUser"
  15608. },
  15609. "message": {
  15610. "type": "string",
  15611. "x-go-name": "Message"
  15612. },
  15613. "tree": {
  15614. "$ref": "#/definitions/CommitMeta"
  15615. },
  15616. "url": {
  15617. "type": "string",
  15618. "x-go-name": "URL"
  15619. }
  15620. },
  15621. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15622. },
  15623. "RepoTopicOptions": {
  15624. "description": "RepoTopicOptions a collection of repo topic names",
  15625. "type": "object",
  15626. "properties": {
  15627. "topics": {
  15628. "description": "list of topic names",
  15629. "type": "array",
  15630. "items": {
  15631. "type": "string"
  15632. },
  15633. "x-go-name": "Topics"
  15634. }
  15635. },
  15636. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15637. },
  15638. "Repository": {
  15639. "description": "Repository represents a repository",
  15640. "type": "object",
  15641. "properties": {
  15642. "allow_merge_commits": {
  15643. "type": "boolean",
  15644. "x-go-name": "AllowMerge"
  15645. },
  15646. "allow_rebase": {
  15647. "type": "boolean",
  15648. "x-go-name": "AllowRebase"
  15649. },
  15650. "allow_rebase_explicit": {
  15651. "type": "boolean",
  15652. "x-go-name": "AllowRebaseMerge"
  15653. },
  15654. "allow_squash_merge": {
  15655. "type": "boolean",
  15656. "x-go-name": "AllowSquash"
  15657. },
  15658. "archived": {
  15659. "type": "boolean",
  15660. "x-go-name": "Archived"
  15661. },
  15662. "avatar_url": {
  15663. "type": "string",
  15664. "x-go-name": "AvatarURL"
  15665. },
  15666. "clone_url": {
  15667. "type": "string",
  15668. "x-go-name": "CloneURL"
  15669. },
  15670. "created_at": {
  15671. "type": "string",
  15672. "format": "date-time",
  15673. "x-go-name": "Created"
  15674. },
  15675. "default_branch": {
  15676. "type": "string",
  15677. "x-go-name": "DefaultBranch"
  15678. },
  15679. "description": {
  15680. "type": "string",
  15681. "x-go-name": "Description"
  15682. },
  15683. "empty": {
  15684. "type": "boolean",
  15685. "x-go-name": "Empty"
  15686. },
  15687. "external_tracker": {
  15688. "$ref": "#/definitions/ExternalTracker"
  15689. },
  15690. "external_wiki": {
  15691. "$ref": "#/definitions/ExternalWiki"
  15692. },
  15693. "fork": {
  15694. "type": "boolean",
  15695. "x-go-name": "Fork"
  15696. },
  15697. "forks_count": {
  15698. "type": "integer",
  15699. "format": "int64",
  15700. "x-go-name": "Forks"
  15701. },
  15702. "full_name": {
  15703. "type": "string",
  15704. "x-go-name": "FullName"
  15705. },
  15706. "has_issues": {
  15707. "type": "boolean",
  15708. "x-go-name": "HasIssues"
  15709. },
  15710. "has_projects": {
  15711. "type": "boolean",
  15712. "x-go-name": "HasProjects"
  15713. },
  15714. "has_pull_requests": {
  15715. "type": "boolean",
  15716. "x-go-name": "HasPullRequests"
  15717. },
  15718. "has_wiki": {
  15719. "type": "boolean",
  15720. "x-go-name": "HasWiki"
  15721. },
  15722. "html_url": {
  15723. "type": "string",
  15724. "x-go-name": "HTMLURL"
  15725. },
  15726. "id": {
  15727. "type": "integer",
  15728. "format": "int64",
  15729. "x-go-name": "ID"
  15730. },
  15731. "ignore_whitespace_conflicts": {
  15732. "type": "boolean",
  15733. "x-go-name": "IgnoreWhitespaceConflicts"
  15734. },
  15735. "internal": {
  15736. "type": "boolean",
  15737. "x-go-name": "Internal"
  15738. },
  15739. "internal_tracker": {
  15740. "$ref": "#/definitions/InternalTracker"
  15741. },
  15742. "mirror": {
  15743. "type": "boolean",
  15744. "x-go-name": "Mirror"
  15745. },
  15746. "mirror_interval": {
  15747. "type": "string",
  15748. "x-go-name": "MirrorInterval"
  15749. },
  15750. "name": {
  15751. "type": "string",
  15752. "x-go-name": "Name"
  15753. },
  15754. "open_issues_count": {
  15755. "type": "integer",
  15756. "format": "int64",
  15757. "x-go-name": "OpenIssues"
  15758. },
  15759. "open_pr_counter": {
  15760. "type": "integer",
  15761. "format": "int64",
  15762. "x-go-name": "OpenPulls"
  15763. },
  15764. "original_url": {
  15765. "type": "string",
  15766. "x-go-name": "OriginalURL"
  15767. },
  15768. "owner": {
  15769. "$ref": "#/definitions/User"
  15770. },
  15771. "parent": {
  15772. "$ref": "#/definitions/Repository"
  15773. },
  15774. "permissions": {
  15775. "$ref": "#/definitions/Permission"
  15776. },
  15777. "private": {
  15778. "type": "boolean",
  15779. "x-go-name": "Private"
  15780. },
  15781. "release_counter": {
  15782. "type": "integer",
  15783. "format": "int64",
  15784. "x-go-name": "Releases"
  15785. },
  15786. "size": {
  15787. "type": "integer",
  15788. "format": "int64",
  15789. "x-go-name": "Size"
  15790. },
  15791. "ssh_url": {
  15792. "type": "string",
  15793. "x-go-name": "SSHURL"
  15794. },
  15795. "stars_count": {
  15796. "type": "integer",
  15797. "format": "int64",
  15798. "x-go-name": "Stars"
  15799. },
  15800. "template": {
  15801. "type": "boolean",
  15802. "x-go-name": "Template"
  15803. },
  15804. "updated_at": {
  15805. "type": "string",
  15806. "format": "date-time",
  15807. "x-go-name": "Updated"
  15808. },
  15809. "watchers_count": {
  15810. "type": "integer",
  15811. "format": "int64",
  15812. "x-go-name": "Watchers"
  15813. },
  15814. "website": {
  15815. "type": "string",
  15816. "x-go-name": "Website"
  15817. }
  15818. },
  15819. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15820. },
  15821. "RepositoryMeta": {
  15822. "description": "RepositoryMeta basic repository information",
  15823. "type": "object",
  15824. "properties": {
  15825. "full_name": {
  15826. "type": "string",
  15827. "x-go-name": "FullName"
  15828. },
  15829. "id": {
  15830. "type": "integer",
  15831. "format": "int64",
  15832. "x-go-name": "ID"
  15833. },
  15834. "name": {
  15835. "type": "string",
  15836. "x-go-name": "Name"
  15837. },
  15838. "owner": {
  15839. "type": "string",
  15840. "x-go-name": "Owner"
  15841. }
  15842. },
  15843. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15844. },
  15845. "ReviewStateType": {
  15846. "description": "ReviewStateType review state type",
  15847. "type": "string",
  15848. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15849. },
  15850. "SearchResults": {
  15851. "description": "SearchResults results of a successful search",
  15852. "type": "object",
  15853. "properties": {
  15854. "data": {
  15855. "type": "array",
  15856. "items": {
  15857. "$ref": "#/definitions/Repository"
  15858. },
  15859. "x-go-name": "Data"
  15860. },
  15861. "ok": {
  15862. "type": "boolean",
  15863. "x-go-name": "OK"
  15864. }
  15865. },
  15866. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15867. },
  15868. "ServerVersion": {
  15869. "description": "ServerVersion wraps the version of the server",
  15870. "type": "object",
  15871. "properties": {
  15872. "version": {
  15873. "type": "string",
  15874. "x-go-name": "Version"
  15875. }
  15876. },
  15877. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15878. },
  15879. "StateType": {
  15880. "description": "StateType issue state type",
  15881. "type": "string",
  15882. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15883. },
  15884. "StopWatch": {
  15885. "description": "StopWatch represent a running stopwatch",
  15886. "type": "object",
  15887. "properties": {
  15888. "created": {
  15889. "type": "string",
  15890. "format": "date-time",
  15891. "x-go-name": "Created"
  15892. },
  15893. "duration": {
  15894. "type": "string",
  15895. "x-go-name": "Duration"
  15896. },
  15897. "issue_index": {
  15898. "type": "integer",
  15899. "format": "int64",
  15900. "x-go-name": "IssueIndex"
  15901. },
  15902. "issue_title": {
  15903. "type": "string",
  15904. "x-go-name": "IssueTitle"
  15905. },
  15906. "repo_name": {
  15907. "type": "string",
  15908. "x-go-name": "RepoName"
  15909. },
  15910. "repo_owner_name": {
  15911. "type": "string",
  15912. "x-go-name": "RepoOwnerName"
  15913. },
  15914. "seconds": {
  15915. "type": "integer",
  15916. "format": "int64",
  15917. "x-go-name": "Seconds"
  15918. }
  15919. },
  15920. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15921. },
  15922. "SubmitPullReviewOptions": {
  15923. "description": "SubmitPullReviewOptions are options to submit a pending pull review",
  15924. "type": "object",
  15925. "properties": {
  15926. "body": {
  15927. "type": "string",
  15928. "x-go-name": "Body"
  15929. },
  15930. "event": {
  15931. "$ref": "#/definitions/ReviewStateType"
  15932. }
  15933. },
  15934. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15935. },
  15936. "Tag": {
  15937. "description": "Tag represents a repository tag",
  15938. "type": "object",
  15939. "properties": {
  15940. "commit": {
  15941. "$ref": "#/definitions/CommitMeta"
  15942. },
  15943. "id": {
  15944. "type": "string",
  15945. "x-go-name": "ID"
  15946. },
  15947. "name": {
  15948. "type": "string",
  15949. "x-go-name": "Name"
  15950. },
  15951. "tarball_url": {
  15952. "type": "string",
  15953. "x-go-name": "TarballURL"
  15954. },
  15955. "zipball_url": {
  15956. "type": "string",
  15957. "x-go-name": "ZipballURL"
  15958. }
  15959. },
  15960. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15961. },
  15962. "Team": {
  15963. "description": "Team represents a team in an organization",
  15964. "type": "object",
  15965. "properties": {
  15966. "can_create_org_repo": {
  15967. "type": "boolean",
  15968. "x-go-name": "CanCreateOrgRepo"
  15969. },
  15970. "description": {
  15971. "type": "string",
  15972. "x-go-name": "Description"
  15973. },
  15974. "id": {
  15975. "type": "integer",
  15976. "format": "int64",
  15977. "x-go-name": "ID"
  15978. },
  15979. "includes_all_repositories": {
  15980. "type": "boolean",
  15981. "x-go-name": "IncludesAllRepositories"
  15982. },
  15983. "name": {
  15984. "type": "string",
  15985. "x-go-name": "Name"
  15986. },
  15987. "organization": {
  15988. "$ref": "#/definitions/Organization"
  15989. },
  15990. "permission": {
  15991. "type": "string",
  15992. "enum": [
  15993. "none",
  15994. "read",
  15995. "write",
  15996. "admin",
  15997. "owner"
  15998. ],
  15999. "x-go-name": "Permission"
  16000. },
  16001. "units": {
  16002. "type": "array",
  16003. "items": {
  16004. "type": "string"
  16005. },
  16006. "x-go-name": "Units",
  16007. "example": [
  16008. "repo.code",
  16009. "repo.issues",
  16010. "repo.ext_issues",
  16011. "repo.wiki",
  16012. "repo.pulls",
  16013. "repo.releases",
  16014. "repo.projects",
  16015. "repo.ext_wiki"
  16016. ]
  16017. }
  16018. },
  16019. "x-go-package": "code.gitea.io/gitea/modules/structs"
  16020. },
  16021. "TimeStamp": {
  16022. "description": "TimeStamp defines a timestamp",
  16023. "type": "integer",
  16024. "format": "int64",
  16025. "x-go-package": "code.gitea.io/gitea/modules/timeutil"
  16026. },
  16027. "TopicName": {
  16028. "description": "TopicName a list of repo topic names",
  16029. "type": "object",
  16030. "properties": {
  16031. "topics": {
  16032. "type": "array",
  16033. "items": {
  16034. "type": "string"
  16035. },
  16036. "x-go-name": "TopicNames"
  16037. }
  16038. },
  16039. "x-go-package": "code.gitea.io/gitea/modules/structs"
  16040. },
  16041. "TopicResponse": {
  16042. "description": "TopicResponse for returning topics",
  16043. "type": "object",
  16044. "properties": {
  16045. "created": {
  16046. "type": "string",
  16047. "format": "date-time",
  16048. "x-go-name": "Created"
  16049. },
  16050. "id": {
  16051. "type": "integer",
  16052. "format": "int64",
  16053. "x-go-name": "ID"
  16054. },
  16055. "repo_count": {
  16056. "type": "integer",
  16057. "format": "int64",
  16058. "x-go-name": "RepoCount"
  16059. },
  16060. "topic_name": {
  16061. "type": "string",
  16062. "x-go-name": "Name"
  16063. },
  16064. "updated": {
  16065. "type": "string",
  16066. "format": "date-time",
  16067. "x-go-name": "Updated"
  16068. }
  16069. },
  16070. "x-go-package": "code.gitea.io/gitea/modules/structs"
  16071. },
  16072. "TrackedTime": {
  16073. "description": "TrackedTime worked time for an issue / pr",
  16074. "type": "object",
  16075. "properties": {
  16076. "created": {
  16077. "type": "string",
  16078. "format": "date-time",
  16079. "x-go-name": "Created"
  16080. },
  16081. "id": {
  16082. "type": "integer",
  16083. "format": "int64",
  16084. "x-go-name": "ID"
  16085. },
  16086. "issue": {
  16087. "$ref": "#/definitions/Issue"
  16088. },
  16089. "issue_id": {
  16090. "description": "deprecated (only for backwards compatibility)",
  16091. "type": "integer",
  16092. "format": "int64",
  16093. "x-go-name": "IssueID"
  16094. },
  16095. "time": {
  16096. "description": "Time in seconds",
  16097. "type": "integer",
  16098. "format": "int64",
  16099. "x-go-name": "Time"
  16100. },
  16101. "user_id": {
  16102. "description": "deprecated (only for backwards compatibility)",
  16103. "type": "integer",
  16104. "format": "int64",
  16105. "x-go-name": "UserID"
  16106. },
  16107. "user_name": {
  16108. "type": "string",
  16109. "x-go-name": "UserName"
  16110. }
  16111. },
  16112. "x-go-package": "code.gitea.io/gitea/modules/structs"
  16113. },
  16114. "TransferRepoOption": {
  16115. "description": "TransferRepoOption options when transfer a repository's ownership",
  16116. "type": "object",
  16117. "required": [
  16118. "new_owner"
  16119. ],
  16120. "properties": {
  16121. "new_owner": {
  16122. "type": "string",
  16123. "x-go-name": "NewOwner"
  16124. },
  16125. "team_ids": {
  16126. "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.",
  16127. "type": "array",
  16128. "items": {
  16129. "type": "integer",
  16130. "format": "int64"
  16131. },
  16132. "x-go-name": "TeamIDs"
  16133. }
  16134. },
  16135. "x-go-package": "code.gitea.io/gitea/modules/structs"
  16136. },
  16137. "UpdateFileOptions": {
  16138. "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)",
  16139. "type": "object",
  16140. "required": [
  16141. "sha",
  16142. "content"
  16143. ],
  16144. "properties": {
  16145. "author": {
  16146. "$ref": "#/definitions/Identity"
  16147. },
  16148. "branch": {
  16149. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  16150. "type": "string",
  16151. "x-go-name": "BranchName"
  16152. },
  16153. "committer": {
  16154. "$ref": "#/definitions/Identity"
  16155. },
  16156. "content": {
  16157. "description": "content must be base64 encoded",
  16158. "type": "string",
  16159. "x-go-name": "Content"
  16160. },
  16161. "dates": {
  16162. "$ref": "#/definitions/CommitDateOptions"
  16163. },
  16164. "from_path": {
  16165. "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL",
  16166. "type": "string",
  16167. "x-go-name": "FromPath"
  16168. },
  16169. "message": {
  16170. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  16171. "type": "string",
  16172. "x-go-name": "Message"
  16173. },
  16174. "new_branch": {
  16175. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  16176. "type": "string",
  16177. "x-go-name": "NewBranchName"
  16178. },
  16179. "sha": {
  16180. "description": "sha is the SHA for the file that already exists",
  16181. "type": "string",
  16182. "x-go-name": "SHA"
  16183. },
  16184. "signoff": {
  16185. "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message.",
  16186. "type": "boolean",
  16187. "x-go-name": "Signoff"
  16188. }
  16189. },
  16190. "x-go-package": "code.gitea.io/gitea/modules/structs"
  16191. },
  16192. "User": {
  16193. "description": "User represents a user",
  16194. "type": "object",
  16195. "properties": {
  16196. "avatar_url": {
  16197. "description": "URL to the user's avatar",
  16198. "type": "string",
  16199. "x-go-name": "AvatarURL"
  16200. },
  16201. "created": {
  16202. "type": "string",
  16203. "format": "date-time",
  16204. "x-go-name": "Created"
  16205. },
  16206. "email": {
  16207. "type": "string",
  16208. "format": "email",
  16209. "x-go-name": "Email"
  16210. },
  16211. "full_name": {
  16212. "description": "the user's full name",
  16213. "type": "string",
  16214. "x-go-name": "FullName"
  16215. },
  16216. "id": {
  16217. "description": "the user's id",
  16218. "type": "integer",
  16219. "format": "int64",
  16220. "x-go-name": "ID"
  16221. },
  16222. "is_admin": {
  16223. "description": "Is the user an administrator",
  16224. "type": "boolean",
  16225. "x-go-name": "IsAdmin"
  16226. },
  16227. "language": {
  16228. "description": "User locale",
  16229. "type": "string",
  16230. "x-go-name": "Language"
  16231. },
  16232. "last_login": {
  16233. "type": "string",
  16234. "format": "date-time",
  16235. "x-go-name": "LastLogin"
  16236. },
  16237. "login": {
  16238. "description": "the user's username",
  16239. "type": "string",
  16240. "x-go-name": "UserName"
  16241. },
  16242. "restricted": {
  16243. "description": "Is user restricted",
  16244. "type": "boolean",
  16245. "x-go-name": "Restricted"
  16246. }
  16247. },
  16248. "x-go-package": "code.gitea.io/gitea/modules/structs"
  16249. },
  16250. "UserHeatmapData": {
  16251. "description": "UserHeatmapData represents the data needed to create a heatmap",
  16252. "type": "object",
  16253. "properties": {
  16254. "contributions": {
  16255. "type": "integer",
  16256. "format": "int64",
  16257. "x-go-name": "Contributions"
  16258. },
  16259. "timestamp": {
  16260. "$ref": "#/definitions/TimeStamp"
  16261. }
  16262. },
  16263. "x-go-package": "code.gitea.io/gitea/models"
  16264. },
  16265. "WatchInfo": {
  16266. "description": "WatchInfo represents an API watch status of one repository",
  16267. "type": "object",
  16268. "properties": {
  16269. "created_at": {
  16270. "type": "string",
  16271. "format": "date-time",
  16272. "x-go-name": "CreatedAt"
  16273. },
  16274. "ignored": {
  16275. "type": "boolean",
  16276. "x-go-name": "Ignored"
  16277. },
  16278. "reason": {
  16279. "type": "object",
  16280. "x-go-name": "Reason"
  16281. },
  16282. "repository_url": {
  16283. "type": "string",
  16284. "x-go-name": "RepositoryURL"
  16285. },
  16286. "subscribed": {
  16287. "type": "boolean",
  16288. "x-go-name": "Subscribed"
  16289. },
  16290. "url": {
  16291. "type": "string",
  16292. "x-go-name": "URL"
  16293. }
  16294. },
  16295. "x-go-package": "code.gitea.io/gitea/modules/structs"
  16296. }
  16297. },
  16298. "responses": {
  16299. "AccessToken": {
  16300. "description": "AccessToken represents an API access token.",
  16301. "headers": {
  16302. "id": {
  16303. "type": "integer",
  16304. "format": "int64"
  16305. },
  16306. "name": {
  16307. "type": "string"
  16308. },
  16309. "sha1": {
  16310. "type": "string"
  16311. },
  16312. "token_last_eight": {
  16313. "type": "string"
  16314. }
  16315. }
  16316. },
  16317. "AccessTokenList": {
  16318. "description": "AccessTokenList represents a list of API access token.",
  16319. "schema": {
  16320. "type": "array",
  16321. "items": {
  16322. "$ref": "#/definitions/AccessToken"
  16323. }
  16324. }
  16325. },
  16326. "AnnotatedTag": {
  16327. "description": "AnnotatedTag",
  16328. "schema": {
  16329. "$ref": "#/definitions/AnnotatedTag"
  16330. }
  16331. },
  16332. "Attachment": {
  16333. "description": "Attachment",
  16334. "schema": {
  16335. "$ref": "#/definitions/Attachment"
  16336. }
  16337. },
  16338. "AttachmentList": {
  16339. "description": "AttachmentList",
  16340. "schema": {
  16341. "type": "array",
  16342. "items": {
  16343. "$ref": "#/definitions/Attachment"
  16344. }
  16345. }
  16346. },
  16347. "Branch": {
  16348. "description": "Branch",
  16349. "schema": {
  16350. "$ref": "#/definitions/Branch"
  16351. }
  16352. },
  16353. "BranchList": {
  16354. "description": "BranchList",
  16355. "schema": {
  16356. "type": "array",
  16357. "items": {
  16358. "$ref": "#/definitions/Branch"
  16359. }
  16360. }
  16361. },
  16362. "BranchProtection": {
  16363. "description": "BranchProtection",
  16364. "schema": {
  16365. "$ref": "#/definitions/BranchProtection"
  16366. }
  16367. },
  16368. "BranchProtectionList": {
  16369. "description": "BranchProtectionList",
  16370. "schema": {
  16371. "type": "array",
  16372. "items": {
  16373. "$ref": "#/definitions/BranchProtection"
  16374. }
  16375. }
  16376. },
  16377. "CombinedStatus": {
  16378. "description": "CombinedStatus",
  16379. "schema": {
  16380. "$ref": "#/definitions/CombinedStatus"
  16381. }
  16382. },
  16383. "Comment": {
  16384. "description": "Comment",
  16385. "schema": {
  16386. "$ref": "#/definitions/Comment"
  16387. }
  16388. },
  16389. "CommentList": {
  16390. "description": "CommentList",
  16391. "schema": {
  16392. "type": "array",
  16393. "items": {
  16394. "$ref": "#/definitions/Comment"
  16395. }
  16396. }
  16397. },
  16398. "Commit": {
  16399. "description": "Commit",
  16400. "schema": {
  16401. "$ref": "#/definitions/Commit"
  16402. }
  16403. },
  16404. "CommitList": {
  16405. "description": "CommitList",
  16406. "schema": {
  16407. "type": "array",
  16408. "items": {
  16409. "$ref": "#/definitions/Commit"
  16410. }
  16411. },
  16412. "headers": {
  16413. "X-HasMore": {
  16414. "type": "boolean",
  16415. "description": "True if there is another page"
  16416. },
  16417. "X-Page": {
  16418. "type": "integer",
  16419. "format": "int64",
  16420. "description": "The current page"
  16421. },
  16422. "X-PageCount": {
  16423. "type": "integer",
  16424. "format": "int64",
  16425. "description": "Total number of pages"
  16426. },
  16427. "X-PerPage": {
  16428. "type": "integer",
  16429. "format": "int64",
  16430. "description": "Commits per page"
  16431. },
  16432. "X-Total": {
  16433. "type": "integer",
  16434. "format": "int64",
  16435. "description": "Total commit count"
  16436. }
  16437. }
  16438. },
  16439. "CommitStatus": {
  16440. "description": "CommitStatus",
  16441. "schema": {
  16442. "$ref": "#/definitions/CommitStatus"
  16443. }
  16444. },
  16445. "CommitStatusList": {
  16446. "description": "CommitStatusList",
  16447. "schema": {
  16448. "type": "array",
  16449. "items": {
  16450. "$ref": "#/definitions/CommitStatus"
  16451. }
  16452. }
  16453. },
  16454. "ContentsListResponse": {
  16455. "description": "ContentsListResponse",
  16456. "schema": {
  16457. "type": "array",
  16458. "items": {
  16459. "$ref": "#/definitions/ContentsResponse"
  16460. }
  16461. }
  16462. },
  16463. "ContentsResponse": {
  16464. "description": "ContentsResponse",
  16465. "schema": {
  16466. "$ref": "#/definitions/ContentsResponse"
  16467. }
  16468. },
  16469. "CronList": {
  16470. "description": "CronList",
  16471. "schema": {
  16472. "type": "array",
  16473. "items": {
  16474. "$ref": "#/definitions/Cron"
  16475. }
  16476. }
  16477. },
  16478. "DeployKey": {
  16479. "description": "DeployKey",
  16480. "schema": {
  16481. "$ref": "#/definitions/DeployKey"
  16482. }
  16483. },
  16484. "DeployKeyList": {
  16485. "description": "DeployKeyList",
  16486. "schema": {
  16487. "type": "array",
  16488. "items": {
  16489. "$ref": "#/definitions/DeployKey"
  16490. }
  16491. }
  16492. },
  16493. "EmailList": {
  16494. "description": "EmailList",
  16495. "schema": {
  16496. "type": "array",
  16497. "items": {
  16498. "$ref": "#/definitions/Email"
  16499. }
  16500. }
  16501. },
  16502. "EmptyRepository": {
  16503. "description": "EmptyRepository",
  16504. "schema": {
  16505. "$ref": "#/definitions/APIError"
  16506. }
  16507. },
  16508. "FileDeleteResponse": {
  16509. "description": "FileDeleteResponse",
  16510. "schema": {
  16511. "$ref": "#/definitions/FileDeleteResponse"
  16512. }
  16513. },
  16514. "FileResponse": {
  16515. "description": "FileResponse",
  16516. "schema": {
  16517. "$ref": "#/definitions/FileResponse"
  16518. }
  16519. },
  16520. "GPGKey": {
  16521. "description": "GPGKey",
  16522. "schema": {
  16523. "$ref": "#/definitions/GPGKey"
  16524. }
  16525. },
  16526. "GPGKeyList": {
  16527. "description": "GPGKeyList",
  16528. "schema": {
  16529. "type": "array",
  16530. "items": {
  16531. "$ref": "#/definitions/GPGKey"
  16532. }
  16533. }
  16534. },
  16535. "GeneralAPISettings": {
  16536. "description": "GeneralAPISettings",
  16537. "schema": {
  16538. "$ref": "#/definitions/GeneralAPISettings"
  16539. }
  16540. },
  16541. "GeneralAttachmentSettings": {
  16542. "description": "GeneralAttachmentSettings",
  16543. "schema": {
  16544. "$ref": "#/definitions/GeneralAttachmentSettings"
  16545. }
  16546. },
  16547. "GeneralRepoSettings": {
  16548. "description": "GeneralRepoSettings",
  16549. "schema": {
  16550. "$ref": "#/definitions/GeneralRepoSettings"
  16551. }
  16552. },
  16553. "GeneralUISettings": {
  16554. "description": "GeneralUISettings",
  16555. "schema": {
  16556. "$ref": "#/definitions/GeneralUISettings"
  16557. }
  16558. },
  16559. "GitBlobResponse": {
  16560. "description": "GitBlobResponse",
  16561. "schema": {
  16562. "$ref": "#/definitions/GitBlobResponse"
  16563. }
  16564. },
  16565. "GitHook": {
  16566. "description": "GitHook",
  16567. "schema": {
  16568. "$ref": "#/definitions/GitHook"
  16569. }
  16570. },
  16571. "GitHookList": {
  16572. "description": "GitHookList",
  16573. "schema": {
  16574. "type": "array",
  16575. "items": {
  16576. "$ref": "#/definitions/GitHook"
  16577. }
  16578. }
  16579. },
  16580. "GitTreeResponse": {
  16581. "description": "GitTreeResponse",
  16582. "schema": {
  16583. "$ref": "#/definitions/GitTreeResponse"
  16584. }
  16585. },
  16586. "Hook": {
  16587. "description": "Hook",
  16588. "schema": {
  16589. "$ref": "#/definitions/Hook"
  16590. }
  16591. },
  16592. "HookList": {
  16593. "description": "HookList",
  16594. "schema": {
  16595. "type": "array",
  16596. "items": {
  16597. "$ref": "#/definitions/Hook"
  16598. }
  16599. }
  16600. },
  16601. "Issue": {
  16602. "description": "Issue",
  16603. "schema": {
  16604. "$ref": "#/definitions/Issue"
  16605. }
  16606. },
  16607. "IssueDeadline": {
  16608. "description": "IssueDeadline",
  16609. "schema": {
  16610. "$ref": "#/definitions/IssueDeadline"
  16611. }
  16612. },
  16613. "IssueList": {
  16614. "description": "IssueList",
  16615. "schema": {
  16616. "type": "array",
  16617. "items": {
  16618. "$ref": "#/definitions/Issue"
  16619. }
  16620. }
  16621. },
  16622. "IssueTemplates": {
  16623. "description": "IssueTemplates",
  16624. "schema": {
  16625. "type": "array",
  16626. "items": {
  16627. "$ref": "#/definitions/IssueTemplate"
  16628. }
  16629. }
  16630. },
  16631. "Label": {
  16632. "description": "Label",
  16633. "schema": {
  16634. "$ref": "#/definitions/Label"
  16635. }
  16636. },
  16637. "LabelList": {
  16638. "description": "LabelList",
  16639. "schema": {
  16640. "type": "array",
  16641. "items": {
  16642. "$ref": "#/definitions/Label"
  16643. }
  16644. }
  16645. },
  16646. "LanguageStatistics": {
  16647. "description": "LanguageStatistics",
  16648. "schema": {
  16649. "type": "object",
  16650. "additionalProperties": {
  16651. "type": "integer",
  16652. "format": "int64"
  16653. }
  16654. }
  16655. },
  16656. "MarkdownRender": {
  16657. "description": "MarkdownRender is a rendered markdown document",
  16658. "schema": {
  16659. "type": "string"
  16660. }
  16661. },
  16662. "Milestone": {
  16663. "description": "Milestone",
  16664. "schema": {
  16665. "$ref": "#/definitions/Milestone"
  16666. }
  16667. },
  16668. "MilestoneList": {
  16669. "description": "MilestoneList",
  16670. "schema": {
  16671. "type": "array",
  16672. "items": {
  16673. "$ref": "#/definitions/Milestone"
  16674. }
  16675. }
  16676. },
  16677. "NotificationCount": {
  16678. "description": "Number of unread notifications",
  16679. "schema": {
  16680. "$ref": "#/definitions/NotificationCount"
  16681. }
  16682. },
  16683. "NotificationThread": {
  16684. "description": "NotificationThread",
  16685. "schema": {
  16686. "$ref": "#/definitions/NotificationThread"
  16687. }
  16688. },
  16689. "NotificationThreadList": {
  16690. "description": "NotificationThreadList",
  16691. "schema": {
  16692. "type": "array",
  16693. "items": {
  16694. "$ref": "#/definitions/NotificationThread"
  16695. }
  16696. }
  16697. },
  16698. "OAuth2Application": {
  16699. "description": "OAuth2Application",
  16700. "schema": {
  16701. "$ref": "#/definitions/OAuth2Application"
  16702. }
  16703. },
  16704. "OAuth2ApplicationList": {
  16705. "description": "OAuth2ApplicationList represents a list of OAuth2 applications.",
  16706. "schema": {
  16707. "type": "array",
  16708. "items": {
  16709. "$ref": "#/definitions/OAuth2Application"
  16710. }
  16711. }
  16712. },
  16713. "Organization": {
  16714. "description": "Organization",
  16715. "schema": {
  16716. "$ref": "#/definitions/Organization"
  16717. }
  16718. },
  16719. "OrganizationList": {
  16720. "description": "OrganizationList",
  16721. "schema": {
  16722. "type": "array",
  16723. "items": {
  16724. "$ref": "#/definitions/Organization"
  16725. }
  16726. }
  16727. },
  16728. "PublicKey": {
  16729. "description": "PublicKey",
  16730. "schema": {
  16731. "$ref": "#/definitions/PublicKey"
  16732. }
  16733. },
  16734. "PublicKeyList": {
  16735. "description": "PublicKeyList",
  16736. "schema": {
  16737. "type": "array",
  16738. "items": {
  16739. "$ref": "#/definitions/PublicKey"
  16740. }
  16741. }
  16742. },
  16743. "PullRequest": {
  16744. "description": "PullRequest",
  16745. "schema": {
  16746. "$ref": "#/definitions/PullRequest"
  16747. }
  16748. },
  16749. "PullRequestList": {
  16750. "description": "PullRequestList",
  16751. "schema": {
  16752. "type": "array",
  16753. "items": {
  16754. "$ref": "#/definitions/PullRequest"
  16755. }
  16756. }
  16757. },
  16758. "PullReview": {
  16759. "description": "PullReview",
  16760. "schema": {
  16761. "$ref": "#/definitions/PullReview"
  16762. }
  16763. },
  16764. "PullReviewComment": {
  16765. "description": "PullComment",
  16766. "schema": {
  16767. "$ref": "#/definitions/PullReviewComment"
  16768. }
  16769. },
  16770. "PullReviewCommentList": {
  16771. "description": "PullCommentList",
  16772. "schema": {
  16773. "type": "array",
  16774. "items": {
  16775. "$ref": "#/definitions/PullReviewComment"
  16776. }
  16777. }
  16778. },
  16779. "PullReviewList": {
  16780. "description": "PullReviewList",
  16781. "schema": {
  16782. "type": "array",
  16783. "items": {
  16784. "$ref": "#/definitions/PullReview"
  16785. }
  16786. }
  16787. },
  16788. "Reaction": {
  16789. "description": "Reaction",
  16790. "schema": {
  16791. "$ref": "#/definitions/Reaction"
  16792. }
  16793. },
  16794. "ReactionList": {
  16795. "description": "ReactionList",
  16796. "schema": {
  16797. "type": "array",
  16798. "items": {
  16799. "$ref": "#/definitions/Reaction"
  16800. }
  16801. }
  16802. },
  16803. "Reference": {
  16804. "description": "Reference",
  16805. "schema": {
  16806. "$ref": "#/definitions/Reference"
  16807. }
  16808. },
  16809. "ReferenceList": {
  16810. "description": "ReferenceList",
  16811. "schema": {
  16812. "type": "array",
  16813. "items": {
  16814. "$ref": "#/definitions/Reference"
  16815. }
  16816. }
  16817. },
  16818. "Release": {
  16819. "description": "Release",
  16820. "schema": {
  16821. "$ref": "#/definitions/Release"
  16822. }
  16823. },
  16824. "ReleaseList": {
  16825. "description": "ReleaseList",
  16826. "schema": {
  16827. "type": "array",
  16828. "items": {
  16829. "$ref": "#/definitions/Release"
  16830. }
  16831. }
  16832. },
  16833. "Repository": {
  16834. "description": "Repository",
  16835. "schema": {
  16836. "$ref": "#/definitions/Repository"
  16837. }
  16838. },
  16839. "RepositoryList": {
  16840. "description": "RepositoryList",
  16841. "schema": {
  16842. "type": "array",
  16843. "items": {
  16844. "$ref": "#/definitions/Repository"
  16845. }
  16846. }
  16847. },
  16848. "SearchResults": {
  16849. "description": "SearchResults",
  16850. "schema": {
  16851. "$ref": "#/definitions/SearchResults"
  16852. }
  16853. },
  16854. "ServerVersion": {
  16855. "description": "ServerVersion",
  16856. "schema": {
  16857. "$ref": "#/definitions/ServerVersion"
  16858. }
  16859. },
  16860. "StopWatch": {
  16861. "description": "StopWatch",
  16862. "schema": {
  16863. "$ref": "#/definitions/StopWatch"
  16864. }
  16865. },
  16866. "StopWatchList": {
  16867. "description": "StopWatchList",
  16868. "schema": {
  16869. "type": "array",
  16870. "items": {
  16871. "$ref": "#/definitions/StopWatch"
  16872. }
  16873. }
  16874. },
  16875. "StringSlice": {
  16876. "description": "StringSlice",
  16877. "schema": {
  16878. "type": "array",
  16879. "items": {
  16880. "type": "string"
  16881. }
  16882. }
  16883. },
  16884. "Tag": {
  16885. "description": "Tag",
  16886. "schema": {
  16887. "$ref": "#/definitions/Tag"
  16888. }
  16889. },
  16890. "TagList": {
  16891. "description": "TagList",
  16892. "schema": {
  16893. "type": "array",
  16894. "items": {
  16895. "$ref": "#/definitions/Tag"
  16896. }
  16897. }
  16898. },
  16899. "Team": {
  16900. "description": "Team",
  16901. "schema": {
  16902. "$ref": "#/definitions/Team"
  16903. }
  16904. },
  16905. "TeamList": {
  16906. "description": "TeamList",
  16907. "schema": {
  16908. "type": "array",
  16909. "items": {
  16910. "$ref": "#/definitions/Team"
  16911. }
  16912. }
  16913. },
  16914. "TopicListResponse": {
  16915. "description": "TopicListResponse",
  16916. "schema": {
  16917. "type": "array",
  16918. "items": {
  16919. "$ref": "#/definitions/TopicResponse"
  16920. }
  16921. }
  16922. },
  16923. "TopicNames": {
  16924. "description": "TopicNames",
  16925. "schema": {
  16926. "$ref": "#/definitions/TopicName"
  16927. }
  16928. },
  16929. "TrackedTime": {
  16930. "description": "TrackedTime",
  16931. "schema": {
  16932. "$ref": "#/definitions/TrackedTime"
  16933. }
  16934. },
  16935. "TrackedTimeList": {
  16936. "description": "TrackedTimeList",
  16937. "schema": {
  16938. "type": "array",
  16939. "items": {
  16940. "$ref": "#/definitions/TrackedTime"
  16941. }
  16942. }
  16943. },
  16944. "User": {
  16945. "description": "User",
  16946. "schema": {
  16947. "$ref": "#/definitions/User"
  16948. }
  16949. },
  16950. "UserHeatmapData": {
  16951. "description": "UserHeatmapData",
  16952. "schema": {
  16953. "type": "array",
  16954. "items": {
  16955. "$ref": "#/definitions/UserHeatmapData"
  16956. }
  16957. }
  16958. },
  16959. "UserList": {
  16960. "description": "UserList",
  16961. "schema": {
  16962. "type": "array",
  16963. "items": {
  16964. "$ref": "#/definitions/User"
  16965. }
  16966. }
  16967. },
  16968. "WatchInfo": {
  16969. "description": "WatchInfo",
  16970. "schema": {
  16971. "$ref": "#/definitions/WatchInfo"
  16972. }
  16973. },
  16974. "conflict": {
  16975. "description": "APIConflict is a conflict empty response"
  16976. },
  16977. "empty": {
  16978. "description": "APIEmpty is an empty response"
  16979. },
  16980. "error": {
  16981. "description": "APIError is error format response",
  16982. "headers": {
  16983. "message": {
  16984. "type": "string"
  16985. },
  16986. "url": {
  16987. "type": "string"
  16988. }
  16989. }
  16990. },
  16991. "forbidden": {
  16992. "description": "APIForbiddenError is a forbidden error response",
  16993. "headers": {
  16994. "message": {
  16995. "type": "string"
  16996. },
  16997. "url": {
  16998. "type": "string"
  16999. }
  17000. }
  17001. },
  17002. "invalidTopicsError": {
  17003. "description": "APIInvalidTopicsError is error format response to invalid topics",
  17004. "headers": {
  17005. "invalidTopics": {
  17006. "type": "array",
  17007. "items": {
  17008. "type": "string"
  17009. }
  17010. },
  17011. "message": {
  17012. "type": "string"
  17013. }
  17014. }
  17015. },
  17016. "notFound": {
  17017. "description": "APINotFound is a not found empty response"
  17018. },
  17019. "parameterBodies": {
  17020. "description": "parameterBodies",
  17021. "schema": {
  17022. "$ref": "#/definitions/PullReviewRequestOptions"
  17023. }
  17024. },
  17025. "redirect": {
  17026. "description": "APIRedirect is a redirect response"
  17027. },
  17028. "string": {
  17029. "description": "APIString is a string response",
  17030. "schema": {
  17031. "type": "string"
  17032. }
  17033. },
  17034. "validationError": {
  17035. "description": "APIValidationError is error format response related to input validation",
  17036. "headers": {
  17037. "message": {
  17038. "type": "string"
  17039. },
  17040. "url": {
  17041. "type": "string"
  17042. }
  17043. }
  17044. }
  17045. },
  17046. "securityDefinitions": {
  17047. "AccessToken": {
  17048. "type": "apiKey",
  17049. "name": "access_token",
  17050. "in": "query"
  17051. },
  17052. "AuthorizationHeaderToken": {
  17053. "description": "API tokens must be prepended with \"token\" followed by a space.",
  17054. "type": "apiKey",
  17055. "name": "Authorization",
  17056. "in": "header"
  17057. },
  17058. "BasicAuth": {
  17059. "type": "basic"
  17060. },
  17061. "SudoHeader": {
  17062. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  17063. "type": "apiKey",
  17064. "name": "Sudo",
  17065. "in": "header"
  17066. },
  17067. "SudoParam": {
  17068. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  17069. "type": "apiKey",
  17070. "name": "sudo",
  17071. "in": "query"
  17072. },
  17073. "TOTPHeader": {
  17074. "description": "Must be used in combination with BasicAuth if two-factor authentication is enabled.",
  17075. "type": "apiKey",
  17076. "name": "X-GITEA-OTP",
  17077. "in": "header"
  17078. },
  17079. "Token": {
  17080. "type": "apiKey",
  17081. "name": "token",
  17082. "in": "query"
  17083. }
  17084. },
  17085. "security": [
  17086. {
  17087. "BasicAuth": []
  17088. },
  17089. {
  17090. "Token": []
  17091. },
  17092. {
  17093. "AccessToken": []
  17094. },
  17095. {
  17096. "AuthorizationHeaderToken": []
  17097. },
  17098. {
  17099. "SudoParam": []
  17100. },
  17101. {
  17102. "SudoHeader": []
  17103. },
  17104. {
  17105. "TOTPHeader": []
  17106. }
  17107. ]
  17108. }