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

16059 lines
402 KiB

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>
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>
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>
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>
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>
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>
4 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>
4 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
4 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
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>
4 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
4 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>
4 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>
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>
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>
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>
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>
4 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>
6 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>
6 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>
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>
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>
4 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>
6 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>
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>
4 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
4 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>
6 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>
6 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>
6 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>
6 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>
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>
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>
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>
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>
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>
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>
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>
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>
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
6 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>
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>
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
6 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
6 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
6 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
6 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
6 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
6 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
6 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
6 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
6 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
6 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
6 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
6 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
6 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.
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>
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>
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>
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>
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>
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>
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>
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>
4 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>
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>
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>
4 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>
4 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>
4 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>
4 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>
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.
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>
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>
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>
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>
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>
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>
4 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
6 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
6 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
6 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
6 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
6 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
6 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
6 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>
3 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
6 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
6 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
6 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
6 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
6 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
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>
4 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
6 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
6 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
6 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
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.
4 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
6 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
6 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
6 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
6 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>
4 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
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>
4 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
4 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
4 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>
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
6 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
6 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
6 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>
4 years ago
  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": "1.1.1"
  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/users": {
  124. "get": {
  125. "produces": [
  126. "application/json"
  127. ],
  128. "tags": [
  129. "admin"
  130. ],
  131. "summary": "List all users",
  132. "operationId": "adminGetAllUsers",
  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. "responses": {
  148. "200": {
  149. "$ref": "#/responses/UserList"
  150. },
  151. "403": {
  152. "$ref": "#/responses/forbidden"
  153. }
  154. }
  155. },
  156. "post": {
  157. "consumes": [
  158. "application/json"
  159. ],
  160. "produces": [
  161. "application/json"
  162. ],
  163. "tags": [
  164. "admin"
  165. ],
  166. "summary": "Create a user",
  167. "operationId": "adminCreateUser",
  168. "parameters": [
  169. {
  170. "name": "body",
  171. "in": "body",
  172. "schema": {
  173. "$ref": "#/definitions/CreateUserOption"
  174. }
  175. }
  176. ],
  177. "responses": {
  178. "201": {
  179. "$ref": "#/responses/User"
  180. },
  181. "400": {
  182. "$ref": "#/responses/error"
  183. },
  184. "403": {
  185. "$ref": "#/responses/forbidden"
  186. },
  187. "422": {
  188. "$ref": "#/responses/validationError"
  189. }
  190. }
  191. }
  192. },
  193. "/admin/users/{username}": {
  194. "delete": {
  195. "produces": [
  196. "application/json"
  197. ],
  198. "tags": [
  199. "admin"
  200. ],
  201. "summary": "Delete a user",
  202. "operationId": "adminDeleteUser",
  203. "parameters": [
  204. {
  205. "type": "string",
  206. "description": "username of user to delete",
  207. "name": "username",
  208. "in": "path",
  209. "required": true
  210. }
  211. ],
  212. "responses": {
  213. "204": {
  214. "$ref": "#/responses/empty"
  215. },
  216. "403": {
  217. "$ref": "#/responses/forbidden"
  218. },
  219. "422": {
  220. "$ref": "#/responses/validationError"
  221. }
  222. }
  223. },
  224. "patch": {
  225. "consumes": [
  226. "application/json"
  227. ],
  228. "produces": [
  229. "application/json"
  230. ],
  231. "tags": [
  232. "admin"
  233. ],
  234. "summary": "Edit an existing user",
  235. "operationId": "adminEditUser",
  236. "parameters": [
  237. {
  238. "type": "string",
  239. "description": "username of user to edit",
  240. "name": "username",
  241. "in": "path",
  242. "required": true
  243. },
  244. {
  245. "name": "body",
  246. "in": "body",
  247. "schema": {
  248. "$ref": "#/definitions/EditUserOption"
  249. }
  250. }
  251. ],
  252. "responses": {
  253. "200": {
  254. "$ref": "#/responses/User"
  255. },
  256. "403": {
  257. "$ref": "#/responses/forbidden"
  258. },
  259. "422": {
  260. "$ref": "#/responses/validationError"
  261. }
  262. }
  263. }
  264. },
  265. "/admin/users/{username}/keys": {
  266. "post": {
  267. "consumes": [
  268. "application/json"
  269. ],
  270. "produces": [
  271. "application/json"
  272. ],
  273. "tags": [
  274. "admin"
  275. ],
  276. "summary": "Add a public key on behalf of a user",
  277. "operationId": "adminCreatePublicKey",
  278. "parameters": [
  279. {
  280. "type": "string",
  281. "description": "username of the user",
  282. "name": "username",
  283. "in": "path",
  284. "required": true
  285. },
  286. {
  287. "name": "key",
  288. "in": "body",
  289. "schema": {
  290. "$ref": "#/definitions/CreateKeyOption"
  291. }
  292. }
  293. ],
  294. "responses": {
  295. "201": {
  296. "$ref": "#/responses/PublicKey"
  297. },
  298. "403": {
  299. "$ref": "#/responses/forbidden"
  300. },
  301. "422": {
  302. "$ref": "#/responses/validationError"
  303. }
  304. }
  305. }
  306. },
  307. "/admin/users/{username}/keys/{id}": {
  308. "delete": {
  309. "produces": [
  310. "application/json"
  311. ],
  312. "tags": [
  313. "admin"
  314. ],
  315. "summary": "Delete a user's public key",
  316. "operationId": "adminDeleteUserPublicKey",
  317. "parameters": [
  318. {
  319. "type": "string",
  320. "description": "username of user",
  321. "name": "username",
  322. "in": "path",
  323. "required": true
  324. },
  325. {
  326. "type": "integer",
  327. "format": "int64",
  328. "description": "id of the key to delete",
  329. "name": "id",
  330. "in": "path",
  331. "required": true
  332. }
  333. ],
  334. "responses": {
  335. "204": {
  336. "$ref": "#/responses/empty"
  337. },
  338. "403": {
  339. "$ref": "#/responses/forbidden"
  340. },
  341. "404": {
  342. "$ref": "#/responses/notFound"
  343. }
  344. }
  345. }
  346. },
  347. "/admin/users/{username}/orgs": {
  348. "post": {
  349. "consumes": [
  350. "application/json"
  351. ],
  352. "produces": [
  353. "application/json"
  354. ],
  355. "tags": [
  356. "admin"
  357. ],
  358. "summary": "Create an organization",
  359. "operationId": "adminCreateOrg",
  360. "parameters": [
  361. {
  362. "type": "string",
  363. "description": "username of the user that will own the created organization",
  364. "name": "username",
  365. "in": "path",
  366. "required": true
  367. },
  368. {
  369. "name": "organization",
  370. "in": "body",
  371. "required": true,
  372. "schema": {
  373. "$ref": "#/definitions/CreateOrgOption"
  374. }
  375. }
  376. ],
  377. "responses": {
  378. "201": {
  379. "$ref": "#/responses/Organization"
  380. },
  381. "403": {
  382. "$ref": "#/responses/forbidden"
  383. },
  384. "422": {
  385. "$ref": "#/responses/validationError"
  386. }
  387. }
  388. }
  389. },
  390. "/admin/users/{username}/repos": {
  391. "post": {
  392. "consumes": [
  393. "application/json"
  394. ],
  395. "produces": [
  396. "application/json"
  397. ],
  398. "tags": [
  399. "admin"
  400. ],
  401. "summary": "Create a repository on behalf of a user",
  402. "operationId": "adminCreateRepo",
  403. "parameters": [
  404. {
  405. "type": "string",
  406. "description": "username of the user. This user will own the created repository",
  407. "name": "username",
  408. "in": "path",
  409. "required": true
  410. },
  411. {
  412. "name": "repository",
  413. "in": "body",
  414. "required": true,
  415. "schema": {
  416. "$ref": "#/definitions/CreateRepoOption"
  417. }
  418. }
  419. ],
  420. "responses": {
  421. "201": {
  422. "$ref": "#/responses/Repository"
  423. },
  424. "403": {
  425. "$ref": "#/responses/forbidden"
  426. },
  427. "404": {
  428. "$ref": "#/responses/notFound"
  429. },
  430. "409": {
  431. "$ref": "#/responses/error"
  432. },
  433. "422": {
  434. "$ref": "#/responses/validationError"
  435. }
  436. }
  437. }
  438. },
  439. "/markdown": {
  440. "post": {
  441. "consumes": [
  442. "application/json"
  443. ],
  444. "produces": [
  445. "text/html"
  446. ],
  447. "tags": [
  448. "miscellaneous"
  449. ],
  450. "summary": "Render a markdown document as HTML",
  451. "operationId": "renderMarkdown",
  452. "parameters": [
  453. {
  454. "name": "body",
  455. "in": "body",
  456. "schema": {
  457. "$ref": "#/definitions/MarkdownOption"
  458. }
  459. }
  460. ],
  461. "responses": {
  462. "200": {
  463. "$ref": "#/responses/MarkdownRender"
  464. },
  465. "422": {
  466. "$ref": "#/responses/validationError"
  467. }
  468. }
  469. }
  470. },
  471. "/markdown/raw": {
  472. "post": {
  473. "consumes": [
  474. "text/plain"
  475. ],
  476. "produces": [
  477. "text/html"
  478. ],
  479. "tags": [
  480. "miscellaneous"
  481. ],
  482. "summary": "Render raw markdown as HTML",
  483. "operationId": "renderMarkdownRaw",
  484. "parameters": [
  485. {
  486. "description": "Request body to render",
  487. "name": "body",
  488. "in": "body",
  489. "required": true,
  490. "schema": {
  491. "type": "string"
  492. }
  493. }
  494. ],
  495. "responses": {
  496. "200": {
  497. "$ref": "#/responses/MarkdownRender"
  498. },
  499. "422": {
  500. "$ref": "#/responses/validationError"
  501. }
  502. }
  503. }
  504. },
  505. "/notifications": {
  506. "get": {
  507. "consumes": [
  508. "application/json"
  509. ],
  510. "produces": [
  511. "application/json"
  512. ],
  513. "tags": [
  514. "notification"
  515. ],
  516. "summary": "List users's notification threads",
  517. "operationId": "notifyGetList",
  518. "parameters": [
  519. {
  520. "type": "string",
  521. "description": "If true, show notifications marked as read. Default value is false",
  522. "name": "all",
  523. "in": "query"
  524. },
  525. {
  526. "type": "array",
  527. "items": {
  528. "type": "string"
  529. },
  530. "collectionFormat": "multi",
  531. "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned.",
  532. "name": "status-types",
  533. "in": "query"
  534. },
  535. {
  536. "type": "string",
  537. "format": "date-time",
  538. "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
  539. "name": "since",
  540. "in": "query"
  541. },
  542. {
  543. "type": "string",
  544. "format": "date-time",
  545. "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
  546. "name": "before",
  547. "in": "query"
  548. },
  549. {
  550. "type": "integer",
  551. "description": "page number of results to return (1-based)",
  552. "name": "page",
  553. "in": "query"
  554. },
  555. {
  556. "type": "integer",
  557. "description": "page size of results",
  558. "name": "limit",
  559. "in": "query"
  560. }
  561. ],
  562. "responses": {
  563. "200": {
  564. "$ref": "#/responses/NotificationThreadList"
  565. }
  566. }
  567. },
  568. "put": {
  569. "consumes": [
  570. "application/json"
  571. ],
  572. "produces": [
  573. "application/json"
  574. ],
  575. "tags": [
  576. "notification"
  577. ],
  578. "summary": "Mark notification threads as read, pinned or unread",
  579. "operationId": "notifyReadList",
  580. "parameters": [
  581. {
  582. "type": "string",
  583. "format": "date-time",
  584. "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
  585. "name": "last_read_at",
  586. "in": "query"
  587. },
  588. {
  589. "type": "string",
  590. "description": "If true, mark all notifications on this repo. Default value is false",
  591. "name": "all",
  592. "in": "query"
  593. },
  594. {
  595. "type": "array",
  596. "items": {
  597. "type": "string"
  598. },
  599. "collectionFormat": "multi",
  600. "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.",
  601. "name": "status-types",
  602. "in": "query"
  603. },
  604. {
  605. "type": "string",
  606. "description": "Status to mark notifications as, Defaults to read.",
  607. "name": "to-status",
  608. "in": "query"
  609. }
  610. ],
  611. "responses": {
  612. "205": {
  613. "$ref": "#/responses/empty"
  614. }
  615. }
  616. }
  617. },
  618. "/notifications/new": {
  619. "get": {
  620. "tags": [
  621. "notification"
  622. ],
  623. "summary": "Check if unread notifications exist",
  624. "operationId": "notifyNewAvailable",
  625. "responses": {
  626. "200": {
  627. "$ref": "#/responses/NotificationCount"
  628. }
  629. }
  630. }
  631. },
  632. "/notifications/threads/{id}": {
  633. "get": {
  634. "consumes": [
  635. "application/json"
  636. ],
  637. "produces": [
  638. "application/json"
  639. ],
  640. "tags": [
  641. "notification"
  642. ],
  643. "summary": "Get notification thread by ID",
  644. "operationId": "notifyGetThread",
  645. "parameters": [
  646. {
  647. "type": "string",
  648. "description": "id of notification thread",
  649. "name": "id",
  650. "in": "path",
  651. "required": true
  652. }
  653. ],
  654. "responses": {
  655. "200": {
  656. "$ref": "#/responses/NotificationThread"
  657. },
  658. "403": {
  659. "$ref": "#/responses/forbidden"
  660. },
  661. "404": {
  662. "$ref": "#/responses/notFound"
  663. }
  664. }
  665. },
  666. "patch": {
  667. "consumes": [
  668. "application/json"
  669. ],
  670. "produces": [
  671. "application/json"
  672. ],
  673. "tags": [
  674. "notification"
  675. ],
  676. "summary": "Mark notification thread as read by ID",
  677. "operationId": "notifyReadThread",
  678. "parameters": [
  679. {
  680. "type": "string",
  681. "description": "id of notification thread",
  682. "name": "id",
  683. "in": "path",
  684. "required": true
  685. },
  686. {
  687. "type": "string",
  688. "default": "read",
  689. "description": "Status to mark notifications as",
  690. "name": "to-status",
  691. "in": "query"
  692. }
  693. ],
  694. "responses": {
  695. "205": {
  696. "$ref": "#/responses/empty"
  697. },
  698. "403": {
  699. "$ref": "#/responses/forbidden"
  700. },
  701. "404": {
  702. "$ref": "#/responses/notFound"
  703. }
  704. }
  705. }
  706. },
  707. "/org/{org}/repos": {
  708. "post": {
  709. "consumes": [
  710. "application/json"
  711. ],
  712. "produces": [
  713. "application/json"
  714. ],
  715. "tags": [
  716. "organization"
  717. ],
  718. "summary": "Create a repository in an organization",
  719. "operationId": "createOrgRepoDeprecated",
  720. "deprecated": true,
  721. "parameters": [
  722. {
  723. "type": "string",
  724. "description": "name of organization",
  725. "name": "org",
  726. "in": "path",
  727. "required": true
  728. },
  729. {
  730. "name": "body",
  731. "in": "body",
  732. "schema": {
  733. "$ref": "#/definitions/CreateRepoOption"
  734. }
  735. }
  736. ],
  737. "responses": {
  738. "201": {
  739. "$ref": "#/responses/Repository"
  740. },
  741. "403": {
  742. "$ref": "#/responses/forbidden"
  743. },
  744. "422": {
  745. "$ref": "#/responses/validationError"
  746. }
  747. }
  748. }
  749. },
  750. "/orgs": {
  751. "get": {
  752. "produces": [
  753. "application/json"
  754. ],
  755. "tags": [
  756. "organization"
  757. ],
  758. "summary": "Get list of organizations",
  759. "operationId": "orgGetAll",
  760. "parameters": [
  761. {
  762. "type": "integer",
  763. "description": "page number of results to return (1-based)",
  764. "name": "page",
  765. "in": "query"
  766. },
  767. {
  768. "type": "integer",
  769. "description": "page size of results",
  770. "name": "limit",
  771. "in": "query"
  772. }
  773. ],
  774. "responses": {
  775. "200": {
  776. "$ref": "#/responses/OrganizationList"
  777. }
  778. }
  779. },
  780. "post": {
  781. "consumes": [
  782. "application/json"
  783. ],
  784. "produces": [
  785. "application/json"
  786. ],
  787. "tags": [
  788. "organization"
  789. ],
  790. "summary": "Create an organization",
  791. "operationId": "orgCreate",
  792. "parameters": [
  793. {
  794. "name": "organization",
  795. "in": "body",
  796. "required": true,
  797. "schema": {
  798. "$ref": "#/definitions/CreateOrgOption"
  799. }
  800. }
  801. ],
  802. "responses": {
  803. "201": {
  804. "$ref": "#/responses/Organization"
  805. },
  806. "403": {
  807. "$ref": "#/responses/forbidden"
  808. },
  809. "422": {
  810. "$ref": "#/responses/validationError"
  811. }
  812. }
  813. }
  814. },
  815. "/orgs/{org}": {
  816. "get": {
  817. "produces": [
  818. "application/json"
  819. ],
  820. "tags": [
  821. "organization"
  822. ],
  823. "summary": "Get an organization",
  824. "operationId": "orgGet",
  825. "parameters": [
  826. {
  827. "type": "string",
  828. "description": "name of the organization to get",
  829. "name": "org",
  830. "in": "path",
  831. "required": true
  832. }
  833. ],
  834. "responses": {
  835. "200": {
  836. "$ref": "#/responses/Organization"
  837. }
  838. }
  839. },
  840. "delete": {
  841. "produces": [
  842. "application/json"
  843. ],
  844. "tags": [
  845. "organization"
  846. ],
  847. "summary": "Delete an organization",
  848. "operationId": "orgDelete",
  849. "parameters": [
  850. {
  851. "type": "string",
  852. "description": "organization that is to be deleted",
  853. "name": "org",
  854. "in": "path",
  855. "required": true
  856. }
  857. ],
  858. "responses": {
  859. "204": {
  860. "$ref": "#/responses/empty"
  861. }
  862. }
  863. },
  864. "patch": {
  865. "consumes": [
  866. "application/json"
  867. ],
  868. "produces": [
  869. "application/json"
  870. ],
  871. "tags": [
  872. "organization"
  873. ],
  874. "summary": "Edit an organization",
  875. "operationId": "orgEdit",
  876. "parameters": [
  877. {
  878. "type": "string",
  879. "description": "name of the organization to edit",
  880. "name": "org",
  881. "in": "path",
  882. "required": true
  883. },
  884. {
  885. "name": "body",
  886. "in": "body",
  887. "required": true,
  888. "schema": {
  889. "$ref": "#/definitions/EditOrgOption"
  890. }
  891. }
  892. ],
  893. "responses": {
  894. "200": {
  895. "$ref": "#/responses/Organization"
  896. }
  897. }
  898. }
  899. },
  900. "/orgs/{org}/hooks": {
  901. "get": {
  902. "produces": [
  903. "application/json"
  904. ],
  905. "tags": [
  906. "organization"
  907. ],
  908. "summary": "List an organization's webhooks",
  909. "operationId": "orgListHooks",
  910. "parameters": [
  911. {
  912. "type": "string",
  913. "description": "name of the organization",
  914. "name": "org",
  915. "in": "path",
  916. "required": true
  917. },
  918. {
  919. "type": "integer",
  920. "description": "page number of results to return (1-based)",
  921. "name": "page",
  922. "in": "query"
  923. },
  924. {
  925. "type": "integer",
  926. "description": "page size of results",
  927. "name": "limit",
  928. "in": "query"
  929. }
  930. ],
  931. "responses": {
  932. "200": {
  933. "$ref": "#/responses/HookList"
  934. }
  935. }
  936. }
  937. },
  938. "/orgs/{org}/hooks/": {
  939. "post": {
  940. "consumes": [
  941. "application/json"
  942. ],
  943. "produces": [
  944. "application/json"
  945. ],
  946. "tags": [
  947. "organization"
  948. ],
  949. "summary": "Create a hook",
  950. "operationId": "orgCreateHook",
  951. "parameters": [
  952. {
  953. "type": "string",
  954. "description": "name of the organization",
  955. "name": "org",
  956. "in": "path",
  957. "required": true
  958. },
  959. {
  960. "name": "body",
  961. "in": "body",
  962. "required": true,
  963. "schema": {
  964. "$ref": "#/definitions/CreateHookOption"
  965. }
  966. }
  967. ],
  968. "responses": {
  969. "201": {
  970. "$ref": "#/responses/Hook"
  971. }
  972. }
  973. }
  974. },
  975. "/orgs/{org}/hooks/{id}": {
  976. "get": {
  977. "produces": [
  978. "application/json"
  979. ],
  980. "tags": [
  981. "organization"
  982. ],
  983. "summary": "Get a hook",
  984. "operationId": "orgGetHook",
  985. "parameters": [
  986. {
  987. "type": "string",
  988. "description": "name of the organization",
  989. "name": "org",
  990. "in": "path",
  991. "required": true
  992. },
  993. {
  994. "type": "integer",
  995. "format": "int64",
  996. "description": "id of the hook to get",
  997. "name": "id",
  998. "in": "path",
  999. "required": true
  1000. }
  1001. ],
  1002. "responses": {
  1003. "200": {
  1004. "$ref": "#/responses/Hook"
  1005. }
  1006. }
  1007. },
  1008. "delete": {
  1009. "produces": [
  1010. "application/json"
  1011. ],
  1012. "tags": [
  1013. "organization"
  1014. ],
  1015. "summary": "Delete a hook",
  1016. "operationId": "orgDeleteHook",
  1017. "parameters": [
  1018. {
  1019. "type": "string",
  1020. "description": "name of the organization",
  1021. "name": "org",
  1022. "in": "path",
  1023. "required": true
  1024. },
  1025. {
  1026. "type": "integer",
  1027. "format": "int64",
  1028. "description": "id of the hook to delete",
  1029. "name": "id",
  1030. "in": "path",
  1031. "required": true
  1032. }
  1033. ],
  1034. "responses": {
  1035. "204": {
  1036. "$ref": "#/responses/empty"
  1037. }
  1038. }
  1039. },
  1040. "patch": {
  1041. "consumes": [
  1042. "application/json"
  1043. ],
  1044. "produces": [
  1045. "application/json"
  1046. ],
  1047. "tags": [
  1048. "organization"
  1049. ],
  1050. "summary": "Update a hook",
  1051. "operationId": "orgEditHook",
  1052. "parameters": [
  1053. {
  1054. "type": "string",
  1055. "description": "name of the organization",
  1056. "name": "org",
  1057. "in": "path",
  1058. "required": true
  1059. },
  1060. {
  1061. "type": "integer",
  1062. "format": "int64",
  1063. "description": "id of the hook to update",
  1064. "name": "id",
  1065. "in": "path",
  1066. "required": true
  1067. },
  1068. {
  1069. "name": "body",
  1070. "in": "body",
  1071. "schema": {
  1072. "$ref": "#/definitions/EditHookOption"
  1073. }
  1074. }
  1075. ],
  1076. "responses": {
  1077. "200": {
  1078. "$ref": "#/responses/Hook"
  1079. }
  1080. }
  1081. }
  1082. },
  1083. "/orgs/{org}/labels": {
  1084. "get": {
  1085. "produces": [
  1086. "application/json"
  1087. ],
  1088. "tags": [
  1089. "organization"
  1090. ],
  1091. "summary": "List an organization's labels",
  1092. "operationId": "orgListLabels",
  1093. "parameters": [
  1094. {
  1095. "type": "string",
  1096. "description": "name of the organization",
  1097. "name": "org",
  1098. "in": "path",
  1099. "required": true
  1100. },
  1101. {
  1102. "type": "integer",
  1103. "description": "page number of results to return (1-based)",
  1104. "name": "page",
  1105. "in": "query"
  1106. },
  1107. {
  1108. "type": "integer",
  1109. "description": "page size of results",
  1110. "name": "limit",
  1111. "in": "query"
  1112. }
  1113. ],
  1114. "responses": {
  1115. "200": {
  1116. "$ref": "#/responses/LabelList"
  1117. }
  1118. }
  1119. },
  1120. "post": {
  1121. "consumes": [
  1122. "application/json"
  1123. ],
  1124. "produces": [
  1125. "application/json"
  1126. ],
  1127. "tags": [
  1128. "organization"
  1129. ],
  1130. "summary": "Create a label for an organization",
  1131. "operationId": "orgCreateLabel",
  1132. "parameters": [
  1133. {
  1134. "type": "string",
  1135. "description": "name of the organization",
  1136. "name": "org",
  1137. "in": "path",
  1138. "required": true
  1139. },
  1140. {
  1141. "name": "body",
  1142. "in": "body",
  1143. "schema": {
  1144. "$ref": "#/definitions/CreateLabelOption"
  1145. }
  1146. }
  1147. ],
  1148. "responses": {
  1149. "201": {
  1150. "$ref": "#/responses/Label"
  1151. },
  1152. "422": {
  1153. "$ref": "#/responses/validationError"
  1154. }
  1155. }
  1156. }
  1157. },
  1158. "/orgs/{org}/labels/{id}": {
  1159. "get": {
  1160. "produces": [
  1161. "application/json"
  1162. ],
  1163. "tags": [
  1164. "organization"
  1165. ],
  1166. "summary": "Get a single label",
  1167. "operationId": "orgGetLabel",
  1168. "parameters": [
  1169. {
  1170. "type": "string",
  1171. "description": "name of the organization",
  1172. "name": "org",
  1173. "in": "path",
  1174. "required": true
  1175. },
  1176. {
  1177. "type": "integer",
  1178. "format": "int64",
  1179. "description": "id of the label to get",
  1180. "name": "id",
  1181. "in": "path",
  1182. "required": true
  1183. }
  1184. ],
  1185. "responses": {
  1186. "200": {
  1187. "$ref": "#/responses/Label"
  1188. }
  1189. }
  1190. },
  1191. "delete": {
  1192. "tags": [
  1193. "organization"
  1194. ],
  1195. "summary": "Delete a label",
  1196. "operationId": "orgDeleteLabel",
  1197. "parameters": [
  1198. {
  1199. "type": "string",
  1200. "description": "name of the organization",
  1201. "name": "org",
  1202. "in": "path",
  1203. "required": true
  1204. },
  1205. {
  1206. "type": "integer",
  1207. "format": "int64",
  1208. "description": "id of the label to delete",
  1209. "name": "id",
  1210. "in": "path",
  1211. "required": true
  1212. }
  1213. ],
  1214. "responses": {
  1215. "204": {
  1216. "$ref": "#/responses/empty"
  1217. }
  1218. }
  1219. },
  1220. "patch": {
  1221. "consumes": [
  1222. "application/json"
  1223. ],
  1224. "produces": [
  1225. "application/json"
  1226. ],
  1227. "tags": [
  1228. "organization"
  1229. ],
  1230. "summary": "Update a label",
  1231. "operationId": "orgEditLabel",
  1232. "parameters": [
  1233. {
  1234. "type": "string",
  1235. "description": "name of the organization",
  1236. "name": "org",
  1237. "in": "path",
  1238. "required": true
  1239. },
  1240. {
  1241. "type": "integer",
  1242. "format": "int64",
  1243. "description": "id of the label to edit",
  1244. "name": "id",
  1245. "in": "path",
  1246. "required": true
  1247. },
  1248. {
  1249. "name": "body",
  1250. "in": "body",
  1251. "schema": {
  1252. "$ref": "#/definitions/EditLabelOption"
  1253. }
  1254. }
  1255. ],
  1256. "responses": {
  1257. "200": {
  1258. "$ref": "#/responses/Label"
  1259. },
  1260. "422": {
  1261. "$ref": "#/responses/validationError"
  1262. }
  1263. }
  1264. }
  1265. },
  1266. "/orgs/{org}/members": {
  1267. "get": {
  1268. "produces": [
  1269. "application/json"
  1270. ],
  1271. "tags": [
  1272. "organization"
  1273. ],
  1274. "summary": "List an organization's members",
  1275. "operationId": "orgListMembers",
  1276. "parameters": [
  1277. {
  1278. "type": "string",
  1279. "description": "name of the organization",
  1280. "name": "org",
  1281. "in": "path",
  1282. "required": true
  1283. },
  1284. {
  1285. "type": "integer",
  1286. "description": "page number of results to return (1-based)",
  1287. "name": "page",
  1288. "in": "query"
  1289. },
  1290. {
  1291. "type": "integer",
  1292. "description": "page size of results",
  1293. "name": "limit",
  1294. "in": "query"
  1295. }
  1296. ],
  1297. "responses": {
  1298. "200": {
  1299. "$ref": "#/responses/UserList"
  1300. }
  1301. }
  1302. }
  1303. },
  1304. "/orgs/{org}/members/{username}": {
  1305. "get": {
  1306. "tags": [
  1307. "organization"
  1308. ],
  1309. "summary": "Check if a user is a member of an organization",
  1310. "operationId": "orgIsMember",
  1311. "parameters": [
  1312. {
  1313. "type": "string",
  1314. "description": "name of the organization",
  1315. "name": "org",
  1316. "in": "path",
  1317. "required": true
  1318. },
  1319. {
  1320. "type": "string",
  1321. "description": "username of the user",
  1322. "name": "username",
  1323. "in": "path",
  1324. "required": true
  1325. }
  1326. ],
  1327. "responses": {
  1328. "204": {
  1329. "description": "user is a member"
  1330. },
  1331. "302": {
  1332. "description": "redirection to /orgs/{org}/public_members/{username}"
  1333. },
  1334. "404": {
  1335. "description": "user is not a member"
  1336. }
  1337. }
  1338. },
  1339. "delete": {
  1340. "produces": [
  1341. "application/json"
  1342. ],
  1343. "tags": [
  1344. "organization"
  1345. ],
  1346. "summary": "Remove a member from an organization",
  1347. "operationId": "orgDeleteMember",
  1348. "parameters": [
  1349. {
  1350. "type": "string",
  1351. "description": "name of the organization",
  1352. "name": "org",
  1353. "in": "path",
  1354. "required": true
  1355. },
  1356. {
  1357. "type": "string",
  1358. "description": "username of the user",
  1359. "name": "username",
  1360. "in": "path",
  1361. "required": true
  1362. }
  1363. ],
  1364. "responses": {
  1365. "204": {
  1366. "description": "member removed"
  1367. }
  1368. }
  1369. }
  1370. },
  1371. "/orgs/{org}/public_members": {
  1372. "get": {
  1373. "produces": [
  1374. "application/json"
  1375. ],
  1376. "tags": [
  1377. "organization"
  1378. ],
  1379. "summary": "List an organization's public members",
  1380. "operationId": "orgListPublicMembers",
  1381. "parameters": [
  1382. {
  1383. "type": "string",
  1384. "description": "name of the organization",
  1385. "name": "org",
  1386. "in": "path",
  1387. "required": true
  1388. },
  1389. {
  1390. "type": "integer",
  1391. "description": "page number of results to return (1-based)",
  1392. "name": "page",
  1393. "in": "query"
  1394. },
  1395. {
  1396. "type": "integer",
  1397. "description": "page size of results",
  1398. "name": "limit",
  1399. "in": "query"
  1400. }
  1401. ],
  1402. "responses": {
  1403. "200": {
  1404. "$ref": "#/responses/UserList"
  1405. }
  1406. }
  1407. }
  1408. },
  1409. "/orgs/{org}/public_members/{username}": {
  1410. "get": {
  1411. "tags": [
  1412. "organization"
  1413. ],
  1414. "summary": "Check if a user is a public member of an organization",
  1415. "operationId": "orgIsPublicMember",
  1416. "parameters": [
  1417. {
  1418. "type": "string",
  1419. "description": "name of the organization",
  1420. "name": "org",
  1421. "in": "path",
  1422. "required": true
  1423. },
  1424. {
  1425. "type": "string",
  1426. "description": "username of the user",
  1427. "name": "username",
  1428. "in": "path",
  1429. "required": true
  1430. }
  1431. ],
  1432. "responses": {
  1433. "204": {
  1434. "description": "user is a public member"
  1435. },
  1436. "404": {
  1437. "description": "user is not a public member"
  1438. }
  1439. }
  1440. },
  1441. "put": {
  1442. "produces": [
  1443. "application/json"
  1444. ],
  1445. "tags": [
  1446. "organization"
  1447. ],
  1448. "summary": "Publicize a user's membership",
  1449. "operationId": "orgPublicizeMember",
  1450. "parameters": [
  1451. {
  1452. "type": "string",
  1453. "description": "name of the organization",
  1454. "name": "org",
  1455. "in": "path",
  1456. "required": true
  1457. },
  1458. {
  1459. "type": "string",
  1460. "description": "username of the user",
  1461. "name": "username",
  1462. "in": "path",
  1463. "required": true
  1464. }
  1465. ],
  1466. "responses": {
  1467. "204": {
  1468. "description": "membership publicized"
  1469. },
  1470. "403": {
  1471. "$ref": "#/responses/forbidden"
  1472. }
  1473. }
  1474. },
  1475. "delete": {
  1476. "produces": [
  1477. "application/json"
  1478. ],
  1479. "tags": [
  1480. "organization"
  1481. ],
  1482. "summary": "Conceal a user's membership",
  1483. "operationId": "orgConcealMember",
  1484. "parameters": [
  1485. {
  1486. "type": "string",
  1487. "description": "name of the organization",
  1488. "name": "org",
  1489. "in": "path",
  1490. "required": true
  1491. },
  1492. {
  1493. "type": "string",
  1494. "description": "username of the user",
  1495. "name": "username",
  1496. "in": "path",
  1497. "required": true
  1498. }
  1499. ],
  1500. "responses": {
  1501. "204": {
  1502. "$ref": "#/responses/empty"
  1503. },
  1504. "403": {
  1505. "$ref": "#/responses/forbidden"
  1506. }
  1507. }
  1508. }
  1509. },
  1510. "/orgs/{org}/repos": {
  1511. "get": {
  1512. "produces": [
  1513. "application/json"
  1514. ],
  1515. "tags": [
  1516. "organization"
  1517. ],
  1518. "summary": "List an organization's repos",
  1519. "operationId": "orgListRepos",
  1520. "parameters": [
  1521. {
  1522. "type": "string",
  1523. "description": "name of the organization",
  1524. "name": "org",
  1525. "in": "path",
  1526. "required": true
  1527. },
  1528. {
  1529. "type": "integer",
  1530. "description": "page number of results to return (1-based)",
  1531. "name": "page",
  1532. "in": "query"
  1533. },
  1534. {
  1535. "type": "integer",
  1536. "description": "page size of results",
  1537. "name": "limit",
  1538. "in": "query"
  1539. }
  1540. ],
  1541. "responses": {
  1542. "200": {
  1543. "$ref": "#/responses/RepositoryList"
  1544. }
  1545. }
  1546. },
  1547. "post": {
  1548. "consumes": [
  1549. "application/json"
  1550. ],
  1551. "produces": [
  1552. "application/json"
  1553. ],
  1554. "tags": [
  1555. "organization"
  1556. ],
  1557. "summary": "Create a repository in an organization",
  1558. "operationId": "createOrgRepo",
  1559. "parameters": [
  1560. {
  1561. "type": "string",
  1562. "description": "name of organization",
  1563. "name": "org",
  1564. "in": "path",
  1565. "required": true
  1566. },
  1567. {
  1568. "name": "body",
  1569. "in": "body",
  1570. "schema": {
  1571. "$ref": "#/definitions/CreateRepoOption"
  1572. }
  1573. }
  1574. ],
  1575. "responses": {
  1576. "201": {
  1577. "$ref": "#/responses/Repository"
  1578. },
  1579. "403": {
  1580. "$ref": "#/responses/forbidden"
  1581. },
  1582. "404": {
  1583. "$ref": "#/responses/notFound"
  1584. }
  1585. }
  1586. }
  1587. },
  1588. "/orgs/{org}/teams": {
  1589. "get": {
  1590. "produces": [
  1591. "application/json"
  1592. ],
  1593. "tags": [
  1594. "organization"
  1595. ],
  1596. "summary": "List an organization's teams",
  1597. "operationId": "orgListTeams",
  1598. "parameters": [
  1599. {
  1600. "type": "string",
  1601. "description": "name of the organization",
  1602. "name": "org",
  1603. "in": "path",
  1604. "required": true
  1605. },
  1606. {
  1607. "type": "integer",
  1608. "description": "page number of results to return (1-based)",
  1609. "name": "page",
  1610. "in": "query"
  1611. },
  1612. {
  1613. "type": "integer",
  1614. "description": "page size of results",
  1615. "name": "limit",
  1616. "in": "query"
  1617. }
  1618. ],
  1619. "responses": {
  1620. "200": {
  1621. "$ref": "#/responses/TeamList"
  1622. }
  1623. }
  1624. },
  1625. "post": {
  1626. "consumes": [
  1627. "application/json"
  1628. ],
  1629. "produces": [
  1630. "application/json"
  1631. ],
  1632. "tags": [
  1633. "organization"
  1634. ],
  1635. "summary": "Create a team",
  1636. "operationId": "orgCreateTeam",
  1637. "parameters": [
  1638. {
  1639. "type": "string",
  1640. "description": "name of the organization",
  1641. "name": "org",
  1642. "in": "path",
  1643. "required": true
  1644. },
  1645. {
  1646. "name": "body",
  1647. "in": "body",
  1648. "schema": {
  1649. "$ref": "#/definitions/CreateTeamOption"
  1650. }
  1651. }
  1652. ],
  1653. "responses": {
  1654. "201": {
  1655. "$ref": "#/responses/Team"
  1656. },
  1657. "422": {
  1658. "$ref": "#/responses/validationError"
  1659. }
  1660. }
  1661. }
  1662. },
  1663. "/orgs/{org}/teams/search": {
  1664. "get": {
  1665. "produces": [
  1666. "application/json"
  1667. ],
  1668. "tags": [
  1669. "organization"
  1670. ],
  1671. "summary": "Search for teams within an organization",
  1672. "operationId": "teamSearch",
  1673. "parameters": [
  1674. {
  1675. "type": "string",
  1676. "description": "name of the organization",
  1677. "name": "org",
  1678. "in": "path",
  1679. "required": true
  1680. },
  1681. {
  1682. "type": "string",
  1683. "description": "keywords to search",
  1684. "name": "q",
  1685. "in": "query"
  1686. },
  1687. {
  1688. "type": "boolean",
  1689. "description": "include search within team description (defaults to true)",
  1690. "name": "include_desc",
  1691. "in": "query"
  1692. },
  1693. {
  1694. "type": "integer",
  1695. "description": "page number of results to return (1-based)",
  1696. "name": "page",
  1697. "in": "query"
  1698. },
  1699. {
  1700. "type": "integer",
  1701. "description": "page size of results",
  1702. "name": "limit",
  1703. "in": "query"
  1704. }
  1705. ],
  1706. "responses": {
  1707. "200": {
  1708. "description": "SearchResults of a successful search",
  1709. "schema": {
  1710. "type": "object",
  1711. "properties": {
  1712. "data": {
  1713. "type": "array",
  1714. "items": {
  1715. "$ref": "#/definitions/Team"
  1716. }
  1717. },
  1718. "ok": {
  1719. "type": "boolean"
  1720. }
  1721. }
  1722. }
  1723. }
  1724. }
  1725. }
  1726. },
  1727. "/repos/issues/search": {
  1728. "get": {
  1729. "produces": [
  1730. "application/json"
  1731. ],
  1732. "tags": [
  1733. "issue"
  1734. ],
  1735. "summary": "Search for issues across the repositories that the user has access to",
  1736. "operationId": "issueSearchIssues",
  1737. "parameters": [
  1738. {
  1739. "type": "string",
  1740. "description": "whether issue is open or closed",
  1741. "name": "state",
  1742. "in": "query"
  1743. },
  1744. {
  1745. "type": "string",
  1746. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  1747. "name": "labels",
  1748. "in": "query"
  1749. },
  1750. {
  1751. "type": "string",
  1752. "description": "search string",
  1753. "name": "q",
  1754. "in": "query"
  1755. },
  1756. {
  1757. "type": "integer",
  1758. "format": "int64",
  1759. "description": "repository to prioritize in the results",
  1760. "name": "priority_repo_id",
  1761. "in": "query"
  1762. },
  1763. {
  1764. "type": "string",
  1765. "description": "filter by type (issues / pulls) if set",
  1766. "name": "type",
  1767. "in": "query"
  1768. },
  1769. {
  1770. "type": "integer",
  1771. "description": "page number of requested issues",
  1772. "name": "page",
  1773. "in": "query"
  1774. }
  1775. ],
  1776. "responses": {
  1777. "200": {
  1778. "$ref": "#/responses/IssueList"
  1779. }
  1780. }
  1781. }
  1782. },
  1783. "/repos/migrate": {
  1784. "post": {
  1785. "consumes": [
  1786. "application/json"
  1787. ],
  1788. "produces": [
  1789. "application/json"
  1790. ],
  1791. "tags": [
  1792. "repository"
  1793. ],
  1794. "summary": "Migrate a remote git repository",
  1795. "operationId": "repoMigrate",
  1796. "parameters": [
  1797. {
  1798. "name": "body",
  1799. "in": "body",
  1800. "schema": {
  1801. "$ref": "#/definitions/MigrateRepoOptions"
  1802. }
  1803. }
  1804. ],
  1805. "responses": {
  1806. "201": {
  1807. "$ref": "#/responses/Repository"
  1808. },
  1809. "403": {
  1810. "$ref": "#/responses/forbidden"
  1811. },
  1812. "422": {
  1813. "$ref": "#/responses/validationError"
  1814. }
  1815. }
  1816. }
  1817. },
  1818. "/repos/search": {
  1819. "get": {
  1820. "produces": [
  1821. "application/json"
  1822. ],
  1823. "tags": [
  1824. "repository"
  1825. ],
  1826. "summary": "Search for repositories",
  1827. "operationId": "repoSearch",
  1828. "parameters": [
  1829. {
  1830. "type": "string",
  1831. "description": "keyword",
  1832. "name": "q",
  1833. "in": "query"
  1834. },
  1835. {
  1836. "type": "boolean",
  1837. "description": "Limit search to repositories with keyword as topic",
  1838. "name": "topic",
  1839. "in": "query"
  1840. },
  1841. {
  1842. "type": "boolean",
  1843. "description": "include search of keyword within repository description",
  1844. "name": "includeDesc",
  1845. "in": "query"
  1846. },
  1847. {
  1848. "type": "integer",
  1849. "format": "int64",
  1850. "description": "search only for repos that the user with the given id owns or contributes to",
  1851. "name": "uid",
  1852. "in": "query"
  1853. },
  1854. {
  1855. "type": "integer",
  1856. "format": "int64",
  1857. "description": "repo owner to prioritize in the results",
  1858. "name": "priority_owner_id",
  1859. "in": "query"
  1860. },
  1861. {
  1862. "type": "integer",
  1863. "format": "int64",
  1864. "description": "search only for repos that the user with the given id has starred",
  1865. "name": "starredBy",
  1866. "in": "query"
  1867. },
  1868. {
  1869. "type": "boolean",
  1870. "description": "include private repositories this user has access to (defaults to true)",
  1871. "name": "private",
  1872. "in": "query"
  1873. },
  1874. {
  1875. "type": "boolean",
  1876. "description": "show only pubic, private or all repositories (defaults to all)",
  1877. "name": "is_private",
  1878. "in": "query"
  1879. },
  1880. {
  1881. "type": "boolean",
  1882. "description": "include template repositories this user has access to (defaults to true)",
  1883. "name": "template",
  1884. "in": "query"
  1885. },
  1886. {
  1887. "type": "boolean",
  1888. "description": "show only archived, non-archived or all repositories (defaults to all)",
  1889. "name": "archived",
  1890. "in": "query"
  1891. },
  1892. {
  1893. "type": "string",
  1894. "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"",
  1895. "name": "mode",
  1896. "in": "query"
  1897. },
  1898. {
  1899. "type": "boolean",
  1900. "description": "if `uid` is given, search only for repos that the user owns",
  1901. "name": "exclusive",
  1902. "in": "query"
  1903. },
  1904. {
  1905. "type": "string",
  1906. "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"",
  1907. "name": "sort",
  1908. "in": "query"
  1909. },
  1910. {
  1911. "type": "string",
  1912. "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.",
  1913. "name": "order",
  1914. "in": "query"
  1915. },
  1916. {
  1917. "type": "integer",
  1918. "description": "page number of results to return (1-based)",
  1919. "name": "page",
  1920. "in": "query"
  1921. },
  1922. {
  1923. "type": "integer",
  1924. "description": "page size of results",
  1925. "name": "limit",
  1926. "in": "query"
  1927. }
  1928. ],
  1929. "responses": {
  1930. "200": {
  1931. "$ref": "#/responses/SearchResults"
  1932. },
  1933. "422": {
  1934. "$ref": "#/responses/validationError"
  1935. }
  1936. }
  1937. }
  1938. },
  1939. "/repos/{owner}/{repo}": {
  1940. "get": {
  1941. "produces": [
  1942. "application/json"
  1943. ],
  1944. "tags": [
  1945. "repository"
  1946. ],
  1947. "summary": "Get a repository",
  1948. "operationId": "repoGet",
  1949. "parameters": [
  1950. {
  1951. "type": "string",
  1952. "description": "owner of the repo",
  1953. "name": "owner",
  1954. "in": "path",
  1955. "required": true
  1956. },
  1957. {
  1958. "type": "string",
  1959. "description": "name of the repo",
  1960. "name": "repo",
  1961. "in": "path",
  1962. "required": true
  1963. }
  1964. ],
  1965. "responses": {
  1966. "200": {
  1967. "$ref": "#/responses/Repository"
  1968. }
  1969. }
  1970. },
  1971. "delete": {
  1972. "produces": [
  1973. "application/json"
  1974. ],
  1975. "tags": [
  1976. "repository"
  1977. ],
  1978. "summary": "Delete a repository",
  1979. "operationId": "repoDelete",
  1980. "parameters": [
  1981. {
  1982. "type": "string",
  1983. "description": "owner of the repo to delete",
  1984. "name": "owner",
  1985. "in": "path",
  1986. "required": true
  1987. },
  1988. {
  1989. "type": "string",
  1990. "description": "name of the repo to delete",
  1991. "name": "repo",
  1992. "in": "path",
  1993. "required": true
  1994. }
  1995. ],
  1996. "responses": {
  1997. "204": {
  1998. "$ref": "#/responses/empty"
  1999. },
  2000. "403": {
  2001. "$ref": "#/responses/forbidden"
  2002. }
  2003. }
  2004. },
  2005. "patch": {
  2006. "produces": [
  2007. "application/json"
  2008. ],
  2009. "tags": [
  2010. "repository"
  2011. ],
  2012. "summary": "Edit a repository's properties. Only fields that are set will be changed.",
  2013. "operationId": "repoEdit",
  2014. "parameters": [
  2015. {
  2016. "type": "string",
  2017. "description": "owner of the repo to edit",
  2018. "name": "owner",
  2019. "in": "path",
  2020. "required": true
  2021. },
  2022. {
  2023. "type": "string",
  2024. "description": "name of the repo to edit",
  2025. "name": "repo",
  2026. "in": "path",
  2027. "required": true
  2028. },
  2029. {
  2030. "description": "Properties of a repo that you can edit",
  2031. "name": "body",
  2032. "in": "body",
  2033. "schema": {
  2034. "$ref": "#/definitions/EditRepoOption"
  2035. }
  2036. }
  2037. ],
  2038. "responses": {
  2039. "200": {
  2040. "$ref": "#/responses/Repository"
  2041. },
  2042. "403": {
  2043. "$ref": "#/responses/forbidden"
  2044. },
  2045. "422": {
  2046. "$ref": "#/responses/validationError"
  2047. }
  2048. }
  2049. }
  2050. },
  2051. "/repos/{owner}/{repo}/archive/{archive}": {
  2052. "get": {
  2053. "produces": [
  2054. "application/json"
  2055. ],
  2056. "tags": [
  2057. "repository"
  2058. ],
  2059. "summary": "Get an archive of a repository",
  2060. "operationId": "repoGetArchive",
  2061. "parameters": [
  2062. {
  2063. "type": "string",
  2064. "description": "owner of the repo",
  2065. "name": "owner",
  2066. "in": "path",
  2067. "required": true
  2068. },
  2069. {
  2070. "type": "string",
  2071. "description": "name of the repo",
  2072. "name": "repo",
  2073. "in": "path",
  2074. "required": true
  2075. },
  2076. {
  2077. "type": "string",
  2078. "description": "the git reference for download with attached archive format (e.g. master.zip)",
  2079. "name": "archive",
  2080. "in": "path",
  2081. "required": true
  2082. }
  2083. ],
  2084. "responses": {
  2085. "200": {
  2086. "description": "success"
  2087. },
  2088. "404": {
  2089. "$ref": "#/responses/notFound"
  2090. }
  2091. }
  2092. }
  2093. },
  2094. "/repos/{owner}/{repo}/branch_protections": {
  2095. "get": {
  2096. "produces": [
  2097. "application/json"
  2098. ],
  2099. "tags": [
  2100. "repository"
  2101. ],
  2102. "summary": "List branch protections for a repository",
  2103. "operationId": "repoListBranchProtection",
  2104. "parameters": [
  2105. {
  2106. "type": "string",
  2107. "description": "owner of the repo",
  2108. "name": "owner",
  2109. "in": "path",
  2110. "required": true
  2111. },
  2112. {
  2113. "type": "string",
  2114. "description": "name of the repo",
  2115. "name": "repo",
  2116. "in": "path",
  2117. "required": true
  2118. }
  2119. ],
  2120. "responses": {
  2121. "200": {
  2122. "$ref": "#/responses/BranchProtectionList"
  2123. }
  2124. }
  2125. },
  2126. "post": {
  2127. "consumes": [
  2128. "application/json"
  2129. ],
  2130. "produces": [
  2131. "application/json"
  2132. ],
  2133. "tags": [
  2134. "repository"
  2135. ],
  2136. "summary": "Create a branch protections for a repository",
  2137. "operationId": "repoCreateBranchProtection",
  2138. "parameters": [
  2139. {
  2140. "type": "string",
  2141. "description": "owner of the repo",
  2142. "name": "owner",
  2143. "in": "path",
  2144. "required": true
  2145. },
  2146. {
  2147. "type": "string",
  2148. "description": "name of the repo",
  2149. "name": "repo",
  2150. "in": "path",
  2151. "required": true
  2152. },
  2153. {
  2154. "name": "body",
  2155. "in": "body",
  2156. "schema": {
  2157. "$ref": "#/definitions/CreateBranchProtectionOption"
  2158. }
  2159. }
  2160. ],
  2161. "responses": {
  2162. "201": {
  2163. "$ref": "#/responses/BranchProtection"
  2164. },
  2165. "403": {
  2166. "$ref": "#/responses/forbidden"
  2167. },
  2168. "404": {
  2169. "$ref": "#/responses/notFound"
  2170. },
  2171. "422": {
  2172. "$ref": "#/responses/validationError"
  2173. }
  2174. }
  2175. }
  2176. },
  2177. "/repos/{owner}/{repo}/branch_protections/{name}": {
  2178. "get": {
  2179. "produces": [
  2180. "application/json"
  2181. ],
  2182. "tags": [
  2183. "repository"
  2184. ],
  2185. "summary": "Get a specific branch protection for the repository",
  2186. "operationId": "repoGetBranchProtection",
  2187. "parameters": [
  2188. {
  2189. "type": "string",
  2190. "description": "owner of the repo",
  2191. "name": "owner",
  2192. "in": "path",
  2193. "required": true
  2194. },
  2195. {
  2196. "type": "string",
  2197. "description": "name of the repo",
  2198. "name": "repo",
  2199. "in": "path",
  2200. "required": true
  2201. },
  2202. {
  2203. "type": "string",
  2204. "description": "name of protected branch",
  2205. "name": "name",
  2206. "in": "path",
  2207. "required": true
  2208. }
  2209. ],
  2210. "responses": {
  2211. "200": {
  2212. "$ref": "#/responses/BranchProtection"
  2213. },
  2214. "404": {
  2215. "$ref": "#/responses/notFound"
  2216. }
  2217. }
  2218. },
  2219. "delete": {
  2220. "produces": [
  2221. "application/json"
  2222. ],
  2223. "tags": [
  2224. "repository"
  2225. ],
  2226. "summary": "Delete a specific branch protection for the repository",
  2227. "operationId": "repoDeleteBranchProtection",
  2228. "parameters": [
  2229. {
  2230. "type": "string",
  2231. "description": "owner of the repo",
  2232. "name": "owner",
  2233. "in": "path",
  2234. "required": true
  2235. },
  2236. {
  2237. "type": "string",
  2238. "description": "name of the repo",
  2239. "name": "repo",
  2240. "in": "path",
  2241. "required": true
  2242. },
  2243. {
  2244. "type": "string",
  2245. "description": "name of protected branch",
  2246. "name": "name",
  2247. "in": "path",
  2248. "required": true
  2249. }
  2250. ],
  2251. "responses": {
  2252. "204": {
  2253. "$ref": "#/responses/empty"
  2254. },
  2255. "404": {
  2256. "$ref": "#/responses/notFound"
  2257. }
  2258. }
  2259. },
  2260. "patch": {
  2261. "consumes": [
  2262. "application/json"
  2263. ],
  2264. "produces": [
  2265. "application/json"
  2266. ],
  2267. "tags": [
  2268. "repository"
  2269. ],
  2270. "summary": "Edit a branch protections for a repository. Only fields that are set will be changed",
  2271. "operationId": "repoEditBranchProtection",
  2272. "parameters": [
  2273. {
  2274. "type": "string",
  2275. "description": "owner of the repo",
  2276. "name": "owner",
  2277. "in": "path",
  2278. "required": true
  2279. },
  2280. {
  2281. "type": "string",
  2282. "description": "name of the repo",
  2283. "name": "repo",
  2284. "in": "path",
  2285. "required": true
  2286. },
  2287. {
  2288. "type": "string",
  2289. "description": "name of protected branch",
  2290. "name": "name",
  2291. "in": "path",
  2292. "required": true
  2293. },
  2294. {
  2295. "name": "body",
  2296. "in": "body",
  2297. "schema": {
  2298. "$ref": "#/definitions/EditBranchProtectionOption"
  2299. }
  2300. }
  2301. ],
  2302. "responses": {
  2303. "200": {
  2304. "$ref": "#/responses/BranchProtection"
  2305. },
  2306. "404": {
  2307. "$ref": "#/responses/notFound"
  2308. },
  2309. "422": {
  2310. "$ref": "#/responses/validationError"
  2311. }
  2312. }
  2313. }
  2314. },
  2315. "/repos/{owner}/{repo}/branches": {
  2316. "get": {
  2317. "produces": [
  2318. "application/json"
  2319. ],
  2320. "tags": [
  2321. "repository"
  2322. ],
  2323. "summary": "List a repository's branches",
  2324. "operationId": "repoListBranches",
  2325. "parameters": [
  2326. {
  2327. "type": "string",
  2328. "description": "owner of the repo",
  2329. "name": "owner",
  2330. "in": "path",
  2331. "required": true
  2332. },
  2333. {
  2334. "type": "string",
  2335. "description": "name of the repo",
  2336. "name": "repo",
  2337. "in": "path",
  2338. "required": true
  2339. }
  2340. ],
  2341. "responses": {
  2342. "200": {
  2343. "$ref": "#/responses/BranchList"
  2344. }
  2345. }
  2346. },
  2347. "post": {
  2348. "consumes": [
  2349. "application/json"
  2350. ],
  2351. "produces": [
  2352. "application/json"
  2353. ],
  2354. "tags": [
  2355. "repository"
  2356. ],
  2357. "summary": "Create a branch",
  2358. "operationId": "repoCreateBranch",
  2359. "parameters": [
  2360. {
  2361. "type": "string",
  2362. "description": "owner of the repo",
  2363. "name": "owner",
  2364. "in": "path",
  2365. "required": true
  2366. },
  2367. {
  2368. "type": "string",
  2369. "description": "name of the repo",
  2370. "name": "repo",
  2371. "in": "path",
  2372. "required": true
  2373. },
  2374. {
  2375. "name": "body",
  2376. "in": "body",
  2377. "schema": {
  2378. "$ref": "#/definitions/CreateBranchRepoOption"
  2379. }
  2380. }
  2381. ],
  2382. "responses": {
  2383. "201": {
  2384. "$ref": "#/responses/Branch"
  2385. },
  2386. "404": {
  2387. "description": "The old branch does not exist."
  2388. },
  2389. "409": {
  2390. "description": "The branch with the same name already exists."
  2391. }
  2392. }
  2393. }
  2394. },
  2395. "/repos/{owner}/{repo}/branches/{branch}": {
  2396. "get": {
  2397. "produces": [
  2398. "application/json"
  2399. ],
  2400. "tags": [
  2401. "repository"
  2402. ],
  2403. "summary": "Retrieve a specific branch from a repository, including its effective branch protection",
  2404. "operationId": "repoGetBranch",
  2405. "parameters": [
  2406. {
  2407. "type": "string",
  2408. "description": "owner of the repo",
  2409. "name": "owner",
  2410. "in": "path",
  2411. "required": true
  2412. },
  2413. {
  2414. "type": "string",
  2415. "description": "name of the repo",
  2416. "name": "repo",
  2417. "in": "path",
  2418. "required": true
  2419. },
  2420. {
  2421. "type": "string",
  2422. "description": "branch to get",
  2423. "name": "branch",
  2424. "in": "path",
  2425. "required": true
  2426. }
  2427. ],
  2428. "responses": {
  2429. "200": {
  2430. "$ref": "#/responses/Branch"
  2431. }
  2432. }
  2433. },
  2434. "delete": {
  2435. "produces": [
  2436. "application/json"
  2437. ],
  2438. "tags": [
  2439. "repository"
  2440. ],
  2441. "summary": "Delete a specific branch from a repository",
  2442. "operationId": "repoDeleteBranch",
  2443. "parameters": [
  2444. {
  2445. "type": "string",
  2446. "description": "owner of the repo",
  2447. "name": "owner",
  2448. "in": "path",
  2449. "required": true
  2450. },
  2451. {
  2452. "type": "string",
  2453. "description": "name of the repo",
  2454. "name": "repo",
  2455. "in": "path",
  2456. "required": true
  2457. },
  2458. {
  2459. "type": "string",
  2460. "description": "branch to delete",
  2461. "name": "branch",
  2462. "in": "path",
  2463. "required": true
  2464. }
  2465. ],
  2466. "responses": {
  2467. "204": {
  2468. "$ref": "#/responses/empty"
  2469. },
  2470. "403": {
  2471. "$ref": "#/responses/error"
  2472. }
  2473. }
  2474. }
  2475. },
  2476. "/repos/{owner}/{repo}/collaborators": {
  2477. "get": {
  2478. "produces": [
  2479. "application/json"
  2480. ],
  2481. "tags": [
  2482. "repository"
  2483. ],
  2484. "summary": "List a repository's collaborators",
  2485. "operationId": "repoListCollaborators",
  2486. "parameters": [
  2487. {
  2488. "type": "string",
  2489. "description": "owner of the repo",
  2490. "name": "owner",
  2491. "in": "path",
  2492. "required": true
  2493. },
  2494. {
  2495. "type": "string",
  2496. "description": "name of the repo",
  2497. "name": "repo",
  2498. "in": "path",
  2499. "required": true
  2500. },
  2501. {
  2502. "type": "integer",
  2503. "description": "page number of results to return (1-based)",
  2504. "name": "page",
  2505. "in": "query"
  2506. },
  2507. {
  2508. "type": "integer",
  2509. "description": "page size of results",
  2510. "name": "limit",
  2511. "in": "query"
  2512. }
  2513. ],
  2514. "responses": {
  2515. "200": {
  2516. "$ref": "#/responses/UserList"
  2517. }
  2518. }
  2519. }
  2520. },
  2521. "/repos/{owner}/{repo}/collaborators/{collaborator}": {
  2522. "get": {
  2523. "produces": [
  2524. "application/json"
  2525. ],
  2526. "tags": [
  2527. "repository"
  2528. ],
  2529. "summary": "Check if a user is a collaborator of a repository",
  2530. "operationId": "repoCheckCollaborator",
  2531. "parameters": [
  2532. {
  2533. "type": "string",
  2534. "description": "owner of the repo",
  2535. "name": "owner",
  2536. "in": "path",
  2537. "required": true
  2538. },
  2539. {
  2540. "type": "string",
  2541. "description": "name of the repo",
  2542. "name": "repo",
  2543. "in": "path",
  2544. "required": true
  2545. },
  2546. {
  2547. "type": "string",
  2548. "description": "username of the collaborator",
  2549. "name": "collaborator",
  2550. "in": "path",
  2551. "required": true
  2552. }
  2553. ],
  2554. "responses": {
  2555. "204": {
  2556. "$ref": "#/responses/empty"
  2557. },
  2558. "404": {
  2559. "$ref": "#/responses/notFound"
  2560. },
  2561. "422": {
  2562. "$ref": "#/responses/validationError"
  2563. }
  2564. }
  2565. },
  2566. "put": {
  2567. "produces": [
  2568. "application/json"
  2569. ],
  2570. "tags": [
  2571. "repository"
  2572. ],
  2573. "summary": "Add a collaborator to a repository",
  2574. "operationId": "repoAddCollaborator",
  2575. "parameters": [
  2576. {
  2577. "type": "string",
  2578. "description": "owner of the repo",
  2579. "name": "owner",
  2580. "in": "path",
  2581. "required": true
  2582. },
  2583. {
  2584. "type": "string",
  2585. "description": "name of the repo",
  2586. "name": "repo",
  2587. "in": "path",
  2588. "required": true
  2589. },
  2590. {
  2591. "type": "string",
  2592. "description": "username of the collaborator to add",
  2593. "name": "collaborator",
  2594. "in": "path",
  2595. "required": true
  2596. },
  2597. {
  2598. "name": "body",
  2599. "in": "body",
  2600. "schema": {
  2601. "$ref": "#/definitions/AddCollaboratorOption"
  2602. }
  2603. }
  2604. ],
  2605. "responses": {
  2606. "204": {
  2607. "$ref": "#/responses/empty"
  2608. },
  2609. "422": {
  2610. "$ref": "#/responses/validationError"
  2611. }
  2612. }
  2613. },
  2614. "delete": {
  2615. "produces": [
  2616. "application/json"
  2617. ],
  2618. "tags": [
  2619. "repository"
  2620. ],
  2621. "summary": "Delete a collaborator from a repository",
  2622. "operationId": "repoDeleteCollaborator",
  2623. "parameters": [
  2624. {
  2625. "type": "string",
  2626. "description": "owner of the repo",
  2627. "name": "owner",
  2628. "in": "path",
  2629. "required": true
  2630. },
  2631. {
  2632. "type": "string",
  2633. "description": "name of the repo",
  2634. "name": "repo",
  2635. "in": "path",
  2636. "required": true
  2637. },
  2638. {
  2639. "type": "string",
  2640. "description": "username of the collaborator to delete",
  2641. "name": "collaborator",
  2642. "in": "path",
  2643. "required": true
  2644. }
  2645. ],
  2646. "responses": {
  2647. "204": {
  2648. "$ref": "#/responses/empty"
  2649. },
  2650. "422": {
  2651. "$ref": "#/responses/validationError"
  2652. }
  2653. }
  2654. }
  2655. },
  2656. "/repos/{owner}/{repo}/commits": {
  2657. "get": {
  2658. "produces": [
  2659. "application/json"
  2660. ],
  2661. "tags": [
  2662. "repository"
  2663. ],
  2664. "summary": "Get a list of all commits from a repository",
  2665. "operationId": "repoGetAllCommits",
  2666. "parameters": [
  2667. {
  2668. "type": "string",
  2669. "description": "owner of the repo",
  2670. "name": "owner",
  2671. "in": "path",
  2672. "required": true
  2673. },
  2674. {
  2675. "type": "string",
  2676. "description": "name of the repo",
  2677. "name": "repo",
  2678. "in": "path",
  2679. "required": true
  2680. },
  2681. {
  2682. "type": "string",
  2683. "description": "SHA or branch to start listing commits from (usually 'master')",
  2684. "name": "sha",
  2685. "in": "query"
  2686. },
  2687. {
  2688. "type": "integer",
  2689. "description": "page number of results to return (1-based)",
  2690. "name": "page",
  2691. "in": "query"
  2692. },
  2693. {
  2694. "type": "integer",
  2695. "description": "page size of results",
  2696. "name": "limit",
  2697. "in": "query"
  2698. }
  2699. ],
  2700. "responses": {
  2701. "200": {
  2702. "$ref": "#/responses/CommitList"
  2703. },
  2704. "404": {
  2705. "$ref": "#/responses/notFound"
  2706. },
  2707. "409": {
  2708. "$ref": "#/responses/EmptyRepository"
  2709. }
  2710. }
  2711. }
  2712. },
  2713. "/repos/{owner}/{repo}/commits/{ref}/statuses": {
  2714. "get": {
  2715. "produces": [
  2716. "application/json"
  2717. ],
  2718. "tags": [
  2719. "repository"
  2720. ],
  2721. "summary": "Get a commit's combined status, by branch/tag/commit reference",
  2722. "operationId": "repoGetCombinedStatusByRef",
  2723. "parameters": [
  2724. {
  2725. "type": "string",
  2726. "description": "owner of the repo",
  2727. "name": "owner",
  2728. "in": "path",
  2729. "required": true
  2730. },
  2731. {
  2732. "type": "string",
  2733. "description": "name of the repo",
  2734. "name": "repo",
  2735. "in": "path",
  2736. "required": true
  2737. },
  2738. {
  2739. "type": "string",
  2740. "description": "name of branch/tag/commit",
  2741. "name": "ref",
  2742. "in": "path",
  2743. "required": true
  2744. },
  2745. {
  2746. "type": "integer",
  2747. "description": "page number of results",
  2748. "name": "page",
  2749. "in": "query"
  2750. }
  2751. ],
  2752. "responses": {
  2753. "200": {
  2754. "$ref": "#/responses/Status"
  2755. },
  2756. "400": {
  2757. "$ref": "#/responses/error"
  2758. }
  2759. }
  2760. }
  2761. },
  2762. "/repos/{owner}/{repo}/contents": {
  2763. "get": {
  2764. "produces": [
  2765. "application/json"
  2766. ],
  2767. "tags": [
  2768. "repository"
  2769. ],
  2770. "summary": "Gets the metadata of all the entries of the root dir",
  2771. "operationId": "repoGetContentsList",
  2772. "parameters": [
  2773. {
  2774. "type": "string",
  2775. "description": "owner of the repo",
  2776. "name": "owner",
  2777. "in": "path",
  2778. "required": true
  2779. },
  2780. {
  2781. "type": "string",
  2782. "description": "name of the repo",
  2783. "name": "repo",
  2784. "in": "path",
  2785. "required": true
  2786. },
  2787. {
  2788. "type": "string",
  2789. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  2790. "name": "ref",
  2791. "in": "query"
  2792. }
  2793. ],
  2794. "responses": {
  2795. "200": {
  2796. "$ref": "#/responses/ContentsListResponse"
  2797. },
  2798. "404": {
  2799. "$ref": "#/responses/notFound"
  2800. }
  2801. }
  2802. }
  2803. },
  2804. "/repos/{owner}/{repo}/contents/{filepath}": {
  2805. "get": {
  2806. "produces": [
  2807. "application/json"
  2808. ],
  2809. "tags": [
  2810. "repository"
  2811. ],
  2812. "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir",
  2813. "operationId": "repoGetContents",
  2814. "parameters": [
  2815. {
  2816. "type": "string",
  2817. "description": "owner of the repo",
  2818. "name": "owner",
  2819. "in": "path",
  2820. "required": true
  2821. },
  2822. {
  2823. "type": "string",
  2824. "description": "name of the repo",
  2825. "name": "repo",
  2826. "in": "path",
  2827. "required": true
  2828. },
  2829. {
  2830. "type": "string",
  2831. "description": "path of the dir, file, symlink or submodule in the repo",
  2832. "name": "filepath",
  2833. "in": "path",
  2834. "required": true
  2835. },
  2836. {
  2837. "type": "string",
  2838. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  2839. "name": "ref",
  2840. "in": "query"
  2841. }
  2842. ],
  2843. "responses": {
  2844. "200": {
  2845. "$ref": "#/responses/ContentsResponse"
  2846. },
  2847. "404": {
  2848. "$ref": "#/responses/notFound"
  2849. }
  2850. }
  2851. },
  2852. "put": {
  2853. "consumes": [
  2854. "application/json"
  2855. ],
  2856. "produces": [
  2857. "application/json"
  2858. ],
  2859. "tags": [
  2860. "repository"
  2861. ],
  2862. "summary": "Update a file in a repository",
  2863. "operationId": "repoUpdateFile",
  2864. "parameters": [
  2865. {
  2866. "type": "string",
  2867. "description": "owner of the repo",
  2868. "name": "owner",
  2869. "in": "path",
  2870. "required": true
  2871. },
  2872. {
  2873. "type": "string",
  2874. "description": "name of the repo",
  2875. "name": "repo",
  2876. "in": "path",
  2877. "required": true
  2878. },
  2879. {
  2880. "type": "string",
  2881. "description": "path of the file to update",
  2882. "name": "filepath",
  2883. "in": "path",
  2884. "required": true
  2885. },
  2886. {
  2887. "name": "body",
  2888. "in": "body",
  2889. "required": true,
  2890. "schema": {
  2891. "$ref": "#/definitions/UpdateFileOptions"
  2892. }
  2893. }
  2894. ],
  2895. "responses": {
  2896. "200": {
  2897. "$ref": "#/responses/FileResponse"
  2898. },
  2899. "403": {
  2900. "$ref": "#/responses/error"
  2901. },
  2902. "404": {
  2903. "$ref": "#/responses/notFound"
  2904. },
  2905. "422": {
  2906. "$ref": "#/responses/error"
  2907. }
  2908. }
  2909. },
  2910. "post": {
  2911. "consumes": [
  2912. "application/json"
  2913. ],
  2914. "produces": [
  2915. "application/json"
  2916. ],
  2917. "tags": [
  2918. "repository"
  2919. ],
  2920. "summary": "Create a file in a repository",
  2921. "operationId": "repoCreateFile",
  2922. "parameters": [
  2923. {
  2924. "type": "string",
  2925. "description": "owner of the repo",
  2926. "name": "owner",
  2927. "in": "path",
  2928. "required": true
  2929. },
  2930. {
  2931. "type": "string",
  2932. "description": "name of the repo",
  2933. "name": "repo",
  2934. "in": "path",
  2935. "required": true
  2936. },
  2937. {
  2938. "type": "string",
  2939. "description": "path of the file to create",
  2940. "name": "filepath",
  2941. "in": "path",
  2942. "required": true
  2943. },
  2944. {
  2945. "name": "body",
  2946. "in": "body",
  2947. "required": true,
  2948. "schema": {
  2949. "$ref": "#/definitions/CreateFileOptions"
  2950. }
  2951. }
  2952. ],
  2953. "responses": {
  2954. "201": {
  2955. "$ref": "#/responses/FileResponse"
  2956. },
  2957. "403": {
  2958. "$ref": "#/responses/error"
  2959. },
  2960. "404": {
  2961. "$ref": "#/responses/notFound"
  2962. },
  2963. "422": {
  2964. "$ref": "#/responses/error"
  2965. }
  2966. }
  2967. },
  2968. "delete": {
  2969. "consumes": [
  2970. "application/json"
  2971. ],
  2972. "produces": [
  2973. "application/json"
  2974. ],
  2975. "tags": [
  2976. "repository"
  2977. ],
  2978. "summary": "Delete a file in a repository",
  2979. "operationId": "repoDeleteFile",
  2980. "parameters": [
  2981. {
  2982. "type": "string",
  2983. "description": "owner of the repo",
  2984. "name": "owner",
  2985. "in": "path",
  2986. "required": true
  2987. },
  2988. {
  2989. "type": "string",
  2990. "description": "name of the repo",
  2991. "name": "repo",
  2992. "in": "path",
  2993. "required": true
  2994. },
  2995. {
  2996. "type": "string",
  2997. "description": "path of the file to delete",
  2998. "name": "filepath",
  2999. "in": "path",
  3000. "required": true
  3001. },
  3002. {
  3003. "name": "body",
  3004. "in": "body",
  3005. "required": true,
  3006. "schema": {
  3007. "$ref": "#/definitions/DeleteFileOptions"
  3008. }
  3009. }
  3010. ],
  3011. "responses": {
  3012. "200": {
  3013. "$ref": "#/responses/FileDeleteResponse"
  3014. },
  3015. "400": {
  3016. "$ref": "#/responses/error"
  3017. },
  3018. "403": {
  3019. "$ref": "#/responses/error"
  3020. },
  3021. "404": {
  3022. "$ref": "#/responses/error"
  3023. }
  3024. }
  3025. }
  3026. },
  3027. "/repos/{owner}/{repo}/editorconfig/{filepath}": {
  3028. "get": {
  3029. "produces": [
  3030. "application/json"
  3031. ],
  3032. "tags": [
  3033. "repository"
  3034. ],
  3035. "summary": "Get the EditorConfig definitions of a file in a repository",
  3036. "operationId": "repoGetEditorConfig",
  3037. "parameters": [
  3038. {
  3039. "type": "string",
  3040. "description": "owner of the repo",
  3041. "name": "owner",
  3042. "in": "path",
  3043. "required": true
  3044. },
  3045. {
  3046. "type": "string",
  3047. "description": "name of the repo",
  3048. "name": "repo",
  3049. "in": "path",
  3050. "required": true
  3051. },
  3052. {
  3053. "type": "string",
  3054. "description": "filepath of file to get",
  3055. "name": "filepath",
  3056. "in": "path",
  3057. "required": true
  3058. }
  3059. ],
  3060. "responses": {
  3061. "200": {
  3062. "description": "success"
  3063. },
  3064. "404": {
  3065. "$ref": "#/responses/notFound"
  3066. }
  3067. }
  3068. }
  3069. },
  3070. "/repos/{owner}/{repo}/forks": {
  3071. "get": {
  3072. "produces": [
  3073. "application/json"
  3074. ],
  3075. "tags": [
  3076. "repository"
  3077. ],
  3078. "summary": "List a repository's forks",
  3079. "operationId": "listForks",
  3080. "parameters": [
  3081. {
  3082. "type": "string",
  3083. "description": "owner of the repo",
  3084. "name": "owner",
  3085. "in": "path",
  3086. "required": true
  3087. },
  3088. {
  3089. "type": "string",
  3090. "description": "name of the repo",
  3091. "name": "repo",
  3092. "in": "path",
  3093. "required": true
  3094. },
  3095. {
  3096. "type": "integer",
  3097. "description": "page number of results to return (1-based)",
  3098. "name": "page",
  3099. "in": "query"
  3100. },
  3101. {
  3102. "type": "integer",
  3103. "description": "page size of results",
  3104. "name": "limit",
  3105. "in": "query"
  3106. }
  3107. ],
  3108. "responses": {
  3109. "200": {
  3110. "$ref": "#/responses/RepositoryList"
  3111. }
  3112. }
  3113. },
  3114. "post": {
  3115. "produces": [
  3116. "application/json"
  3117. ],
  3118. "tags": [
  3119. "repository"
  3120. ],
  3121. "summary": "Fork a repository",
  3122. "operationId": "createFork",
  3123. "parameters": [
  3124. {
  3125. "type": "string",
  3126. "description": "owner of the repo to fork",
  3127. "name": "owner",
  3128. "in": "path",
  3129. "required": true
  3130. },
  3131. {
  3132. "type": "string",
  3133. "description": "name of the repo to fork",
  3134. "name": "repo",
  3135. "in": "path",
  3136. "required": true
  3137. },
  3138. {
  3139. "name": "body",
  3140. "in": "body",
  3141. "schema": {
  3142. "$ref": "#/definitions/CreateForkOption"
  3143. }
  3144. }
  3145. ],
  3146. "responses": {
  3147. "202": {
  3148. "$ref": "#/responses/Repository"
  3149. },
  3150. "403": {
  3151. "$ref": "#/responses/forbidden"
  3152. },
  3153. "422": {
  3154. "$ref": "#/responses/validationError"
  3155. }
  3156. }
  3157. }
  3158. },
  3159. "/repos/{owner}/{repo}/git/blobs/{sha}": {
  3160. "get": {
  3161. "produces": [
  3162. "application/json"
  3163. ],
  3164. "tags": [
  3165. "repository"
  3166. ],
  3167. "summary": "Gets the blob of a repository.",
  3168. "operationId": "GetBlob",
  3169. "parameters": [
  3170. {
  3171. "type": "string",
  3172. "description": "owner of the repo",
  3173. "name": "owner",
  3174. "in": "path",
  3175. "required": true
  3176. },
  3177. {
  3178. "type": "string",
  3179. "description": "name of the repo",
  3180. "name": "repo",
  3181. "in": "path",
  3182. "required": true
  3183. },
  3184. {
  3185. "type": "string",
  3186. "description": "sha of the commit",
  3187. "name": "sha",
  3188. "in": "path",
  3189. "required": true
  3190. }
  3191. ],
  3192. "responses": {
  3193. "200": {
  3194. "$ref": "#/responses/GitBlobResponse"
  3195. },
  3196. "400": {
  3197. "$ref": "#/responses/error"
  3198. }
  3199. }
  3200. }
  3201. },
  3202. "/repos/{owner}/{repo}/git/commits/{sha}": {
  3203. "get": {
  3204. "produces": [
  3205. "application/json"
  3206. ],
  3207. "tags": [
  3208. "repository"
  3209. ],
  3210. "summary": "Get a single commit from a repository",
  3211. "operationId": "repoGetSingleCommit",
  3212. "parameters": [
  3213. {
  3214. "type": "string",
  3215. "description": "owner of the repo",
  3216. "name": "owner",
  3217. "in": "path",
  3218. "required": true
  3219. },
  3220. {
  3221. "type": "string",
  3222. "description": "name of the repo",
  3223. "name": "repo",
  3224. "in": "path",
  3225. "required": true
  3226. },
  3227. {
  3228. "type": "string",
  3229. "description": "a git ref or commit sha",
  3230. "name": "sha",
  3231. "in": "path",
  3232. "required": true
  3233. }
  3234. ],
  3235. "responses": {
  3236. "200": {
  3237. "$ref": "#/responses/Commit"
  3238. },
  3239. "404": {
  3240. "$ref": "#/responses/notFound"
  3241. },
  3242. "422": {
  3243. "$ref": "#/responses/validationError"
  3244. }
  3245. }
  3246. }
  3247. },
  3248. "/repos/{owner}/{repo}/git/refs": {
  3249. "get": {
  3250. "produces": [
  3251. "application/json"
  3252. ],
  3253. "tags": [
  3254. "repository"
  3255. ],
  3256. "summary": "Get specified ref or filtered repository's refs",
  3257. "operationId": "repoListAllGitRefs",
  3258. "parameters": [
  3259. {
  3260. "type": "string",
  3261. "description": "owner of the repo",
  3262. "name": "owner",
  3263. "in": "path",
  3264. "required": true
  3265. },
  3266. {
  3267. "type": "string",
  3268. "description": "name of the repo",
  3269. "name": "repo",
  3270. "in": "path",
  3271. "required": true
  3272. }
  3273. ],
  3274. "responses": {
  3275. "200": {
  3276. "$ref": "#/responses/ReferenceList"
  3277. },
  3278. "404": {
  3279. "$ref": "#/responses/notFound"
  3280. }
  3281. }
  3282. }
  3283. },
  3284. "/repos/{owner}/{repo}/git/refs/{ref}": {
  3285. "get": {
  3286. "produces": [
  3287. "application/json"
  3288. ],
  3289. "tags": [
  3290. "repository"
  3291. ],
  3292. "summary": "Get specified ref or filtered repository's refs",
  3293. "operationId": "repoListGitRefs",
  3294. "parameters": [
  3295. {
  3296. "type": "string",
  3297. "description": "owner of the repo",
  3298. "name": "owner",
  3299. "in": "path",
  3300. "required": true
  3301. },
  3302. {
  3303. "type": "string",
  3304. "description": "name of the repo",
  3305. "name": "repo",
  3306. "in": "path",
  3307. "required": true
  3308. },
  3309. {
  3310. "type": "string",
  3311. "description": "part or full name of the ref",
  3312. "name": "ref",
  3313. "in": "path",
  3314. "required": true
  3315. }
  3316. ],
  3317. "responses": {
  3318. "200": {
  3319. "$ref": "#/responses/ReferenceList"
  3320. },
  3321. "404": {
  3322. "$ref": "#/responses/notFound"
  3323. }
  3324. }
  3325. }
  3326. },
  3327. "/repos/{owner}/{repo}/git/tags/{sha}": {
  3328. "get": {
  3329. "produces": [
  3330. "application/json"
  3331. ],
  3332. "tags": [
  3333. "repository"
  3334. ],
  3335. "summary": "Gets the tag object of an annotated tag (not lightweight tags)",
  3336. "operationId": "GetTag",
  3337. "parameters": [
  3338. {
  3339. "type": "string",
  3340. "description": "owner of the repo",
  3341. "name": "owner",
  3342. "in": "path",
  3343. "required": true
  3344. },
  3345. {
  3346. "type": "string",
  3347. "description": "name of the repo",
  3348. "name": "repo",
  3349. "in": "path",
  3350. "required": true
  3351. },
  3352. {
  3353. "type": "string",
  3354. "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.",
  3355. "name": "sha",
  3356. "in": "path",
  3357. "required": true
  3358. }
  3359. ],
  3360. "responses": {
  3361. "200": {
  3362. "$ref": "#/responses/AnnotatedTag"
  3363. },
  3364. "400": {
  3365. "$ref": "#/responses/error"
  3366. }
  3367. }
  3368. }
  3369. },
  3370. "/repos/{owner}/{repo}/git/trees/{sha}": {
  3371. "get": {
  3372. "produces": [
  3373. "application/json"
  3374. ],
  3375. "tags": [
  3376. "repository"
  3377. ],
  3378. "summary": "Gets the tree of a repository.",
  3379. "operationId": "GetTree",
  3380. "parameters": [
  3381. {
  3382. "type": "string",
  3383. "description": "owner of the repo",
  3384. "name": "owner",
  3385. "in": "path",
  3386. "required": true
  3387. },
  3388. {
  3389. "type": "string",
  3390. "description": "name of the repo",
  3391. "name": "repo",
  3392. "in": "path",
  3393. "required": true
  3394. },
  3395. {
  3396. "type": "string",
  3397. "description": "sha of the commit",
  3398. "name": "sha",
  3399. "in": "path",
  3400. "required": true
  3401. },
  3402. {
  3403. "type": "boolean",
  3404. "description": "show all directories and files",
  3405. "name": "recursive",
  3406. "in": "query"
  3407. },
  3408. {
  3409. "type": "integer",
  3410. "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",
  3411. "name": "page",
  3412. "in": "query"
  3413. },
  3414. {
  3415. "type": "integer",
  3416. "description": "number of items per page",
  3417. "name": "per_page",
  3418. "in": "query"
  3419. }
  3420. ],
  3421. "responses": {
  3422. "200": {
  3423. "$ref": "#/responses/GitTreeResponse"
  3424. },
  3425. "400": {
  3426. "$ref": "#/responses/error"
  3427. }
  3428. }
  3429. }
  3430. },
  3431. "/repos/{owner}/{repo}/hooks": {
  3432. "get": {
  3433. "produces": [
  3434. "application/json"
  3435. ],
  3436. "tags": [
  3437. "repository"
  3438. ],
  3439. "summary": "List the hooks in a repository",
  3440. "operationId": "repoListHooks",
  3441. "parameters": [
  3442. {
  3443. "type": "string",
  3444. "description": "owner of the repo",
  3445. "name": "owner",
  3446. "in": "path",
  3447. "required": true
  3448. },
  3449. {
  3450. "type": "string",
  3451. "description": "name of the repo",
  3452. "name": "repo",
  3453. "in": "path",
  3454. "required": true
  3455. },
  3456. {
  3457. "type": "integer",
  3458. "description": "page number of results to return (1-based)",
  3459. "name": "page",
  3460. "in": "query"
  3461. },
  3462. {
  3463. "type": "integer",
  3464. "description": "page size of results",
  3465. "name": "limit",
  3466. "in": "query"
  3467. }
  3468. ],
  3469. "responses": {
  3470. "200": {
  3471. "$ref": "#/responses/HookList"
  3472. }
  3473. }
  3474. },
  3475. "post": {
  3476. "consumes": [
  3477. "application/json"
  3478. ],
  3479. "produces": [
  3480. "application/json"
  3481. ],
  3482. "tags": [
  3483. "repository"
  3484. ],
  3485. "summary": "Create a hook",
  3486. "operationId": "repoCreateHook",
  3487. "parameters": [
  3488. {
  3489. "type": "string",
  3490. "description": "owner of the repo",
  3491. "name": "owner",
  3492. "in": "path",
  3493. "required": true
  3494. },
  3495. {
  3496. "type": "string",
  3497. "description": "name of the repo",
  3498. "name": "repo",
  3499. "in": "path",
  3500. "required": true
  3501. },
  3502. {
  3503. "name": "body",
  3504. "in": "body",
  3505. "schema": {
  3506. "$ref": "#/definitions/CreateHookOption"
  3507. }
  3508. }
  3509. ],
  3510. "responses": {
  3511. "201": {
  3512. "$ref": "#/responses/Hook"
  3513. }
  3514. }
  3515. }
  3516. },
  3517. "/repos/{owner}/{repo}/hooks/git": {
  3518. "get": {
  3519. "produces": [
  3520. "application/json"
  3521. ],
  3522. "tags": [
  3523. "repository"
  3524. ],
  3525. "summary": "List the Git hooks in a repository",
  3526. "operationId": "repoListGitHooks",
  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/GitHookList"
  3546. }
  3547. }
  3548. }
  3549. },
  3550. "/repos/{owner}/{repo}/hooks/git/{id}": {
  3551. "get": {
  3552. "produces": [
  3553. "application/json"
  3554. ],
  3555. "tags": [
  3556. "repository"
  3557. ],
  3558. "summary": "Get a Git hook",
  3559. "operationId": "repoGetGitHook",
  3560. "parameters": [
  3561. {
  3562. "type": "string",
  3563. "description": "owner of the repo",
  3564. "name": "owner",
  3565. "in": "path",
  3566. "required": true
  3567. },
  3568. {
  3569. "type": "string",
  3570. "description": "name of the repo",
  3571. "name": "repo",
  3572. "in": "path",
  3573. "required": true
  3574. },
  3575. {
  3576. "type": "string",
  3577. "description": "id of the hook to get",
  3578. "name": "id",
  3579. "in": "path",
  3580. "required": true
  3581. }
  3582. ],
  3583. "responses": {
  3584. "200": {
  3585. "$ref": "#/responses/GitHook"
  3586. },
  3587. "404": {
  3588. "$ref": "#/responses/notFound"
  3589. }
  3590. }
  3591. },
  3592. "delete": {
  3593. "produces": [
  3594. "application/json"
  3595. ],
  3596. "tags": [
  3597. "repository"
  3598. ],
  3599. "summary": "Delete a Git hook in a repository",
  3600. "operationId": "repoDeleteGitHook",
  3601. "parameters": [
  3602. {
  3603. "type": "string",
  3604. "description": "owner of the repo",
  3605. "name": "owner",
  3606. "in": "path",
  3607. "required": true
  3608. },
  3609. {
  3610. "type": "string",
  3611. "description": "name of the repo",
  3612. "name": "repo",
  3613. "in": "path",
  3614. "required": true
  3615. },
  3616. {
  3617. "type": "string",
  3618. "description": "id of the hook to get",
  3619. "name": "id",
  3620. "in": "path",
  3621. "required": true
  3622. }
  3623. ],
  3624. "responses": {
  3625. "204": {
  3626. "$ref": "#/responses/empty"
  3627. },
  3628. "404": {
  3629. "$ref": "#/responses/notFound"
  3630. }
  3631. }
  3632. },
  3633. "patch": {
  3634. "produces": [
  3635. "application/json"
  3636. ],
  3637. "tags": [
  3638. "repository"
  3639. ],
  3640. "summary": "Edit a Git hook in a repository",
  3641. "operationId": "repoEditGitHook",
  3642. "parameters": [
  3643. {
  3644. "type": "string",
  3645. "description": "owner of the repo",
  3646. "name": "owner",
  3647. "in": "path",
  3648. "required": true
  3649. },
  3650. {
  3651. "type": "string",
  3652. "description": "name of the repo",
  3653. "name": "repo",
  3654. "in": "path",
  3655. "required": true
  3656. },
  3657. {
  3658. "type": "string",
  3659. "description": "id of the hook to get",
  3660. "name": "id",
  3661. "in": "path",
  3662. "required": true
  3663. },
  3664. {
  3665. "name": "body",
  3666. "in": "body",
  3667. "schema": {
  3668. "$ref": "#/definitions/EditGitHookOption"
  3669. }
  3670. }
  3671. ],
  3672. "responses": {
  3673. "200": {
  3674. "$ref": "#/responses/GitHook"
  3675. },
  3676. "404": {
  3677. "$ref": "#/responses/notFound"
  3678. }
  3679. }
  3680. }
  3681. },
  3682. "/repos/{owner}/{repo}/hooks/{id}": {
  3683. "get": {
  3684. "produces": [
  3685. "application/json"
  3686. ],
  3687. "tags": [
  3688. "repository"
  3689. ],
  3690. "summary": "Get a hook",
  3691. "operationId": "repoGetHook",
  3692. "parameters": [
  3693. {
  3694. "type": "string",
  3695. "description": "owner of the repo",
  3696. "name": "owner",
  3697. "in": "path",
  3698. "required": true
  3699. },
  3700. {
  3701. "type": "string",
  3702. "description": "name of the repo",
  3703. "name": "repo",
  3704. "in": "path",
  3705. "required": true
  3706. },
  3707. {
  3708. "type": "integer",
  3709. "format": "int64",
  3710. "description": "id of the hook to get",
  3711. "name": "id",
  3712. "in": "path",
  3713. "required": true
  3714. }
  3715. ],
  3716. "responses": {
  3717. "200": {
  3718. "$ref": "#/responses/Hook"
  3719. },
  3720. "404": {
  3721. "$ref": "#/responses/notFound"
  3722. }
  3723. }
  3724. },
  3725. "delete": {
  3726. "produces": [
  3727. "application/json"
  3728. ],
  3729. "tags": [
  3730. "repository"
  3731. ],
  3732. "summary": "Delete a hook in a repository",
  3733. "operationId": "repoDeleteHook",
  3734. "parameters": [
  3735. {
  3736. "type": "string",
  3737. "description": "owner of the repo",
  3738. "name": "owner",
  3739. "in": "path",
  3740. "required": true
  3741. },
  3742. {
  3743. "type": "string",
  3744. "description": "name of the repo",
  3745. "name": "repo",
  3746. "in": "path",
  3747. "required": true
  3748. },
  3749. {
  3750. "type": "integer",
  3751. "format": "int64",
  3752. "description": "id of the hook to delete",
  3753. "name": "id",
  3754. "in": "path",
  3755. "required": true
  3756. }
  3757. ],
  3758. "responses": {
  3759. "204": {
  3760. "$ref": "#/responses/empty"
  3761. },
  3762. "404": {
  3763. "$ref": "#/responses/notFound"
  3764. }
  3765. }
  3766. },
  3767. "patch": {
  3768. "produces": [
  3769. "application/json"
  3770. ],
  3771. "tags": [
  3772. "repository"
  3773. ],
  3774. "summary": "Edit a hook in a repository",
  3775. "operationId": "repoEditHook",
  3776. "parameters": [
  3777. {
  3778. "type": "string",
  3779. "description": "owner of the repo",
  3780. "name": "owner",
  3781. "in": "path",
  3782. "required": true
  3783. },
  3784. {
  3785. "type": "string",
  3786. "description": "name of the repo",
  3787. "name": "repo",
  3788. "in": "path",
  3789. "required": true
  3790. },
  3791. {
  3792. "type": "integer",
  3793. "format": "int64",
  3794. "description": "index of the hook",
  3795. "name": "id",
  3796. "in": "path",
  3797. "required": true
  3798. },
  3799. {
  3800. "name": "body",
  3801. "in": "body",
  3802. "schema": {
  3803. "$ref": "#/definitions/EditHookOption"
  3804. }
  3805. }
  3806. ],
  3807. "responses": {
  3808. "200": {
  3809. "$ref": "#/responses/Hook"
  3810. }
  3811. }
  3812. }
  3813. },
  3814. "/repos/{owner}/{repo}/hooks/{id}/tests": {
  3815. "post": {
  3816. "produces": [
  3817. "application/json"
  3818. ],
  3819. "tags": [
  3820. "repository"
  3821. ],
  3822. "summary": "Test a push webhook",
  3823. "operationId": "repoTestHook",
  3824. "parameters": [
  3825. {
  3826. "type": "string",
  3827. "description": "owner of the repo",
  3828. "name": "owner",
  3829. "in": "path",
  3830. "required": true
  3831. },
  3832. {
  3833. "type": "string",
  3834. "description": "name of the repo",
  3835. "name": "repo",
  3836. "in": "path",
  3837. "required": true
  3838. },
  3839. {
  3840. "type": "integer",
  3841. "format": "int64",
  3842. "description": "id of the hook to test",
  3843. "name": "id",
  3844. "in": "path",
  3845. "required": true
  3846. }
  3847. ],
  3848. "responses": {
  3849. "204": {
  3850. "$ref": "#/responses/empty"
  3851. }
  3852. }
  3853. }
  3854. },
  3855. "/repos/{owner}/{repo}/issue_templates": {
  3856. "get": {
  3857. "produces": [
  3858. "application/json"
  3859. ],
  3860. "tags": [
  3861. "repository"
  3862. ],
  3863. "summary": "Get available issue templates for a repository",
  3864. "operationId": "repoGetIssueTemplates",
  3865. "parameters": [
  3866. {
  3867. "type": "string",
  3868. "description": "owner of the repo",
  3869. "name": "owner",
  3870. "in": "path",
  3871. "required": true
  3872. },
  3873. {
  3874. "type": "string",
  3875. "description": "name of the repo",
  3876. "name": "repo",
  3877. "in": "path",
  3878. "required": true
  3879. }
  3880. ],
  3881. "responses": {
  3882. "200": {
  3883. "$ref": "#/responses/IssueTemplates"
  3884. }
  3885. }
  3886. }
  3887. },
  3888. "/repos/{owner}/{repo}/issues": {
  3889. "get": {
  3890. "produces": [
  3891. "application/json"
  3892. ],
  3893. "tags": [
  3894. "issue"
  3895. ],
  3896. "summary": "List a repository's issues",
  3897. "operationId": "issueListIssues",
  3898. "parameters": [
  3899. {
  3900. "type": "string",
  3901. "description": "owner of the repo",
  3902. "name": "owner",
  3903. "in": "path",
  3904. "required": true
  3905. },
  3906. {
  3907. "type": "string",
  3908. "description": "name of the repo",
  3909. "name": "repo",
  3910. "in": "path",
  3911. "required": true
  3912. },
  3913. {
  3914. "enum": [
  3915. "closed",
  3916. "open",
  3917. "all"
  3918. ],
  3919. "type": "string",
  3920. "description": "whether issue is open or closed",
  3921. "name": "state",
  3922. "in": "query"
  3923. },
  3924. {
  3925. "type": "string",
  3926. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  3927. "name": "labels",
  3928. "in": "query"
  3929. },
  3930. {
  3931. "type": "string",
  3932. "description": "search string",
  3933. "name": "q",
  3934. "in": "query"
  3935. },
  3936. {
  3937. "enum": [
  3938. "issues",
  3939. "pulls"
  3940. ],
  3941. "type": "string",
  3942. "description": "filter by type (issues / pulls) if set",
  3943. "name": "type",
  3944. "in": "query"
  3945. },
  3946. {
  3947. "type": "string",
  3948. "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",
  3949. "name": "milestones",
  3950. "in": "query"
  3951. },
  3952. {
  3953. "type": "integer",
  3954. "description": "page number of results to return (1-based)",
  3955. "name": "page",
  3956. "in": "query"
  3957. },
  3958. {
  3959. "type": "integer",
  3960. "description": "page size of results",
  3961. "name": "limit",
  3962. "in": "query"
  3963. }
  3964. ],
  3965. "responses": {
  3966. "200": {
  3967. "$ref": "#/responses/IssueList"
  3968. }
  3969. }
  3970. },
  3971. "post": {
  3972. "consumes": [
  3973. "application/json"
  3974. ],
  3975. "produces": [
  3976. "application/json"
  3977. ],
  3978. "tags": [
  3979. "issue"
  3980. ],
  3981. "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  3982. "operationId": "issueCreateIssue",
  3983. "parameters": [
  3984. {
  3985. "type": "string",
  3986. "description": "owner of the repo",
  3987. "name": "owner",
  3988. "in": "path",
  3989. "required": true
  3990. },
  3991. {
  3992. "type": "string",
  3993. "description": "name of the repo",
  3994. "name": "repo",
  3995. "in": "path",
  3996. "required": true
  3997. },
  3998. {
  3999. "name": "body",
  4000. "in": "body",
  4001. "schema": {
  4002. "$ref": "#/definitions/CreateIssueOption"
  4003. }
  4004. }
  4005. ],
  4006. "responses": {
  4007. "201": {
  4008. "$ref": "#/responses/Issue"
  4009. },
  4010. "403": {
  4011. "$ref": "#/responses/forbidden"
  4012. },
  4013. "412": {
  4014. "$ref": "#/responses/error"
  4015. },
  4016. "422": {
  4017. "$ref": "#/responses/validationError"
  4018. }
  4019. }
  4020. }
  4021. },
  4022. "/repos/{owner}/{repo}/issues/comments": {
  4023. "get": {
  4024. "produces": [
  4025. "application/json"
  4026. ],
  4027. "tags": [
  4028. "issue"
  4029. ],
  4030. "summary": "List all comments in a repository",
  4031. "operationId": "issueGetRepoComments",
  4032. "parameters": [
  4033. {
  4034. "type": "string",
  4035. "description": "owner of the repo",
  4036. "name": "owner",
  4037. "in": "path",
  4038. "required": true
  4039. },
  4040. {
  4041. "type": "string",
  4042. "description": "name of the repo",
  4043. "name": "repo",
  4044. "in": "path",
  4045. "required": true
  4046. },
  4047. {
  4048. "type": "string",
  4049. "format": "date-time",
  4050. "description": "if provided, only comments updated since the provided time are returned.",
  4051. "name": "since",
  4052. "in": "query"
  4053. },
  4054. {
  4055. "type": "string",
  4056. "format": "date-time",
  4057. "description": "if provided, only comments updated before the provided time are returned.",
  4058. "name": "before",
  4059. "in": "query"
  4060. },
  4061. {
  4062. "type": "integer",
  4063. "description": "page number of results to return (1-based)",
  4064. "name": "page",
  4065. "in": "query"
  4066. },
  4067. {
  4068. "type": "integer",
  4069. "description": "page size of results",
  4070. "name": "limit",
  4071. "in": "query"
  4072. }
  4073. ],
  4074. "responses": {
  4075. "200": {
  4076. "$ref": "#/responses/CommentList"
  4077. }
  4078. }
  4079. }
  4080. },
  4081. "/repos/{owner}/{repo}/issues/comments/{id}": {
  4082. "get": {
  4083. "consumes": [
  4084. "application/json"
  4085. ],
  4086. "produces": [
  4087. "application/json"
  4088. ],
  4089. "tags": [
  4090. "issue"
  4091. ],
  4092. "summary": "Get a comment",
  4093. "operationId": "issueGetComment",
  4094. "parameters": [
  4095. {
  4096. "type": "string",
  4097. "description": "owner of the repo",
  4098. "name": "owner",
  4099. "in": "path",
  4100. "required": true
  4101. },
  4102. {
  4103. "type": "string",
  4104. "description": "name of the repo",
  4105. "name": "repo",
  4106. "in": "path",
  4107. "required": true
  4108. },
  4109. {
  4110. "type": "integer",
  4111. "format": "int64",
  4112. "description": "id of the comment",
  4113. "name": "id",
  4114. "in": "path",
  4115. "required": true
  4116. }
  4117. ],
  4118. "responses": {
  4119. "200": {
  4120. "$ref": "#/responses/Comment"
  4121. },
  4122. "204": {
  4123. "$ref": "#/responses/empty"
  4124. },
  4125. "403": {
  4126. "$ref": "#/responses/forbidden"
  4127. },
  4128. "404": {
  4129. "$ref": "#/responses/notFound"
  4130. }
  4131. }
  4132. },
  4133. "delete": {
  4134. "tags": [
  4135. "issue"
  4136. ],
  4137. "summary": "Delete a comment",
  4138. "operationId": "issueDeleteComment",
  4139. "parameters": [
  4140. {
  4141. "type": "string",
  4142. "description": "owner of the repo",
  4143. "name": "owner",
  4144. "in": "path",
  4145. "required": true
  4146. },
  4147. {
  4148. "type": "string",
  4149. "description": "name of the repo",
  4150. "name": "repo",
  4151. "in": "path",
  4152. "required": true
  4153. },
  4154. {
  4155. "type": "integer",
  4156. "format": "int64",
  4157. "description": "id of comment to delete",
  4158. "name": "id",
  4159. "in": "path",
  4160. "required": true
  4161. }
  4162. ],
  4163. "responses": {
  4164. "204": {
  4165. "$ref": "#/responses/empty"
  4166. },
  4167. "403": {
  4168. "$ref": "#/responses/forbidden"
  4169. },
  4170. "404": {
  4171. "$ref": "#/responses/notFound"
  4172. }
  4173. }
  4174. },
  4175. "patch": {
  4176. "consumes": [
  4177. "application/json"
  4178. ],
  4179. "produces": [
  4180. "application/json"
  4181. ],
  4182. "tags": [
  4183. "issue"
  4184. ],
  4185. "summary": "Edit a comment",
  4186. "operationId": "issueEditComment",
  4187. "parameters": [
  4188. {
  4189. "type": "string",
  4190. "description": "owner of the repo",
  4191. "name": "owner",
  4192. "in": "path",
  4193. "required": true
  4194. },
  4195. {
  4196. "type": "string",
  4197. "description": "name of the repo",
  4198. "name": "repo",
  4199. "in": "path",
  4200. "required": true
  4201. },
  4202. {
  4203. "type": "integer",
  4204. "format": "int64",
  4205. "description": "id of the comment to edit",
  4206. "name": "id",
  4207. "in": "path",
  4208. "required": true
  4209. },
  4210. {
  4211. "name": "body",
  4212. "in": "body",
  4213. "schema": {
  4214. "$ref": "#/definitions/EditIssueCommentOption"
  4215. }
  4216. }
  4217. ],
  4218. "responses": {
  4219. "200": {
  4220. "$ref": "#/responses/Comment"
  4221. },
  4222. "204": {
  4223. "$ref": "#/responses/empty"
  4224. },
  4225. "403": {
  4226. "$ref": "#/responses/forbidden"
  4227. },
  4228. "404": {
  4229. "$ref": "#/responses/notFound"
  4230. }
  4231. }
  4232. }
  4233. },
  4234. "/repos/{owner}/{repo}/issues/comments/{id}/reactions": {
  4235. "get": {
  4236. "consumes": [
  4237. "application/json"
  4238. ],
  4239. "produces": [
  4240. "application/json"
  4241. ],
  4242. "tags": [
  4243. "issue"
  4244. ],
  4245. "summary": "Get a list of reactions from a comment of an issue",
  4246. "operationId": "issueGetCommentReactions",
  4247. "parameters": [
  4248. {
  4249. "type": "string",
  4250. "description": "owner of the repo",
  4251. "name": "owner",
  4252. "in": "path",
  4253. "required": true
  4254. },
  4255. {
  4256. "type": "string",
  4257. "description": "name of the repo",
  4258. "name": "repo",
  4259. "in": "path",
  4260. "required": true
  4261. },
  4262. {
  4263. "type": "integer",
  4264. "format": "int64",
  4265. "description": "id of the comment to edit",
  4266. "name": "id",
  4267. "in": "path",
  4268. "required": true
  4269. }
  4270. ],
  4271. "responses": {
  4272. "200": {
  4273. "$ref": "#/responses/ReactionList"
  4274. },
  4275. "403": {
  4276. "$ref": "#/responses/forbidden"
  4277. }
  4278. }
  4279. },
  4280. "post": {
  4281. "consumes": [
  4282. "application/json"
  4283. ],
  4284. "produces": [
  4285. "application/json"
  4286. ],
  4287. "tags": [
  4288. "issue"
  4289. ],
  4290. "summary": "Add a reaction to a comment of an issue",
  4291. "operationId": "issuePostCommentReaction",
  4292. "parameters": [
  4293. {
  4294. "type": "string",
  4295. "description": "owner of the repo",
  4296. "name": "owner",
  4297. "in": "path",
  4298. "required": true
  4299. },
  4300. {
  4301. "type": "string",
  4302. "description": "name of the repo",
  4303. "name": "repo",
  4304. "in": "path",
  4305. "required": true
  4306. },
  4307. {
  4308. "type": "integer",
  4309. "format": "int64",
  4310. "description": "id of the comment to edit",
  4311. "name": "id",
  4312. "in": "path",
  4313. "required": true
  4314. },
  4315. {
  4316. "name": "content",
  4317. "in": "body",
  4318. "schema": {
  4319. "$ref": "#/definitions/EditReactionOption"
  4320. }
  4321. }
  4322. ],
  4323. "responses": {
  4324. "200": {
  4325. "$ref": "#/responses/Reaction"
  4326. },
  4327. "201": {
  4328. "$ref": "#/responses/Reaction"
  4329. },
  4330. "403": {
  4331. "$ref": "#/responses/forbidden"
  4332. }
  4333. }
  4334. },
  4335. "delete": {
  4336. "consumes": [
  4337. "application/json"
  4338. ],
  4339. "produces": [
  4340. "application/json"
  4341. ],
  4342. "tags": [
  4343. "issue"
  4344. ],
  4345. "summary": "Remove a reaction from a comment of an issue",
  4346. "operationId": "issueDeleteCommentReaction",
  4347. "parameters": [
  4348. {
  4349. "type": "string",
  4350. "description": "owner of the repo",
  4351. "name": "owner",
  4352. "in": "path",
  4353. "required": true
  4354. },
  4355. {
  4356. "type": "string",
  4357. "description": "name of the repo",
  4358. "name": "repo",
  4359. "in": "path",
  4360. "required": true
  4361. },
  4362. {
  4363. "type": "integer",
  4364. "format": "int64",
  4365. "description": "id of the comment to edit",
  4366. "name": "id",
  4367. "in": "path",
  4368. "required": true
  4369. },
  4370. {
  4371. "name": "content",
  4372. "in": "body",
  4373. "schema": {
  4374. "$ref": "#/definitions/EditReactionOption"
  4375. }
  4376. }
  4377. ],
  4378. "responses": {
  4379. "200": {
  4380. "$ref": "#/responses/empty"
  4381. },
  4382. "403": {
  4383. "$ref": "#/responses/forbidden"
  4384. }
  4385. }
  4386. }
  4387. },
  4388. "/repos/{owner}/{repo}/issues/{index}": {
  4389. "get": {
  4390. "produces": [
  4391. "application/json"
  4392. ],
  4393. "tags": [
  4394. "issue"
  4395. ],
  4396. "summary": "Get an issue",
  4397. "operationId": "issueGetIssue",
  4398. "parameters": [
  4399. {
  4400. "type": "string",
  4401. "description": "owner of the repo",
  4402. "name": "owner",
  4403. "in": "path",
  4404. "required": true
  4405. },
  4406. {
  4407. "type": "string",
  4408. "description": "name of the repo",
  4409. "name": "repo",
  4410. "in": "path",
  4411. "required": true
  4412. },
  4413. {
  4414. "type": "integer",
  4415. "format": "int64",
  4416. "description": "index of the issue to get",
  4417. "name": "index",
  4418. "in": "path",
  4419. "required": true
  4420. }
  4421. ],
  4422. "responses": {
  4423. "200": {
  4424. "$ref": "#/responses/Issue"
  4425. },
  4426. "404": {
  4427. "$ref": "#/responses/notFound"
  4428. }
  4429. }
  4430. },
  4431. "patch": {
  4432. "consumes": [
  4433. "application/json"
  4434. ],
  4435. "produces": [
  4436. "application/json"
  4437. ],
  4438. "tags": [
  4439. "issue"
  4440. ],
  4441. "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  4442. "operationId": "issueEditIssue",
  4443. "parameters": [
  4444. {
  4445. "type": "string",
  4446. "description": "owner of the repo",
  4447. "name": "owner",
  4448. "in": "path",
  4449. "required": true
  4450. },
  4451. {
  4452. "type": "string",
  4453. "description": "name of the repo",
  4454. "name": "repo",
  4455. "in": "path",
  4456. "required": true
  4457. },
  4458. {
  4459. "type": "integer",
  4460. "format": "int64",
  4461. "description": "index of the issue to edit",
  4462. "name": "index",
  4463. "in": "path",
  4464. "required": true
  4465. },
  4466. {
  4467. "name": "body",
  4468. "in": "body",
  4469. "schema": {
  4470. "$ref": "#/definitions/EditIssueOption"
  4471. }
  4472. }
  4473. ],
  4474. "responses": {
  4475. "201": {
  4476. "$ref": "#/responses/Issue"
  4477. },
  4478. "403": {
  4479. "$ref": "#/responses/forbidden"
  4480. },
  4481. "404": {
  4482. "$ref": "#/responses/notFound"
  4483. },
  4484. "412": {
  4485. "$ref": "#/responses/error"
  4486. }
  4487. }
  4488. }
  4489. },
  4490. "/repos/{owner}/{repo}/issues/{index}/comments": {
  4491. "get": {
  4492. "produces": [
  4493. "application/json"
  4494. ],
  4495. "tags": [
  4496. "issue"
  4497. ],
  4498. "summary": "List all comments on an issue",
  4499. "operationId": "issueGetComments",
  4500. "parameters": [
  4501. {
  4502. "type": "string",
  4503. "description": "owner of the repo",
  4504. "name": "owner",
  4505. "in": "path",
  4506. "required": true
  4507. },
  4508. {
  4509. "type": "string",
  4510. "description": "name of the repo",
  4511. "name": "repo",
  4512. "in": "path",
  4513. "required": true
  4514. },
  4515. {
  4516. "type": "integer",
  4517. "format": "int64",
  4518. "description": "index of the issue",
  4519. "name": "index",
  4520. "in": "path",
  4521. "required": true
  4522. },
  4523. {
  4524. "type": "string",
  4525. "format": "date-time",
  4526. "description": "if provided, only comments updated since the specified time are returned.",
  4527. "name": "since",
  4528. "in": "query"
  4529. },
  4530. {
  4531. "type": "string",
  4532. "format": "date-time",
  4533. "description": "if provided, only comments updated before the provided time are returned.",
  4534. "name": "before",
  4535. "in": "query"
  4536. }
  4537. ],
  4538. "responses": {
  4539. "200": {
  4540. "$ref": "#/responses/CommentList"
  4541. }
  4542. }
  4543. },
  4544. "post": {
  4545. "consumes": [
  4546. "application/json"
  4547. ],
  4548. "produces": [
  4549. "application/json"
  4550. ],
  4551. "tags": [
  4552. "issue"
  4553. ],
  4554. "summary": "Add a comment to an issue",
  4555. "operationId": "issueCreateComment",
  4556. "parameters": [
  4557. {
  4558. "type": "string",
  4559. "description": "owner of the repo",
  4560. "name": "owner",
  4561. "in": "path",
  4562. "required": true
  4563. },
  4564. {
  4565. "type": "string",
  4566. "description": "name of the repo",
  4567. "name": "repo",
  4568. "in": "path",
  4569. "required": true
  4570. },
  4571. {
  4572. "type": "integer",
  4573. "format": "int64",
  4574. "description": "index of the issue",
  4575. "name": "index",
  4576. "in": "path",
  4577. "required": true
  4578. },
  4579. {
  4580. "name": "body",
  4581. "in": "body",
  4582. "schema": {
  4583. "$ref": "#/definitions/CreateIssueCommentOption"
  4584. }
  4585. }
  4586. ],
  4587. "responses": {
  4588. "201": {
  4589. "$ref": "#/responses/Comment"
  4590. },
  4591. "403": {
  4592. "$ref": "#/responses/forbidden"
  4593. }
  4594. }
  4595. }
  4596. },
  4597. "/repos/{owner}/{repo}/issues/{index}/comments/{id}": {
  4598. "delete": {
  4599. "tags": [
  4600. "issue"
  4601. ],
  4602. "summary": "Delete a comment",
  4603. "operationId": "issueDeleteCommentDeprecated",
  4604. "deprecated": true,
  4605. "parameters": [
  4606. {
  4607. "type": "string",
  4608. "description": "owner of the repo",
  4609. "name": "owner",
  4610. "in": "path",
  4611. "required": true
  4612. },
  4613. {
  4614. "type": "string",
  4615. "description": "name of the repo",
  4616. "name": "repo",
  4617. "in": "path",
  4618. "required": true
  4619. },
  4620. {
  4621. "type": "integer",
  4622. "description": "this parameter is ignored",
  4623. "name": "index",
  4624. "in": "path",
  4625. "required": true
  4626. },
  4627. {
  4628. "type": "integer",
  4629. "format": "int64",
  4630. "description": "id of comment to delete",
  4631. "name": "id",
  4632. "in": "path",
  4633. "required": true
  4634. }
  4635. ],
  4636. "responses": {
  4637. "204": {
  4638. "$ref": "#/responses/empty"
  4639. },
  4640. "403": {
  4641. "$ref": "#/responses/forbidden"
  4642. },
  4643. "404": {
  4644. "$ref": "#/responses/notFound"
  4645. }
  4646. }
  4647. },
  4648. "patch": {
  4649. "consumes": [
  4650. "application/json"
  4651. ],
  4652. "produces": [
  4653. "application/json"
  4654. ],
  4655. "tags": [
  4656. "issue"
  4657. ],
  4658. "summary": "Edit a comment",
  4659. "operationId": "issueEditCommentDeprecated",
  4660. "deprecated": true,
  4661. "parameters": [
  4662. {
  4663. "type": "string",
  4664. "description": "owner of the repo",
  4665. "name": "owner",
  4666. "in": "path",
  4667. "required": true
  4668. },
  4669. {
  4670. "type": "string",
  4671. "description": "name of the repo",
  4672. "name": "repo",
  4673. "in": "path",
  4674. "required": true
  4675. },
  4676. {
  4677. "type": "integer",
  4678. "description": "this parameter is ignored",
  4679. "name": "index",
  4680. "in": "path",
  4681. "required": true
  4682. },
  4683. {
  4684. "type": "integer",
  4685. "format": "int64",
  4686. "description": "id of the comment to edit",
  4687. "name": "id",
  4688. "in": "path",
  4689. "required": true
  4690. },
  4691. {
  4692. "name": "body",
  4693. "in": "body",
  4694. "schema": {
  4695. "$ref": "#/definitions/EditIssueCommentOption"
  4696. }
  4697. }
  4698. ],
  4699. "responses": {
  4700. "200": {
  4701. "$ref": "#/responses/Comment"
  4702. },
  4703. "204": {
  4704. "$ref": "#/responses/empty"
  4705. },
  4706. "403": {
  4707. "$ref": "#/responses/forbidden"
  4708. },
  4709. "404": {
  4710. "$ref": "#/responses/notFound"
  4711. }
  4712. }
  4713. }
  4714. },
  4715. "/repos/{owner}/{repo}/issues/{index}/deadline": {
  4716. "post": {
  4717. "consumes": [
  4718. "application/json"
  4719. ],
  4720. "produces": [
  4721. "application/json"
  4722. ],
  4723. "tags": [
  4724. "issue"
  4725. ],
  4726. "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.",
  4727. "operationId": "issueEditIssueDeadline",
  4728. "parameters": [
  4729. {
  4730. "type": "string",
  4731. "description": "owner of the repo",
  4732. "name": "owner",
  4733. "in": "path",
  4734. "required": true
  4735. },
  4736. {
  4737. "type": "string",
  4738. "description": "name of the repo",
  4739. "name": "repo",
  4740. "in": "path",
  4741. "required": true
  4742. },
  4743. {
  4744. "type": "integer",
  4745. "format": "int64",
  4746. "description": "index of the issue to create or update a deadline on",
  4747. "name": "index",
  4748. "in": "path",
  4749. "required": true
  4750. },
  4751. {
  4752. "name": "body",
  4753. "in": "body",
  4754. "schema": {
  4755. "$ref": "#/definitions/EditDeadlineOption"
  4756. }
  4757. }
  4758. ],
  4759. "responses": {
  4760. "201": {
  4761. "$ref": "#/responses/IssueDeadline"
  4762. },
  4763. "403": {
  4764. "$ref": "#/responses/forbidden"
  4765. },
  4766. "404": {
  4767. "$ref": "#/responses/notFound"
  4768. }
  4769. }
  4770. }
  4771. },
  4772. "/repos/{owner}/{repo}/issues/{index}/labels": {
  4773. "get": {
  4774. "produces": [
  4775. "application/json"
  4776. ],
  4777. "tags": [
  4778. "issue"
  4779. ],
  4780. "summary": "Get an issue's labels",
  4781. "operationId": "issueGetLabels",
  4782. "parameters": [
  4783. {
  4784. "type": "string",
  4785. "description": "owner of the repo",
  4786. "name": "owner",
  4787. "in": "path",
  4788. "required": true
  4789. },
  4790. {
  4791. "type": "string",
  4792. "description": "name of the repo",
  4793. "name": "repo",
  4794. "in": "path",
  4795. "required": true
  4796. },
  4797. {
  4798. "type": "integer",
  4799. "format": "int64",
  4800. "description": "index of the issue",
  4801. "name": "index",
  4802. "in": "path",
  4803. "required": true
  4804. }
  4805. ],
  4806. "responses": {
  4807. "200": {
  4808. "$ref": "#/responses/LabelList"
  4809. },
  4810. "404": {
  4811. "$ref": "#/responses/notFound"
  4812. }
  4813. }
  4814. },
  4815. "put": {
  4816. "consumes": [
  4817. "application/json"
  4818. ],
  4819. "produces": [
  4820. "application/json"
  4821. ],
  4822. "tags": [
  4823. "issue"
  4824. ],
  4825. "summary": "Replace an issue's labels",
  4826. "operationId": "issueReplaceLabels",
  4827. "parameters": [
  4828. {
  4829. "type": "string",
  4830. "description": "owner of the repo",
  4831. "name": "owner",
  4832. "in": "path",
  4833. "required": true
  4834. },
  4835. {
  4836. "type": "string",
  4837. "description": "name of the repo",
  4838. "name": "repo",
  4839. "in": "path",
  4840. "required": true
  4841. },
  4842. {
  4843. "type": "integer",
  4844. "format": "int64",
  4845. "description": "index of the issue",
  4846. "name": "index",
  4847. "in": "path",
  4848. "required": true
  4849. },
  4850. {
  4851. "name": "body",
  4852. "in": "body",
  4853. "schema": {
  4854. "$ref": "#/definitions/IssueLabelsOption"
  4855. }
  4856. }
  4857. ],
  4858. "responses": {
  4859. "200": {
  4860. "$ref": "#/responses/LabelList"
  4861. },
  4862. "403": {
  4863. "$ref": "#/responses/forbidden"
  4864. }
  4865. }
  4866. },
  4867. "post": {
  4868. "consumes": [
  4869. "application/json"
  4870. ],
  4871. "produces": [
  4872. "application/json"
  4873. ],
  4874. "tags": [
  4875. "issue"
  4876. ],
  4877. "summary": "Add a label to an issue",
  4878. "operationId": "issueAddLabel",
  4879. "parameters": [
  4880. {
  4881. "type": "string",
  4882. "description": "owner of the repo",
  4883. "name": "owner",
  4884. "in": "path",
  4885. "required": true
  4886. },
  4887. {
  4888. "type": "string",
  4889. "description": "name of the repo",
  4890. "name": "repo",
  4891. "in": "path",
  4892. "required": true
  4893. },
  4894. {
  4895. "type": "integer",
  4896. "format": "int64",
  4897. "description": "index of the issue",
  4898. "name": "index",
  4899. "in": "path",
  4900. "required": true
  4901. },
  4902. {
  4903. "name": "body",
  4904. "in": "body",
  4905. "schema": {
  4906. "$ref": "#/definitions/IssueLabelsOption"
  4907. }
  4908. }
  4909. ],
  4910. "responses": {
  4911. "200": {
  4912. "$ref": "#/responses/LabelList"
  4913. },
  4914. "403": {
  4915. "$ref": "#/responses/forbidden"
  4916. }
  4917. }
  4918. },
  4919. "delete": {
  4920. "produces": [
  4921. "application/json"
  4922. ],
  4923. "tags": [
  4924. "issue"
  4925. ],
  4926. "summary": "Remove all labels from an issue",
  4927. "operationId": "issueClearLabels",
  4928. "parameters": [
  4929. {
  4930. "type": "string",
  4931. "description": "owner of the repo",
  4932. "name": "owner",
  4933. "in": "path",
  4934. "required": true
  4935. },
  4936. {
  4937. "type": "string",
  4938. "description": "name of the repo",
  4939. "name": "repo",
  4940. "in": "path",
  4941. "required": true
  4942. },
  4943. {
  4944. "type": "integer",
  4945. "format": "int64",
  4946. "description": "index of the issue",
  4947. "name": "index",
  4948. "in": "path",
  4949. "required": true
  4950. }
  4951. ],
  4952. "responses": {
  4953. "204": {
  4954. "$ref": "#/responses/empty"
  4955. },
  4956. "403": {
  4957. "$ref": "#/responses/forbidden"
  4958. }
  4959. }
  4960. }
  4961. },
  4962. "/repos/{owner}/{repo}/issues/{index}/labels/{id}": {
  4963. "delete": {
  4964. "produces": [
  4965. "application/json"
  4966. ],
  4967. "tags": [
  4968. "issue"
  4969. ],
  4970. "summary": "Remove a label from an issue",
  4971. "operationId": "issueRemoveLabel",
  4972. "parameters": [
  4973. {
  4974. "type": "string",
  4975. "description": "owner of the repo",
  4976. "name": "owner",
  4977. "in": "path",
  4978. "required": true
  4979. },
  4980. {
  4981. "type": "string",
  4982. "description": "name of the repo",
  4983. "name": "repo",
  4984. "in": "path",
  4985. "required": true
  4986. },
  4987. {
  4988. "type": "integer",
  4989. "format": "int64",
  4990. "description": "index of the issue",
  4991. "name": "index",
  4992. "in": "path",
  4993. "required": true
  4994. },
  4995. {
  4996. "type": "integer",
  4997. "format": "int64",
  4998. "description": "id of the label to remove",
  4999. "name": "id",
  5000. "in": "path",
  5001. "required": true
  5002. }
  5003. ],
  5004. "responses": {
  5005. "204": {
  5006. "$ref": "#/responses/empty"
  5007. },
  5008. "403": {
  5009. "$ref": "#/responses/forbidden"
  5010. },
  5011. "422": {
  5012. "$ref": "#/responses/validationError"
  5013. }
  5014. }
  5015. }
  5016. },
  5017. "/repos/{owner}/{repo}/issues/{index}/reactions": {
  5018. "get": {
  5019. "consumes": [
  5020. "application/json"
  5021. ],
  5022. "produces": [
  5023. "application/json"
  5024. ],
  5025. "tags": [
  5026. "issue"
  5027. ],
  5028. "summary": "Get a list reactions of an issue",
  5029. "operationId": "issueGetIssueReactions",
  5030. "parameters": [
  5031. {
  5032. "type": "string",
  5033. "description": "owner of the repo",
  5034. "name": "owner",
  5035. "in": "path",
  5036. "required": true
  5037. },
  5038. {
  5039. "type": "string",
  5040. "description": "name of the repo",
  5041. "name": "repo",
  5042. "in": "path",
  5043. "required": true
  5044. },
  5045. {
  5046. "type": "integer",
  5047. "format": "int64",
  5048. "description": "index of the issue",
  5049. "name": "index",
  5050. "in": "path",
  5051. "required": true
  5052. },
  5053. {
  5054. "type": "integer",
  5055. "description": "page number of results to return (1-based)",
  5056. "name": "page",
  5057. "in": "query"
  5058. },
  5059. {
  5060. "type": "integer",
  5061. "description": "page size of results",
  5062. "name": "limit",
  5063. "in": "query"
  5064. }
  5065. ],
  5066. "responses": {
  5067. "200": {
  5068. "$ref": "#/responses/ReactionList"
  5069. },
  5070. "403": {
  5071. "$ref": "#/responses/forbidden"
  5072. }
  5073. }
  5074. },
  5075. "post": {
  5076. "consumes": [
  5077. "application/json"
  5078. ],
  5079. "produces": [
  5080. "application/json"
  5081. ],
  5082. "tags": [
  5083. "issue"
  5084. ],
  5085. "summary": "Add a reaction to an issue",
  5086. "operationId": "issuePostIssueReaction",
  5087. "parameters": [
  5088. {
  5089. "type": "string",
  5090. "description": "owner of the repo",
  5091. "name": "owner",
  5092. "in": "path",
  5093. "required": true
  5094. },
  5095. {
  5096. "type": "string",
  5097. "description": "name of the repo",
  5098. "name": "repo",
  5099. "in": "path",
  5100. "required": true
  5101. },
  5102. {
  5103. "type": "integer",
  5104. "format": "int64",
  5105. "description": "index of the issue",
  5106. "name": "index",
  5107. "in": "path",
  5108. "required": true
  5109. },
  5110. {
  5111. "name": "content",
  5112. "in": "body",
  5113. "schema": {
  5114. "$ref": "#/definitions/EditReactionOption"
  5115. }
  5116. }
  5117. ],
  5118. "responses": {
  5119. "200": {
  5120. "$ref": "#/responses/Reaction"
  5121. },
  5122. "201": {
  5123. "$ref": "#/responses/Reaction"
  5124. },
  5125. "403": {
  5126. "$ref": "#/responses/forbidden"
  5127. }
  5128. }
  5129. },
  5130. "delete": {
  5131. "consumes": [
  5132. "application/json"
  5133. ],
  5134. "produces": [
  5135. "application/json"
  5136. ],
  5137. "tags": [
  5138. "issue"
  5139. ],
  5140. "summary": "Remove a reaction from an issue",
  5141. "operationId": "issueDeleteIssueReaction",
  5142. "parameters": [
  5143. {
  5144. "type": "string",
  5145. "description": "owner of the repo",
  5146. "name": "owner",
  5147. "in": "path",
  5148. "required": true
  5149. },
  5150. {
  5151. "type": "string",
  5152. "description": "name of the repo",
  5153. "name": "repo",
  5154. "in": "path",
  5155. "required": true
  5156. },
  5157. {
  5158. "type": "integer",
  5159. "format": "int64",
  5160. "description": "index of the issue",
  5161. "name": "index",
  5162. "in": "path",
  5163. "required": true
  5164. },
  5165. {
  5166. "name": "content",
  5167. "in": "body",
  5168. "schema": {
  5169. "$ref": "#/definitions/EditReactionOption"
  5170. }
  5171. }
  5172. ],
  5173. "responses": {
  5174. "200": {
  5175. "$ref": "#/responses/empty"
  5176. },
  5177. "403": {
  5178. "$ref": "#/responses/forbidden"
  5179. }
  5180. }
  5181. }
  5182. },
  5183. "/repos/{owner}/{repo}/issues/{index}/stopwatch/delete": {
  5184. "delete": {
  5185. "consumes": [
  5186. "application/json"
  5187. ],
  5188. "produces": [
  5189. "application/json"
  5190. ],
  5191. "tags": [
  5192. "issue"
  5193. ],
  5194. "summary": "Delete an issue's existing stopwatch.",
  5195. "operationId": "issueDeleteStopWatch",
  5196. "parameters": [
  5197. {
  5198. "type": "string",
  5199. "description": "owner of the repo",
  5200. "name": "owner",
  5201. "in": "path",
  5202. "required": true
  5203. },
  5204. {
  5205. "type": "string",
  5206. "description": "name of the repo",
  5207. "name": "repo",
  5208. "in": "path",
  5209. "required": true
  5210. },
  5211. {
  5212. "type": "integer",
  5213. "format": "int64",
  5214. "description": "index of the issue to stop the stopwatch on",
  5215. "name": "index",
  5216. "in": "path",
  5217. "required": true
  5218. }
  5219. ],
  5220. "responses": {
  5221. "204": {
  5222. "$ref": "#/responses/empty"
  5223. },
  5224. "403": {
  5225. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5226. },
  5227. "404": {
  5228. "$ref": "#/responses/notFound"
  5229. },
  5230. "409": {
  5231. "description": "Cannot cancel a non existent stopwatch"
  5232. }
  5233. }
  5234. }
  5235. },
  5236. "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": {
  5237. "post": {
  5238. "consumes": [
  5239. "application/json"
  5240. ],
  5241. "produces": [
  5242. "application/json"
  5243. ],
  5244. "tags": [
  5245. "issue"
  5246. ],
  5247. "summary": "Start stopwatch on an issue.",
  5248. "operationId": "issueStartStopWatch",
  5249. "parameters": [
  5250. {
  5251. "type": "string",
  5252. "description": "owner of the repo",
  5253. "name": "owner",
  5254. "in": "path",
  5255. "required": true
  5256. },
  5257. {
  5258. "type": "string",
  5259. "description": "name of the repo",
  5260. "name": "repo",
  5261. "in": "path",
  5262. "required": true
  5263. },
  5264. {
  5265. "type": "integer",
  5266. "format": "int64",
  5267. "description": "index of the issue to create the stopwatch on",
  5268. "name": "index",
  5269. "in": "path",
  5270. "required": true
  5271. }
  5272. ],
  5273. "responses": {
  5274. "201": {
  5275. "$ref": "#/responses/empty"
  5276. },
  5277. "403": {
  5278. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5279. },
  5280. "404": {
  5281. "$ref": "#/responses/notFound"
  5282. },
  5283. "409": {
  5284. "description": "Cannot start a stopwatch again if it already exists"
  5285. }
  5286. }
  5287. }
  5288. },
  5289. "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": {
  5290. "post": {
  5291. "consumes": [
  5292. "application/json"
  5293. ],
  5294. "produces": [
  5295. "application/json"
  5296. ],
  5297. "tags": [
  5298. "issue"
  5299. ],
  5300. "summary": "Stop an issue's existing stopwatch.",
  5301. "operationId": "issueStopStopWatch",
  5302. "parameters": [
  5303. {
  5304. "type": "string",
  5305. "description": "owner of the repo",
  5306. "name": "owner",
  5307. "in": "path",
  5308. "required": true
  5309. },
  5310. {
  5311. "type": "string",
  5312. "description": "name of the repo",
  5313. "name": "repo",
  5314. "in": "path",
  5315. "required": true
  5316. },
  5317. {
  5318. "type": "integer",
  5319. "format": "int64",
  5320. "description": "index of the issue to stop the stopwatch on",
  5321. "name": "index",
  5322. "in": "path",
  5323. "required": true
  5324. }
  5325. ],
  5326. "responses": {
  5327. "201": {
  5328. "$ref": "#/responses/empty"
  5329. },
  5330. "403": {
  5331. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5332. },
  5333. "404": {
  5334. "$ref": "#/responses/notFound"
  5335. },
  5336. "409": {
  5337. "description": "Cannot stop a non existent stopwatch"
  5338. }
  5339. }
  5340. }
  5341. },
  5342. "/repos/{owner}/{repo}/issues/{index}/subscriptions": {
  5343. "get": {
  5344. "consumes": [
  5345. "application/json"
  5346. ],
  5347. "produces": [
  5348. "application/json"
  5349. ],
  5350. "tags": [
  5351. "issue"
  5352. ],
  5353. "summary": "Get users who subscribed on an issue.",
  5354. "operationId": "issueSubscriptions",
  5355. "parameters": [
  5356. {
  5357. "type": "string",
  5358. "description": "owner of the repo",
  5359. "name": "owner",
  5360. "in": "path",
  5361. "required": true
  5362. },
  5363. {
  5364. "type": "string",
  5365. "description": "name of the repo",
  5366. "name": "repo",
  5367. "in": "path",
  5368. "required": true
  5369. },
  5370. {
  5371. "type": "integer",
  5372. "format": "int64",
  5373. "description": "index of the issue",
  5374. "name": "index",
  5375. "in": "path",
  5376. "required": true
  5377. },
  5378. {
  5379. "type": "integer",
  5380. "description": "page number of results to return (1-based)",
  5381. "name": "page",
  5382. "in": "query"
  5383. },
  5384. {
  5385. "type": "integer",
  5386. "description": "page size of results",
  5387. "name": "limit",
  5388. "in": "query"
  5389. }
  5390. ],
  5391. "responses": {
  5392. "200": {
  5393. "$ref": "#/responses/UserList"
  5394. },
  5395. "404": {
  5396. "$ref": "#/responses/notFound"
  5397. }
  5398. }
  5399. }
  5400. },
  5401. "/repos/{owner}/{repo}/issues/{index}/subscriptions/check": {
  5402. "get": {
  5403. "consumes": [
  5404. "application/json"
  5405. ],
  5406. "produces": [
  5407. "application/json"
  5408. ],
  5409. "tags": [
  5410. "issue"
  5411. ],
  5412. "summary": "Check if user is subscribed to an issue",
  5413. "operationId": "issueCheckSubscription",
  5414. "parameters": [
  5415. {
  5416. "type": "string",
  5417. "description": "owner of the repo",
  5418. "name": "owner",
  5419. "in": "path",
  5420. "required": true
  5421. },
  5422. {
  5423. "type": "string",
  5424. "description": "name of the repo",
  5425. "name": "repo",
  5426. "in": "path",
  5427. "required": true
  5428. },
  5429. {
  5430. "type": "integer",
  5431. "format": "int64",
  5432. "description": "index of the issue",
  5433. "name": "index",
  5434. "in": "path",
  5435. "required": true
  5436. }
  5437. ],
  5438. "responses": {
  5439. "200": {
  5440. "$ref": "#/responses/WatchInfo"
  5441. },
  5442. "404": {
  5443. "$ref": "#/responses/notFound"
  5444. }
  5445. }
  5446. }
  5447. },
  5448. "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}": {
  5449. "put": {
  5450. "consumes": [
  5451. "application/json"
  5452. ],
  5453. "produces": [
  5454. "application/json"
  5455. ],
  5456. "tags": [
  5457. "issue"
  5458. ],
  5459. "summary": "Subscribe user to issue",
  5460. "operationId": "issueAddSubscription",
  5461. "parameters": [
  5462. {
  5463. "type": "string",
  5464. "description": "owner of the repo",
  5465. "name": "owner",
  5466. "in": "path",
  5467. "required": true
  5468. },
  5469. {
  5470. "type": "string",
  5471. "description": "name of the repo",
  5472. "name": "repo",
  5473. "in": "path",
  5474. "required": true
  5475. },
  5476. {
  5477. "type": "integer",
  5478. "format": "int64",
  5479. "description": "index of the issue",
  5480. "name": "index",
  5481. "in": "path",
  5482. "required": true
  5483. },
  5484. {
  5485. "type": "string",
  5486. "description": "user to subscribe",
  5487. "name": "user",
  5488. "in": "path",
  5489. "required": true
  5490. }
  5491. ],
  5492. "responses": {
  5493. "200": {
  5494. "description": "Already subscribed"
  5495. },
  5496. "201": {
  5497. "description": "Successfully Subscribed"
  5498. },
  5499. "304": {
  5500. "description": "User can only subscribe itself if he is no admin"
  5501. },
  5502. "404": {
  5503. "$ref": "#/responses/notFound"
  5504. }
  5505. }
  5506. },
  5507. "delete": {
  5508. "consumes": [
  5509. "application/json"
  5510. ],
  5511. "produces": [
  5512. "application/json"
  5513. ],
  5514. "tags": [
  5515. "issue"
  5516. ],
  5517. "summary": "Unsubscribe user from issue",
  5518. "operationId": "issueDeleteSubscription",
  5519. "parameters": [
  5520. {
  5521. "type": "string",
  5522. "description": "owner of the repo",
  5523. "name": "owner",
  5524. "in": "path",
  5525. "required": true
  5526. },
  5527. {
  5528. "type": "string",
  5529. "description": "name of the repo",
  5530. "name": "repo",
  5531. "in": "path",
  5532. "required": true
  5533. },
  5534. {
  5535. "type": "integer",
  5536. "format": "int64",
  5537. "description": "index of the issue",
  5538. "name": "index",
  5539. "in": "path",
  5540. "required": true
  5541. },
  5542. {
  5543. "type": "string",
  5544. "description": "user witch unsubscribe",
  5545. "name": "user",
  5546. "in": "path",
  5547. "required": true
  5548. }
  5549. ],
  5550. "responses": {
  5551. "200": {
  5552. "description": "Already unsubscribed"
  5553. },
  5554. "201": {
  5555. "description": "Successfully Unsubscribed"
  5556. },
  5557. "304": {
  5558. "description": "User can only subscribe itself if he is no admin"
  5559. },
  5560. "404": {
  5561. "$ref": "#/responses/notFound"
  5562. }
  5563. }
  5564. }
  5565. },
  5566. "/repos/{owner}/{repo}/issues/{index}/times": {
  5567. "get": {
  5568. "produces": [
  5569. "application/json"
  5570. ],
  5571. "tags": [
  5572. "issue"
  5573. ],
  5574. "summary": "List an issue's tracked times",
  5575. "operationId": "issueTrackedTimes",
  5576. "parameters": [
  5577. {
  5578. "type": "string",
  5579. "description": "owner of the repo",
  5580. "name": "owner",
  5581. "in": "path",
  5582. "required": true
  5583. },
  5584. {
  5585. "type": "string",
  5586. "description": "name of the repo",
  5587. "name": "repo",
  5588. "in": "path",
  5589. "required": true
  5590. },
  5591. {
  5592. "type": "integer",
  5593. "format": "int64",
  5594. "description": "index of the issue",
  5595. "name": "index",
  5596. "in": "path",
  5597. "required": true
  5598. },
  5599. {
  5600. "type": "string",
  5601. "format": "date-time",
  5602. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  5603. "name": "since",
  5604. "in": "query"
  5605. },
  5606. {
  5607. "type": "string",
  5608. "format": "date-time",
  5609. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  5610. "name": "before",
  5611. "in": "query"
  5612. },
  5613. {
  5614. "type": "integer",
  5615. "description": "page number of results to return (1-based)",
  5616. "name": "page",
  5617. "in": "query"
  5618. },
  5619. {
  5620. "type": "integer",
  5621. "description": "page size of results",
  5622. "name": "limit",
  5623. "in": "query"
  5624. }
  5625. ],
  5626. "responses": {
  5627. "200": {
  5628. "$ref": "#/responses/TrackedTimeList"
  5629. },
  5630. "404": {
  5631. "$ref": "#/responses/notFound"
  5632. }
  5633. }
  5634. },
  5635. "post": {
  5636. "consumes": [
  5637. "application/json"
  5638. ],
  5639. "produces": [
  5640. "application/json"
  5641. ],
  5642. "tags": [
  5643. "issue"
  5644. ],
  5645. "summary": "Add tracked time to a issue",
  5646. "operationId": "issueAddTime",
  5647. "parameters": [
  5648. {
  5649. "type": "string",
  5650. "description": "owner of the repo",
  5651. "name": "owner",
  5652. "in": "path",
  5653. "required": true
  5654. },
  5655. {
  5656. "type": "string",
  5657. "description": "name of the repo",
  5658. "name": "repo",
  5659. "in": "path",
  5660. "required": true
  5661. },
  5662. {
  5663. "type": "integer",
  5664. "format": "int64",
  5665. "description": "index of the issue",
  5666. "name": "index",
  5667. "in": "path",
  5668. "required": true
  5669. },
  5670. {
  5671. "name": "body",
  5672. "in": "body",
  5673. "schema": {
  5674. "$ref": "#/definitions/AddTimeOption"
  5675. }
  5676. }
  5677. ],
  5678. "responses": {
  5679. "200": {
  5680. "$ref": "#/responses/TrackedTime"
  5681. },
  5682. "400": {
  5683. "$ref": "#/responses/error"
  5684. },
  5685. "403": {
  5686. "$ref": "#/responses/forbidden"
  5687. }
  5688. }
  5689. },
  5690. "delete": {
  5691. "consumes": [
  5692. "application/json"
  5693. ],
  5694. "produces": [
  5695. "application/json"
  5696. ],
  5697. "tags": [
  5698. "issue"
  5699. ],
  5700. "summary": "Reset a tracked time of an issue",
  5701. "operationId": "issueResetTime",
  5702. "parameters": [
  5703. {
  5704. "type": "string",
  5705. "description": "owner of the repo",
  5706. "name": "owner",
  5707. "in": "path",
  5708. "required": true
  5709. },
  5710. {
  5711. "type": "string",
  5712. "description": "name of the repo",
  5713. "name": "repo",
  5714. "in": "path",
  5715. "required": true
  5716. },
  5717. {
  5718. "type": "integer",
  5719. "format": "int64",
  5720. "description": "index of the issue to add tracked time to",
  5721. "name": "index",
  5722. "in": "path",
  5723. "required": true
  5724. }
  5725. ],
  5726. "responses": {
  5727. "204": {
  5728. "$ref": "#/responses/empty"
  5729. },
  5730. "400": {
  5731. "$ref": "#/responses/error"
  5732. },
  5733. "403": {
  5734. "$ref": "#/responses/forbidden"
  5735. }
  5736. }
  5737. }
  5738. },
  5739. "/repos/{owner}/{repo}/issues/{index}/times/{id}": {
  5740. "delete": {
  5741. "consumes": [
  5742. "application/json"
  5743. ],
  5744. "produces": [
  5745. "application/json"
  5746. ],
  5747. "tags": [
  5748. "issue"
  5749. ],
  5750. "summary": "Delete specific tracked time",
  5751. "operationId": "issueDeleteTime",
  5752. "parameters": [
  5753. {
  5754. "type": "string",
  5755. "description": "owner of the repo",
  5756. "name": "owner",
  5757. "in": "path",
  5758. "required": true
  5759. },
  5760. {
  5761. "type": "string",
  5762. "description": "name of the repo",
  5763. "name": "repo",
  5764. "in": "path",
  5765. "required": true
  5766. },
  5767. {
  5768. "type": "integer",
  5769. "format": "int64",
  5770. "description": "index of the issue",
  5771. "name": "index",
  5772. "in": "path",
  5773. "required": true
  5774. },
  5775. {
  5776. "type": "integer",
  5777. "format": "int64",
  5778. "description": "id of time to delete",
  5779. "name": "id",
  5780. "in": "path",
  5781. "required": true
  5782. }
  5783. ],
  5784. "responses": {
  5785. "204": {
  5786. "$ref": "#/responses/empty"
  5787. },
  5788. "400": {
  5789. "$ref": "#/responses/error"
  5790. },
  5791. "403": {
  5792. "$ref": "#/responses/forbidden"
  5793. }
  5794. }
  5795. }
  5796. },
  5797. "/repos/{owner}/{repo}/keys": {
  5798. "get": {
  5799. "produces": [
  5800. "application/json"
  5801. ],
  5802. "tags": [
  5803. "repository"
  5804. ],
  5805. "summary": "List a repository's keys",
  5806. "operationId": "repoListKeys",
  5807. "parameters": [
  5808. {
  5809. "type": "string",
  5810. "description": "owner of the repo",
  5811. "name": "owner",
  5812. "in": "path",
  5813. "required": true
  5814. },
  5815. {
  5816. "type": "string",
  5817. "description": "name of the repo",
  5818. "name": "repo",
  5819. "in": "path",
  5820. "required": true
  5821. },
  5822. {
  5823. "type": "integer",
  5824. "description": "the key_id to search for",
  5825. "name": "key_id",
  5826. "in": "query"
  5827. },
  5828. {
  5829. "type": "string",
  5830. "description": "fingerprint of the key",
  5831. "name": "fingerprint",
  5832. "in": "query"
  5833. },
  5834. {
  5835. "type": "integer",
  5836. "description": "page number of results to return (1-based)",
  5837. "name": "page",
  5838. "in": "query"
  5839. },
  5840. {
  5841. "type": "integer",
  5842. "description": "page size of results",
  5843. "name": "limit",
  5844. "in": "query"
  5845. }
  5846. ],
  5847. "responses": {
  5848. "200": {
  5849. "$ref": "#/responses/DeployKeyList"
  5850. }
  5851. }
  5852. },
  5853. "post": {
  5854. "consumes": [
  5855. "application/json"
  5856. ],
  5857. "produces": [
  5858. "application/json"
  5859. ],
  5860. "tags": [
  5861. "repository"
  5862. ],
  5863. "summary": "Add a key to a repository",
  5864. "operationId": "repoCreateKey",
  5865. "parameters": [
  5866. {
  5867. "type": "string",
  5868. "description": "owner of the repo",
  5869. "name": "owner",
  5870. "in": "path",
  5871. "required": true
  5872. },
  5873. {
  5874. "type": "string",
  5875. "description": "name of the repo",
  5876. "name": "repo",
  5877. "in": "path",
  5878. "required": true
  5879. },
  5880. {
  5881. "name": "body",
  5882. "in": "body",
  5883. "schema": {
  5884. "$ref": "#/definitions/CreateKeyOption"
  5885. }
  5886. }
  5887. ],
  5888. "responses": {
  5889. "201": {
  5890. "$ref": "#/responses/DeployKey"
  5891. },
  5892. "422": {
  5893. "$ref": "#/responses/validationError"
  5894. }
  5895. }
  5896. }
  5897. },
  5898. "/repos/{owner}/{repo}/keys/{id}": {
  5899. "get": {
  5900. "produces": [
  5901. "application/json"
  5902. ],
  5903. "tags": [
  5904. "repository"
  5905. ],
  5906. "summary": "Get a repository's key by id",
  5907. "operationId": "repoGetKey",
  5908. "parameters": [
  5909. {
  5910. "type": "string",
  5911. "description": "owner of the repo",
  5912. "name": "owner",
  5913. "in": "path",
  5914. "required": true
  5915. },
  5916. {
  5917. "type": "string",
  5918. "description": "name of the repo",
  5919. "name": "repo",
  5920. "in": "path",
  5921. "required": true
  5922. },
  5923. {
  5924. "type": "integer",
  5925. "format": "int64",
  5926. "description": "id of the key to get",
  5927. "name": "id",
  5928. "in": "path",
  5929. "required": true
  5930. }
  5931. ],
  5932. "responses": {
  5933. "200": {
  5934. "$ref": "#/responses/DeployKey"
  5935. }
  5936. }
  5937. },
  5938. "delete": {
  5939. "tags": [
  5940. "repository"
  5941. ],
  5942. "summary": "Delete a key from a repository",
  5943. "operationId": "repoDeleteKey",
  5944. "parameters": [
  5945. {
  5946. "type": "string",
  5947. "description": "owner of the repo",
  5948. "name": "owner",
  5949. "in": "path",
  5950. "required": true
  5951. },
  5952. {
  5953. "type": "string",
  5954. "description": "name of the repo",
  5955. "name": "repo",
  5956. "in": "path",
  5957. "required": true
  5958. },
  5959. {
  5960. "type": "integer",
  5961. "format": "int64",
  5962. "description": "id of the key to delete",
  5963. "name": "id",
  5964. "in": "path",
  5965. "required": true
  5966. }
  5967. ],
  5968. "responses": {
  5969. "204": {
  5970. "$ref": "#/responses/empty"
  5971. },
  5972. "403": {
  5973. "$ref": "#/responses/forbidden"
  5974. }
  5975. }
  5976. }
  5977. },
  5978. "/repos/{owner}/{repo}/labels": {
  5979. "get": {
  5980. "produces": [
  5981. "application/json"
  5982. ],
  5983. "tags": [
  5984. "issue"
  5985. ],
  5986. "summary": "Get all of a repository's labels",
  5987. "operationId": "issueListLabels",
  5988. "parameters": [
  5989. {
  5990. "type": "string",
  5991. "description": "owner of the repo",
  5992. "name": "owner",
  5993. "in": "path",
  5994. "required": true
  5995. },
  5996. {
  5997. "type": "string",
  5998. "description": "name of the repo",
  5999. "name": "repo",
  6000. "in": "path",
  6001. "required": true
  6002. },
  6003. {
  6004. "type": "integer",
  6005. "description": "page number of results to return (1-based)",
  6006. "name": "page",
  6007. "in": "query"
  6008. },
  6009. {
  6010. "type": "integer",
  6011. "description": "page size of results",
  6012. "name": "limit",
  6013. "in": "query"
  6014. }
  6015. ],
  6016. "responses": {
  6017. "200": {
  6018. "$ref": "#/responses/LabelList"
  6019. }
  6020. }
  6021. },
  6022. "post": {
  6023. "consumes": [
  6024. "application/json"
  6025. ],
  6026. "produces": [
  6027. "application/json"
  6028. ],
  6029. "tags": [
  6030. "issue"
  6031. ],
  6032. "summary": "Create a label",
  6033. "operationId": "issueCreateLabel",
  6034. "parameters": [
  6035. {
  6036. "type": "string",
  6037. "description": "owner of the repo",
  6038. "name": "owner",
  6039. "in": "path",
  6040. "required": true
  6041. },
  6042. {
  6043. "type": "string",
  6044. "description": "name of the repo",
  6045. "name": "repo",
  6046. "in": "path",
  6047. "required": true
  6048. },
  6049. {
  6050. "name": "body",
  6051. "in": "body",
  6052. "schema": {
  6053. "$ref": "#/definitions/CreateLabelOption"
  6054. }
  6055. }
  6056. ],
  6057. "responses": {
  6058. "201": {
  6059. "$ref": "#/responses/Label"
  6060. },
  6061. "422": {
  6062. "$ref": "#/responses/validationError"
  6063. }
  6064. }
  6065. }
  6066. },
  6067. "/repos/{owner}/{repo}/labels/{id}": {
  6068. "get": {
  6069. "produces": [
  6070. "application/json"
  6071. ],
  6072. "tags": [
  6073. "issue"
  6074. ],
  6075. "summary": "Get a single label",
  6076. "operationId": "issueGetLabel",
  6077. "parameters": [
  6078. {
  6079. "type": "string",
  6080. "description": "owner of the repo",
  6081. "name": "owner",
  6082. "in": "path",
  6083. "required": true
  6084. },
  6085. {
  6086. "type": "string",
  6087. "description": "name of the repo",
  6088. "name": "repo",
  6089. "in": "path",
  6090. "required": true
  6091. },
  6092. {
  6093. "type": "integer",
  6094. "format": "int64",
  6095. "description": "id of the label to get",
  6096. "name": "id",
  6097. "in": "path",
  6098. "required": true
  6099. }
  6100. ],
  6101. "responses": {
  6102. "200": {
  6103. "$ref": "#/responses/Label"
  6104. }
  6105. }
  6106. },
  6107. "delete": {
  6108. "tags": [
  6109. "issue"
  6110. ],
  6111. "summary": "Delete a label",
  6112. "operationId": "issueDeleteLabel",
  6113. "parameters": [
  6114. {
  6115. "type": "string",
  6116. "description": "owner of the repo",
  6117. "name": "owner",
  6118. "in": "path",
  6119. "required": true
  6120. },
  6121. {
  6122. "type": "string",
  6123. "description": "name of the repo",
  6124. "name": "repo",
  6125. "in": "path",
  6126. "required": true
  6127. },
  6128. {
  6129. "type": "integer",
  6130. "format": "int64",
  6131. "description": "id of the label to delete",
  6132. "name": "id",
  6133. "in": "path",
  6134. "required": true
  6135. }
  6136. ],
  6137. "responses": {
  6138. "204": {
  6139. "$ref": "#/responses/empty"
  6140. }
  6141. }
  6142. },
  6143. "patch": {
  6144. "consumes": [
  6145. "application/json"
  6146. ],
  6147. "produces": [
  6148. "application/json"
  6149. ],
  6150. "tags": [
  6151. "issue"
  6152. ],
  6153. "summary": "Update a label",
  6154. "operationId": "issueEditLabel",
  6155. "parameters": [
  6156. {
  6157. "type": "string",
  6158. "description": "owner of the repo",
  6159. "name": "owner",
  6160. "in": "path",
  6161. "required": true
  6162. },
  6163. {
  6164. "type": "string",
  6165. "description": "name of the repo",
  6166. "name": "repo",
  6167. "in": "path",
  6168. "required": true
  6169. },
  6170. {
  6171. "type": "integer",
  6172. "format": "int64",
  6173. "description": "id of the label to edit",
  6174. "name": "id",
  6175. "in": "path",
  6176. "required": true
  6177. },
  6178. {
  6179. "name": "body",
  6180. "in": "body",
  6181. "schema": {
  6182. "$ref": "#/definitions/EditLabelOption"
  6183. }
  6184. }
  6185. ],
  6186. "responses": {
  6187. "200": {
  6188. "$ref": "#/responses/Label"
  6189. },
  6190. "422": {
  6191. "$ref": "#/responses/validationError"
  6192. }
  6193. }
  6194. }
  6195. },
  6196. "/repos/{owner}/{repo}/languages": {
  6197. "get": {
  6198. "produces": [
  6199. "application/json"
  6200. ],
  6201. "tags": [
  6202. "repository"
  6203. ],
  6204. "summary": "Get languages and number of bytes of code written",
  6205. "operationId": "repoGetLanguages",
  6206. "parameters": [
  6207. {
  6208. "type": "string",
  6209. "description": "owner of the repo",
  6210. "name": "owner",
  6211. "in": "path",
  6212. "required": true
  6213. },
  6214. {
  6215. "type": "string",
  6216. "description": "name of the repo",
  6217. "name": "repo",
  6218. "in": "path",
  6219. "required": true
  6220. }
  6221. ],
  6222. "responses": {
  6223. "200": {
  6224. "$ref": "#/responses/LanguageStatistics"
  6225. },
  6226. "404": {
  6227. "$ref": "#/responses/notFound"
  6228. }
  6229. }
  6230. }
  6231. },
  6232. "/repos/{owner}/{repo}/milestones": {
  6233. "get": {
  6234. "produces": [
  6235. "application/json"
  6236. ],
  6237. "tags": [
  6238. "issue"
  6239. ],
  6240. "summary": "Get all of a repository's opened milestones",
  6241. "operationId": "issueGetMilestonesList",
  6242. "parameters": [
  6243. {
  6244. "type": "string",
  6245. "description": "owner of the repo",
  6246. "name": "owner",
  6247. "in": "path",
  6248. "required": true
  6249. },
  6250. {
  6251. "type": "string",
  6252. "description": "name of the repo",
  6253. "name": "repo",
  6254. "in": "path",
  6255. "required": true
  6256. },
  6257. {
  6258. "type": "string",
  6259. "description": "Milestone state, Recognised values are open, closed and all. Defaults to \"open\"",
  6260. "name": "state",
  6261. "in": "query"
  6262. },
  6263. {
  6264. "type": "string",
  6265. "description": "filter by milestone name",
  6266. "name": "name",
  6267. "in": "query"
  6268. },
  6269. {
  6270. "type": "integer",
  6271. "description": "page number of results to return (1-based)",
  6272. "name": "page",
  6273. "in": "query"
  6274. },
  6275. {
  6276. "type": "integer",
  6277. "description": "page size of results",
  6278. "name": "limit",
  6279. "in": "query"
  6280. }
  6281. ],
  6282. "responses": {
  6283. "200": {
  6284. "$ref": "#/responses/MilestoneList"
  6285. }
  6286. }
  6287. },
  6288. "post": {
  6289. "consumes": [
  6290. "application/json"
  6291. ],
  6292. "produces": [
  6293. "application/json"
  6294. ],
  6295. "tags": [
  6296. "issue"
  6297. ],
  6298. "summary": "Create a milestone",
  6299. "operationId": "issueCreateMilestone",
  6300. "parameters": [
  6301. {
  6302. "type": "string",
  6303. "description": "owner of the repo",
  6304. "name": "owner",
  6305. "in": "path",
  6306. "required": true
  6307. },
  6308. {
  6309. "type": "string",
  6310. "description": "name of the repo",
  6311. "name": "repo",
  6312. "in": "path",
  6313. "required": true
  6314. },
  6315. {
  6316. "name": "body",
  6317. "in": "body",
  6318. "schema": {
  6319. "$ref": "#/definitions/CreateMilestoneOption"
  6320. }
  6321. }
  6322. ],
  6323. "responses": {
  6324. "201": {
  6325. "$ref": "#/responses/Milestone"
  6326. }
  6327. }
  6328. }
  6329. },
  6330. "/repos/{owner}/{repo}/milestones/{id}": {
  6331. "get": {
  6332. "produces": [
  6333. "application/json"
  6334. ],
  6335. "tags": [
  6336. "issue"
  6337. ],
  6338. "summary": "Get a milestone",
  6339. "operationId": "issueGetMilestone",
  6340. "parameters": [
  6341. {
  6342. "type": "string",
  6343. "description": "owner of the repo",
  6344. "name": "owner",
  6345. "in": "path",
  6346. "required": true
  6347. },
  6348. {
  6349. "type": "string",
  6350. "description": "name of the repo",
  6351. "name": "repo",
  6352. "in": "path",
  6353. "required": true
  6354. },
  6355. {
  6356. "type": "string",
  6357. "description": "the milestone to get, identified by ID and if not available by name",
  6358. "name": "id",
  6359. "in": "path",
  6360. "required": true
  6361. }
  6362. ],
  6363. "responses": {
  6364. "200": {
  6365. "$ref": "#/responses/Milestone"
  6366. }
  6367. }
  6368. },
  6369. "delete": {
  6370. "tags": [
  6371. "issue"
  6372. ],
  6373. "summary": "Delete a milestone",
  6374. "operationId": "issueDeleteMilestone",
  6375. "parameters": [
  6376. {
  6377. "type": "string",
  6378. "description": "owner of the repo",
  6379. "name": "owner",
  6380. "in": "path",
  6381. "required": true
  6382. },
  6383. {
  6384. "type": "string",
  6385. "description": "name of the repo",
  6386. "name": "repo",
  6387. "in": "path",
  6388. "required": true
  6389. },
  6390. {
  6391. "type": "string",
  6392. "description": "the milestone to delete, identified by ID and if not available by name",
  6393. "name": "id",
  6394. "in": "path",
  6395. "required": true
  6396. }
  6397. ],
  6398. "responses": {
  6399. "204": {
  6400. "$ref": "#/responses/empty"
  6401. }
  6402. }
  6403. },
  6404. "patch": {
  6405. "consumes": [
  6406. "application/json"
  6407. ],
  6408. "produces": [
  6409. "application/json"
  6410. ],
  6411. "tags": [
  6412. "issue"
  6413. ],
  6414. "summary": "Update a milestone",
  6415. "operationId": "issueEditMilestone",
  6416. "parameters": [
  6417. {
  6418. "type": "string",
  6419. "description": "owner of the repo",
  6420. "name": "owner",
  6421. "in": "path",
  6422. "required": true
  6423. },
  6424. {
  6425. "type": "string",
  6426. "description": "name of the repo",
  6427. "name": "repo",
  6428. "in": "path",
  6429. "required": true
  6430. },
  6431. {
  6432. "type": "string",
  6433. "description": "the milestone to edit, identified by ID and if not available by name",
  6434. "name": "id",
  6435. "in": "path",
  6436. "required": true
  6437. },
  6438. {
  6439. "name": "body",
  6440. "in": "body",
  6441. "schema": {
  6442. "$ref": "#/definitions/EditMilestoneOption"
  6443. }
  6444. }
  6445. ],
  6446. "responses": {
  6447. "200": {
  6448. "$ref": "#/responses/Milestone"
  6449. }
  6450. }
  6451. }
  6452. },
  6453. "/repos/{owner}/{repo}/mirror-sync": {
  6454. "post": {
  6455. "produces": [
  6456. "application/json"
  6457. ],
  6458. "tags": [
  6459. "repository"
  6460. ],
  6461. "summary": "Sync a mirrored repository",
  6462. "operationId": "repoMirrorSync",
  6463. "parameters": [
  6464. {
  6465. "type": "string",
  6466. "description": "owner of the repo to sync",
  6467. "name": "owner",
  6468. "in": "path",
  6469. "required": true
  6470. },
  6471. {
  6472. "type": "string",
  6473. "description": "name of the repo to sync",
  6474. "name": "repo",
  6475. "in": "path",
  6476. "required": true
  6477. }
  6478. ],
  6479. "responses": {
  6480. "200": {
  6481. "$ref": "#/responses/empty"
  6482. },
  6483. "403": {
  6484. "$ref": "#/responses/forbidden"
  6485. }
  6486. }
  6487. }
  6488. },
  6489. "/repos/{owner}/{repo}/notifications": {
  6490. "get": {
  6491. "consumes": [
  6492. "application/json"
  6493. ],
  6494. "produces": [
  6495. "application/json"
  6496. ],
  6497. "tags": [
  6498. "notification"
  6499. ],
  6500. "summary": "List users's notification threads on a specific repo",
  6501. "operationId": "notifyGetRepoList",
  6502. "parameters": [
  6503. {
  6504. "type": "string",
  6505. "description": "owner of the repo",
  6506. "name": "owner",
  6507. "in": "path",
  6508. "required": true
  6509. },
  6510. {
  6511. "type": "string",
  6512. "description": "name of the repo",
  6513. "name": "repo",
  6514. "in": "path",
  6515. "required": true
  6516. },
  6517. {
  6518. "type": "string",
  6519. "description": "If true, show notifications marked as read. Default value is false",
  6520. "name": "all",
  6521. "in": "query"
  6522. },
  6523. {
  6524. "type": "array",
  6525. "items": {
  6526. "type": "string"
  6527. },
  6528. "collectionFormat": "multi",
  6529. "description": "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread \u0026 pinned",
  6530. "name": "status-types",
  6531. "in": "query"
  6532. },
  6533. {
  6534. "type": "string",
  6535. "format": "date-time",
  6536. "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
  6537. "name": "since",
  6538. "in": "query"
  6539. },
  6540. {
  6541. "type": "string",
  6542. "format": "date-time",
  6543. "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
  6544. "name": "before",
  6545. "in": "query"
  6546. },
  6547. {
  6548. "type": "integer",
  6549. "description": "page number of results to return (1-based)",
  6550. "name": "page",
  6551. "in": "query"
  6552. },
  6553. {
  6554. "type": "integer",
  6555. "description": "page size of results",
  6556. "name": "limit",
  6557. "in": "query"
  6558. }
  6559. ],
  6560. "responses": {
  6561. "200": {
  6562. "$ref": "#/responses/NotificationThreadList"
  6563. }
  6564. }
  6565. },
  6566. "put": {
  6567. "consumes": [
  6568. "application/json"
  6569. ],
  6570. "produces": [
  6571. "application/json"
  6572. ],
  6573. "tags": [
  6574. "notification"
  6575. ],
  6576. "summary": "Mark notification threads as read, pinned or unread on a specific repo",
  6577. "operationId": "notifyReadRepoList",
  6578. "parameters": [
  6579. {
  6580. "type": "string",
  6581. "description": "owner of the repo",
  6582. "name": "owner",
  6583. "in": "path",
  6584. "required": true
  6585. },
  6586. {
  6587. "type": "string",
  6588. "description": "name of the repo",
  6589. "name": "repo",
  6590. "in": "path",
  6591. "required": true
  6592. },
  6593. {
  6594. "type": "string",
  6595. "description": "If true, mark all notifications on this repo. Default value is false",
  6596. "name": "all",
  6597. "in": "query"
  6598. },
  6599. {
  6600. "type": "array",
  6601. "items": {
  6602. "type": "string"
  6603. },
  6604. "collectionFormat": "multi",
  6605. "description": "Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.",
  6606. "name": "status-types",
  6607. "in": "query"
  6608. },
  6609. {
  6610. "type": "string",
  6611. "description": "Status to mark notifications as. Defaults to read.",
  6612. "name": "to-status",
  6613. "in": "query"
  6614. },
  6615. {
  6616. "type": "string",
  6617. "format": "date-time",
  6618. "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
  6619. "name": "last_read_at",
  6620. "in": "query"
  6621. }
  6622. ],
  6623. "responses": {
  6624. "205": {
  6625. "$ref": "#/responses/empty"
  6626. }
  6627. }
  6628. }
  6629. },
  6630. "/repos/{owner}/{repo}/pulls": {
  6631. "get": {
  6632. "produces": [
  6633. "application/json"
  6634. ],
  6635. "tags": [
  6636. "repository"
  6637. ],
  6638. "summary": "List a repo's pull requests",
  6639. "operationId": "repoListPullRequests",
  6640. "parameters": [
  6641. {
  6642. "type": "string",
  6643. "description": "owner of the repo",
  6644. "name": "owner",
  6645. "in": "path",
  6646. "required": true
  6647. },
  6648. {
  6649. "type": "string",
  6650. "description": "name of the repo",
  6651. "name": "repo",
  6652. "in": "path",
  6653. "required": true
  6654. },
  6655. {
  6656. "enum": [
  6657. "closed",
  6658. "open",
  6659. "all"
  6660. ],
  6661. "type": "string",
  6662. "description": "State of pull request: open or closed (optional)",
  6663. "name": "state",
  6664. "in": "query"
  6665. },
  6666. {
  6667. "enum": [
  6668. "oldest",
  6669. "recentupdate",
  6670. "leastupdate",
  6671. "mostcomment",
  6672. "leastcomment",
  6673. "priority"
  6674. ],
  6675. "type": "string",
  6676. "description": "Type of sort",
  6677. "name": "sort",
  6678. "in": "query"
  6679. },
  6680. {
  6681. "type": "integer",
  6682. "format": "int64",
  6683. "description": "ID of the milestone",
  6684. "name": "milestone",
  6685. "in": "query"
  6686. },
  6687. {
  6688. "type": "array",
  6689. "items": {
  6690. "type": "integer",
  6691. "format": "int64"
  6692. },
  6693. "collectionFormat": "multi",
  6694. "description": "Label IDs",
  6695. "name": "labels",
  6696. "in": "query"
  6697. },
  6698. {
  6699. "type": "integer",
  6700. "description": "page number of results to return (1-based)",
  6701. "name": "page",
  6702. "in": "query"
  6703. },
  6704. {
  6705. "type": "integer",
  6706. "description": "page size of results",
  6707. "name": "limit",
  6708. "in": "query"
  6709. }
  6710. ],
  6711. "responses": {
  6712. "200": {
  6713. "$ref": "#/responses/PullRequestList"
  6714. }
  6715. }
  6716. },
  6717. "post": {
  6718. "consumes": [
  6719. "application/json"
  6720. ],
  6721. "produces": [
  6722. "application/json"
  6723. ],
  6724. "tags": [
  6725. "repository"
  6726. ],
  6727. "summary": "Create a pull request",
  6728. "operationId": "repoCreatePullRequest",
  6729. "parameters": [
  6730. {
  6731. "type": "string",
  6732. "description": "owner of the repo",
  6733. "name": "owner",
  6734. "in": "path",
  6735. "required": true
  6736. },
  6737. {
  6738. "type": "string",
  6739. "description": "name of the repo",
  6740. "name": "repo",
  6741. "in": "path",
  6742. "required": true
  6743. },
  6744. {
  6745. "name": "body",
  6746. "in": "body",
  6747. "schema": {
  6748. "$ref": "#/definitions/CreatePullRequestOption"
  6749. }
  6750. }
  6751. ],
  6752. "responses": {
  6753. "201": {
  6754. "$ref": "#/responses/PullRequest"
  6755. },
  6756. "409": {
  6757. "$ref": "#/responses/error"
  6758. },
  6759. "422": {
  6760. "$ref": "#/responses/validationError"
  6761. }
  6762. }
  6763. }
  6764. },
  6765. "/repos/{owner}/{repo}/pulls/{index}": {
  6766. "get": {
  6767. "produces": [
  6768. "application/json"
  6769. ],
  6770. "tags": [
  6771. "repository"
  6772. ],
  6773. "summary": "Get a pull request",
  6774. "operationId": "repoGetPullRequest",
  6775. "parameters": [
  6776. {
  6777. "type": "string",
  6778. "description": "owner of the repo",
  6779. "name": "owner",
  6780. "in": "path",
  6781. "required": true
  6782. },
  6783. {
  6784. "type": "string",
  6785. "description": "name of the repo",
  6786. "name": "repo",
  6787. "in": "path",
  6788. "required": true
  6789. },
  6790. {
  6791. "type": "integer",
  6792. "format": "int64",
  6793. "description": "index of the pull request to get",
  6794. "name": "index",
  6795. "in": "path",
  6796. "required": true
  6797. }
  6798. ],
  6799. "responses": {
  6800. "200": {
  6801. "$ref": "#/responses/PullRequest"
  6802. },
  6803. "404": {
  6804. "$ref": "#/responses/notFound"
  6805. }
  6806. }
  6807. },
  6808. "patch": {
  6809. "consumes": [
  6810. "application/json"
  6811. ],
  6812. "produces": [
  6813. "application/json"
  6814. ],
  6815. "tags": [
  6816. "repository"
  6817. ],
  6818. "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.",
  6819. "operationId": "repoEditPullRequest",
  6820. "parameters": [
  6821. {
  6822. "type": "string",
  6823. "description": "owner of the repo",
  6824. "name": "owner",
  6825. "in": "path",
  6826. "required": true
  6827. },
  6828. {
  6829. "type": "string",
  6830. "description": "name of the repo",
  6831. "name": "repo",
  6832. "in": "path",
  6833. "required": true
  6834. },
  6835. {
  6836. "type": "integer",
  6837. "format": "int64",
  6838. "description": "index of the pull request to edit",
  6839. "name": "index",
  6840. "in": "path",
  6841. "required": true
  6842. },
  6843. {
  6844. "name": "body",
  6845. "in": "body",
  6846. "schema": {
  6847. "$ref": "#/definitions/EditPullRequestOption"
  6848. }
  6849. }
  6850. ],
  6851. "responses": {
  6852. "201": {
  6853. "$ref": "#/responses/PullRequest"
  6854. },
  6855. "403": {
  6856. "$ref": "#/responses/forbidden"
  6857. },
  6858. "409": {
  6859. "$ref": "#/responses/error"
  6860. },
  6861. "412": {
  6862. "$ref": "#/responses/error"
  6863. },
  6864. "422": {
  6865. "$ref": "#/responses/validationError"
  6866. }
  6867. }
  6868. }
  6869. },
  6870. "/repos/{owner}/{repo}/pulls/{index}.diff": {
  6871. "get": {
  6872. "produces": [
  6873. "text/plain"
  6874. ],
  6875. "tags": [
  6876. "repository"
  6877. ],
  6878. "summary": "Get a pull request diff",
  6879. "operationId": "repoDownloadPullDiff",
  6880. "parameters": [
  6881. {
  6882. "type": "string",
  6883. "description": "owner of the repo",
  6884. "name": "owner",
  6885. "in": "path",
  6886. "required": true
  6887. },
  6888. {
  6889. "type": "string",
  6890. "description": "name of the repo",
  6891. "name": "repo",
  6892. "in": "path",
  6893. "required": true
  6894. },
  6895. {
  6896. "type": "integer",
  6897. "format": "int64",
  6898. "description": "index of the pull request to get",
  6899. "name": "index",
  6900. "in": "path",
  6901. "required": true
  6902. }
  6903. ],
  6904. "responses": {
  6905. "200": {
  6906. "$ref": "#/responses/string"
  6907. },
  6908. "404": {
  6909. "$ref": "#/responses/notFound"
  6910. }
  6911. }
  6912. }
  6913. },
  6914. "/repos/{owner}/{repo}/pulls/{index}.patch": {
  6915. "get": {
  6916. "produces": [
  6917. "text/plain"
  6918. ],
  6919. "tags": [
  6920. "repository"
  6921. ],
  6922. "summary": "Get a pull request patch file",
  6923. "operationId": "repoDownloadPullPatch",
  6924. "parameters": [
  6925. {
  6926. "type": "string",
  6927. "description": "owner of the repo",
  6928. "name": "owner",
  6929. "in": "path",
  6930. "required": true
  6931. },
  6932. {
  6933. "type": "string",
  6934. "description": "name of the repo",
  6935. "name": "repo",
  6936. "in": "path",
  6937. "required": true
  6938. },
  6939. {
  6940. "type": "integer",
  6941. "format": "int64",
  6942. "description": "index of the pull request to get",
  6943. "name": "index",
  6944. "in": "path",
  6945. "required": true
  6946. }
  6947. ],
  6948. "responses": {
  6949. "200": {
  6950. "$ref": "#/responses/string"
  6951. },
  6952. "404": {
  6953. "$ref": "#/responses/notFound"
  6954. }
  6955. }
  6956. }
  6957. },
  6958. "/repos/{owner}/{repo}/pulls/{index}/merge": {
  6959. "get": {
  6960. "produces": [
  6961. "application/json"
  6962. ],
  6963. "tags": [
  6964. "repository"
  6965. ],
  6966. "summary": "Check if a pull request has been merged",
  6967. "operationId": "repoPullRequestIsMerged",
  6968. "parameters": [
  6969. {
  6970. "type": "string",
  6971. "description": "owner of the repo",
  6972. "name": "owner",
  6973. "in": "path",
  6974. "required": true
  6975. },
  6976. {
  6977. "type": "string",
  6978. "description": "name of the repo",
  6979. "name": "repo",
  6980. "in": "path",
  6981. "required": true
  6982. },
  6983. {
  6984. "type": "integer",
  6985. "format": "int64",
  6986. "description": "index of the pull request",
  6987. "name": "index",
  6988. "in": "path",
  6989. "required": true
  6990. }
  6991. ],
  6992. "responses": {
  6993. "204": {
  6994. "description": "pull request has been merged"
  6995. },
  6996. "404": {
  6997. "description": "pull request has not been merged"
  6998. }
  6999. }
  7000. },
  7001. "post": {
  7002. "produces": [
  7003. "application/json"
  7004. ],
  7005. "tags": [
  7006. "repository"
  7007. ],
  7008. "summary": "Merge a pull request",
  7009. "operationId": "repoMergePullRequest",
  7010. "parameters": [
  7011. {
  7012. "type": "string",
  7013. "description": "owner of the repo",
  7014. "name": "owner",
  7015. "in": "path",
  7016. "required": true
  7017. },
  7018. {
  7019. "type": "string",
  7020. "description": "name of the repo",
  7021. "name": "repo",
  7022. "in": "path",
  7023. "required": true
  7024. },
  7025. {
  7026. "type": "integer",
  7027. "format": "int64",
  7028. "description": "index of the pull request to merge",
  7029. "name": "index",
  7030. "in": "path",
  7031. "required": true
  7032. },
  7033. {
  7034. "name": "body",
  7035. "in": "body",
  7036. "schema": {
  7037. "$ref": "#/definitions/MergePullRequestOption"
  7038. }
  7039. }
  7040. ],
  7041. "responses": {
  7042. "200": {
  7043. "$ref": "#/responses/empty"
  7044. },
  7045. "405": {
  7046. "$ref": "#/responses/empty"
  7047. },
  7048. "409": {
  7049. "$ref": "#/responses/error"
  7050. }
  7051. }
  7052. }
  7053. },
  7054. "/repos/{owner}/{repo}/pulls/{index}/reviews": {
  7055. "get": {
  7056. "produces": [
  7057. "application/json"
  7058. ],
  7059. "tags": [
  7060. "repository"
  7061. ],
  7062. "summary": "List all reviews for a pull request",
  7063. "operationId": "repoListPullReviews",
  7064. "parameters": [
  7065. {
  7066. "type": "string",
  7067. "description": "owner of the repo",
  7068. "name": "owner",
  7069. "in": "path",
  7070. "required": true
  7071. },
  7072. {
  7073. "type": "string",
  7074. "description": "name of the repo",
  7075. "name": "repo",
  7076. "in": "path",
  7077. "required": true
  7078. },
  7079. {
  7080. "type": "integer",
  7081. "format": "int64",
  7082. "description": "index of the pull request",
  7083. "name": "index",
  7084. "in": "path",
  7085. "required": true
  7086. },
  7087. {
  7088. "type": "integer",
  7089. "description": "page number of results to return (1-based)",
  7090. "name": "page",
  7091. "in": "query"
  7092. },
  7093. {
  7094. "type": "integer",
  7095. "description": "page size of results",
  7096. "name": "limit",
  7097. "in": "query"
  7098. }
  7099. ],
  7100. "responses": {
  7101. "200": {
  7102. "$ref": "#/responses/PullReviewList"
  7103. },
  7104. "404": {
  7105. "$ref": "#/responses/notFound"
  7106. }
  7107. }
  7108. },
  7109. "post": {
  7110. "produces": [
  7111. "application/json"
  7112. ],
  7113. "tags": [
  7114. "repository"
  7115. ],
  7116. "summary": "Create a review to an pull request",
  7117. "operationId": "repoCreatePullReview",
  7118. "parameters": [
  7119. {
  7120. "type": "string",
  7121. "description": "owner of the repo",
  7122. "name": "owner",
  7123. "in": "path",
  7124. "required": true
  7125. },
  7126. {
  7127. "type": "string",
  7128. "description": "name of the repo",
  7129. "name": "repo",
  7130. "in": "path",
  7131. "required": true
  7132. },
  7133. {
  7134. "type": "integer",
  7135. "format": "int64",
  7136. "description": "index of the pull request",
  7137. "name": "index",
  7138. "in": "path",
  7139. "required": true
  7140. },
  7141. {
  7142. "name": "body",
  7143. "in": "body",
  7144. "required": true,
  7145. "schema": {
  7146. "$ref": "#/definitions/CreatePullReviewOptions"
  7147. }
  7148. }
  7149. ],
  7150. "responses": {
  7151. "200": {
  7152. "$ref": "#/responses/PullReview"
  7153. },
  7154. "404": {
  7155. "$ref": "#/responses/notFound"
  7156. },
  7157. "422": {
  7158. "$ref": "#/responses/validationError"
  7159. }
  7160. }
  7161. }
  7162. },
  7163. "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}": {
  7164. "get": {
  7165. "produces": [
  7166. "application/json"
  7167. ],
  7168. "tags": [
  7169. "repository"
  7170. ],
  7171. "summary": "Get a specific review for a pull request",
  7172. "operationId": "repoGetPullReview",
  7173. "parameters": [
  7174. {
  7175. "type": "string",
  7176. "description": "owner of the repo",
  7177. "name": "owner",
  7178. "in": "path",
  7179. "required": true
  7180. },
  7181. {
  7182. "type": "string",
  7183. "description": "name of the repo",
  7184. "name": "repo",
  7185. "in": "path",
  7186. "required": true
  7187. },
  7188. {
  7189. "type": "integer",
  7190. "format": "int64",
  7191. "description": "index of the pull request",
  7192. "name": "index",
  7193. "in": "path",
  7194. "required": true
  7195. },
  7196. {
  7197. "type": "integer",
  7198. "format": "int64",
  7199. "description": "id of the review",
  7200. "name": "id",
  7201. "in": "path",
  7202. "required": true
  7203. }
  7204. ],
  7205. "responses": {
  7206. "200": {
  7207. "$ref": "#/responses/PullReview"
  7208. },
  7209. "404": {
  7210. "$ref": "#/responses/notFound"
  7211. }
  7212. }
  7213. },
  7214. "post": {
  7215. "produces": [
  7216. "application/json"
  7217. ],
  7218. "tags": [
  7219. "repository"
  7220. ],
  7221. "summary": "Submit a pending review to an pull request",
  7222. "operationId": "repoSubmitPullReview",
  7223. "parameters": [
  7224. {
  7225. "type": "string",
  7226. "description": "owner of the repo",
  7227. "name": "owner",
  7228. "in": "path",
  7229. "required": true
  7230. },
  7231. {
  7232. "type": "string",
  7233. "description": "name of the repo",
  7234. "name": "repo",
  7235. "in": "path",
  7236. "required": true
  7237. },
  7238. {
  7239. "type": "integer",
  7240. "format": "int64",
  7241. "description": "index of the pull request",
  7242. "name": "index",
  7243. "in": "path",
  7244. "required": true
  7245. },
  7246. {
  7247. "type": "integer",
  7248. "format": "int64",
  7249. "description": "id of the review",
  7250. "name": "id",
  7251. "in": "path",
  7252. "required": true
  7253. },
  7254. {
  7255. "name": "body",
  7256. "in": "body",
  7257. "required": true,
  7258. "schema": {
  7259. "$ref": "#/definitions/SubmitPullReviewOptions"
  7260. }
  7261. }
  7262. ],
  7263. "responses": {
  7264. "200": {
  7265. "$ref": "#/responses/PullReview"
  7266. },
  7267. "404": {
  7268. "$ref": "#/responses/notFound"
  7269. },
  7270. "422": {
  7271. "$ref": "#/responses/validationError"
  7272. }
  7273. }
  7274. },
  7275. "delete": {
  7276. "produces": [
  7277. "application/json"
  7278. ],
  7279. "tags": [
  7280. "repository"
  7281. ],
  7282. "summary": "Delete a specific review from a pull request",
  7283. "operationId": "repoDeletePullReview",
  7284. "parameters": [
  7285. {
  7286. "type": "string",
  7287. "description": "owner of the repo",
  7288. "name": "owner",
  7289. "in": "path",
  7290. "required": true
  7291. },
  7292. {
  7293. "type": "string",
  7294. "description": "name of the repo",
  7295. "name": "repo",
  7296. "in": "path",
  7297. "required": true
  7298. },
  7299. {
  7300. "type": "integer",
  7301. "format": "int64",
  7302. "description": "index of the pull request",
  7303. "name": "index",
  7304. "in": "path",
  7305. "required": true
  7306. },
  7307. {
  7308. "type": "integer",
  7309. "format": "int64",
  7310. "description": "id of the review",
  7311. "name": "id",
  7312. "in": "path",
  7313. "required": true
  7314. }
  7315. ],
  7316. "responses": {
  7317. "204": {
  7318. "$ref": "#/responses/empty"
  7319. },
  7320. "403": {
  7321. "$ref": "#/responses/forbidden"
  7322. },
  7323. "404": {
  7324. "$ref": "#/responses/notFound"
  7325. }
  7326. }
  7327. }
  7328. },
  7329. "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments": {
  7330. "get": {
  7331. "produces": [
  7332. "application/json"
  7333. ],
  7334. "tags": [
  7335. "repository"
  7336. ],
  7337. "summary": "Get a specific review for a pull request",
  7338. "operationId": "repoGetPullReviewComments",
  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. "type": "integer",
  7364. "format": "int64",
  7365. "description": "id of the review",
  7366. "name": "id",
  7367. "in": "path",
  7368. "required": true
  7369. }
  7370. ],
  7371. "responses": {
  7372. "200": {
  7373. "$ref": "#/responses/PullReviewCommentList"
  7374. },
  7375. "404": {
  7376. "$ref": "#/responses/notFound"
  7377. }
  7378. }
  7379. }
  7380. },
  7381. "/repos/{owner}/{repo}/pulls/{index}/update": {
  7382. "post": {
  7383. "produces": [
  7384. "application/json"
  7385. ],
  7386. "tags": [
  7387. "repository"
  7388. ],
  7389. "summary": "Merge PR's baseBranch into headBranch",
  7390. "operationId": "repoUpdatePullRequest",
  7391. "parameters": [
  7392. {
  7393. "type": "string",
  7394. "description": "owner of the repo",
  7395. "name": "owner",
  7396. "in": "path",
  7397. "required": true
  7398. },
  7399. {
  7400. "type": "string",
  7401. "description": "name of the repo",
  7402. "name": "repo",
  7403. "in": "path",
  7404. "required": true
  7405. },
  7406. {
  7407. "type": "integer",
  7408. "format": "int64",
  7409. "description": "index of the pull request to get",
  7410. "name": "index",
  7411. "in": "path",
  7412. "required": true
  7413. }
  7414. ],
  7415. "responses": {
  7416. "200": {
  7417. "$ref": "#/responses/empty"
  7418. },
  7419. "403": {
  7420. "$ref": "#/responses/forbidden"
  7421. },
  7422. "404": {
  7423. "$ref": "#/responses/notFound"
  7424. },
  7425. "409": {
  7426. "$ref": "#/responses/error"
  7427. },
  7428. "422": {
  7429. "$ref": "#/responses/validationError"
  7430. }
  7431. }
  7432. }
  7433. },
  7434. "/repos/{owner}/{repo}/raw/{filepath}": {
  7435. "get": {
  7436. "produces": [
  7437. "application/json"
  7438. ],
  7439. "tags": [
  7440. "repository"
  7441. ],
  7442. "summary": "Get a file from a repository",
  7443. "operationId": "repoGetRawFile",
  7444. "parameters": [
  7445. {
  7446. "type": "string",
  7447. "description": "owner of the repo",
  7448. "name": "owner",
  7449. "in": "path",
  7450. "required": true
  7451. },
  7452. {
  7453. "type": "string",
  7454. "description": "name of the repo",
  7455. "name": "repo",
  7456. "in": "path",
  7457. "required": true
  7458. },
  7459. {
  7460. "type": "string",
  7461. "description": "filepath of the file to get",
  7462. "name": "filepath",
  7463. "in": "path",
  7464. "required": true
  7465. }
  7466. ],
  7467. "responses": {
  7468. "200": {
  7469. "description": "success"
  7470. },
  7471. "404": {
  7472. "$ref": "#/responses/notFound"
  7473. }
  7474. }
  7475. }
  7476. },
  7477. "/repos/{owner}/{repo}/releases": {
  7478. "get": {
  7479. "produces": [
  7480. "application/json"
  7481. ],
  7482. "tags": [
  7483. "repository"
  7484. ],
  7485. "summary": "List a repo's releases",
  7486. "operationId": "repoListReleases",
  7487. "parameters": [
  7488. {
  7489. "type": "string",
  7490. "description": "owner of the repo",
  7491. "name": "owner",
  7492. "in": "path",
  7493. "required": true
  7494. },
  7495. {
  7496. "type": "string",
  7497. "description": "name of the repo",
  7498. "name": "repo",
  7499. "in": "path",
  7500. "required": true
  7501. },
  7502. {
  7503. "type": "integer",
  7504. "description": "page size of results, deprecated - use limit",
  7505. "name": "per_page",
  7506. "in": "query"
  7507. },
  7508. {
  7509. "type": "integer",
  7510. "description": "page number of results to return (1-based)",
  7511. "name": "page",
  7512. "in": "query"
  7513. },
  7514. {
  7515. "type": "integer",
  7516. "description": "page size of results",
  7517. "name": "limit",
  7518. "in": "query"
  7519. }
  7520. ],
  7521. "responses": {
  7522. "200": {
  7523. "$ref": "#/responses/ReleaseList"
  7524. }
  7525. }
  7526. },
  7527. "post": {
  7528. "consumes": [
  7529. "application/json"
  7530. ],
  7531. "produces": [
  7532. "application/json"
  7533. ],
  7534. "tags": [
  7535. "repository"
  7536. ],
  7537. "summary": "Create a release",
  7538. "operationId": "repoCreateRelease",
  7539. "parameters": [
  7540. {
  7541. "type": "string",
  7542. "description": "owner of the repo",
  7543. "name": "owner",
  7544. "in": "path",
  7545. "required": true
  7546. },
  7547. {
  7548. "type": "string",
  7549. "description": "name of the repo",
  7550. "name": "repo",
  7551. "in": "path",
  7552. "required": true
  7553. },
  7554. {
  7555. "name": "body",
  7556. "in": "body",
  7557. "schema": {
  7558. "$ref": "#/definitions/CreateReleaseOption"
  7559. }
  7560. }
  7561. ],
  7562. "responses": {
  7563. "201": {
  7564. "$ref": "#/responses/Release"
  7565. },
  7566. "409": {
  7567. "$ref": "#/responses/error"
  7568. }
  7569. }
  7570. }
  7571. },
  7572. "/repos/{owner}/{repo}/releases/{id}": {
  7573. "get": {
  7574. "produces": [
  7575. "application/json"
  7576. ],
  7577. "tags": [
  7578. "repository"
  7579. ],
  7580. "summary": "Get a release",
  7581. "operationId": "repoGetRelease",
  7582. "parameters": [
  7583. {
  7584. "type": "string",
  7585. "description": "owner of the repo",
  7586. "name": "owner",
  7587. "in": "path",
  7588. "required": true
  7589. },
  7590. {
  7591. "type": "string",
  7592. "description": "name of the repo",
  7593. "name": "repo",
  7594. "in": "path",
  7595. "required": true
  7596. },
  7597. {
  7598. "type": "integer",
  7599. "format": "int64",
  7600. "description": "id of the release to get",
  7601. "name": "id",
  7602. "in": "path",
  7603. "required": true
  7604. }
  7605. ],
  7606. "responses": {
  7607. "200": {
  7608. "$ref": "#/responses/Release"
  7609. }
  7610. }
  7611. },
  7612. "delete": {
  7613. "tags": [
  7614. "repository"
  7615. ],
  7616. "summary": "Delete a release",
  7617. "operationId": "repoDeleteRelease",
  7618. "parameters": [
  7619. {
  7620. "type": "string",
  7621. "description": "owner of the repo",
  7622. "name": "owner",
  7623. "in": "path",
  7624. "required": true
  7625. },
  7626. {
  7627. "type": "string",
  7628. "description": "name of the repo",
  7629. "name": "repo",
  7630. "in": "path",
  7631. "required": true
  7632. },
  7633. {
  7634. "type": "integer",
  7635. "format": "int64",
  7636. "description": "id of the release to delete",
  7637. "name": "id",
  7638. "in": "path",
  7639. "required": true
  7640. }
  7641. ],
  7642. "responses": {
  7643. "204": {
  7644. "$ref": "#/responses/empty"
  7645. }
  7646. }
  7647. },
  7648. "patch": {
  7649. "consumes": [
  7650. "application/json"
  7651. ],
  7652. "produces": [
  7653. "application/json"
  7654. ],
  7655. "tags": [
  7656. "repository"
  7657. ],
  7658. "summary": "Update a release",
  7659. "operationId": "repoEditRelease",
  7660. "parameters": [
  7661. {
  7662. "type": "string",
  7663. "description": "owner of the repo",
  7664. "name": "owner",
  7665. "in": "path",
  7666. "required": true
  7667. },
  7668. {
  7669. "type": "string",
  7670. "description": "name of the repo",
  7671. "name": "repo",
  7672. "in": "path",
  7673. "required": true
  7674. },
  7675. {
  7676. "type": "integer",
  7677. "format": "int64",
  7678. "description": "id of the release to edit",
  7679. "name": "id",
  7680. "in": "path",
  7681. "required": true
  7682. },
  7683. {
  7684. "name": "body",
  7685. "in": "body",
  7686. "schema": {
  7687. "$ref": "#/definitions/EditReleaseOption"
  7688. }
  7689. }
  7690. ],
  7691. "responses": {
  7692. "200": {
  7693. "$ref": "#/responses/Release"
  7694. }
  7695. }
  7696. }
  7697. },
  7698. "/repos/{owner}/{repo}/releases/{id}/assets": {
  7699. "get": {
  7700. "produces": [
  7701. "application/json"
  7702. ],
  7703. "tags": [
  7704. "repository"
  7705. ],
  7706. "summary": "List release's attachments",
  7707. "operationId": "repoListReleaseAttachments",
  7708. "parameters": [
  7709. {
  7710. "type": "string",
  7711. "description": "owner of the repo",
  7712. "name": "owner",
  7713. "in": "path",
  7714. "required": true
  7715. },
  7716. {
  7717. "type": "string",
  7718. "description": "name of the repo",
  7719. "name": "repo",
  7720. "in": "path",
  7721. "required": true
  7722. },
  7723. {
  7724. "type": "integer",
  7725. "format": "int64",
  7726. "description": "id of the release",
  7727. "name": "id",
  7728. "in": "path",
  7729. "required": true
  7730. }
  7731. ],
  7732. "responses": {
  7733. "200": {
  7734. "$ref": "#/responses/AttachmentList"
  7735. }
  7736. }
  7737. },
  7738. "post": {
  7739. "consumes": [
  7740. "multipart/form-data"
  7741. ],
  7742. "produces": [
  7743. "application/json"
  7744. ],
  7745. "tags": [
  7746. "repository"
  7747. ],
  7748. "summary": "Create a release attachment",
  7749. "operationId": "repoCreateReleaseAttachment",
  7750. "parameters": [
  7751. {
  7752. "type": "string",
  7753. "description": "owner of the repo",
  7754. "name": "owner",
  7755. "in": "path",
  7756. "required": true
  7757. },
  7758. {
  7759. "type": "string",
  7760. "description": "name of the repo",
  7761. "name": "repo",
  7762. "in": "path",
  7763. "required": true
  7764. },
  7765. {
  7766. "type": "integer",
  7767. "format": "int64",
  7768. "description": "id of the release",
  7769. "name": "id",
  7770. "in": "path",
  7771. "required": true
  7772. },
  7773. {
  7774. "type": "string",
  7775. "description": "name of the attachment",
  7776. "name": "name",
  7777. "in": "query"
  7778. },
  7779. {
  7780. "type": "file",
  7781. "description": "attachment to upload",
  7782. "name": "attachment",
  7783. "in": "formData",
  7784. "required": true
  7785. }
  7786. ],
  7787. "responses": {
  7788. "201": {
  7789. "$ref": "#/responses/Attachment"
  7790. },
  7791. "400": {
  7792. "$ref": "#/responses/error"
  7793. }
  7794. }
  7795. }
  7796. },
  7797. "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": {
  7798. "get": {
  7799. "produces": [
  7800. "application/json"
  7801. ],
  7802. "tags": [
  7803. "repository"
  7804. ],
  7805. "summary": "Get a release attachment",
  7806. "operationId": "repoGetReleaseAttachment",
  7807. "parameters": [
  7808. {
  7809. "type": "string",
  7810. "description": "owner of the repo",
  7811. "name": "owner",
  7812. "in": "path",
  7813. "required": true
  7814. },
  7815. {
  7816. "type": "string",
  7817. "description": "name of the repo",
  7818. "name": "repo",
  7819. "in": "path",
  7820. "required": true
  7821. },
  7822. {
  7823. "type": "integer",
  7824. "format": "int64",
  7825. "description": "id of the release",
  7826. "name": "id",
  7827. "in": "path",
  7828. "required": true
  7829. },
  7830. {
  7831. "type": "integer",
  7832. "format": "int64",
  7833. "description": "id of the attachment to get",
  7834. "name": "attachment_id",
  7835. "in": "path",
  7836. "required": true
  7837. }
  7838. ],
  7839. "responses": {
  7840. "200": {
  7841. "$ref": "#/responses/Attachment"
  7842. }
  7843. }
  7844. },
  7845. "delete": {
  7846. "produces": [
  7847. "application/json"
  7848. ],
  7849. "tags": [
  7850. "repository"
  7851. ],
  7852. "summary": "Delete a release attachment",
  7853. "operationId": "repoDeleteReleaseAttachment",
  7854. "parameters": [
  7855. {
  7856. "type": "string",
  7857. "description": "owner of the repo",
  7858. "name": "owner",
  7859. "in": "path",
  7860. "required": true
  7861. },
  7862. {
  7863. "type": "string",
  7864. "description": "name of the repo",
  7865. "name": "repo",
  7866. "in": "path",
  7867. "required": true
  7868. },
  7869. {
  7870. "type": "integer",
  7871. "format": "int64",
  7872. "description": "id of the release",
  7873. "name": "id",
  7874. "in": "path",
  7875. "required": true
  7876. },
  7877. {
  7878. "type": "integer",
  7879. "format": "int64",
  7880. "description": "id of the attachment to delete",
  7881. "name": "attachment_id",
  7882. "in": "path",
  7883. "required": true
  7884. }
  7885. ],
  7886. "responses": {
  7887. "204": {
  7888. "$ref": "#/responses/empty"
  7889. }
  7890. }
  7891. },
  7892. "patch": {
  7893. "consumes": [
  7894. "application/json"
  7895. ],
  7896. "produces": [
  7897. "application/json"
  7898. ],
  7899. "tags": [
  7900. "repository"
  7901. ],
  7902. "summary": "Edit a release attachment",
  7903. "operationId": "repoEditReleaseAttachment",
  7904. "parameters": [
  7905. {
  7906. "type": "string",
  7907. "description": "owner of the repo",
  7908. "name": "owner",
  7909. "in": "path",
  7910. "required": true
  7911. },
  7912. {
  7913. "type": "string",
  7914. "description": "name of the repo",
  7915. "name": "repo",
  7916. "in": "path",
  7917. "required": true
  7918. },
  7919. {
  7920. "type": "integer",
  7921. "format": "int64",
  7922. "description": "id of the release",
  7923. "name": "id",
  7924. "in": "path",
  7925. "required": true
  7926. },
  7927. {
  7928. "type": "integer",
  7929. "format": "int64",
  7930. "description": "id of the attachment to edit",
  7931. "name": "attachment_id",
  7932. "in": "path",
  7933. "required": true
  7934. },
  7935. {
  7936. "name": "body",
  7937. "in": "body",
  7938. "schema": {
  7939. "$ref": "#/definitions/EditAttachmentOptions"
  7940. }
  7941. }
  7942. ],
  7943. "responses": {
  7944. "201": {
  7945. "$ref": "#/responses/Attachment"
  7946. }
  7947. }
  7948. }
  7949. },
  7950. "/repos/{owner}/{repo}/signing-key.gpg": {
  7951. "get": {
  7952. "produces": [
  7953. "text/plain"
  7954. ],
  7955. "tags": [
  7956. "repository"
  7957. ],
  7958. "summary": "Get signing-key.gpg for given repository",
  7959. "operationId": "repoSigningKey",
  7960. "parameters": [
  7961. {
  7962. "type": "string",
  7963. "description": "owner of the repo",
  7964. "name": "owner",
  7965. "in": "path",
  7966. "required": true
  7967. },
  7968. {
  7969. "type": "string",
  7970. "description": "name of the repo",
  7971. "name": "repo",
  7972. "in": "path",
  7973. "required": true
  7974. }
  7975. ],
  7976. "responses": {
  7977. "200": {
  7978. "description": "GPG armored public key",
  7979. "schema": {
  7980. "type": "string"
  7981. }
  7982. }
  7983. }
  7984. }
  7985. },
  7986. "/repos/{owner}/{repo}/stargazers": {
  7987. "get": {
  7988. "produces": [
  7989. "application/json"
  7990. ],
  7991. "tags": [
  7992. "repository"
  7993. ],
  7994. "summary": "List a repo's stargazers",
  7995. "operationId": "repoListStargazers",
  7996. "parameters": [
  7997. {
  7998. "type": "string",
  7999. "description": "owner of the repo",
  8000. "name": "owner",
  8001. "in": "path",
  8002. "required": true
  8003. },
  8004. {
  8005. "type": "string",
  8006. "description": "name of the repo",
  8007. "name": "repo",
  8008. "in": "path",
  8009. "required": true
  8010. },
  8011. {
  8012. "type": "integer",
  8013. "description": "page number of results to return (1-based)",
  8014. "name": "page",
  8015. "in": "query"
  8016. },
  8017. {
  8018. "type": "integer",
  8019. "description": "page size of results",
  8020. "name": "limit",
  8021. "in": "query"
  8022. }
  8023. ],
  8024. "responses": {
  8025. "200": {
  8026. "$ref": "#/responses/UserList"
  8027. }
  8028. }
  8029. }
  8030. },
  8031. "/repos/{owner}/{repo}/statuses/{sha}": {
  8032. "get": {
  8033. "produces": [
  8034. "application/json"
  8035. ],
  8036. "tags": [
  8037. "repository"
  8038. ],
  8039. "summary": "Get a commit's statuses",
  8040. "operationId": "repoListStatuses",
  8041. "parameters": [
  8042. {
  8043. "type": "string",
  8044. "description": "owner of the repo",
  8045. "name": "owner",
  8046. "in": "path",
  8047. "required": true
  8048. },
  8049. {
  8050. "type": "string",
  8051. "description": "name of the repo",
  8052. "name": "repo",
  8053. "in": "path",
  8054. "required": true
  8055. },
  8056. {
  8057. "type": "string",
  8058. "description": "sha of the commit",
  8059. "name": "sha",
  8060. "in": "path",
  8061. "required": true
  8062. },
  8063. {
  8064. "enum": [
  8065. "oldest",
  8066. "recentupdate",
  8067. "leastupdate",
  8068. "leastindex",
  8069. "highestindex"
  8070. ],
  8071. "type": "string",
  8072. "description": "type of sort",
  8073. "name": "sort",
  8074. "in": "query"
  8075. },
  8076. {
  8077. "enum": [
  8078. "pending",
  8079. "success",
  8080. "error",
  8081. "failure",
  8082. "warning"
  8083. ],
  8084. "type": "string",
  8085. "description": "type of state",
  8086. "name": "state",
  8087. "in": "query"
  8088. },
  8089. {
  8090. "type": "integer",
  8091. "description": "page number of results to return (1-based)",
  8092. "name": "page",
  8093. "in": "query"
  8094. },
  8095. {
  8096. "type": "integer",
  8097. "description": "page size of results",
  8098. "name": "limit",
  8099. "in": "query"
  8100. }
  8101. ],
  8102. "responses": {
  8103. "200": {
  8104. "$ref": "#/responses/StatusList"
  8105. },
  8106. "400": {
  8107. "$ref": "#/responses/error"
  8108. }
  8109. }
  8110. },
  8111. "post": {
  8112. "produces": [
  8113. "application/json"
  8114. ],
  8115. "tags": [
  8116. "repository"
  8117. ],
  8118. "summary": "Create a commit status",
  8119. "operationId": "repoCreateStatus",
  8120. "parameters": [
  8121. {
  8122. "type": "string",
  8123. "description": "owner of the repo",
  8124. "name": "owner",
  8125. "in": "path",
  8126. "required": true
  8127. },
  8128. {
  8129. "type": "string",
  8130. "description": "name of the repo",
  8131. "name": "repo",
  8132. "in": "path",
  8133. "required": true
  8134. },
  8135. {
  8136. "type": "string",
  8137. "description": "sha of the commit",
  8138. "name": "sha",
  8139. "in": "path",
  8140. "required": true
  8141. },
  8142. {
  8143. "name": "body",
  8144. "in": "body",
  8145. "schema": {
  8146. "$ref": "#/definitions/CreateStatusOption"
  8147. }
  8148. }
  8149. ],
  8150. "responses": {
  8151. "201": {
  8152. "$ref": "#/responses/Status"
  8153. },
  8154. "400": {
  8155. "$ref": "#/responses/error"
  8156. }
  8157. }
  8158. }
  8159. },
  8160. "/repos/{owner}/{repo}/subscribers": {
  8161. "get": {
  8162. "produces": [
  8163. "application/json"
  8164. ],
  8165. "tags": [
  8166. "repository"
  8167. ],
  8168. "summary": "List a repo's watchers",
  8169. "operationId": "repoListSubscribers",
  8170. "parameters": [
  8171. {
  8172. "type": "string",
  8173. "description": "owner of the repo",
  8174. "name": "owner",
  8175. "in": "path",
  8176. "required": true
  8177. },
  8178. {
  8179. "type": "string",
  8180. "description": "name of the repo",
  8181. "name": "repo",
  8182. "in": "path",
  8183. "required": true
  8184. },
  8185. {
  8186. "type": "integer",
  8187. "description": "page number of results to return (1-based)",
  8188. "name": "page",
  8189. "in": "query"
  8190. },
  8191. {
  8192. "type": "integer",
  8193. "description": "page size of results",
  8194. "name": "limit",
  8195. "in": "query"
  8196. }
  8197. ],
  8198. "responses": {
  8199. "200": {
  8200. "$ref": "#/responses/UserList"
  8201. }
  8202. }
  8203. }
  8204. },
  8205. "/repos/{owner}/{repo}/subscription": {
  8206. "get": {
  8207. "tags": [
  8208. "repository"
  8209. ],
  8210. "summary": "Check if the current user is watching a repo",
  8211. "operationId": "userCurrentCheckSubscription",
  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. "responses": {
  8229. "200": {
  8230. "$ref": "#/responses/WatchInfo"
  8231. },
  8232. "404": {
  8233. "description": "User is not watching this repo or repo do not exist"
  8234. }
  8235. }
  8236. },
  8237. "put": {
  8238. "tags": [
  8239. "repository"
  8240. ],
  8241. "summary": "Watch a repo",
  8242. "operationId": "userCurrentPutSubscription",
  8243. "parameters": [
  8244. {
  8245. "type": "string",
  8246. "description": "owner of the repo",
  8247. "name": "owner",
  8248. "in": "path",
  8249. "required": true
  8250. },
  8251. {
  8252. "type": "string",
  8253. "description": "name of the repo",
  8254. "name": "repo",
  8255. "in": "path",
  8256. "required": true
  8257. }
  8258. ],
  8259. "responses": {
  8260. "200": {
  8261. "$ref": "#/responses/WatchInfo"
  8262. }
  8263. }
  8264. },
  8265. "delete": {
  8266. "tags": [
  8267. "repository"
  8268. ],
  8269. "summary": "Unwatch a repo",
  8270. "operationId": "userCurrentDeleteSubscription",
  8271. "parameters": [
  8272. {
  8273. "type": "string",
  8274. "description": "owner of the repo",
  8275. "name": "owner",
  8276. "in": "path",
  8277. "required": true
  8278. },
  8279. {
  8280. "type": "string",
  8281. "description": "name of the repo",
  8282. "name": "repo",
  8283. "in": "path",
  8284. "required": true
  8285. }
  8286. ],
  8287. "responses": {
  8288. "204": {
  8289. "$ref": "#/responses/empty"
  8290. }
  8291. }
  8292. }
  8293. },
  8294. "/repos/{owner}/{repo}/tags": {
  8295. "get": {
  8296. "produces": [
  8297. "application/json"
  8298. ],
  8299. "tags": [
  8300. "repository"
  8301. ],
  8302. "summary": "List a repository's tags",
  8303. "operationId": "repoListTags",
  8304. "parameters": [
  8305. {
  8306. "type": "string",
  8307. "description": "owner of the repo",
  8308. "name": "owner",
  8309. "in": "path",
  8310. "required": true
  8311. },
  8312. {
  8313. "type": "string",
  8314. "description": "name of the repo",
  8315. "name": "repo",
  8316. "in": "path",
  8317. "required": true
  8318. },
  8319. {
  8320. "type": "integer",
  8321. "description": "page number of results to return (1-based)",
  8322. "name": "page",
  8323. "in": "query"
  8324. },
  8325. {
  8326. "type": "integer",
  8327. "description": "page size of results, default maximum page size is 50",
  8328. "name": "limit",
  8329. "in": "query"
  8330. }
  8331. ],
  8332. "responses": {
  8333. "200": {
  8334. "$ref": "#/responses/TagList"
  8335. }
  8336. }
  8337. }
  8338. },
  8339. "/repos/{owner}/{repo}/times": {
  8340. "get": {
  8341. "produces": [
  8342. "application/json"
  8343. ],
  8344. "tags": [
  8345. "repository"
  8346. ],
  8347. "summary": "List a repo's tracked times",
  8348. "operationId": "repoTrackedTimes",
  8349. "parameters": [
  8350. {
  8351. "type": "string",
  8352. "description": "owner of the repo",
  8353. "name": "owner",
  8354. "in": "path",
  8355. "required": true
  8356. },
  8357. {
  8358. "type": "string",
  8359. "description": "name of the repo",
  8360. "name": "repo",
  8361. "in": "path",
  8362. "required": true
  8363. },
  8364. {
  8365. "type": "string",
  8366. "description": "optional filter by user",
  8367. "name": "user",
  8368. "in": "query"
  8369. },
  8370. {
  8371. "type": "string",
  8372. "format": "date-time",
  8373. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  8374. "name": "since",
  8375. "in": "query"
  8376. },
  8377. {
  8378. "type": "string",
  8379. "format": "date-time",
  8380. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  8381. "name": "before",
  8382. "in": "query"
  8383. },
  8384. {
  8385. "type": "integer",
  8386. "description": "page number of results to return (1-based)",
  8387. "name": "page",
  8388. "in": "query"
  8389. },
  8390. {
  8391. "type": "integer",
  8392. "description": "page size of results",
  8393. "name": "limit",
  8394. "in": "query"
  8395. }
  8396. ],
  8397. "responses": {
  8398. "200": {
  8399. "$ref": "#/responses/TrackedTimeList"
  8400. },
  8401. "400": {
  8402. "$ref": "#/responses/error"
  8403. },
  8404. "403": {
  8405. "$ref": "#/responses/forbidden"
  8406. }
  8407. }
  8408. }
  8409. },
  8410. "/repos/{owner}/{repo}/times/{user}": {
  8411. "get": {
  8412. "produces": [
  8413. "application/json"
  8414. ],
  8415. "tags": [
  8416. "repository"
  8417. ],
  8418. "summary": "List a user's tracked times in a repo",
  8419. "operationId": "userTrackedTimes",
  8420. "deprecated": true,
  8421. "parameters": [
  8422. {
  8423. "type": "string",
  8424. "description": "owner of the repo",
  8425. "name": "owner",
  8426. "in": "path",
  8427. "required": true
  8428. },
  8429. {
  8430. "type": "string",
  8431. "description": "name of the repo",
  8432. "name": "repo",
  8433. "in": "path",
  8434. "required": true
  8435. },
  8436. {
  8437. "type": "string",
  8438. "description": "username of user",
  8439. "name": "user",
  8440. "in": "path",
  8441. "required": true
  8442. }
  8443. ],
  8444. "responses": {
  8445. "200": {
  8446. "$ref": "#/responses/TrackedTimeList"
  8447. },
  8448. "400": {
  8449. "$ref": "#/responses/error"
  8450. },
  8451. "403": {
  8452. "$ref": "#/responses/forbidden"
  8453. }
  8454. }
  8455. }
  8456. },
  8457. "/repos/{owner}/{repo}/topics": {
  8458. "get": {
  8459. "produces": [
  8460. "application/json"
  8461. ],
  8462. "tags": [
  8463. "repository"
  8464. ],
  8465. "summary": "Get list of topics that a repository has",
  8466. "operationId": "repoListTopics",
  8467. "parameters": [
  8468. {
  8469. "type": "string",
  8470. "description": "owner of the repo",
  8471. "name": "owner",
  8472. "in": "path",
  8473. "required": true
  8474. },
  8475. {
  8476. "type": "string",
  8477. "description": "name of the repo",
  8478. "name": "repo",
  8479. "in": "path",
  8480. "required": true
  8481. },
  8482. {
  8483. "type": "integer",
  8484. "description": "page number of results to return (1-based)",
  8485. "name": "page",
  8486. "in": "query"
  8487. },
  8488. {
  8489. "type": "integer",
  8490. "description": "page size of results",
  8491. "name": "limit",
  8492. "in": "query"
  8493. }
  8494. ],
  8495. "responses": {
  8496. "200": {
  8497. "$ref": "#/responses/TopicNames"
  8498. }
  8499. }
  8500. },
  8501. "put": {
  8502. "produces": [
  8503. "application/json"
  8504. ],
  8505. "tags": [
  8506. "repository"
  8507. ],
  8508. "summary": "Replace list of topics for a repository",
  8509. "operationId": "repoUpdateTopics",
  8510. "parameters": [
  8511. {
  8512. "type": "string",
  8513. "description": "owner of the repo",
  8514. "name": "owner",
  8515. "in": "path",
  8516. "required": true
  8517. },
  8518. {
  8519. "type": "string",
  8520. "description": "name of the repo",
  8521. "name": "repo",
  8522. "in": "path",
  8523. "required": true
  8524. },
  8525. {
  8526. "name": "body",
  8527. "in": "body",
  8528. "schema": {
  8529. "$ref": "#/definitions/RepoTopicOptions"
  8530. }
  8531. }
  8532. ],
  8533. "responses": {
  8534. "204": {
  8535. "$ref": "#/responses/empty"
  8536. },
  8537. "422": {
  8538. "$ref": "#/responses/invalidTopicsError"
  8539. }
  8540. }
  8541. }
  8542. },
  8543. "/repos/{owner}/{repo}/topics/{topic}": {
  8544. "put": {
  8545. "produces": [
  8546. "application/json"
  8547. ],
  8548. "tags": [
  8549. "repository"
  8550. ],
  8551. "summary": "Add a topic to a repository",
  8552. "operationId": "repoAddTopíc",
  8553. "parameters": [
  8554. {
  8555. "type": "string",
  8556. "description": "owner of the repo",
  8557. "name": "owner",
  8558. "in": "path",
  8559. "required": true
  8560. },
  8561. {
  8562. "type": "string",
  8563. "description": "name of the repo",
  8564. "name": "repo",
  8565. "in": "path",
  8566. "required": true
  8567. },
  8568. {
  8569. "type": "string",
  8570. "description": "name of the topic to add",
  8571. "name": "topic",
  8572. "in": "path",
  8573. "required": true
  8574. }
  8575. ],
  8576. "responses": {
  8577. "204": {
  8578. "$ref": "#/responses/empty"
  8579. },
  8580. "422": {
  8581. "$ref": "#/responses/invalidTopicsError"
  8582. }
  8583. }
  8584. },
  8585. "delete": {
  8586. "produces": [
  8587. "application/json"
  8588. ],
  8589. "tags": [
  8590. "repository"
  8591. ],
  8592. "summary": "Delete a topic from a repository",
  8593. "operationId": "repoDeleteTopic",
  8594. "parameters": [
  8595. {
  8596. "type": "string",
  8597. "description": "owner of the repo",
  8598. "name": "owner",
  8599. "in": "path",
  8600. "required": true
  8601. },
  8602. {
  8603. "type": "string",
  8604. "description": "name of the repo",
  8605. "name": "repo",
  8606. "in": "path",
  8607. "required": true
  8608. },
  8609. {
  8610. "type": "string",
  8611. "description": "name of the topic to delete",
  8612. "name": "topic",
  8613. "in": "path",
  8614. "required": true
  8615. }
  8616. ],
  8617. "responses": {
  8618. "204": {
  8619. "$ref": "#/responses/empty"
  8620. },
  8621. "422": {
  8622. "$ref": "#/responses/invalidTopicsError"
  8623. }
  8624. }
  8625. }
  8626. },
  8627. "/repos/{owner}/{repo}/transfer": {
  8628. "post": {
  8629. "produces": [
  8630. "application/json"
  8631. ],
  8632. "tags": [
  8633. "repository"
  8634. ],
  8635. "summary": "Transfer a repo ownership",
  8636. "operationId": "repoTransfer",
  8637. "parameters": [
  8638. {
  8639. "type": "string",
  8640. "description": "owner of the repo to transfer",
  8641. "name": "owner",
  8642. "in": "path",
  8643. "required": true
  8644. },
  8645. {
  8646. "type": "string",
  8647. "description": "name of the repo to transfer",
  8648. "name": "repo",
  8649. "in": "path",
  8650. "required": true
  8651. },
  8652. {
  8653. "description": "Transfer Options",
  8654. "name": "body",
  8655. "in": "body",
  8656. "required": true,
  8657. "schema": {
  8658. "$ref": "#/definitions/TransferRepoOption"
  8659. }
  8660. }
  8661. ],
  8662. "responses": {
  8663. "202": {
  8664. "$ref": "#/responses/Repository"
  8665. },
  8666. "403": {
  8667. "$ref": "#/responses/forbidden"
  8668. },
  8669. "404": {
  8670. "$ref": "#/responses/notFound"
  8671. },
  8672. "422": {
  8673. "$ref": "#/responses/validationError"
  8674. }
  8675. }
  8676. }
  8677. },
  8678. "/repositories/{id}": {
  8679. "get": {
  8680. "produces": [
  8681. "application/json"
  8682. ],
  8683. "tags": [
  8684. "repository"
  8685. ],
  8686. "summary": "Get a repository by id",
  8687. "operationId": "repoGetByID",
  8688. "parameters": [
  8689. {
  8690. "type": "integer",
  8691. "format": "int64",
  8692. "description": "id of the repo to get",
  8693. "name": "id",
  8694. "in": "path",
  8695. "required": true
  8696. }
  8697. ],
  8698. "responses": {
  8699. "200": {
  8700. "$ref": "#/responses/Repository"
  8701. }
  8702. }
  8703. }
  8704. },
  8705. "/settings/Attachment": {
  8706. "get": {
  8707. "produces": [
  8708. "application/json"
  8709. ],
  8710. "tags": [
  8711. "settings"
  8712. ],
  8713. "summary": "Get instance's global settings for Attachment",
  8714. "operationId": "getGeneralAttachmentSettings",
  8715. "responses": {
  8716. "200": {
  8717. "$ref": "#/responses/GeneralAttachmentSettings"
  8718. }
  8719. }
  8720. }
  8721. },
  8722. "/settings/api": {
  8723. "get": {
  8724. "produces": [
  8725. "application/json"
  8726. ],
  8727. "tags": [
  8728. "settings"
  8729. ],
  8730. "summary": "Get instance's global settings for api",
  8731. "operationId": "getGeneralAPISettings",
  8732. "responses": {
  8733. "200": {
  8734. "$ref": "#/responses/GeneralAPISettings"
  8735. }
  8736. }
  8737. }
  8738. },
  8739. "/settings/repository": {
  8740. "get": {
  8741. "produces": [
  8742. "application/json"
  8743. ],
  8744. "tags": [
  8745. "settings"
  8746. ],
  8747. "summary": "Get instance's global settings for repositories",
  8748. "operationId": "getGeneralRepositorySettings",
  8749. "responses": {
  8750. "200": {
  8751. "$ref": "#/responses/GeneralRepoSettings"
  8752. }
  8753. }
  8754. }
  8755. },
  8756. "/settings/ui": {
  8757. "get": {
  8758. "produces": [
  8759. "application/json"
  8760. ],
  8761. "tags": [
  8762. "settings"
  8763. ],
  8764. "summary": "Get instance's global settings for ui",
  8765. "operationId": "getGeneralUISettings",
  8766. "responses": {
  8767. "200": {
  8768. "$ref": "#/responses/GeneralUISettings"
  8769. }
  8770. }
  8771. }
  8772. },
  8773. "/signing-key.gpg": {
  8774. "get": {
  8775. "produces": [
  8776. "text/plain"
  8777. ],
  8778. "tags": [
  8779. "miscellaneous"
  8780. ],
  8781. "summary": "Get default signing-key.gpg",
  8782. "operationId": "getSigningKey",
  8783. "responses": {
  8784. "200": {
  8785. "description": "GPG armored public key",
  8786. "schema": {
  8787. "type": "string"
  8788. }
  8789. }
  8790. }
  8791. }
  8792. },
  8793. "/teams/{id}": {
  8794. "get": {
  8795. "produces": [
  8796. "application/json"
  8797. ],
  8798. "tags": [
  8799. "organization"
  8800. ],
  8801. "summary": "Get a team",
  8802. "operationId": "orgGetTeam",
  8803. "parameters": [
  8804. {
  8805. "type": "integer",
  8806. "format": "int64",
  8807. "description": "id of the team to get",
  8808. "name": "id",
  8809. "in": "path",
  8810. "required": true
  8811. }
  8812. ],
  8813. "responses": {
  8814. "200": {
  8815. "$ref": "#/responses/Team"
  8816. }
  8817. }
  8818. },
  8819. "delete": {
  8820. "tags": [
  8821. "organization"
  8822. ],
  8823. "summary": "Delete a team",
  8824. "operationId": "orgDeleteTeam",
  8825. "parameters": [
  8826. {
  8827. "type": "integer",
  8828. "format": "int64",
  8829. "description": "id of the team to delete",
  8830. "name": "id",
  8831. "in": "path",
  8832. "required": true
  8833. }
  8834. ],
  8835. "responses": {
  8836. "204": {
  8837. "description": "team deleted"
  8838. }
  8839. }
  8840. },
  8841. "patch": {
  8842. "consumes": [
  8843. "application/json"
  8844. ],
  8845. "produces": [
  8846. "application/json"
  8847. ],
  8848. "tags": [
  8849. "organization"
  8850. ],
  8851. "summary": "Edit a team",
  8852. "operationId": "orgEditTeam",
  8853. "parameters": [
  8854. {
  8855. "type": "integer",
  8856. "description": "id of the team to edit",
  8857. "name": "id",
  8858. "in": "path",
  8859. "required": true
  8860. },
  8861. {
  8862. "name": "body",
  8863. "in": "body",
  8864. "schema": {
  8865. "$ref": "#/definitions/EditTeamOption"
  8866. }
  8867. }
  8868. ],
  8869. "responses": {
  8870. "200": {
  8871. "$ref": "#/responses/Team"
  8872. }
  8873. }
  8874. }
  8875. },
  8876. "/teams/{id}/members": {
  8877. "get": {
  8878. "produces": [
  8879. "application/json"
  8880. ],
  8881. "tags": [
  8882. "organization"
  8883. ],
  8884. "summary": "List a team's members",
  8885. "operationId": "orgListTeamMembers",
  8886. "parameters": [
  8887. {
  8888. "type": "integer",
  8889. "format": "int64",
  8890. "description": "id of the team",
  8891. "name": "id",
  8892. "in": "path",
  8893. "required": true
  8894. },
  8895. {
  8896. "type": "integer",
  8897. "description": "page number of results to return (1-based)",
  8898. "name": "page",
  8899. "in": "query"
  8900. },
  8901. {
  8902. "type": "integer",
  8903. "description": "page size of results",
  8904. "name": "limit",
  8905. "in": "query"
  8906. }
  8907. ],
  8908. "responses": {
  8909. "200": {
  8910. "$ref": "#/responses/UserList"
  8911. }
  8912. }
  8913. }
  8914. },
  8915. "/teams/{id}/members/{username}": {
  8916. "get": {
  8917. "produces": [
  8918. "application/json"
  8919. ],
  8920. "tags": [
  8921. "organization"
  8922. ],
  8923. "summary": "List a particular member of team",
  8924. "operationId": "orgListTeamMember",
  8925. "parameters": [
  8926. {
  8927. "type": "integer",
  8928. "format": "int64",
  8929. "description": "id of the team",
  8930. "name": "id",
  8931. "in": "path",
  8932. "required": true
  8933. },
  8934. {
  8935. "type": "string",
  8936. "description": "username of the member to list",
  8937. "name": "username",
  8938. "in": "path",
  8939. "required": true
  8940. }
  8941. ],
  8942. "responses": {
  8943. "200": {
  8944. "$ref": "#/responses/User"
  8945. },
  8946. "404": {
  8947. "$ref": "#/responses/notFound"
  8948. }
  8949. }
  8950. },
  8951. "put": {
  8952. "produces": [
  8953. "application/json"
  8954. ],
  8955. "tags": [
  8956. "organization"
  8957. ],
  8958. "summary": "Add a team member",
  8959. "operationId": "orgAddTeamMember",
  8960. "parameters": [
  8961. {
  8962. "type": "integer",
  8963. "format": "int64",
  8964. "description": "id of the team",
  8965. "name": "id",
  8966. "in": "path",
  8967. "required": true
  8968. },
  8969. {
  8970. "type": "string",
  8971. "description": "username of the user to add",
  8972. "name": "username",
  8973. "in": "path",
  8974. "required": true
  8975. }
  8976. ],
  8977. "responses": {
  8978. "204": {
  8979. "$ref": "#/responses/empty"
  8980. },
  8981. "404": {
  8982. "$ref": "#/responses/notFound"
  8983. }
  8984. }
  8985. },
  8986. "delete": {
  8987. "produces": [
  8988. "application/json"
  8989. ],
  8990. "tags": [
  8991. "organization"
  8992. ],
  8993. "summary": "Remove a team member",
  8994. "operationId": "orgRemoveTeamMember",
  8995. "parameters": [
  8996. {
  8997. "type": "integer",
  8998. "format": "int64",
  8999. "description": "id of the team",
  9000. "name": "id",
  9001. "in": "path",
  9002. "required": true
  9003. },
  9004. {
  9005. "type": "string",
  9006. "description": "username of the user to remove",
  9007. "name": "username",
  9008. "in": "path",
  9009. "required": true
  9010. }
  9011. ],
  9012. "responses": {
  9013. "204": {
  9014. "$ref": "#/responses/empty"
  9015. },
  9016. "404": {
  9017. "$ref": "#/responses/notFound"
  9018. }
  9019. }
  9020. }
  9021. },
  9022. "/teams/{id}/repos": {
  9023. "get": {
  9024. "produces": [
  9025. "application/json"
  9026. ],
  9027. "tags": [
  9028. "organization"
  9029. ],
  9030. "summary": "List a team's repos",
  9031. "operationId": "orgListTeamRepos",
  9032. "parameters": [
  9033. {
  9034. "type": "integer",
  9035. "format": "int64",
  9036. "description": "id of the team",
  9037. "name": "id",
  9038. "in": "path",
  9039. "required": true
  9040. },
  9041. {
  9042. "type": "integer",
  9043. "description": "page number of results to return (1-based)",
  9044. "name": "page",
  9045. "in": "query"
  9046. },
  9047. {
  9048. "type": "integer",
  9049. "description": "page size of results",
  9050. "name": "limit",
  9051. "in": "query"
  9052. }
  9053. ],
  9054. "responses": {
  9055. "200": {
  9056. "$ref": "#/responses/RepositoryList"
  9057. }
  9058. }
  9059. }
  9060. },
  9061. "/teams/{id}/repos/{org}/{repo}": {
  9062. "put": {
  9063. "produces": [
  9064. "application/json"
  9065. ],
  9066. "tags": [
  9067. "organization"
  9068. ],
  9069. "summary": "Add a repository to a team",
  9070. "operationId": "orgAddTeamRepository",
  9071. "parameters": [
  9072. {
  9073. "type": "integer",
  9074. "format": "int64",
  9075. "description": "id of the team",
  9076. "name": "id",
  9077. "in": "path",
  9078. "required": true
  9079. },
  9080. {
  9081. "type": "string",
  9082. "description": "organization that owns the repo to add",
  9083. "name": "org",
  9084. "in": "path",
  9085. "required": true
  9086. },
  9087. {
  9088. "type": "string",
  9089. "description": "name of the repo to add",
  9090. "name": "repo",
  9091. "in": "path",
  9092. "required": true
  9093. }
  9094. ],
  9095. "responses": {
  9096. "204": {
  9097. "$ref": "#/responses/empty"
  9098. },
  9099. "403": {
  9100. "$ref": "#/responses/forbidden"
  9101. }
  9102. }
  9103. },
  9104. "delete": {
  9105. "description": "This does not delete the repository, it only removes the repository from the team.",
  9106. "produces": [
  9107. "application/json"
  9108. ],
  9109. "tags": [
  9110. "organization"
  9111. ],
  9112. "summary": "Remove a repository from a team",
  9113. "operationId": "orgRemoveTeamRepository",
  9114. "parameters": [
  9115. {
  9116. "type": "integer",
  9117. "format": "int64",
  9118. "description": "id of the team",
  9119. "name": "id",
  9120. "in": "path",
  9121. "required": true
  9122. },
  9123. {
  9124. "type": "string",
  9125. "description": "organization that owns the repo to remove",
  9126. "name": "org",
  9127. "in": "path",
  9128. "required": true
  9129. },
  9130. {
  9131. "type": "string",
  9132. "description": "name of the repo to remove",
  9133. "name": "repo",
  9134. "in": "path",
  9135. "required": true
  9136. }
  9137. ],
  9138. "responses": {
  9139. "204": {
  9140. "$ref": "#/responses/empty"
  9141. },
  9142. "403": {
  9143. "$ref": "#/responses/forbidden"
  9144. }
  9145. }
  9146. }
  9147. },
  9148. "/topics/search": {
  9149. "get": {
  9150. "produces": [
  9151. "application/json"
  9152. ],
  9153. "tags": [
  9154. "repository"
  9155. ],
  9156. "summary": "search topics via keyword",
  9157. "operationId": "topicSearch",
  9158. "parameters": [
  9159. {
  9160. "type": "string",
  9161. "description": "keywords to search",
  9162. "name": "q",
  9163. "in": "query",
  9164. "required": true
  9165. },
  9166. {
  9167. "type": "integer",
  9168. "description": "page number of results to return (1-based)",
  9169. "name": "page",
  9170. "in": "query"
  9171. },
  9172. {
  9173. "type": "integer",
  9174. "description": "page size of results",
  9175. "name": "limit",
  9176. "in": "query"
  9177. }
  9178. ],
  9179. "responses": {
  9180. "200": {
  9181. "$ref": "#/responses/TopicListResponse"
  9182. },
  9183. "403": {
  9184. "$ref": "#/responses/forbidden"
  9185. }
  9186. }
  9187. }
  9188. },
  9189. "/user": {
  9190. "get": {
  9191. "produces": [
  9192. "application/json"
  9193. ],
  9194. "tags": [
  9195. "user"
  9196. ],
  9197. "summary": "Get the authenticated user",
  9198. "operationId": "userGetCurrent",
  9199. "responses": {
  9200. "200": {
  9201. "$ref": "#/responses/User"
  9202. }
  9203. }
  9204. }
  9205. },
  9206. "/user/applications/oauth2": {
  9207. "get": {
  9208. "produces": [
  9209. "application/json"
  9210. ],
  9211. "tags": [
  9212. "user"
  9213. ],
  9214. "summary": "List the authenticated user's oauth2 applications",
  9215. "operationId": "userGetOauth2Application",
  9216. "parameters": [
  9217. {
  9218. "type": "integer",
  9219. "description": "page number of results to return (1-based)",
  9220. "name": "page",
  9221. "in": "query"
  9222. },
  9223. {
  9224. "type": "integer",
  9225. "description": "page size of results",
  9226. "name": "limit",
  9227. "in": "query"
  9228. }
  9229. ],
  9230. "responses": {
  9231. "200": {
  9232. "$ref": "#/responses/OAuth2ApplicationList"
  9233. }
  9234. }
  9235. },
  9236. "post": {
  9237. "produces": [
  9238. "application/json"
  9239. ],
  9240. "tags": [
  9241. "user"
  9242. ],
  9243. "summary": "creates a new OAuth2 application",
  9244. "operationId": "userCreateOAuth2Application",
  9245. "parameters": [
  9246. {
  9247. "name": "body",
  9248. "in": "body",
  9249. "required": true,
  9250. "schema": {
  9251. "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
  9252. }
  9253. }
  9254. ],
  9255. "responses": {
  9256. "201": {
  9257. "$ref": "#/responses/OAuth2Application"
  9258. }
  9259. }
  9260. }
  9261. },
  9262. "/user/applications/oauth2/{id}": {
  9263. "get": {
  9264. "produces": [
  9265. "application/json"
  9266. ],
  9267. "tags": [
  9268. "user"
  9269. ],
  9270. "summary": "get an OAuth2 Application",
  9271. "operationId": "userGetOAuth2Application",
  9272. "parameters": [
  9273. {
  9274. "type": "integer",
  9275. "format": "int64",
  9276. "description": "Application ID to be found",
  9277. "name": "id",
  9278. "in": "path",
  9279. "required": true
  9280. }
  9281. ],
  9282. "responses": {
  9283. "200": {
  9284. "$ref": "#/responses/OAuth2Application"
  9285. }
  9286. }
  9287. },
  9288. "delete": {
  9289. "produces": [
  9290. "application/json"
  9291. ],
  9292. "tags": [
  9293. "user"
  9294. ],
  9295. "summary": "delete an OAuth2 Application",
  9296. "operationId": "userDeleteOAuth2Application",
  9297. "parameters": [
  9298. {
  9299. "type": "integer",
  9300. "format": "int64",
  9301. "description": "token to be deleted",
  9302. "name": "id",
  9303. "in": "path",
  9304. "required": true
  9305. }
  9306. ],
  9307. "responses": {
  9308. "204": {
  9309. "$ref": "#/responses/empty"
  9310. }
  9311. }
  9312. },
  9313. "patch": {
  9314. "produces": [
  9315. "application/json"
  9316. ],
  9317. "tags": [
  9318. "user"
  9319. ],
  9320. "summary": "update an OAuth2 Application, this includes regenerating the client secret",
  9321. "operationId": "userUpdateOAuth2Application",
  9322. "parameters": [
  9323. {
  9324. "type": "integer",
  9325. "format": "int64",
  9326. "description": "application to be updated",
  9327. "name": "id",
  9328. "in": "path",
  9329. "required": true
  9330. },
  9331. {
  9332. "name": "body",
  9333. "in": "body",
  9334. "required": true,
  9335. "schema": {
  9336. "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
  9337. }
  9338. }
  9339. ],
  9340. "responses": {
  9341. "200": {
  9342. "$ref": "#/responses/OAuth2Application"
  9343. }
  9344. }
  9345. }
  9346. },
  9347. "/user/emails": {
  9348. "get": {
  9349. "produces": [
  9350. "application/json"
  9351. ],
  9352. "tags": [
  9353. "user"
  9354. ],
  9355. "summary": "List the authenticated user's email addresses",
  9356. "operationId": "userListEmails",
  9357. "responses": {
  9358. "200": {
  9359. "$ref": "#/responses/EmailList"
  9360. }
  9361. }
  9362. },
  9363. "post": {
  9364. "produces": [
  9365. "application/json"
  9366. ],
  9367. "tags": [
  9368. "user"
  9369. ],
  9370. "summary": "Add email addresses",
  9371. "operationId": "userAddEmail",
  9372. "parameters": [
  9373. {
  9374. "name": "body",
  9375. "in": "body",
  9376. "schema": {
  9377. "$ref": "#/definitions/CreateEmailOption"
  9378. }
  9379. }
  9380. ],
  9381. "responses": {
  9382. "201": {
  9383. "$ref": "#/responses/EmailList"
  9384. },
  9385. "422": {
  9386. "$ref": "#/responses/validationError"
  9387. }
  9388. }
  9389. },
  9390. "delete": {
  9391. "produces": [
  9392. "application/json"
  9393. ],
  9394. "tags": [
  9395. "user"
  9396. ],
  9397. "summary": "Delete email addresses",
  9398. "operationId": "userDeleteEmail",
  9399. "parameters": [
  9400. {
  9401. "name": "body",
  9402. "in": "body",
  9403. "schema": {
  9404. "$ref": "#/definitions/DeleteEmailOption"
  9405. }
  9406. }
  9407. ],
  9408. "responses": {
  9409. "204": {
  9410. "$ref": "#/responses/empty"
  9411. }
  9412. }
  9413. }
  9414. },
  9415. "/user/followers": {
  9416. "get": {
  9417. "produces": [
  9418. "application/json"
  9419. ],
  9420. "tags": [
  9421. "user"
  9422. ],
  9423. "summary": "List the authenticated user's followers",
  9424. "operationId": "userCurrentListFollowers",
  9425. "parameters": [
  9426. {
  9427. "type": "integer",
  9428. "description": "page number of results to return (1-based)",
  9429. "name": "page",
  9430. "in": "query"
  9431. },
  9432. {
  9433. "type": "integer",
  9434. "description": "page size of results",
  9435. "name": "limit",
  9436. "in": "query"
  9437. }
  9438. ],
  9439. "responses": {
  9440. "200": {
  9441. "$ref": "#/responses/UserList"
  9442. }
  9443. }
  9444. }
  9445. },
  9446. "/user/following": {
  9447. "get": {
  9448. "produces": [
  9449. "application/json"
  9450. ],
  9451. "tags": [
  9452. "user"
  9453. ],
  9454. "summary": "List the users that the authenticated user is following",
  9455. "operationId": "userCurrentListFollowing",
  9456. "parameters": [
  9457. {
  9458. "type": "integer",
  9459. "description": "page number of results to return (1-based)",
  9460. "name": "page",
  9461. "in": "query"
  9462. },
  9463. {
  9464. "type": "integer",
  9465. "description": "page size of results",
  9466. "name": "limit",
  9467. "in": "query"
  9468. }
  9469. ],
  9470. "responses": {
  9471. "200": {
  9472. "$ref": "#/responses/UserList"
  9473. }
  9474. }
  9475. }
  9476. },
  9477. "/user/following/{username}": {
  9478. "get": {
  9479. "tags": [
  9480. "user"
  9481. ],
  9482. "summary": "Check whether a user is followed by the authenticated user",
  9483. "operationId": "userCurrentCheckFollowing",
  9484. "parameters": [
  9485. {
  9486. "type": "string",
  9487. "description": "username of followed user",
  9488. "name": "username",
  9489. "in": "path",
  9490. "required": true
  9491. }
  9492. ],
  9493. "responses": {
  9494. "204": {
  9495. "$ref": "#/responses/empty"
  9496. },
  9497. "404": {
  9498. "$ref": "#/responses/notFound"
  9499. }
  9500. }
  9501. },
  9502. "put": {
  9503. "tags": [
  9504. "user"
  9505. ],
  9506. "summary": "Follow a user",
  9507. "operationId": "userCurrentPutFollow",
  9508. "parameters": [
  9509. {
  9510. "type": "string",
  9511. "description": "username of user to follow",
  9512. "name": "username",
  9513. "in": "path",
  9514. "required": true
  9515. }
  9516. ],
  9517. "responses": {
  9518. "204": {
  9519. "$ref": "#/responses/empty"
  9520. }
  9521. }
  9522. },
  9523. "delete": {
  9524. "tags": [
  9525. "user"
  9526. ],
  9527. "summary": "Unfollow a user",
  9528. "operationId": "userCurrentDeleteFollow",
  9529. "parameters": [
  9530. {
  9531. "type": "string",
  9532. "description": "username of user to unfollow",
  9533. "name": "username",
  9534. "in": "path",
  9535. "required": true
  9536. }
  9537. ],
  9538. "responses": {
  9539. "204": {
  9540. "$ref": "#/responses/empty"
  9541. }
  9542. }
  9543. }
  9544. },
  9545. "/user/gpg_keys": {
  9546. "get": {
  9547. "produces": [
  9548. "application/json"
  9549. ],
  9550. "tags": [
  9551. "user"
  9552. ],
  9553. "summary": "List the authenticated user's GPG keys",
  9554. "operationId": "userCurrentListGPGKeys",
  9555. "parameters": [
  9556. {
  9557. "type": "integer",
  9558. "description": "page number of results to return (1-based)",
  9559. "name": "page",
  9560. "in": "query"
  9561. },
  9562. {
  9563. "type": "integer",
  9564. "description": "page size of results",
  9565. "name": "limit",
  9566. "in": "query"
  9567. }
  9568. ],
  9569. "responses": {
  9570. "200": {
  9571. "$ref": "#/responses/GPGKeyList"
  9572. }
  9573. }
  9574. },
  9575. "post": {
  9576. "consumes": [
  9577. "application/json"
  9578. ],
  9579. "produces": [
  9580. "application/json"
  9581. ],
  9582. "tags": [
  9583. "user"
  9584. ],
  9585. "summary": "Create a GPG key",
  9586. "operationId": "userCurrentPostGPGKey",
  9587. "parameters": [
  9588. {
  9589. "name": "Form",
  9590. "in": "body",
  9591. "schema": {
  9592. "$ref": "#/definitions/CreateGPGKeyOption"
  9593. }
  9594. }
  9595. ],
  9596. "responses": {
  9597. "201": {
  9598. "$ref": "#/responses/GPGKey"
  9599. },
  9600. "404": {
  9601. "$ref": "#/responses/notFound"
  9602. },
  9603. "422": {
  9604. "$ref": "#/responses/validationError"
  9605. }
  9606. }
  9607. }
  9608. },
  9609. "/user/gpg_keys/{id}": {
  9610. "get": {
  9611. "produces": [
  9612. "application/json"
  9613. ],
  9614. "tags": [
  9615. "user"
  9616. ],
  9617. "summary": "Get a GPG key",
  9618. "operationId": "userCurrentGetGPGKey",
  9619. "parameters": [
  9620. {
  9621. "type": "integer",
  9622. "format": "int64",
  9623. "description": "id of key to get",
  9624. "name": "id",
  9625. "in": "path",
  9626. "required": true
  9627. }
  9628. ],
  9629. "responses": {
  9630. "200": {
  9631. "$ref": "#/responses/GPGKey"
  9632. },
  9633. "404": {
  9634. "$ref": "#/responses/notFound"
  9635. }
  9636. }
  9637. },
  9638. "delete": {
  9639. "produces": [
  9640. "application/json"
  9641. ],
  9642. "tags": [
  9643. "user"
  9644. ],
  9645. "summary": "Remove a GPG key",
  9646. "operationId": "userCurrentDeleteGPGKey",
  9647. "parameters": [
  9648. {
  9649. "type": "integer",
  9650. "format": "int64",
  9651. "description": "id of key to delete",
  9652. "name": "id",
  9653. "in": "path",
  9654. "required": true
  9655. }
  9656. ],
  9657. "responses": {
  9658. "204": {
  9659. "$ref": "#/responses/empty"
  9660. },
  9661. "403": {
  9662. "$ref": "#/responses/forbidden"
  9663. },
  9664. "404": {
  9665. "$ref": "#/responses/notFound"
  9666. }
  9667. }
  9668. }
  9669. },
  9670. "/user/keys": {
  9671. "get": {
  9672. "produces": [
  9673. "application/json"
  9674. ],
  9675. "tags": [
  9676. "user"
  9677. ],
  9678. "summary": "List the authenticated user's public keys",
  9679. "operationId": "userCurrentListKeys",
  9680. "parameters": [
  9681. {
  9682. "type": "string",
  9683. "description": "fingerprint of the key",
  9684. "name": "fingerprint",
  9685. "in": "query"
  9686. },
  9687. {
  9688. "type": "integer",
  9689. "description": "page number of results to return (1-based)",
  9690. "name": "page",
  9691. "in": "query"
  9692. },
  9693. {
  9694. "type": "integer",
  9695. "description": "page size of results",
  9696. "name": "limit",
  9697. "in": "query"
  9698. }
  9699. ],
  9700. "responses": {
  9701. "200": {
  9702. "$ref": "#/responses/PublicKeyList"
  9703. }
  9704. }
  9705. },
  9706. "post": {
  9707. "consumes": [
  9708. "application/json"
  9709. ],
  9710. "produces": [
  9711. "application/json"
  9712. ],
  9713. "tags": [
  9714. "user"
  9715. ],
  9716. "summary": "Create a public key",
  9717. "operationId": "userCurrentPostKey",
  9718. "parameters": [
  9719. {
  9720. "name": "body",
  9721. "in": "body",
  9722. "schema": {
  9723. "$ref": "#/definitions/CreateKeyOption"
  9724. }
  9725. }
  9726. ],
  9727. "responses": {
  9728. "201": {
  9729. "$ref": "#/responses/PublicKey"
  9730. },
  9731. "422": {
  9732. "$ref": "#/responses/validationError"
  9733. }
  9734. }
  9735. }
  9736. },
  9737. "/user/keys/{id}": {
  9738. "get": {
  9739. "produces": [
  9740. "application/json"
  9741. ],
  9742. "tags": [
  9743. "user"
  9744. ],
  9745. "summary": "Get a public key",
  9746. "operationId": "userCurrentGetKey",
  9747. "parameters": [
  9748. {
  9749. "type": "integer",
  9750. "format": "int64",
  9751. "description": "id of key to get",
  9752. "name": "id",
  9753. "in": "path",
  9754. "required": true
  9755. }
  9756. ],
  9757. "responses": {
  9758. "200": {
  9759. "$ref": "#/responses/PublicKey"
  9760. },
  9761. "404": {
  9762. "$ref": "#/responses/notFound"
  9763. }
  9764. }
  9765. },
  9766. "delete": {
  9767. "produces": [
  9768. "application/json"
  9769. ],
  9770. "tags": [
  9771. "user"
  9772. ],
  9773. "summary": "Delete a public key",
  9774. "operationId": "userCurrentDeleteKey",
  9775. "parameters": [
  9776. {
  9777. "type": "integer",
  9778. "format": "int64",
  9779. "description": "id of key to delete",
  9780. "name": "id",
  9781. "in": "path",
  9782. "required": true
  9783. }
  9784. ],
  9785. "responses": {
  9786. "204": {
  9787. "$ref": "#/responses/empty"
  9788. },
  9789. "403": {
  9790. "$ref": "#/responses/forbidden"
  9791. },
  9792. "404": {
  9793. "$ref": "#/responses/notFound"
  9794. }
  9795. }
  9796. }
  9797. },
  9798. "/user/orgs": {
  9799. "get": {
  9800. "produces": [
  9801. "application/json"
  9802. ],
  9803. "tags": [
  9804. "organization"
  9805. ],
  9806. "summary": "List the current user's organizations",
  9807. "operationId": "orgListCurrentUserOrgs",
  9808. "parameters": [
  9809. {
  9810. "type": "integer",
  9811. "description": "page number of results to return (1-based)",
  9812. "name": "page",
  9813. "in": "query"
  9814. },
  9815. {
  9816. "type": "integer",
  9817. "description": "page size of results",
  9818. "name": "limit",
  9819. "in": "query"
  9820. }
  9821. ],
  9822. "responses": {
  9823. "200": {
  9824. "$ref": "#/responses/OrganizationList"
  9825. }
  9826. }
  9827. }
  9828. },
  9829. "/user/repos": {
  9830. "get": {
  9831. "produces": [
  9832. "application/json"
  9833. ],
  9834. "tags": [
  9835. "user"
  9836. ],
  9837. "summary": "List the repos that the authenticated user owns or has access to",
  9838. "operationId": "userCurrentListRepos",
  9839. "parameters": [
  9840. {
  9841. "type": "integer",
  9842. "description": "page number of results to return (1-based)",
  9843. "name": "page",
  9844. "in": "query"
  9845. },
  9846. {
  9847. "type": "integer",
  9848. "description": "page size of results",
  9849. "name": "limit",
  9850. "in": "query"
  9851. }
  9852. ],
  9853. "responses": {
  9854. "200": {
  9855. "$ref": "#/responses/RepositoryList"
  9856. }
  9857. }
  9858. },
  9859. "post": {
  9860. "consumes": [
  9861. "application/json"
  9862. ],
  9863. "produces": [
  9864. "application/json"
  9865. ],
  9866. "tags": [
  9867. "repository",
  9868. "user"
  9869. ],
  9870. "summary": "Create a repository",
  9871. "operationId": "createCurrentUserRepo",
  9872. "parameters": [
  9873. {
  9874. "name": "body",
  9875. "in": "body",
  9876. "schema": {
  9877. "$ref": "#/definitions/CreateRepoOption"
  9878. }
  9879. }
  9880. ],
  9881. "responses": {
  9882. "201": {
  9883. "$ref": "#/responses/Repository"
  9884. },
  9885. "409": {
  9886. "description": "The repository with the same name already exists."
  9887. },
  9888. "422": {
  9889. "$ref": "#/responses/validationError"
  9890. }
  9891. }
  9892. }
  9893. },
  9894. "/user/starred": {
  9895. "get": {
  9896. "produces": [
  9897. "application/json"
  9898. ],
  9899. "tags": [
  9900. "user"
  9901. ],
  9902. "summary": "The repos that the authenticated user has starred",
  9903. "operationId": "userCurrentListStarred",
  9904. "parameters": [
  9905. {
  9906. "type": "integer",
  9907. "description": "page number of results to return (1-based)",
  9908. "name": "page",
  9909. "in": "query"
  9910. },
  9911. {
  9912. "type": "integer",
  9913. "description": "page size of results",
  9914. "name": "limit",
  9915. "in": "query"
  9916. }
  9917. ],
  9918. "responses": {
  9919. "200": {
  9920. "$ref": "#/responses/RepositoryList"
  9921. }
  9922. }
  9923. }
  9924. },
  9925. "/user/starred/{owner}/{repo}": {
  9926. "get": {
  9927. "tags": [
  9928. "user"
  9929. ],
  9930. "summary": "Whether the authenticated is starring the repo",
  9931. "operationId": "userCurrentCheckStarring",
  9932. "parameters": [
  9933. {
  9934. "type": "string",
  9935. "description": "owner of the repo",
  9936. "name": "owner",
  9937. "in": "path",
  9938. "required": true
  9939. },
  9940. {
  9941. "type": "string",
  9942. "description": "name of the repo",
  9943. "name": "repo",
  9944. "in": "path",
  9945. "required": true
  9946. }
  9947. ],
  9948. "responses": {
  9949. "204": {
  9950. "$ref": "#/responses/empty"
  9951. },
  9952. "404": {
  9953. "$ref": "#/responses/notFound"
  9954. }
  9955. }
  9956. },
  9957. "put": {
  9958. "tags": [
  9959. "user"
  9960. ],
  9961. "summary": "Star the given repo",
  9962. "operationId": "userCurrentPutStar",
  9963. "parameters": [
  9964. {
  9965. "type": "string",
  9966. "description": "owner of the repo to star",
  9967. "name": "owner",
  9968. "in": "path",
  9969. "required": true
  9970. },
  9971. {
  9972. "type": "string",
  9973. "description": "name of the repo to star",
  9974. "name": "repo",
  9975. "in": "path",
  9976. "required": true
  9977. }
  9978. ],
  9979. "responses": {
  9980. "204": {
  9981. "$ref": "#/responses/empty"
  9982. }
  9983. }
  9984. },
  9985. "delete": {
  9986. "tags": [
  9987. "user"
  9988. ],
  9989. "summary": "Unstar the given repo",
  9990. "operationId": "userCurrentDeleteStar",
  9991. "parameters": [
  9992. {
  9993. "type": "string",
  9994. "description": "owner of the repo to unstar",
  9995. "name": "owner",
  9996. "in": "path",
  9997. "required": true
  9998. },
  9999. {
  10000. "type": "string",
  10001. "description": "name of the repo to unstar",
  10002. "name": "repo",
  10003. "in": "path",
  10004. "required": true
  10005. }
  10006. ],
  10007. "responses": {
  10008. "204": {
  10009. "$ref": "#/responses/empty"
  10010. }
  10011. }
  10012. }
  10013. },
  10014. "/user/stopwatches": {
  10015. "get": {
  10016. "consumes": [
  10017. "application/json"
  10018. ],
  10019. "produces": [
  10020. "application/json"
  10021. ],
  10022. "tags": [
  10023. "user"
  10024. ],
  10025. "summary": "Get list of all existing stopwatches",
  10026. "operationId": "userGetStopWatches",
  10027. "parameters": [
  10028. {
  10029. "type": "integer",
  10030. "description": "page number of results to return (1-based)",
  10031. "name": "page",
  10032. "in": "query"
  10033. },
  10034. {
  10035. "type": "integer",
  10036. "description": "page size of results",
  10037. "name": "limit",
  10038. "in": "query"
  10039. }
  10040. ],
  10041. "responses": {
  10042. "200": {
  10043. "$ref": "#/responses/StopWatchList"
  10044. }
  10045. }
  10046. }
  10047. },
  10048. "/user/subscriptions": {
  10049. "get": {
  10050. "produces": [
  10051. "application/json"
  10052. ],
  10053. "tags": [
  10054. "user"
  10055. ],
  10056. "summary": "List repositories watched by the authenticated user",
  10057. "operationId": "userCurrentListSubscriptions",
  10058. "parameters": [
  10059. {
  10060. "type": "integer",
  10061. "description": "page number of results to return (1-based)",
  10062. "name": "page",
  10063. "in": "query"
  10064. },
  10065. {
  10066. "type": "integer",
  10067. "description": "page size of results",
  10068. "name": "limit",
  10069. "in": "query"
  10070. }
  10071. ],
  10072. "responses": {
  10073. "200": {
  10074. "$ref": "#/responses/RepositoryList"
  10075. }
  10076. }
  10077. }
  10078. },
  10079. "/user/teams": {
  10080. "get": {
  10081. "produces": [
  10082. "application/json"
  10083. ],
  10084. "tags": [
  10085. "user"
  10086. ],
  10087. "summary": "List all the teams a user belongs to",
  10088. "operationId": "userListTeams",
  10089. "parameters": [
  10090. {
  10091. "type": "integer",
  10092. "description": "page number of results to return (1-based)",
  10093. "name": "page",
  10094. "in": "query"
  10095. },
  10096. {
  10097. "type": "integer",
  10098. "description": "page size of results",
  10099. "name": "limit",
  10100. "in": "query"
  10101. }
  10102. ],
  10103. "responses": {
  10104. "200": {
  10105. "$ref": "#/responses/TeamList"
  10106. }
  10107. }
  10108. }
  10109. },
  10110. "/user/times": {
  10111. "get": {
  10112. "produces": [
  10113. "application/json"
  10114. ],
  10115. "tags": [
  10116. "user"
  10117. ],
  10118. "summary": "List the current user's tracked times",
  10119. "operationId": "userCurrentTrackedTimes",
  10120. "parameters": [
  10121. {
  10122. "type": "string",
  10123. "format": "date-time",
  10124. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  10125. "name": "since",
  10126. "in": "query"
  10127. },
  10128. {
  10129. "type": "string",
  10130. "format": "date-time",
  10131. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  10132. "name": "before",
  10133. "in": "query"
  10134. }
  10135. ],
  10136. "responses": {
  10137. "200": {
  10138. "$ref": "#/responses/TrackedTimeList"
  10139. }
  10140. }
  10141. }
  10142. },
  10143. "/users/search": {
  10144. "get": {
  10145. "produces": [
  10146. "application/json"
  10147. ],
  10148. "tags": [
  10149. "user"
  10150. ],
  10151. "summary": "Search for users",
  10152. "operationId": "userSearch",
  10153. "parameters": [
  10154. {
  10155. "type": "string",
  10156. "description": "keyword",
  10157. "name": "q",
  10158. "in": "query"
  10159. },
  10160. {
  10161. "type": "integer",
  10162. "format": "int64",
  10163. "description": "ID of the user to search for",
  10164. "name": "uid",
  10165. "in": "query"
  10166. },
  10167. {
  10168. "type": "integer",
  10169. "description": "page number of results to return (1-based)",
  10170. "name": "page",
  10171. "in": "query"
  10172. },
  10173. {
  10174. "type": "integer",
  10175. "description": "page size of results",
  10176. "name": "limit",
  10177. "in": "query"
  10178. }
  10179. ],
  10180. "responses": {
  10181. "200": {
  10182. "description": "SearchResults of a successful search",
  10183. "schema": {
  10184. "type": "object",
  10185. "properties": {
  10186. "data": {
  10187. "type": "array",
  10188. "items": {
  10189. "$ref": "#/definitions/User"
  10190. }
  10191. },
  10192. "ok": {
  10193. "type": "boolean"
  10194. }
  10195. }
  10196. }
  10197. }
  10198. }
  10199. }
  10200. },
  10201. "/users/{follower}/following/{followee}": {
  10202. "get": {
  10203. "tags": [
  10204. "user"
  10205. ],
  10206. "summary": "Check if one user is following another user",
  10207. "operationId": "userCheckFollowing",
  10208. "parameters": [
  10209. {
  10210. "type": "string",
  10211. "description": "username of following user",
  10212. "name": "follower",
  10213. "in": "path",
  10214. "required": true
  10215. },
  10216. {
  10217. "type": "string",
  10218. "description": "username of followed user",
  10219. "name": "followee",
  10220. "in": "path",
  10221. "required": true
  10222. }
  10223. ],
  10224. "responses": {
  10225. "204": {
  10226. "$ref": "#/responses/empty"
  10227. },
  10228. "404": {
  10229. "$ref": "#/responses/notFound"
  10230. }
  10231. }
  10232. }
  10233. },
  10234. "/users/{username}": {
  10235. "get": {
  10236. "produces": [
  10237. "application/json"
  10238. ],
  10239. "tags": [
  10240. "user"
  10241. ],
  10242. "summary": "Get a user",
  10243. "operationId": "userGet",
  10244. "parameters": [
  10245. {
  10246. "type": "string",
  10247. "description": "username of user to get",
  10248. "name": "username",
  10249. "in": "path",
  10250. "required": true
  10251. }
  10252. ],
  10253. "responses": {
  10254. "200": {
  10255. "$ref": "#/responses/User"
  10256. },
  10257. "404": {
  10258. "$ref": "#/responses/notFound"
  10259. }
  10260. }
  10261. }
  10262. },
  10263. "/users/{username}/followers": {
  10264. "get": {
  10265. "produces": [
  10266. "application/json"
  10267. ],
  10268. "tags": [
  10269. "user"
  10270. ],
  10271. "summary": "List the given user's followers",
  10272. "operationId": "userListFollowers",
  10273. "parameters": [
  10274. {
  10275. "type": "string",
  10276. "description": "username of user",
  10277. "name": "username",
  10278. "in": "path",
  10279. "required": true
  10280. },
  10281. {
  10282. "type": "integer",
  10283. "description": "page number of results to return (1-based)",
  10284. "name": "page",
  10285. "in": "query"
  10286. },
  10287. {
  10288. "type": "integer",
  10289. "description": "page size of results",
  10290. "name": "limit",
  10291. "in": "query"
  10292. }
  10293. ],
  10294. "responses": {
  10295. "200": {
  10296. "$ref": "#/responses/UserList"
  10297. }
  10298. }
  10299. }
  10300. },
  10301. "/users/{username}/following": {
  10302. "get": {
  10303. "produces": [
  10304. "application/json"
  10305. ],
  10306. "tags": [
  10307. "user"
  10308. ],
  10309. "summary": "List the users that the given user is following",
  10310. "operationId": "userListFollowing",
  10311. "parameters": [
  10312. {
  10313. "type": "string",
  10314. "description": "username of user",
  10315. "name": "username",
  10316. "in": "path",
  10317. "required": true
  10318. },
  10319. {
  10320. "type": "integer",
  10321. "description": "page number of results to return (1-based)",
  10322. "name": "page",
  10323. "in": "query"
  10324. },
  10325. {
  10326. "type": "integer",
  10327. "description": "page size of results",
  10328. "name": "limit",
  10329. "in": "query"
  10330. }
  10331. ],
  10332. "responses": {
  10333. "200": {
  10334. "$ref": "#/responses/UserList"
  10335. }
  10336. }
  10337. }
  10338. },
  10339. "/users/{username}/gpg_keys": {
  10340. "get": {
  10341. "produces": [
  10342. "application/json"
  10343. ],
  10344. "tags": [
  10345. "user"
  10346. ],
  10347. "summary": "List the given user's GPG keys",
  10348. "operationId": "userListGPGKeys",
  10349. "parameters": [
  10350. {
  10351. "type": "string",
  10352. "description": "username of user",
  10353. "name": "username",
  10354. "in": "path",
  10355. "required": true
  10356. },
  10357. {
  10358. "type": "integer",
  10359. "description": "page number of results to return (1-based)",
  10360. "name": "page",
  10361. "in": "query"
  10362. },
  10363. {
  10364. "type": "integer",
  10365. "description": "page size of results",
  10366. "name": "limit",
  10367. "in": "query"
  10368. }
  10369. ],
  10370. "responses": {
  10371. "200": {
  10372. "$ref": "#/responses/GPGKeyList"
  10373. }
  10374. }
  10375. }
  10376. },
  10377. "/users/{username}/heatmap": {
  10378. "get": {
  10379. "produces": [
  10380. "application/json"
  10381. ],
  10382. "tags": [
  10383. "user"
  10384. ],
  10385. "summary": "Get a user's heatmap",
  10386. "operationId": "userGetHeatmapData",
  10387. "parameters": [
  10388. {
  10389. "type": "string",
  10390. "description": "username of user to get",
  10391. "name": "username",
  10392. "in": "path",
  10393. "required": true
  10394. }
  10395. ],
  10396. "responses": {
  10397. "200": {
  10398. "$ref": "#/responses/UserHeatmapData"
  10399. },
  10400. "404": {
  10401. "$ref": "#/responses/notFound"
  10402. }
  10403. }
  10404. }
  10405. },
  10406. "/users/{username}/keys": {
  10407. "get": {
  10408. "produces": [
  10409. "application/json"
  10410. ],
  10411. "tags": [
  10412. "user"
  10413. ],
  10414. "summary": "List the given user's public keys",
  10415. "operationId": "userListKeys",
  10416. "parameters": [
  10417. {
  10418. "type": "string",
  10419. "description": "username of user",
  10420. "name": "username",
  10421. "in": "path",
  10422. "required": true
  10423. },
  10424. {
  10425. "type": "string",
  10426. "description": "fingerprint of the key",
  10427. "name": "fingerprint",
  10428. "in": "query"
  10429. },
  10430. {
  10431. "type": "integer",
  10432. "description": "page number of results to return (1-based)",
  10433. "name": "page",
  10434. "in": "query"
  10435. },
  10436. {
  10437. "type": "integer",
  10438. "description": "page size of results",
  10439. "name": "limit",
  10440. "in": "query"
  10441. }
  10442. ],
  10443. "responses": {
  10444. "200": {
  10445. "$ref": "#/responses/PublicKeyList"
  10446. }
  10447. }
  10448. }
  10449. },
  10450. "/users/{username}/orgs": {
  10451. "get": {
  10452. "produces": [
  10453. "application/json"
  10454. ],
  10455. "tags": [
  10456. "organization"
  10457. ],
  10458. "summary": "List a user's organizations",
  10459. "operationId": "orgListUserOrgs",
  10460. "parameters": [
  10461. {
  10462. "type": "string",
  10463. "description": "username of user",
  10464. "name": "username",
  10465. "in": "path",
  10466. "required": true
  10467. },
  10468. {
  10469. "type": "integer",
  10470. "description": "page number of results to return (1-based)",
  10471. "name": "page",
  10472. "in": "query"
  10473. },
  10474. {
  10475. "type": "integer",
  10476. "description": "page size of results",
  10477. "name": "limit",
  10478. "in": "query"
  10479. }
  10480. ],
  10481. "responses": {
  10482. "200": {
  10483. "$ref": "#/responses/OrganizationList"
  10484. }
  10485. }
  10486. }
  10487. },
  10488. "/users/{username}/repos": {
  10489. "get": {
  10490. "produces": [
  10491. "application/json"
  10492. ],
  10493. "tags": [
  10494. "user"
  10495. ],
  10496. "summary": "List the repos owned by the given user",
  10497. "operationId": "userListRepos",
  10498. "parameters": [
  10499. {
  10500. "type": "string",
  10501. "description": "username of user",
  10502. "name": "username",
  10503. "in": "path",
  10504. "required": true
  10505. },
  10506. {
  10507. "type": "integer",
  10508. "description": "page number of results to return (1-based)",
  10509. "name": "page",
  10510. "in": "query"
  10511. },
  10512. {
  10513. "type": "integer",
  10514. "description": "page size of results",
  10515. "name": "limit",
  10516. "in": "query"
  10517. }
  10518. ],
  10519. "responses": {
  10520. "200": {
  10521. "$ref": "#/responses/RepositoryList"
  10522. }
  10523. }
  10524. }
  10525. },
  10526. "/users/{username}/starred": {
  10527. "get": {
  10528. "produces": [
  10529. "application/json"
  10530. ],
  10531. "tags": [
  10532. "user"
  10533. ],
  10534. "summary": "The repos that the given user has starred",
  10535. "operationId": "userListStarred",
  10536. "parameters": [
  10537. {
  10538. "type": "string",
  10539. "description": "username of user",
  10540. "name": "username",
  10541. "in": "path",
  10542. "required": true
  10543. },
  10544. {
  10545. "type": "integer",
  10546. "description": "page number of results to return (1-based)",
  10547. "name": "page",
  10548. "in": "query"
  10549. },
  10550. {
  10551. "type": "integer",
  10552. "description": "page size of results",
  10553. "name": "limit",
  10554. "in": "query"
  10555. }
  10556. ],
  10557. "responses": {
  10558. "200": {
  10559. "$ref": "#/responses/RepositoryList"
  10560. }
  10561. }
  10562. }
  10563. },
  10564. "/users/{username}/subscriptions": {
  10565. "get": {
  10566. "produces": [
  10567. "application/json"
  10568. ],
  10569. "tags": [
  10570. "user"
  10571. ],
  10572. "summary": "List the repositories watched by a user",
  10573. "operationId": "userListSubscriptions",
  10574. "parameters": [
  10575. {
  10576. "type": "string",
  10577. "description": "username of the user",
  10578. "name": "username",
  10579. "in": "path",
  10580. "required": true
  10581. },
  10582. {
  10583. "type": "integer",
  10584. "description": "page number of results to return (1-based)",
  10585. "name": "page",
  10586. "in": "query"
  10587. },
  10588. {
  10589. "type": "integer",
  10590. "description": "page size of results",
  10591. "name": "limit",
  10592. "in": "query"
  10593. }
  10594. ],
  10595. "responses": {
  10596. "200": {
  10597. "$ref": "#/responses/RepositoryList"
  10598. }
  10599. }
  10600. }
  10601. },
  10602. "/users/{username}/tokens": {
  10603. "get": {
  10604. "produces": [
  10605. "application/json"
  10606. ],
  10607. "tags": [
  10608. "user"
  10609. ],
  10610. "summary": "List the authenticated user's access tokens",
  10611. "operationId": "userGetTokens",
  10612. "parameters": [
  10613. {
  10614. "type": "string",
  10615. "description": "username of user",
  10616. "name": "username",
  10617. "in": "path",
  10618. "required": true
  10619. },
  10620. {
  10621. "type": "integer",
  10622. "description": "page number of results to return (1-based)",
  10623. "name": "page",
  10624. "in": "query"
  10625. },
  10626. {
  10627. "type": "integer",
  10628. "description": "page size of results",
  10629. "name": "limit",
  10630. "in": "query"
  10631. }
  10632. ],
  10633. "responses": {
  10634. "200": {
  10635. "$ref": "#/responses/AccessTokenList"
  10636. }
  10637. }
  10638. },
  10639. "post": {
  10640. "consumes": [
  10641. "application/json"
  10642. ],
  10643. "produces": [
  10644. "application/json"
  10645. ],
  10646. "tags": [
  10647. "user"
  10648. ],
  10649. "summary": "Create an access token",
  10650. "operationId": "userCreateToken",
  10651. "parameters": [
  10652. {
  10653. "type": "string",
  10654. "x-go-name": "Name",
  10655. "description": "username of user",
  10656. "name": "username",
  10657. "in": "path",
  10658. "required": true
  10659. },
  10660. {
  10661. "name": "accessToken",
  10662. "in": "body",
  10663. "schema": {
  10664. "type": "object",
  10665. "required": [
  10666. "name"
  10667. ],
  10668. "properties": {
  10669. "name": {
  10670. "type": "string"
  10671. }
  10672. }
  10673. }
  10674. }
  10675. ],
  10676. "responses": {
  10677. "200": {
  10678. "$ref": "#/responses/AccessToken"
  10679. }
  10680. }
  10681. }
  10682. },
  10683. "/users/{username}/tokens/{token}": {
  10684. "delete": {
  10685. "produces": [
  10686. "application/json"
  10687. ],
  10688. "tags": [
  10689. "user"
  10690. ],
  10691. "summary": "delete an access token",
  10692. "operationId": "userDeleteAccessToken",
  10693. "parameters": [
  10694. {
  10695. "type": "string",
  10696. "description": "username of user",
  10697. "name": "username",
  10698. "in": "path",
  10699. "required": true
  10700. },
  10701. {
  10702. "type": "string",
  10703. "description": "token to be deleted, identified by ID and if not available by name",
  10704. "name": "token",
  10705. "in": "path",
  10706. "required": true
  10707. }
  10708. ],
  10709. "responses": {
  10710. "204": {
  10711. "$ref": "#/responses/empty"
  10712. },
  10713. "422": {
  10714. "$ref": "#/responses/error"
  10715. }
  10716. }
  10717. }
  10718. },
  10719. "/version": {
  10720. "get": {
  10721. "produces": [
  10722. "application/json"
  10723. ],
  10724. "tags": [
  10725. "miscellaneous"
  10726. ],
  10727. "summary": "Returns the version of the Gitea application",
  10728. "operationId": "getVersion",
  10729. "responses": {
  10730. "200": {
  10731. "$ref": "#/responses/ServerVersion"
  10732. }
  10733. }
  10734. }
  10735. }
  10736. },
  10737. "definitions": {
  10738. "APIError": {
  10739. "description": "APIError is an api error with a message",
  10740. "type": "object",
  10741. "properties": {
  10742. "message": {
  10743. "type": "string",
  10744. "x-go-name": "Message"
  10745. },
  10746. "url": {
  10747. "type": "string",
  10748. "x-go-name": "URL"
  10749. }
  10750. },
  10751. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10752. },
  10753. "AccessToken": {
  10754. "type": "object",
  10755. "title": "AccessToken represents an API access token.",
  10756. "properties": {
  10757. "id": {
  10758. "type": "integer",
  10759. "format": "int64",
  10760. "x-go-name": "ID"
  10761. },
  10762. "name": {
  10763. "type": "string",
  10764. "x-go-name": "Name"
  10765. },
  10766. "sha1": {
  10767. "type": "string",
  10768. "x-go-name": "Token"
  10769. },
  10770. "token_last_eight": {
  10771. "type": "string",
  10772. "x-go-name": "TokenLastEight"
  10773. }
  10774. },
  10775. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10776. },
  10777. "AddCollaboratorOption": {
  10778. "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository",
  10779. "type": "object",
  10780. "properties": {
  10781. "permission": {
  10782. "type": "string",
  10783. "x-go-name": "Permission"
  10784. }
  10785. },
  10786. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10787. },
  10788. "AddTimeOption": {
  10789. "description": "AddTimeOption options for adding time to an issue",
  10790. "type": "object",
  10791. "required": [
  10792. "time"
  10793. ],
  10794. "properties": {
  10795. "created": {
  10796. "type": "string",
  10797. "format": "date-time",
  10798. "x-go-name": "Created"
  10799. },
  10800. "time": {
  10801. "description": "time in seconds",
  10802. "type": "integer",
  10803. "format": "int64",
  10804. "x-go-name": "Time"
  10805. },
  10806. "user_name": {
  10807. "description": "User who spent the time (optional)",
  10808. "type": "string",
  10809. "x-go-name": "User"
  10810. }
  10811. },
  10812. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10813. },
  10814. "AnnotatedTag": {
  10815. "description": "AnnotatedTag represents an annotated tag",
  10816. "type": "object",
  10817. "properties": {
  10818. "message": {
  10819. "type": "string",
  10820. "x-go-name": "Message"
  10821. },
  10822. "object": {
  10823. "$ref": "#/definitions/AnnotatedTagObject"
  10824. },
  10825. "sha": {
  10826. "type": "string",
  10827. "x-go-name": "SHA"
  10828. },
  10829. "tag": {
  10830. "type": "string",
  10831. "x-go-name": "Tag"
  10832. },
  10833. "tagger": {
  10834. "$ref": "#/definitions/CommitUser"
  10835. },
  10836. "url": {
  10837. "type": "string",
  10838. "x-go-name": "URL"
  10839. },
  10840. "verification": {
  10841. "$ref": "#/definitions/PayloadCommitVerification"
  10842. }
  10843. },
  10844. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10845. },
  10846. "AnnotatedTagObject": {
  10847. "description": "AnnotatedTagObject contains meta information of the tag object",
  10848. "type": "object",
  10849. "properties": {
  10850. "sha": {
  10851. "type": "string",
  10852. "x-go-name": "SHA"
  10853. },
  10854. "type": {
  10855. "type": "string",
  10856. "x-go-name": "Type"
  10857. },
  10858. "url": {
  10859. "type": "string",
  10860. "x-go-name": "URL"
  10861. }
  10862. },
  10863. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10864. },
  10865. "Attachment": {
  10866. "description": "Attachment a generic attachment",
  10867. "type": "object",
  10868. "properties": {
  10869. "browser_download_url": {
  10870. "type": "string",
  10871. "x-go-name": "DownloadURL"
  10872. },
  10873. "created_at": {
  10874. "type": "string",
  10875. "format": "date-time",
  10876. "x-go-name": "Created"
  10877. },
  10878. "download_count": {
  10879. "type": "integer",
  10880. "format": "int64",
  10881. "x-go-name": "DownloadCount"
  10882. },
  10883. "id": {
  10884. "type": "integer",
  10885. "format": "int64",
  10886. "x-go-name": "ID"
  10887. },
  10888. "name": {
  10889. "type": "string",
  10890. "x-go-name": "Name"
  10891. },
  10892. "size": {
  10893. "type": "integer",
  10894. "format": "int64",
  10895. "x-go-name": "Size"
  10896. },
  10897. "uuid": {
  10898. "type": "string",
  10899. "x-go-name": "UUID"
  10900. }
  10901. },
  10902. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10903. },
  10904. "Branch": {
  10905. "description": "Branch represents a repository branch",
  10906. "type": "object",
  10907. "properties": {
  10908. "commit": {
  10909. "$ref": "#/definitions/PayloadCommit"
  10910. },
  10911. "effective_branch_protection_name": {
  10912. "type": "string",
  10913. "x-go-name": "EffectiveBranchProtectionName"
  10914. },
  10915. "enable_status_check": {
  10916. "type": "boolean",
  10917. "x-go-name": "EnableStatusCheck"
  10918. },
  10919. "name": {
  10920. "type": "string",
  10921. "x-go-name": "Name"
  10922. },
  10923. "protected": {
  10924. "type": "boolean",
  10925. "x-go-name": "Protected"
  10926. },
  10927. "required_approvals": {
  10928. "type": "integer",
  10929. "format": "int64",
  10930. "x-go-name": "RequiredApprovals"
  10931. },
  10932. "status_check_contexts": {
  10933. "type": "array",
  10934. "items": {
  10935. "type": "string"
  10936. },
  10937. "x-go-name": "StatusCheckContexts"
  10938. },
  10939. "user_can_merge": {
  10940. "type": "boolean",
  10941. "x-go-name": "UserCanMerge"
  10942. },
  10943. "user_can_push": {
  10944. "type": "boolean",
  10945. "x-go-name": "UserCanPush"
  10946. }
  10947. },
  10948. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10949. },
  10950. "BranchProtection": {
  10951. "description": "BranchProtection represents a branch protection for a repository",
  10952. "type": "object",
  10953. "properties": {
  10954. "approvals_whitelist_teams": {
  10955. "type": "array",
  10956. "items": {
  10957. "type": "string"
  10958. },
  10959. "x-go-name": "ApprovalsWhitelistTeams"
  10960. },
  10961. "approvals_whitelist_username": {
  10962. "type": "array",
  10963. "items": {
  10964. "type": "string"
  10965. },
  10966. "x-go-name": "ApprovalsWhitelistUsernames"
  10967. },
  10968. "block_on_outdated_branch": {
  10969. "type": "boolean",
  10970. "x-go-name": "BlockOnOutdatedBranch"
  10971. },
  10972. "block_on_rejected_reviews": {
  10973. "type": "boolean",
  10974. "x-go-name": "BlockOnRejectedReviews"
  10975. },
  10976. "branch_name": {
  10977. "type": "string",
  10978. "x-go-name": "BranchName"
  10979. },
  10980. "created_at": {
  10981. "type": "string",
  10982. "format": "date-time",
  10983. "x-go-name": "Created"
  10984. },
  10985. "dismiss_stale_approvals": {
  10986. "type": "boolean",
  10987. "x-go-name": "DismissStaleApprovals"
  10988. },
  10989. "enable_approvals_whitelist": {
  10990. "type": "boolean",
  10991. "x-go-name": "EnableApprovalsWhitelist"
  10992. },
  10993. "enable_merge_whitelist": {
  10994. "type": "boolean",
  10995. "x-go-name": "EnableMergeWhitelist"
  10996. },
  10997. "enable_push": {
  10998. "type": "boolean",
  10999. "x-go-name": "EnablePush"
  11000. },
  11001. "enable_push_whitelist": {
  11002. "type": "boolean",
  11003. "x-go-name": "EnablePushWhitelist"
  11004. },
  11005. "enable_status_check": {
  11006. "type": "boolean",
  11007. "x-go-name": "EnableStatusCheck"
  11008. },
  11009. "merge_whitelist_teams": {
  11010. "type": "array",
  11011. "items": {
  11012. "type": "string"
  11013. },
  11014. "x-go-name": "MergeWhitelistTeams"
  11015. },
  11016. "merge_whitelist_usernames": {
  11017. "type": "array",
  11018. "items": {
  11019. "type": "string"
  11020. },
  11021. "x-go-name": "MergeWhitelistUsernames"
  11022. },
  11023. "protected_file_patterns": {
  11024. "type": "string",
  11025. "x-go-name": "ProtectedFilePatterns"
  11026. },
  11027. "push_whitelist_deploy_keys": {
  11028. "type": "boolean",
  11029. "x-go-name": "PushWhitelistDeployKeys"
  11030. },
  11031. "push_whitelist_teams": {
  11032. "type": "array",
  11033. "items": {
  11034. "type": "string"
  11035. },
  11036. "x-go-name": "PushWhitelistTeams"
  11037. },
  11038. "push_whitelist_usernames": {
  11039. "type": "array",
  11040. "items": {
  11041. "type": "string"
  11042. },
  11043. "x-go-name": "PushWhitelistUsernames"
  11044. },
  11045. "require_signed_commits": {
  11046. "type": "boolean",
  11047. "x-go-name": "RequireSignedCommits"
  11048. },
  11049. "required_approvals": {
  11050. "type": "integer",
  11051. "format": "int64",
  11052. "x-go-name": "RequiredApprovals"
  11053. },
  11054. "status_check_contexts": {
  11055. "type": "array",
  11056. "items": {
  11057. "type": "string"
  11058. },
  11059. "x-go-name": "StatusCheckContexts"
  11060. },
  11061. "updated_at": {
  11062. "type": "string",
  11063. "format": "date-time",
  11064. "x-go-name": "Updated"
  11065. }
  11066. },
  11067. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11068. },
  11069. "Comment": {
  11070. "description": "Comment represents a comment on a commit or issue",
  11071. "type": "object",
  11072. "properties": {
  11073. "body": {
  11074. "type": "string",
  11075. "x-go-name": "Body"
  11076. },
  11077. "created_at": {
  11078. "type": "string",
  11079. "format": "date-time",
  11080. "x-go-name": "Created"
  11081. },
  11082. "html_url": {
  11083. "type": "string",
  11084. "x-go-name": "HTMLURL"
  11085. },
  11086. "id": {
  11087. "type": "integer",
  11088. "format": "int64",
  11089. "x-go-name": "ID"
  11090. },
  11091. "issue_url": {
  11092. "type": "string",
  11093. "x-go-name": "IssueURL"
  11094. },
  11095. "original_author": {
  11096. "type": "string",
  11097. "x-go-name": "OriginalAuthor"
  11098. },
  11099. "original_author_id": {
  11100. "type": "integer",
  11101. "format": "int64",
  11102. "x-go-name": "OriginalAuthorID"
  11103. },
  11104. "pull_request_url": {
  11105. "type": "string",
  11106. "x-go-name": "PRURL"
  11107. },
  11108. "updated_at": {
  11109. "type": "string",
  11110. "format": "date-time",
  11111. "x-go-name": "Updated"
  11112. },
  11113. "user": {
  11114. "$ref": "#/definitions/User"
  11115. }
  11116. },
  11117. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11118. },
  11119. "Commit": {
  11120. "type": "object",
  11121. "title": "Commit contains information generated from a Git commit.",
  11122. "properties": {
  11123. "author": {
  11124. "$ref": "#/definitions/User"
  11125. },
  11126. "commit": {
  11127. "$ref": "#/definitions/RepoCommit"
  11128. },
  11129. "committer": {
  11130. "$ref": "#/definitions/User"
  11131. },
  11132. "html_url": {
  11133. "type": "string",
  11134. "x-go-name": "HTMLURL"
  11135. },
  11136. "parents": {
  11137. "type": "array",
  11138. "items": {
  11139. "$ref": "#/definitions/CommitMeta"
  11140. },
  11141. "x-go-name": "Parents"
  11142. },
  11143. "sha": {
  11144. "type": "string",
  11145. "x-go-name": "SHA"
  11146. },
  11147. "url": {
  11148. "type": "string",
  11149. "x-go-name": "URL"
  11150. }
  11151. },
  11152. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11153. },
  11154. "CommitDateOptions": {
  11155. "description": "CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE",
  11156. "type": "object",
  11157. "properties": {
  11158. "author": {
  11159. "type": "string",
  11160. "format": "date-time",
  11161. "x-go-name": "Author"
  11162. },
  11163. "committer": {
  11164. "type": "string",
  11165. "format": "date-time",
  11166. "x-go-name": "Committer"
  11167. }
  11168. },
  11169. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11170. },
  11171. "CommitMeta": {
  11172. "type": "object",
  11173. "title": "CommitMeta contains meta information of a commit in terms of API.",
  11174. "properties": {
  11175. "sha": {
  11176. "type": "string",
  11177. "x-go-name": "SHA"
  11178. },
  11179. "url": {
  11180. "type": "string",
  11181. "x-go-name": "URL"
  11182. }
  11183. },
  11184. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11185. },
  11186. "CommitUser": {
  11187. "type": "object",
  11188. "title": "CommitUser contains information of a user in the context of a commit.",
  11189. "properties": {
  11190. "date": {
  11191. "type": "string",
  11192. "x-go-name": "Date"
  11193. },
  11194. "email": {
  11195. "type": "string",
  11196. "format": "email",
  11197. "x-go-name": "Email"
  11198. },
  11199. "name": {
  11200. "type": "string",
  11201. "x-go-name": "Name"
  11202. }
  11203. },
  11204. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11205. },
  11206. "ContentsResponse": {
  11207. "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content",
  11208. "type": "object",
  11209. "properties": {
  11210. "_links": {
  11211. "$ref": "#/definitions/FileLinksResponse"
  11212. },
  11213. "content": {
  11214. "description": "`content` is populated when `type` is `file`, otherwise null",
  11215. "type": "string",
  11216. "x-go-name": "Content"
  11217. },
  11218. "download_url": {
  11219. "type": "string",
  11220. "x-go-name": "DownloadURL"
  11221. },
  11222. "encoding": {
  11223. "description": "`encoding` is populated when `type` is `file`, otherwise null",
  11224. "type": "string",
  11225. "x-go-name": "Encoding"
  11226. },
  11227. "git_url": {
  11228. "type": "string",
  11229. "x-go-name": "GitURL"
  11230. },
  11231. "html_url": {
  11232. "type": "string",
  11233. "x-go-name": "HTMLURL"
  11234. },
  11235. "name": {
  11236. "type": "string",
  11237. "x-go-name": "Name"
  11238. },
  11239. "path": {
  11240. "type": "string",
  11241. "x-go-name": "Path"
  11242. },
  11243. "sha": {
  11244. "type": "string",
  11245. "x-go-name": "SHA"
  11246. },
  11247. "size": {
  11248. "type": "integer",
  11249. "format": "int64",
  11250. "x-go-name": "Size"
  11251. },
  11252. "submodule_git_url": {
  11253. "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null",
  11254. "type": "string",
  11255. "x-go-name": "SubmoduleGitURL"
  11256. },
  11257. "target": {
  11258. "description": "`target` is populated when `type` is `symlink`, otherwise null",
  11259. "type": "string",
  11260. "x-go-name": "Target"
  11261. },
  11262. "type": {
  11263. "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`",
  11264. "type": "string",
  11265. "x-go-name": "Type"
  11266. },
  11267. "url": {
  11268. "type": "string",
  11269. "x-go-name": "URL"
  11270. }
  11271. },
  11272. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11273. },
  11274. "CreateBranchProtectionOption": {
  11275. "description": "CreateBranchProtectionOption options for creating a branch protection",
  11276. "type": "object",
  11277. "properties": {
  11278. "approvals_whitelist_teams": {
  11279. "type": "array",
  11280. "items": {
  11281. "type": "string"
  11282. },
  11283. "x-go-name": "ApprovalsWhitelistTeams"
  11284. },
  11285. "approvals_whitelist_username": {
  11286. "type": "array",
  11287. "items": {
  11288. "type": "string"
  11289. },
  11290. "x-go-name": "ApprovalsWhitelistUsernames"
  11291. },
  11292. "block_on_outdated_branch": {
  11293. "type": "boolean",
  11294. "x-go-name": "BlockOnOutdatedBranch"
  11295. },
  11296. "block_on_rejected_reviews": {
  11297. "type": "boolean",
  11298. "x-go-name": "BlockOnRejectedReviews"
  11299. },
  11300. "branch_name": {
  11301. "type": "string",
  11302. "x-go-name": "BranchName"
  11303. },
  11304. "dismiss_stale_approvals": {
  11305. "type": "boolean",
  11306. "x-go-name": "DismissStaleApprovals"
  11307. },
  11308. "enable_approvals_whitelist": {
  11309. "type": "boolean",
  11310. "x-go-name": "EnableApprovalsWhitelist"
  11311. },
  11312. "enable_merge_whitelist": {
  11313. "type": "boolean",
  11314. "x-go-name": "EnableMergeWhitelist"
  11315. },
  11316. "enable_push": {
  11317. "type": "boolean",
  11318. "x-go-name": "EnablePush"
  11319. },
  11320. "enable_push_whitelist": {
  11321. "type": "boolean",
  11322. "x-go-name": "EnablePushWhitelist"
  11323. },
  11324. "enable_status_check": {
  11325. "type": "boolean",
  11326. "x-go-name": "EnableStatusCheck"
  11327. },
  11328. "merge_whitelist_teams": {
  11329. "type": "array",
  11330. "items": {
  11331. "type": "string"
  11332. },
  11333. "x-go-name": "MergeWhitelistTeams"
  11334. },
  11335. "merge_whitelist_usernames": {
  11336. "type": "array",
  11337. "items": {
  11338. "type": "string"
  11339. },
  11340. "x-go-name": "MergeWhitelistUsernames"
  11341. },
  11342. "protected_file_patterns": {
  11343. "type": "string",
  11344. "x-go-name": "ProtectedFilePatterns"
  11345. },
  11346. "push_whitelist_deploy_keys": {
  11347. "type": "boolean",
  11348. "x-go-name": "PushWhitelistDeployKeys"
  11349. },
  11350. "push_whitelist_teams": {
  11351. "type": "array",
  11352. "items": {
  11353. "type": "string"
  11354. },
  11355. "x-go-name": "PushWhitelistTeams"
  11356. },
  11357. "push_whitelist_usernames": {
  11358. "type": "array",
  11359. "items": {
  11360. "type": "string"
  11361. },
  11362. "x-go-name": "PushWhitelistUsernames"
  11363. },
  11364. "require_signed_commits": {
  11365. "type": "boolean",
  11366. "x-go-name": "RequireSignedCommits"
  11367. },
  11368. "required_approvals": {
  11369. "type": "integer",
  11370. "format": "int64",
  11371. "x-go-name": "RequiredApprovals"
  11372. },
  11373. "status_check_contexts": {
  11374. "type": "array",
  11375. "items": {
  11376. "type": "string"
  11377. },
  11378. "x-go-name": "StatusCheckContexts"
  11379. }
  11380. },
  11381. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11382. },
  11383. "CreateBranchRepoOption": {
  11384. "description": "CreateBranchRepoOption options when creating a branch in a repository",
  11385. "type": "object",
  11386. "required": [
  11387. "new_branch_name"
  11388. ],
  11389. "properties": {
  11390. "new_branch_name": {
  11391. "description": "Name of the branch to create",
  11392. "type": "string",
  11393. "uniqueItems": true,
  11394. "x-go-name": "BranchName"
  11395. },
  11396. "old_branch_name": {
  11397. "description": "Name of the old branch to create from",
  11398. "type": "string",
  11399. "uniqueItems": true,
  11400. "x-go-name": "OldBranchName"
  11401. }
  11402. },
  11403. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11404. },
  11405. "CreateEmailOption": {
  11406. "description": "CreateEmailOption options when creating email addresses",
  11407. "type": "object",
  11408. "properties": {
  11409. "emails": {
  11410. "description": "email addresses to add",
  11411. "type": "array",
  11412. "items": {
  11413. "type": "string"
  11414. },
  11415. "x-go-name": "Emails"
  11416. }
  11417. },
  11418. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11419. },
  11420. "CreateFileOptions": {
  11421. "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)",
  11422. "type": "object",
  11423. "required": [
  11424. "content"
  11425. ],
  11426. "properties": {
  11427. "author": {
  11428. "$ref": "#/definitions/Identity"
  11429. },
  11430. "branch": {
  11431. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  11432. "type": "string",
  11433. "x-go-name": "BranchName"
  11434. },
  11435. "committer": {
  11436. "$ref": "#/definitions/Identity"
  11437. },
  11438. "content": {
  11439. "description": "content must be base64 encoded",
  11440. "type": "string",
  11441. "x-go-name": "Content"
  11442. },
  11443. "dates": {
  11444. "$ref": "#/definitions/CommitDateOptions"
  11445. },
  11446. "message": {
  11447. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  11448. "type": "string",
  11449. "x-go-name": "Message"
  11450. },
  11451. "new_branch": {
  11452. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  11453. "type": "string",
  11454. "x-go-name": "NewBranchName"
  11455. }
  11456. },
  11457. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11458. },
  11459. "CreateForkOption": {
  11460. "description": "CreateForkOption options for creating a fork",
  11461. "type": "object",
  11462. "properties": {
  11463. "organization": {
  11464. "description": "organization name, if forking into an organization",
  11465. "type": "string",
  11466. "x-go-name": "Organization"
  11467. }
  11468. },
  11469. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11470. },
  11471. "CreateGPGKeyOption": {
  11472. "description": "CreateGPGKeyOption options create user GPG key",
  11473. "type": "object",
  11474. "required": [
  11475. "armored_public_key"
  11476. ],
  11477. "properties": {
  11478. "armored_public_key": {
  11479. "description": "An armored GPG key to add",
  11480. "type": "string",
  11481. "uniqueItems": true,
  11482. "x-go-name": "ArmoredKey"
  11483. }
  11484. },
  11485. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11486. },
  11487. "CreateHookOption": {
  11488. "description": "CreateHookOption options when create a hook",
  11489. "type": "object",
  11490. "required": [
  11491. "type",
  11492. "config"
  11493. ],
  11494. "properties": {
  11495. "active": {
  11496. "type": "boolean",
  11497. "default": false,
  11498. "x-go-name": "Active"
  11499. },
  11500. "branch_filter": {
  11501. "type": "string",
  11502. "x-go-name": "BranchFilter"
  11503. },
  11504. "config": {
  11505. "$ref": "#/definitions/CreateHookOptionConfig"
  11506. },
  11507. "events": {
  11508. "type": "array",
  11509. "items": {
  11510. "type": "string"
  11511. },
  11512. "x-go-name": "Events"
  11513. },
  11514. "type": {
  11515. "type": "string",
  11516. "enum": [
  11517. "dingtalk",
  11518. "discord",
  11519. "gitea",
  11520. "gogs",
  11521. "msteams",
  11522. "slack",
  11523. "telegram",
  11524. "feishu"
  11525. ],
  11526. "x-go-name": "Type"
  11527. }
  11528. },
  11529. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11530. },
  11531. "CreateHookOptionConfig": {
  11532. "description": "CreateHookOptionConfig has all config options in it\nrequired are \"content_type\" and \"url\" Required",
  11533. "type": "object",
  11534. "additionalProperties": {
  11535. "type": "string"
  11536. },
  11537. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11538. },
  11539. "CreateIssueCommentOption": {
  11540. "description": "CreateIssueCommentOption options for creating a comment on an issue",
  11541. "type": "object",
  11542. "required": [
  11543. "body"
  11544. ],
  11545. "properties": {
  11546. "body": {
  11547. "type": "string",
  11548. "x-go-name": "Body"
  11549. }
  11550. },
  11551. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11552. },
  11553. "CreateIssueOption": {
  11554. "description": "CreateIssueOption options to create one issue",
  11555. "type": "object",
  11556. "required": [
  11557. "title"
  11558. ],
  11559. "properties": {
  11560. "assignee": {
  11561. "description": "username of assignee",
  11562. "type": "string",
  11563. "x-go-name": "Assignee"
  11564. },
  11565. "assignees": {
  11566. "type": "array",
  11567. "items": {
  11568. "type": "string"
  11569. },
  11570. "x-go-name": "Assignees"
  11571. },
  11572. "body": {
  11573. "type": "string",
  11574. "x-go-name": "Body"
  11575. },
  11576. "closed": {
  11577. "type": "boolean",
  11578. "x-go-name": "Closed"
  11579. },
  11580. "due_date": {
  11581. "type": "string",
  11582. "format": "date-time",
  11583. "x-go-name": "Deadline"
  11584. },
  11585. "labels": {
  11586. "description": "list of label ids",
  11587. "type": "array",
  11588. "items": {
  11589. "type": "integer",
  11590. "format": "int64"
  11591. },
  11592. "x-go-name": "Labels"
  11593. },
  11594. "milestone": {
  11595. "description": "milestone id",
  11596. "type": "integer",
  11597. "format": "int64",
  11598. "x-go-name": "Milestone"
  11599. },
  11600. "title": {
  11601. "type": "string",
  11602. "x-go-name": "Title"
  11603. }
  11604. },
  11605. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11606. },
  11607. "CreateKeyOption": {
  11608. "description": "CreateKeyOption options when creating a key",
  11609. "type": "object",
  11610. "required": [
  11611. "title",
  11612. "key"
  11613. ],
  11614. "properties": {
  11615. "key": {
  11616. "description": "An armored SSH key to add",
  11617. "type": "string",
  11618. "uniqueItems": true,
  11619. "x-go-name": "Key"
  11620. },
  11621. "read_only": {
  11622. "description": "Describe if the key has only read access or read/write",
  11623. "type": "boolean",
  11624. "x-go-name": "ReadOnly"
  11625. },
  11626. "title": {
  11627. "description": "Title of the key to add",
  11628. "type": "string",
  11629. "uniqueItems": true,
  11630. "x-go-name": "Title"
  11631. }
  11632. },
  11633. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11634. },
  11635. "CreateLabelOption": {
  11636. "description": "CreateLabelOption options for creating a label",
  11637. "type": "object",
  11638. "required": [
  11639. "name",
  11640. "color"
  11641. ],
  11642. "properties": {
  11643. "color": {
  11644. "type": "string",
  11645. "x-go-name": "Color",
  11646. "example": "#00aabb"
  11647. },
  11648. "description": {
  11649. "type": "string",
  11650. "x-go-name": "Description"
  11651. },
  11652. "name": {
  11653. "type": "string",
  11654. "x-go-name": "Name"
  11655. }
  11656. },
  11657. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11658. },
  11659. "CreateMilestoneOption": {
  11660. "description": "CreateMilestoneOption options for creating a milestone",
  11661. "type": "object",
  11662. "properties": {
  11663. "description": {
  11664. "type": "string",
  11665. "x-go-name": "Description"
  11666. },
  11667. "due_on": {
  11668. "type": "string",
  11669. "format": "date-time",
  11670. "x-go-name": "Deadline"
  11671. },
  11672. "state": {
  11673. "type": "string",
  11674. "enum": [
  11675. "open",
  11676. "closed"
  11677. ],
  11678. "x-go-name": "State"
  11679. },
  11680. "title": {
  11681. "type": "string",
  11682. "x-go-name": "Title"
  11683. }
  11684. },
  11685. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11686. },
  11687. "CreateOAuth2ApplicationOptions": {
  11688. "description": "CreateOAuth2ApplicationOptions holds options to create an oauth2 application",
  11689. "type": "object",
  11690. "properties": {
  11691. "name": {
  11692. "type": "string",
  11693. "x-go-name": "Name"
  11694. },
  11695. "redirect_uris": {
  11696. "type": "array",
  11697. "items": {
  11698. "type": "string"
  11699. },
  11700. "x-go-name": "RedirectURIs"
  11701. }
  11702. },
  11703. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11704. },
  11705. "CreateOrgOption": {
  11706. "description": "CreateOrgOption options for creating an organization",
  11707. "type": "object",
  11708. "required": [
  11709. "username"
  11710. ],
  11711. "properties": {
  11712. "description": {
  11713. "type": "string",
  11714. "x-go-name": "Description"
  11715. },
  11716. "full_name": {
  11717. "type": "string",
  11718. "x-go-name": "FullName"
  11719. },
  11720. "location": {
  11721. "type": "string",
  11722. "x-go-name": "Location"
  11723. },
  11724. "repo_admin_change_team_access": {
  11725. "type": "boolean",
  11726. "x-go-name": "RepoAdminChangeTeamAccess"
  11727. },
  11728. "username": {
  11729. "type": "string",
  11730. "x-go-name": "UserName"
  11731. },
  11732. "visibility": {
  11733. "description": "possible values are `public` (default), `limited` or `private`",
  11734. "type": "string",
  11735. "enum": [
  11736. "public",
  11737. "limited",
  11738. "private"
  11739. ],
  11740. "x-go-name": "Visibility"
  11741. },
  11742. "website": {
  11743. "type": "string",
  11744. "x-go-name": "Website"
  11745. }
  11746. },
  11747. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11748. },
  11749. "CreatePullRequestOption": {
  11750. "description": "CreatePullRequestOption options when creating a pull request",
  11751. "type": "object",
  11752. "properties": {
  11753. "assignee": {
  11754. "type": "string",
  11755. "x-go-name": "Assignee"
  11756. },
  11757. "assignees": {
  11758. "type": "array",
  11759. "items": {
  11760. "type": "string"
  11761. },
  11762. "x-go-name": "Assignees"
  11763. },
  11764. "base": {
  11765. "type": "string",
  11766. "x-go-name": "Base"
  11767. },
  11768. "body": {
  11769. "type": "string",
  11770. "x-go-name": "Body"
  11771. },
  11772. "due_date": {
  11773. "type": "string",
  11774. "format": "date-time",
  11775. "x-go-name": "Deadline"
  11776. },
  11777. "head": {
  11778. "type": "string",
  11779. "x-go-name": "Head"
  11780. },
  11781. "labels": {
  11782. "type": "array",
  11783. "items": {
  11784. "type": "integer",
  11785. "format": "int64"
  11786. },
  11787. "x-go-name": "Labels"
  11788. },
  11789. "milestone": {
  11790. "type": "integer",
  11791. "format": "int64",
  11792. "x-go-name": "Milestone"
  11793. },
  11794. "title": {
  11795. "type": "string",
  11796. "x-go-name": "Title"
  11797. }
  11798. },
  11799. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11800. },
  11801. "CreatePullReviewComment": {
  11802. "description": "CreatePullReviewComment represent a review comment for creation api",
  11803. "type": "object",
  11804. "properties": {
  11805. "body": {
  11806. "type": "string",
  11807. "x-go-name": "Body"
  11808. },
  11809. "new_position": {
  11810. "description": "if comment to new file line or 0",
  11811. "type": "integer",
  11812. "format": "int64",
  11813. "x-go-name": "NewLineNum"
  11814. },
  11815. "old_position": {
  11816. "description": "if comment to old file line or 0",
  11817. "type": "integer",
  11818. "format": "int64",
  11819. "x-go-name": "OldLineNum"
  11820. },
  11821. "path": {
  11822. "description": "the tree path",
  11823. "type": "string",
  11824. "x-go-name": "Path"
  11825. }
  11826. },
  11827. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11828. },
  11829. "CreatePullReviewOptions": {
  11830. "description": "CreatePullReviewOptions are options to create a pull review",
  11831. "type": "object",
  11832. "properties": {
  11833. "body": {
  11834. "type": "string",
  11835. "x-go-name": "Body"
  11836. },
  11837. "comments": {
  11838. "type": "array",
  11839. "items": {
  11840. "$ref": "#/definitions/CreatePullReviewComment"
  11841. },
  11842. "x-go-name": "Comments"
  11843. },
  11844. "commit_id": {
  11845. "type": "string",
  11846. "x-go-name": "CommitID"
  11847. },
  11848. "event": {
  11849. "$ref": "#/definitions/ReviewStateType"
  11850. }
  11851. },
  11852. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11853. },
  11854. "CreateReleaseOption": {
  11855. "description": "CreateReleaseOption options when creating a release",
  11856. "type": "object",
  11857. "required": [
  11858. "tag_name"
  11859. ],
  11860. "properties": {
  11861. "body": {
  11862. "type": "string",
  11863. "x-go-name": "Note"
  11864. },
  11865. "draft": {
  11866. "type": "boolean",
  11867. "x-go-name": "IsDraft"
  11868. },
  11869. "name": {
  11870. "type": "string",
  11871. "x-go-name": "Title"
  11872. },
  11873. "prerelease": {
  11874. "type": "boolean",
  11875. "x-go-name": "IsPrerelease"
  11876. },
  11877. "tag_name": {
  11878. "type": "string",
  11879. "x-go-name": "TagName"
  11880. },
  11881. "target_commitish": {
  11882. "type": "string",
  11883. "x-go-name": "Target"
  11884. }
  11885. },
  11886. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11887. },
  11888. "CreateRepoOption": {
  11889. "description": "CreateRepoOption options when creating repository",
  11890. "type": "object",
  11891. "required": [
  11892. "name"
  11893. ],
  11894. "properties": {
  11895. "auto_init": {
  11896. "description": "Whether the repository should be auto-intialized?",
  11897. "type": "boolean",
  11898. "x-go-name": "AutoInit"
  11899. },
  11900. "default_branch": {
  11901. "description": "DefaultBranch of the repository (used when initializes and in template)",
  11902. "type": "string",
  11903. "x-go-name": "DefaultBranch"
  11904. },
  11905. "description": {
  11906. "description": "Description of the repository to create",
  11907. "type": "string",
  11908. "x-go-name": "Description"
  11909. },
  11910. "gitignores": {
  11911. "description": "Gitignores to use",
  11912. "type": "string",
  11913. "x-go-name": "Gitignores"
  11914. },
  11915. "issue_labels": {
  11916. "description": "Issue Label set to use",
  11917. "type": "string",
  11918. "x-go-name": "IssueLabels"
  11919. },
  11920. "license": {
  11921. "description": "License to use",
  11922. "type": "string",
  11923. "x-go-name": "License"
  11924. },
  11925. "name": {
  11926. "description": "Name of the repository to create",
  11927. "type": "string",
  11928. "uniqueItems": true,
  11929. "x-go-name": "Name"
  11930. },
  11931. "private": {
  11932. "description": "Whether the repository is private",
  11933. "type": "boolean",
  11934. "x-go-name": "Private"
  11935. },
  11936. "readme": {
  11937. "description": "Readme of the repository to create",
  11938. "type": "string",
  11939. "x-go-name": "Readme"
  11940. },
  11941. "trust_model": {
  11942. "description": "TrustModel of the repository",
  11943. "type": "string",
  11944. "enum": [
  11945. "default",
  11946. "collaborator",
  11947. "committer",
  11948. "collaboratorcommitter"
  11949. ],
  11950. "x-go-name": "TrustModel"
  11951. }
  11952. },
  11953. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11954. },
  11955. "CreateStatusOption": {
  11956. "description": "CreateStatusOption holds the information needed to create a new Status for a Commit",
  11957. "type": "object",
  11958. "properties": {
  11959. "context": {
  11960. "type": "string",
  11961. "x-go-name": "Context"
  11962. },
  11963. "description": {
  11964. "type": "string",
  11965. "x-go-name": "Description"
  11966. },
  11967. "state": {
  11968. "$ref": "#/definitions/StatusState"
  11969. },
  11970. "target_url": {
  11971. "type": "string",
  11972. "x-go-name": "TargetURL"
  11973. }
  11974. },
  11975. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11976. },
  11977. "CreateTeamOption": {
  11978. "description": "CreateTeamOption options for creating a team",
  11979. "type": "object",
  11980. "required": [
  11981. "name"
  11982. ],
  11983. "properties": {
  11984. "can_create_org_repo": {
  11985. "type": "boolean",
  11986. "x-go-name": "CanCreateOrgRepo"
  11987. },
  11988. "description": {
  11989. "type": "string",
  11990. "x-go-name": "Description"
  11991. },
  11992. "includes_all_repositories": {
  11993. "type": "boolean",
  11994. "x-go-name": "IncludesAllRepositories"
  11995. },
  11996. "name": {
  11997. "type": "string",
  11998. "x-go-name": "Name"
  11999. },
  12000. "permission": {
  12001. "type": "string",
  12002. "enum": [
  12003. "read",
  12004. "write",
  12005. "admin"
  12006. ],
  12007. "x-go-name": "Permission"
  12008. },
  12009. "units": {
  12010. "type": "array",
  12011. "items": {
  12012. "type": "string"
  12013. },
  12014. "x-go-name": "Units",
  12015. "example": [
  12016. "repo.code",
  12017. "repo.issues",
  12018. "repo.ext_issues",
  12019. "repo.wiki",
  12020. "repo.pulls",
  12021. "repo.releases",
  12022. "repo.ext_wiki"
  12023. ]
  12024. }
  12025. },
  12026. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12027. },
  12028. "CreateUserOption": {
  12029. "description": "CreateUserOption create user options",
  12030. "type": "object",
  12031. "required": [
  12032. "username",
  12033. "email",
  12034. "password"
  12035. ],
  12036. "properties": {
  12037. "email": {
  12038. "type": "string",
  12039. "format": "email",
  12040. "x-go-name": "Email"
  12041. },
  12042. "full_name": {
  12043. "type": "string",
  12044. "x-go-name": "FullName"
  12045. },
  12046. "login_name": {
  12047. "type": "string",
  12048. "x-go-name": "LoginName"
  12049. },
  12050. "must_change_password": {
  12051. "type": "boolean",
  12052. "x-go-name": "MustChangePassword"
  12053. },
  12054. "password": {
  12055. "type": "string",
  12056. "x-go-name": "Password"
  12057. },
  12058. "send_notify": {
  12059. "type": "boolean",
  12060. "x-go-name": "SendNotify"
  12061. },
  12062. "source_id": {
  12063. "type": "integer",
  12064. "format": "int64",
  12065. "x-go-name": "SourceID"
  12066. },
  12067. "username": {
  12068. "type": "string",
  12069. "x-go-name": "Username"
  12070. }
  12071. },
  12072. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12073. },
  12074. "Cron": {
  12075. "description": "Cron represents a Cron task",
  12076. "type": "object",
  12077. "properties": {
  12078. "exec_times": {
  12079. "type": "integer",
  12080. "format": "int64",
  12081. "x-go-name": "ExecTimes"
  12082. },
  12083. "name": {
  12084. "type": "string",
  12085. "x-go-name": "Name"
  12086. },
  12087. "next": {
  12088. "type": "string",
  12089. "format": "date-time",
  12090. "x-go-name": "Next"
  12091. },
  12092. "prev": {
  12093. "type": "string",
  12094. "format": "date-time",
  12095. "x-go-name": "Prev"
  12096. },
  12097. "schedule": {
  12098. "type": "string",
  12099. "x-go-name": "Schedule"
  12100. }
  12101. },
  12102. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12103. },
  12104. "DeleteEmailOption": {
  12105. "description": "DeleteEmailOption options when deleting email addresses",
  12106. "type": "object",
  12107. "properties": {
  12108. "emails": {
  12109. "description": "email addresses to delete",
  12110. "type": "array",
  12111. "items": {
  12112. "type": "string"
  12113. },
  12114. "x-go-name": "Emails"
  12115. }
  12116. },
  12117. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12118. },
  12119. "DeleteFileOptions": {
  12120. "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)",
  12121. "type": "object",
  12122. "required": [
  12123. "sha"
  12124. ],
  12125. "properties": {
  12126. "author": {
  12127. "$ref": "#/definitions/Identity"
  12128. },
  12129. "branch": {
  12130. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  12131. "type": "string",
  12132. "x-go-name": "BranchName"
  12133. },
  12134. "committer": {
  12135. "$ref": "#/definitions/Identity"
  12136. },
  12137. "dates": {
  12138. "$ref": "#/definitions/CommitDateOptions"
  12139. },
  12140. "message": {
  12141. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  12142. "type": "string",
  12143. "x-go-name": "Message"
  12144. },
  12145. "new_branch": {
  12146. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  12147. "type": "string",
  12148. "x-go-name": "NewBranchName"
  12149. },
  12150. "sha": {
  12151. "description": "sha is the SHA for the file that already exists",
  12152. "type": "string",
  12153. "x-go-name": "SHA"
  12154. }
  12155. },
  12156. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12157. },
  12158. "DeployKey": {
  12159. "description": "DeployKey a deploy key",
  12160. "type": "object",
  12161. "properties": {
  12162. "created_at": {
  12163. "type": "string",
  12164. "format": "date-time",
  12165. "x-go-name": "Created"
  12166. },
  12167. "fingerprint": {
  12168. "type": "string",
  12169. "x-go-name": "Fingerprint"
  12170. },
  12171. "id": {
  12172. "type": "integer",
  12173. "format": "int64",
  12174. "x-go-name": "ID"
  12175. },
  12176. "key": {
  12177. "type": "string",
  12178. "x-go-name": "Key"
  12179. },
  12180. "key_id": {
  12181. "type": "integer",
  12182. "format": "int64",
  12183. "x-go-name": "KeyID"
  12184. },
  12185. "read_only": {
  12186. "type": "boolean",
  12187. "x-go-name": "ReadOnly"
  12188. },
  12189. "repository": {
  12190. "$ref": "#/definitions/Repository"
  12191. },
  12192. "title": {
  12193. "type": "string",
  12194. "x-go-name": "Title"
  12195. },
  12196. "url": {
  12197. "type": "string",
  12198. "x-go-name": "URL"
  12199. }
  12200. },
  12201. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12202. },
  12203. "EditAttachmentOptions": {
  12204. "description": "EditAttachmentOptions options for editing attachments",
  12205. "type": "object",
  12206. "properties": {
  12207. "name": {
  12208. "type": "string",
  12209. "x-go-name": "Name"
  12210. }
  12211. },
  12212. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12213. },
  12214. "EditBranchProtectionOption": {
  12215. "description": "EditBranchProtectionOption options for editing a branch protection",
  12216. "type": "object",
  12217. "properties": {
  12218. "approvals_whitelist_teams": {
  12219. "type": "array",
  12220. "items": {
  12221. "type": "string"
  12222. },
  12223. "x-go-name": "ApprovalsWhitelistTeams"
  12224. },
  12225. "approvals_whitelist_username": {
  12226. "type": "array",
  12227. "items": {
  12228. "type": "string"
  12229. },
  12230. "x-go-name": "ApprovalsWhitelistUsernames"
  12231. },
  12232. "block_on_outdated_branch": {
  12233. "type": "boolean",
  12234. "x-go-name": "BlockOnOutdatedBranch"
  12235. },
  12236. "block_on_rejected_reviews": {
  12237. "type": "boolean",
  12238. "x-go-name": "BlockOnRejectedReviews"
  12239. },
  12240. "dismiss_stale_approvals": {
  12241. "type": "boolean",
  12242. "x-go-name": "DismissStaleApprovals"
  12243. },
  12244. "enable_approvals_whitelist": {
  12245. "type": "boolean",
  12246. "x-go-name": "EnableApprovalsWhitelist"
  12247. },
  12248. "enable_merge_whitelist": {
  12249. "type": "boolean",
  12250. "x-go-name": "EnableMergeWhitelist"
  12251. },
  12252. "enable_push": {
  12253. "type": "boolean",
  12254. "x-go-name": "EnablePush"
  12255. },
  12256. "enable_push_whitelist": {
  12257. "type": "boolean",
  12258. "x-go-name": "EnablePushWhitelist"
  12259. },
  12260. "enable_status_check": {
  12261. "type": "boolean",
  12262. "x-go-name": "EnableStatusCheck"
  12263. },
  12264. "merge_whitelist_teams": {
  12265. "type": "array",
  12266. "items": {
  12267. "type": "string"
  12268. },
  12269. "x-go-name": "MergeWhitelistTeams"
  12270. },
  12271. "merge_whitelist_usernames": {
  12272. "type": "array",
  12273. "items": {
  12274. "type": "string"
  12275. },
  12276. "x-go-name": "MergeWhitelistUsernames"
  12277. },
  12278. "protected_file_patterns": {
  12279. "type": "string",
  12280. "x-go-name": "ProtectedFilePatterns"
  12281. },
  12282. "push_whitelist_deploy_keys": {
  12283. "type": "boolean",
  12284. "x-go-name": "PushWhitelistDeployKeys"
  12285. },
  12286. "push_whitelist_teams": {
  12287. "type": "array",
  12288. "items": {
  12289. "type": "string"
  12290. },
  12291. "x-go-name": "PushWhitelistTeams"
  12292. },
  12293. "push_whitelist_usernames": {
  12294. "type": "array",
  12295. "items": {
  12296. "type": "string"
  12297. },
  12298. "x-go-name": "PushWhitelistUsernames"
  12299. },
  12300. "require_signed_commits": {
  12301. "type": "boolean",
  12302. "x-go-name": "RequireSignedCommits"
  12303. },
  12304. "required_approvals": {
  12305. "type": "integer",
  12306. "format": "int64",
  12307. "x-go-name": "RequiredApprovals"
  12308. },
  12309. "status_check_contexts": {
  12310. "type": "array",
  12311. "items": {
  12312. "type": "string"
  12313. },
  12314. "x-go-name": "StatusCheckContexts"
  12315. }
  12316. },
  12317. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12318. },
  12319. "EditDeadlineOption": {
  12320. "description": "EditDeadlineOption options for creating a deadline",
  12321. "type": "object",
  12322. "required": [
  12323. "due_date"
  12324. ],
  12325. "properties": {
  12326. "due_date": {
  12327. "type": "string",
  12328. "format": "date-time",
  12329. "x-go-name": "Deadline"
  12330. }
  12331. },
  12332. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12333. },
  12334. "EditGitHookOption": {
  12335. "description": "EditGitHookOption options when modifying one Git hook",
  12336. "type": "object",
  12337. "properties": {
  12338. "content": {
  12339. "type": "string",
  12340. "x-go-name": "Content"
  12341. }
  12342. },
  12343. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12344. },
  12345. "EditHookOption": {
  12346. "description": "EditHookOption options when modify one hook",
  12347. "type": "object",
  12348. "properties": {
  12349. "active": {
  12350. "type": "boolean",
  12351. "x-go-name": "Active"
  12352. },
  12353. "branch_filter": {
  12354. "type": "string",
  12355. "x-go-name": "BranchFilter"
  12356. },
  12357. "config": {
  12358. "type": "object",
  12359. "additionalProperties": {
  12360. "type": "string"
  12361. },
  12362. "x-go-name": "Config"
  12363. },
  12364. "events": {
  12365. "type": "array",
  12366. "items": {
  12367. "type": "string"
  12368. },
  12369. "x-go-name": "Events"
  12370. }
  12371. },
  12372. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12373. },
  12374. "EditIssueCommentOption": {
  12375. "description": "EditIssueCommentOption options for editing a comment",
  12376. "type": "object",
  12377. "required": [
  12378. "body"
  12379. ],
  12380. "properties": {
  12381. "body": {
  12382. "type": "string",
  12383. "x-go-name": "Body"
  12384. }
  12385. },
  12386. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12387. },
  12388. "EditIssueOption": {
  12389. "description": "EditIssueOption options for editing an issue",
  12390. "type": "object",
  12391. "properties": {
  12392. "assignee": {
  12393. "type": "string",
  12394. "x-go-name": "Assignee"
  12395. },
  12396. "assignees": {
  12397. "type": "array",
  12398. "items": {
  12399. "type": "string"
  12400. },
  12401. "x-go-name": "Assignees"
  12402. },
  12403. "body": {
  12404. "type": "string",
  12405. "x-go-name": "Body"
  12406. },
  12407. "due_date": {
  12408. "type": "string",
  12409. "format": "date-time",
  12410. "x-go-name": "Deadline"
  12411. },
  12412. "milestone": {
  12413. "type": "integer",
  12414. "format": "int64",
  12415. "x-go-name": "Milestone"
  12416. },
  12417. "state": {
  12418. "type": "string",
  12419. "x-go-name": "State"
  12420. },
  12421. "title": {
  12422. "type": "string",
  12423. "x-go-name": "Title"
  12424. },
  12425. "unset_due_date": {
  12426. "type": "boolean",
  12427. "x-go-name": "RemoveDeadline"
  12428. }
  12429. },
  12430. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12431. },
  12432. "EditLabelOption": {
  12433. "description": "EditLabelOption options for editing a label",
  12434. "type": "object",
  12435. "properties": {
  12436. "color": {
  12437. "type": "string",
  12438. "x-go-name": "Color"
  12439. },
  12440. "description": {
  12441. "type": "string",
  12442. "x-go-name": "Description"
  12443. },
  12444. "name": {
  12445. "type": "string",
  12446. "x-go-name": "Name"
  12447. }
  12448. },
  12449. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12450. },
  12451. "EditMilestoneOption": {
  12452. "description": "EditMilestoneOption options for editing a milestone",
  12453. "type": "object",
  12454. "properties": {
  12455. "description": {
  12456. "type": "string",
  12457. "x-go-name": "Description"
  12458. },
  12459. "due_on": {
  12460. "type": "string",
  12461. "format": "date-time",
  12462. "x-go-name": "Deadline"
  12463. },
  12464. "state": {
  12465. "type": "string",
  12466. "x-go-name": "State"
  12467. },
  12468. "title": {
  12469. "type": "string",
  12470. "x-go-name": "Title"
  12471. }
  12472. },
  12473. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12474. },
  12475. "EditOrgOption": {
  12476. "description": "EditOrgOption options for editing an organization",
  12477. "type": "object",
  12478. "properties": {
  12479. "description": {
  12480. "type": "string",
  12481. "x-go-name": "Description"
  12482. },
  12483. "full_name": {
  12484. "type": "string",
  12485. "x-go-name": "FullName"
  12486. },
  12487. "location": {
  12488. "type": "string",
  12489. "x-go-name": "Location"
  12490. },
  12491. "repo_admin_change_team_access": {
  12492. "type": "boolean",
  12493. "x-go-name": "RepoAdminChangeTeamAccess"
  12494. },
  12495. "visibility": {
  12496. "description": "possible values are `public`, `limited` or `private`",
  12497. "type": "string",
  12498. "enum": [
  12499. "public",
  12500. "limited",
  12501. "private"
  12502. ],
  12503. "x-go-name": "Visibility"
  12504. },
  12505. "website": {
  12506. "type": "string",
  12507. "x-go-name": "Website"
  12508. }
  12509. },
  12510. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12511. },
  12512. "EditPullRequestOption": {
  12513. "description": "EditPullRequestOption options when modify pull request",
  12514. "type": "object",
  12515. "properties": {
  12516. "assignee": {
  12517. "type": "string",
  12518. "x-go-name": "Assignee"
  12519. },
  12520. "assignees": {
  12521. "type": "array",
  12522. "items": {
  12523. "type": "string"
  12524. },
  12525. "x-go-name": "Assignees"
  12526. },
  12527. "base": {
  12528. "type": "string",
  12529. "x-go-name": "Base"
  12530. },
  12531. "body": {
  12532. "type": "string",
  12533. "x-go-name": "Body"
  12534. },
  12535. "due_date": {
  12536. "type": "string",
  12537. "format": "date-time",
  12538. "x-go-name": "Deadline"
  12539. },
  12540. "labels": {
  12541. "type": "array",
  12542. "items": {
  12543. "type": "integer",
  12544. "format": "int64"
  12545. },
  12546. "x-go-name": "Labels"
  12547. },
  12548. "milestone": {
  12549. "type": "integer",
  12550. "format": "int64",
  12551. "x-go-name": "Milestone"
  12552. },
  12553. "state": {
  12554. "type": "string",
  12555. "x-go-name": "State"
  12556. },
  12557. "title": {
  12558. "type": "string",
  12559. "x-go-name": "Title"
  12560. },
  12561. "unset_due_date": {
  12562. "type": "boolean",
  12563. "x-go-name": "RemoveDeadline"
  12564. }
  12565. },
  12566. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12567. },
  12568. "EditReactionOption": {
  12569. "description": "EditReactionOption contain the reaction type",
  12570. "type": "object",
  12571. "properties": {
  12572. "content": {
  12573. "type": "string",
  12574. "x-go-name": "Reaction"
  12575. }
  12576. },
  12577. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12578. },
  12579. "EditReleaseOption": {
  12580. "description": "EditReleaseOption options when editing a release",
  12581. "type": "object",
  12582. "properties": {
  12583. "body": {
  12584. "type": "string",
  12585. "x-go-name": "Note"
  12586. },
  12587. "draft": {
  12588. "type": "boolean",
  12589. "x-go-name": "IsDraft"
  12590. },
  12591. "name": {
  12592. "type": "string",
  12593. "x-go-name": "Title"
  12594. },
  12595. "prerelease": {
  12596. "type": "boolean",
  12597. "x-go-name": "IsPrerelease"
  12598. },
  12599. "tag_name": {
  12600. "type": "string",
  12601. "x-go-name": "TagName"
  12602. },
  12603. "target_commitish": {
  12604. "type": "string",
  12605. "x-go-name": "Target"
  12606. }
  12607. },
  12608. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12609. },
  12610. "EditRepoOption": {
  12611. "description": "EditRepoOption options when editing a repository's properties",
  12612. "type": "object",
  12613. "properties": {
  12614. "allow_merge_commits": {
  12615. "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`.",
  12616. "type": "boolean",
  12617. "x-go-name": "AllowMerge"
  12618. },
  12619. "allow_rebase": {
  12620. "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.",
  12621. "type": "boolean",
  12622. "x-go-name": "AllowRebase"
  12623. },
  12624. "allow_rebase_explicit": {
  12625. "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`.",
  12626. "type": "boolean",
  12627. "x-go-name": "AllowRebaseMerge"
  12628. },
  12629. "allow_squash_merge": {
  12630. "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.",
  12631. "type": "boolean",
  12632. "x-go-name": "AllowSquash"
  12633. },
  12634. "archived": {
  12635. "description": "set to `true` to archive this repository.",
  12636. "type": "boolean",
  12637. "x-go-name": "Archived"
  12638. },
  12639. "default_branch": {
  12640. "description": "sets the default branch for this repository.",
  12641. "type": "string",
  12642. "x-go-name": "DefaultBranch"
  12643. },
  12644. "description": {
  12645. "description": "a short description of the repository.",
  12646. "type": "string",
  12647. "x-go-name": "Description"
  12648. },
  12649. "external_tracker": {
  12650. "$ref": "#/definitions/ExternalTracker"
  12651. },
  12652. "external_wiki": {
  12653. "$ref": "#/definitions/ExternalWiki"
  12654. },
  12655. "has_issues": {
  12656. "description": "either `true` to enable issues for this repository or `false` to disable them.",
  12657. "type": "boolean",
  12658. "x-go-name": "HasIssues"
  12659. },
  12660. "has_projects": {
  12661. "description": "either `true` to enable project unit, or `false` to disable them.",
  12662. "type": "boolean",
  12663. "x-go-name": "HasProjects"
  12664. },
  12665. "has_pull_requests": {
  12666. "description": "either `true` to allow pull requests, or `false` to prevent pull request.",
  12667. "type": "boolean",
  12668. "x-go-name": "HasPullRequests"
  12669. },
  12670. "has_wiki": {
  12671. "description": "either `true` to enable the wiki for this repository or `false` to disable it.",
  12672. "type": "boolean",
  12673. "x-go-name": "HasWiki"
  12674. },
  12675. "ignore_whitespace_conflicts": {
  12676. "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.",
  12677. "type": "boolean",
  12678. "x-go-name": "IgnoreWhitespaceConflicts"
  12679. },
  12680. "internal_tracker": {
  12681. "$ref": "#/definitions/InternalTracker"
  12682. },
  12683. "name": {
  12684. "description": "name of the repository",
  12685. "type": "string",
  12686. "uniqueItems": true,
  12687. "x-go-name": "Name"
  12688. },
  12689. "private": {
  12690. "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.",
  12691. "type": "boolean",
  12692. "x-go-name": "Private"
  12693. },
  12694. "template": {
  12695. "description": "either `true` to make this repository a template or `false` to make it a normal repository",
  12696. "type": "boolean",
  12697. "x-go-name": "Template"
  12698. },
  12699. "website": {
  12700. "description": "a URL with more information about the repository.",
  12701. "type": "string",
  12702. "x-go-name": "Website"
  12703. }
  12704. },
  12705. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12706. },
  12707. "EditTeamOption": {
  12708. "description": "EditTeamOption options for editing a team",
  12709. "type": "object",
  12710. "required": [
  12711. "name"
  12712. ],
  12713. "properties": {
  12714. "can_create_org_repo": {
  12715. "type": "boolean",
  12716. "x-go-name": "CanCreateOrgRepo"
  12717. },
  12718. "description": {
  12719. "type": "string",
  12720. "x-go-name": "Description"
  12721. },
  12722. "includes_all_repositories": {
  12723. "type": "boolean",
  12724. "x-go-name": "IncludesAllRepositories"
  12725. },
  12726. "name": {
  12727. "type": "string",
  12728. "x-go-name": "Name"
  12729. },
  12730. "permission": {
  12731. "type": "string",
  12732. "enum": [
  12733. "read",
  12734. "write",
  12735. "admin"
  12736. ],
  12737. "x-go-name": "Permission"
  12738. },
  12739. "units": {
  12740. "type": "array",
  12741. "items": {
  12742. "type": "string"
  12743. },
  12744. "x-go-name": "Units",
  12745. "example": [
  12746. "repo.code",
  12747. "repo.issues",
  12748. "repo.ext_issues",
  12749. "repo.wiki",
  12750. "repo.pulls",
  12751. "repo.releases",
  12752. "repo.ext_wiki"
  12753. ]
  12754. }
  12755. },
  12756. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12757. },
  12758. "EditUserOption": {
  12759. "description": "EditUserOption edit user options",
  12760. "type": "object",
  12761. "required": [
  12762. "email"
  12763. ],
  12764. "properties": {
  12765. "active": {
  12766. "type": "boolean",
  12767. "x-go-name": "Active"
  12768. },
  12769. "admin": {
  12770. "type": "boolean",
  12771. "x-go-name": "Admin"
  12772. },
  12773. "allow_create_organization": {
  12774. "type": "boolean",
  12775. "x-go-name": "AllowCreateOrganization"
  12776. },
  12777. "allow_git_hook": {
  12778. "type": "boolean",
  12779. "x-go-name": "AllowGitHook"
  12780. },
  12781. "allow_import_local": {
  12782. "type": "boolean",
  12783. "x-go-name": "AllowImportLocal"
  12784. },
  12785. "email": {
  12786. "type": "string",
  12787. "format": "email",
  12788. "x-go-name": "Email"
  12789. },
  12790. "full_name": {
  12791. "type": "string",
  12792. "x-go-name": "FullName"
  12793. },
  12794. "location": {
  12795. "type": "string",
  12796. "x-go-name": "Location"
  12797. },
  12798. "login_name": {
  12799. "type": "string",
  12800. "x-go-name": "LoginName"
  12801. },
  12802. "max_repo_creation": {
  12803. "type": "integer",
  12804. "format": "int64",
  12805. "x-go-name": "MaxRepoCreation"
  12806. },
  12807. "must_change_password": {
  12808. "type": "boolean",
  12809. "x-go-name": "MustChangePassword"
  12810. },
  12811. "password": {
  12812. "type": "string",
  12813. "x-go-name": "Password"
  12814. },
  12815. "prohibit_login": {
  12816. "type": "boolean",
  12817. "x-go-name": "ProhibitLogin"
  12818. },
  12819. "source_id": {
  12820. "type": "integer",
  12821. "format": "int64",
  12822. "x-go-name": "SourceID"
  12823. },
  12824. "website": {
  12825. "type": "string",
  12826. "x-go-name": "Website"
  12827. }
  12828. },
  12829. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12830. },
  12831. "Email": {
  12832. "description": "Email an email address belonging to a user",
  12833. "type": "object",
  12834. "properties": {
  12835. "email": {
  12836. "type": "string",
  12837. "format": "email",
  12838. "x-go-name": "Email"
  12839. },
  12840. "primary": {
  12841. "type": "boolean",
  12842. "x-go-name": "Primary"
  12843. },
  12844. "verified": {
  12845. "type": "boolean",
  12846. "x-go-name": "Verified"
  12847. }
  12848. },
  12849. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12850. },
  12851. "ExternalTracker": {
  12852. "description": "ExternalTracker represents settings for external tracker",
  12853. "type": "object",
  12854. "properties": {
  12855. "external_tracker_format": {
  12856. "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.",
  12857. "type": "string",
  12858. "x-go-name": "ExternalTrackerFormat"
  12859. },
  12860. "external_tracker_style": {
  12861. "description": "External Issue Tracker Number Format, either `numeric` or `alphanumeric`",
  12862. "type": "string",
  12863. "x-go-name": "ExternalTrackerStyle"
  12864. },
  12865. "external_tracker_url": {
  12866. "description": "URL of external issue tracker.",
  12867. "type": "string",
  12868. "x-go-name": "ExternalTrackerURL"
  12869. }
  12870. },
  12871. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12872. },
  12873. "ExternalWiki": {
  12874. "description": "ExternalWiki represents setting for external wiki",
  12875. "type": "object",
  12876. "properties": {
  12877. "external_wiki_url": {
  12878. "description": "URL of external wiki.",
  12879. "type": "string",
  12880. "x-go-name": "ExternalWikiURL"
  12881. }
  12882. },
  12883. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12884. },
  12885. "FileCommitResponse": {
  12886. "type": "object",
  12887. "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.",
  12888. "properties": {
  12889. "author": {
  12890. "$ref": "#/definitions/CommitUser"
  12891. },
  12892. "committer": {
  12893. "$ref": "#/definitions/CommitUser"
  12894. },
  12895. "html_url": {
  12896. "type": "string",
  12897. "x-go-name": "HTMLURL"
  12898. },
  12899. "message": {
  12900. "type": "string",
  12901. "x-go-name": "Message"
  12902. },
  12903. "parents": {
  12904. "type": "array",
  12905. "items": {
  12906. "$ref": "#/definitions/CommitMeta"
  12907. },
  12908. "x-go-name": "Parents"
  12909. },
  12910. "sha": {
  12911. "type": "string",
  12912. "x-go-name": "SHA"
  12913. },
  12914. "tree": {
  12915. "$ref": "#/definitions/CommitMeta"
  12916. },
  12917. "url": {
  12918. "type": "string",
  12919. "x-go-name": "URL"
  12920. }
  12921. },
  12922. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12923. },
  12924. "FileDeleteResponse": {
  12925. "description": "FileDeleteResponse contains information about a repo's file that was deleted",
  12926. "type": "object",
  12927. "properties": {
  12928. "commit": {
  12929. "$ref": "#/definitions/FileCommitResponse"
  12930. },
  12931. "content": {
  12932. "type": "object",
  12933. "x-go-name": "Content"
  12934. },
  12935. "verification": {
  12936. "$ref": "#/definitions/PayloadCommitVerification"
  12937. }
  12938. },
  12939. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12940. },
  12941. "FileLinksResponse": {
  12942. "description": "FileLinksResponse contains the links for a repo's file",
  12943. "type": "object",
  12944. "properties": {
  12945. "git": {
  12946. "type": "string",
  12947. "x-go-name": "GitURL"
  12948. },
  12949. "html": {
  12950. "type": "string",
  12951. "x-go-name": "HTMLURL"
  12952. },
  12953. "self": {
  12954. "type": "string",
  12955. "x-go-name": "Self"
  12956. }
  12957. },
  12958. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12959. },
  12960. "FileResponse": {
  12961. "description": "FileResponse contains information about a repo's file",
  12962. "type": "object",
  12963. "properties": {
  12964. "commit": {
  12965. "$ref": "#/definitions/FileCommitResponse"
  12966. },
  12967. "content": {
  12968. "$ref": "#/definitions/ContentsResponse"
  12969. },
  12970. "verification": {
  12971. "$ref": "#/definitions/PayloadCommitVerification"
  12972. }
  12973. },
  12974. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12975. },
  12976. "GPGKey": {
  12977. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  12978. "type": "object",
  12979. "properties": {
  12980. "can_certify": {
  12981. "type": "boolean",
  12982. "x-go-name": "CanCertify"
  12983. },
  12984. "can_encrypt_comms": {
  12985. "type": "boolean",
  12986. "x-go-name": "CanEncryptComms"
  12987. },
  12988. "can_encrypt_storage": {
  12989. "type": "boolean",
  12990. "x-go-name": "CanEncryptStorage"
  12991. },
  12992. "can_sign": {
  12993. "type": "boolean",
  12994. "x-go-name": "CanSign"
  12995. },
  12996. "created_at": {
  12997. "type": "string",
  12998. "format": "date-time",
  12999. "x-go-name": "Created"
  13000. },
  13001. "emails": {
  13002. "type": "array",
  13003. "items": {
  13004. "$ref": "#/definitions/GPGKeyEmail"
  13005. },
  13006. "x-go-name": "Emails"
  13007. },
  13008. "expires_at": {
  13009. "type": "string",
  13010. "format": "date-time",
  13011. "x-go-name": "Expires"
  13012. },
  13013. "id": {
  13014. "type": "integer",
  13015. "format": "int64",
  13016. "x-go-name": "ID"
  13017. },
  13018. "key_id": {
  13019. "type": "string",
  13020. "x-go-name": "KeyID"
  13021. },
  13022. "primary_key_id": {
  13023. "type": "string",
  13024. "x-go-name": "PrimaryKeyID"
  13025. },
  13026. "public_key": {
  13027. "type": "string",
  13028. "x-go-name": "PublicKey"
  13029. },
  13030. "subkeys": {
  13031. "type": "array",
  13032. "items": {
  13033. "$ref": "#/definitions/GPGKey"
  13034. },
  13035. "x-go-name": "SubsKey"
  13036. }
  13037. },
  13038. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13039. },
  13040. "GPGKeyEmail": {
  13041. "description": "GPGKeyEmail an email attached to a GPGKey",
  13042. "type": "object",
  13043. "properties": {
  13044. "email": {
  13045. "type": "string",
  13046. "x-go-name": "Email"
  13047. },
  13048. "verified": {
  13049. "type": "boolean",
  13050. "x-go-name": "Verified"
  13051. }
  13052. },
  13053. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13054. },
  13055. "GeneralAPISettings": {
  13056. "description": "GeneralAPISettings contains global api settings exposed by it",
  13057. "type": "object",
  13058. "properties": {
  13059. "default_git_trees_per_page": {
  13060. "type": "integer",
  13061. "format": "int64",
  13062. "x-go-name": "DefaultGitTreesPerPage"
  13063. },
  13064. "default_max_blob_size": {
  13065. "type": "integer",
  13066. "format": "int64",
  13067. "x-go-name": "DefaultMaxBlobSize"
  13068. },
  13069. "default_paging_num": {
  13070. "type": "integer",
  13071. "format": "int64",
  13072. "x-go-name": "DefaultPagingNum"
  13073. },
  13074. "max_response_items": {
  13075. "type": "integer",
  13076. "format": "int64",
  13077. "x-go-name": "MaxResponseItems"
  13078. }
  13079. },
  13080. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13081. },
  13082. "GeneralAttachmentSettings": {
  13083. "description": "GeneralAttachmentSettings contains global Attachment settings exposed by API",
  13084. "type": "object",
  13085. "properties": {
  13086. "allowed_types": {
  13087. "type": "string",
  13088. "x-go-name": "AllowedTypes"
  13089. },
  13090. "enabled": {
  13091. "type": "boolean",
  13092. "x-go-name": "Enabled"
  13093. },
  13094. "max_files": {
  13095. "type": "integer",
  13096. "format": "int64",
  13097. "x-go-name": "MaxFiles"
  13098. },
  13099. "max_size": {
  13100. "type": "integer",
  13101. "format": "int64",
  13102. "x-go-name": "MaxSize"
  13103. }
  13104. },
  13105. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13106. },
  13107. "GeneralRepoSettings": {
  13108. "description": "GeneralRepoSettings contains global repository settings exposed by API",
  13109. "type": "object",
  13110. "properties": {
  13111. "http_git_disabled": {
  13112. "type": "boolean",
  13113. "x-go-name": "HTTPGitDisabled"
  13114. },
  13115. "mirrors_disabled": {
  13116. "type": "boolean",
  13117. "x-go-name": "MirrorsDisabled"
  13118. }
  13119. },
  13120. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13121. },
  13122. "GeneralUISettings": {
  13123. "description": "GeneralUISettings contains global ui settings exposed by API",
  13124. "type": "object",
  13125. "properties": {
  13126. "allowed_reactions": {
  13127. "type": "array",
  13128. "items": {
  13129. "type": "string"
  13130. },
  13131. "x-go-name": "AllowedReactions"
  13132. }
  13133. },
  13134. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13135. },
  13136. "GitBlobResponse": {
  13137. "description": "GitBlobResponse represents a git blob",
  13138. "type": "object",
  13139. "properties": {
  13140. "content": {
  13141. "type": "string",
  13142. "x-go-name": "Content"
  13143. },
  13144. "encoding": {
  13145. "type": "string",
  13146. "x-go-name": "Encoding"
  13147. },
  13148. "sha": {
  13149. "type": "string",
  13150. "x-go-name": "SHA"
  13151. },
  13152. "size": {
  13153. "type": "integer",
  13154. "format": "int64",
  13155. "x-go-name": "Size"
  13156. },
  13157. "url": {
  13158. "type": "string",
  13159. "x-go-name": "URL"
  13160. }
  13161. },
  13162. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13163. },
  13164. "GitEntry": {
  13165. "description": "GitEntry represents a git tree",
  13166. "type": "object",
  13167. "properties": {
  13168. "mode": {
  13169. "type": "string",
  13170. "x-go-name": "Mode"
  13171. },
  13172. "path": {
  13173. "type": "string",
  13174. "x-go-name": "Path"
  13175. },
  13176. "sha": {
  13177. "type": "string",
  13178. "x-go-name": "SHA"
  13179. },
  13180. "size": {
  13181. "type": "integer",
  13182. "format": "int64",
  13183. "x-go-name": "Size"
  13184. },
  13185. "type": {
  13186. "type": "string",
  13187. "x-go-name": "Type"
  13188. },
  13189. "url": {
  13190. "type": "string",
  13191. "x-go-name": "URL"
  13192. }
  13193. },
  13194. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13195. },
  13196. "GitHook": {
  13197. "description": "GitHook represents a Git repository hook",
  13198. "type": "object",
  13199. "properties": {
  13200. "content": {
  13201. "type": "string",
  13202. "x-go-name": "Content"
  13203. },
  13204. "is_active": {
  13205. "type": "boolean",
  13206. "x-go-name": "IsActive"
  13207. },
  13208. "name": {
  13209. "type": "string",
  13210. "x-go-name": "Name"
  13211. }
  13212. },
  13213. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13214. },
  13215. "GitObject": {
  13216. "type": "object",
  13217. "title": "GitObject represents a Git object.",
  13218. "properties": {
  13219. "sha": {
  13220. "type": "string",
  13221. "x-go-name": "SHA"
  13222. },
  13223. "type": {
  13224. "type": "string",
  13225. "x-go-name": "Type"
  13226. },
  13227. "url": {
  13228. "type": "string",
  13229. "x-go-name": "URL"
  13230. }
  13231. },
  13232. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13233. },
  13234. "GitTreeResponse": {
  13235. "description": "GitTreeResponse returns a git tree",
  13236. "type": "object",
  13237. "properties": {
  13238. "page": {
  13239. "type": "integer",
  13240. "format": "int64",
  13241. "x-go-name": "Page"
  13242. },
  13243. "sha": {
  13244. "type": "string",
  13245. "x-go-name": "SHA"
  13246. },
  13247. "total_count": {
  13248. "type": "integer",
  13249. "format": "int64",
  13250. "x-go-name": "TotalCount"
  13251. },
  13252. "tree": {
  13253. "type": "array",
  13254. "items": {
  13255. "$ref": "#/definitions/GitEntry"
  13256. },
  13257. "x-go-name": "Entries"
  13258. },
  13259. "truncated": {
  13260. "type": "boolean",
  13261. "x-go-name": "Truncated"
  13262. },
  13263. "url": {
  13264. "type": "string",
  13265. "x-go-name": "URL"
  13266. }
  13267. },
  13268. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13269. },
  13270. "Hook": {
  13271. "description": "Hook a hook is a web hook when one repository changed",
  13272. "type": "object",
  13273. "properties": {
  13274. "active": {
  13275. "type": "boolean",
  13276. "x-go-name": "Active"
  13277. },
  13278. "config": {
  13279. "type": "object",
  13280. "additionalProperties": {
  13281. "type": "string"
  13282. },
  13283. "x-go-name": "Config"
  13284. },
  13285. "created_at": {
  13286. "type": "string",
  13287. "format": "date-time",
  13288. "x-go-name": "Created"
  13289. },
  13290. "events": {
  13291. "type": "array",
  13292. "items": {
  13293. "type": "string"
  13294. },
  13295. "x-go-name": "Events"
  13296. },
  13297. "id": {
  13298. "type": "integer",
  13299. "format": "int64",
  13300. "x-go-name": "ID"
  13301. },
  13302. "type": {
  13303. "type": "string",
  13304. "x-go-name": "Type"
  13305. },
  13306. "updated_at": {
  13307. "type": "string",
  13308. "format": "date-time",
  13309. "x-go-name": "Updated"
  13310. }
  13311. },
  13312. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13313. },
  13314. "Identity": {
  13315. "description": "Identity for a person's identity like an author or committer",
  13316. "type": "object",
  13317. "properties": {
  13318. "email": {
  13319. "type": "string",
  13320. "format": "email",
  13321. "x-go-name": "Email"
  13322. },
  13323. "name": {
  13324. "type": "string",
  13325. "x-go-name": "Name"
  13326. }
  13327. },
  13328. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13329. },
  13330. "InternalTracker": {
  13331. "description": "InternalTracker represents settings for internal tracker",
  13332. "type": "object",
  13333. "properties": {
  13334. "allow_only_contributors_to_track_time": {
  13335. "description": "Let only contributors track time (Built-in issue tracker)",
  13336. "type": "boolean",
  13337. "x-go-name": "AllowOnlyContributorsToTrackTime"
  13338. },
  13339. "enable_issue_dependencies": {
  13340. "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)",
  13341. "type": "boolean",
  13342. "x-go-name": "EnableIssueDependencies"
  13343. },
  13344. "enable_time_tracker": {
  13345. "description": "Enable time tracking (Built-in issue tracker)",
  13346. "type": "boolean",
  13347. "x-go-name": "EnableTimeTracker"
  13348. }
  13349. },
  13350. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13351. },
  13352. "Issue": {
  13353. "description": "Issue represents an issue in a repository",
  13354. "type": "object",
  13355. "properties": {
  13356. "assignee": {
  13357. "$ref": "#/definitions/User"
  13358. },
  13359. "assignees": {
  13360. "type": "array",
  13361. "items": {
  13362. "$ref": "#/definitions/User"
  13363. },
  13364. "x-go-name": "Assignees"
  13365. },
  13366. "body": {
  13367. "type": "string",
  13368. "x-go-name": "Body"
  13369. },
  13370. "closed_at": {
  13371. "type": "string",
  13372. "format": "date-time",
  13373. "x-go-name": "Closed"
  13374. },
  13375. "comments": {
  13376. "type": "integer",
  13377. "format": "int64",
  13378. "x-go-name": "Comments"
  13379. },
  13380. "created_at": {
  13381. "type": "string",
  13382. "format": "date-time",
  13383. "x-go-name": "Created"
  13384. },
  13385. "due_date": {
  13386. "type": "string",
  13387. "format": "date-time",
  13388. "x-go-name": "Deadline"
  13389. },
  13390. "html_url": {
  13391. "type": "string",
  13392. "x-go-name": "HTMLURL"
  13393. },
  13394. "id": {
  13395. "type": "integer",
  13396. "format": "int64",
  13397. "x-go-name": "ID"
  13398. },
  13399. "is_locked": {
  13400. "type": "boolean",
  13401. "x-go-name": "IsLocked"
  13402. },
  13403. "labels": {
  13404. "type": "array",
  13405. "items": {
  13406. "$ref": "#/definitions/Label"
  13407. },
  13408. "x-go-name": "Labels"
  13409. },
  13410. "milestone": {
  13411. "$ref": "#/definitions/Milestone"
  13412. },
  13413. "number": {
  13414. "type": "integer",
  13415. "format": "int64",
  13416. "x-go-name": "Index"
  13417. },
  13418. "original_author": {
  13419. "type": "string",
  13420. "x-go-name": "OriginalAuthor"
  13421. },
  13422. "original_author_id": {
  13423. "type": "integer",
  13424. "format": "int64",
  13425. "x-go-name": "OriginalAuthorID"
  13426. },
  13427. "pull_request": {
  13428. "$ref": "#/definitions/PullRequestMeta"
  13429. },
  13430. "repository": {
  13431. "$ref": "#/definitions/RepositoryMeta"
  13432. },
  13433. "state": {
  13434. "$ref": "#/definitions/StateType"
  13435. },
  13436. "title": {
  13437. "type": "string",
  13438. "x-go-name": "Title"
  13439. },
  13440. "updated_at": {
  13441. "type": "string",
  13442. "format": "date-time",
  13443. "x-go-name": "Updated"
  13444. },
  13445. "url": {
  13446. "type": "string",
  13447. "x-go-name": "URL"
  13448. },
  13449. "user": {
  13450. "$ref": "#/definitions/User"
  13451. }
  13452. },
  13453. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13454. },
  13455. "IssueDeadline": {
  13456. "description": "IssueDeadline represents an issue deadline",
  13457. "type": "object",
  13458. "properties": {
  13459. "due_date": {
  13460. "type": "string",
  13461. "format": "date-time",
  13462. "x-go-name": "Deadline"
  13463. }
  13464. },
  13465. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13466. },
  13467. "IssueLabelsOption": {
  13468. "description": "IssueLabelsOption a collection of labels",
  13469. "type": "object",
  13470. "properties": {
  13471. "labels": {
  13472. "description": "list of label IDs",
  13473. "type": "array",
  13474. "items": {
  13475. "type": "integer",
  13476. "format": "int64"
  13477. },
  13478. "x-go-name": "Labels"
  13479. }
  13480. },
  13481. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13482. },
  13483. "IssueTemplate": {
  13484. "description": "IssueTemplate represents an issue template for a repository",
  13485. "type": "object",
  13486. "properties": {
  13487. "about": {
  13488. "type": "string",
  13489. "x-go-name": "About"
  13490. },
  13491. "content": {
  13492. "type": "string",
  13493. "x-go-name": "Content"
  13494. },
  13495. "file_name": {
  13496. "type": "string",
  13497. "x-go-name": "FileName"
  13498. },
  13499. "labels": {
  13500. "type": "array",
  13501. "items": {
  13502. "type": "string"
  13503. },
  13504. "x-go-name": "Labels"
  13505. },
  13506. "name": {
  13507. "type": "string",
  13508. "x-go-name": "Name"
  13509. },
  13510. "title": {
  13511. "type": "string",
  13512. "x-go-name": "Title"
  13513. }
  13514. },
  13515. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13516. },
  13517. "Label": {
  13518. "description": "Label a label to an issue or a pr",
  13519. "type": "object",
  13520. "properties": {
  13521. "color": {
  13522. "type": "string",
  13523. "x-go-name": "Color",
  13524. "example": "00aabb"
  13525. },
  13526. "description": {
  13527. "type": "string",
  13528. "x-go-name": "Description"
  13529. },
  13530. "id": {
  13531. "type": "integer",
  13532. "format": "int64",
  13533. "x-go-name": "ID"
  13534. },
  13535. "name": {
  13536. "type": "string",
  13537. "x-go-name": "Name"
  13538. },
  13539. "url": {
  13540. "type": "string",
  13541. "x-go-name": "URL"
  13542. }
  13543. },
  13544. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13545. },
  13546. "MarkdownOption": {
  13547. "description": "MarkdownOption markdown options",
  13548. "type": "object",
  13549. "properties": {
  13550. "Context": {
  13551. "description": "Context to render\n\nin: body",
  13552. "type": "string"
  13553. },
  13554. "Mode": {
  13555. "description": "Mode to render\n\nin: body",
  13556. "type": "string"
  13557. },
  13558. "Text": {
  13559. "description": "Text markdown to render\n\nin: body",
  13560. "type": "string"
  13561. },
  13562. "Wiki": {
  13563. "description": "Is it a wiki page ?\n\nin: body",
  13564. "type": "boolean"
  13565. }
  13566. },
  13567. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13568. },
  13569. "MergePullRequestOption": {
  13570. "description": "MergePullRequestForm form for merging Pull Request",
  13571. "type": "object",
  13572. "required": [
  13573. "Do"
  13574. ],
  13575. "properties": {
  13576. "Do": {
  13577. "type": "string",
  13578. "enum": [
  13579. "merge",
  13580. "rebase",
  13581. "rebase-merge",
  13582. "squash"
  13583. ]
  13584. },
  13585. "MergeMessageField": {
  13586. "type": "string"
  13587. },
  13588. "MergeTitleField": {
  13589. "type": "string"
  13590. },
  13591. "force_merge": {
  13592. "type": "boolean",
  13593. "x-go-name": "ForceMerge"
  13594. }
  13595. },
  13596. "x-go-name": "MergePullRequestForm",
  13597. "x-go-package": "code.gitea.io/gitea/modules/auth"
  13598. },
  13599. "MigrateRepoForm": {
  13600. "description": "MigrateRepoForm form for migrating repository\nthis is used to interact with web ui",
  13601. "type": "object",
  13602. "required": [
  13603. "clone_addr",
  13604. "uid",
  13605. "repo_name"
  13606. ],
  13607. "properties": {
  13608. "auth_password": {
  13609. "type": "string",
  13610. "x-go-name": "AuthPassword"
  13611. },
  13612. "auth_token": {
  13613. "type": "string",
  13614. "x-go-name": "AuthToken"
  13615. },
  13616. "auth_username": {
  13617. "type": "string",
  13618. "x-go-name": "AuthUsername"
  13619. },
  13620. "clone_addr": {
  13621. "type": "string",
  13622. "x-go-name": "CloneAddr"
  13623. },
  13624. "description": {
  13625. "type": "string",
  13626. "x-go-name": "Description"
  13627. },
  13628. "issues": {
  13629. "type": "boolean",
  13630. "x-go-name": "Issues"
  13631. },
  13632. "labels": {
  13633. "type": "boolean",
  13634. "x-go-name": "Labels"
  13635. },
  13636. "milestones": {
  13637. "type": "boolean",
  13638. "x-go-name": "Milestones"
  13639. },
  13640. "mirror": {
  13641. "type": "boolean",
  13642. "x-go-name": "Mirror"
  13643. },
  13644. "private": {
  13645. "type": "boolean",
  13646. "x-go-name": "Private"
  13647. },
  13648. "pull_requests": {
  13649. "type": "boolean",
  13650. "x-go-name": "PullRequests"
  13651. },
  13652. "releases": {
  13653. "type": "boolean",
  13654. "x-go-name": "Releases"
  13655. },
  13656. "repo_name": {
  13657. "type": "string",
  13658. "x-go-name": "RepoName"
  13659. },
  13660. "service": {
  13661. "type": "integer",
  13662. "format": "int64",
  13663. "x-go-name": "Service"
  13664. },
  13665. "uid": {
  13666. "type": "integer",
  13667. "format": "int64",
  13668. "x-go-name": "UID"
  13669. },
  13670. "wiki": {
  13671. "type": "boolean",
  13672. "x-go-name": "Wiki"
  13673. }
  13674. },
  13675. "x-go-package": "code.gitea.io/gitea/modules/auth"
  13676. },
  13677. "MigrateRepoOptions": {
  13678. "description": "MigrateRepoOptions options for migrating repository's\nthis is used to interact with api v1",
  13679. "type": "object",
  13680. "required": [
  13681. "clone_addr",
  13682. "repo_name"
  13683. ],
  13684. "properties": {
  13685. "auth_password": {
  13686. "type": "string",
  13687. "x-go-name": "AuthPassword"
  13688. },
  13689. "auth_token": {
  13690. "type": "string",
  13691. "x-go-name": "AuthToken"
  13692. },
  13693. "auth_username": {
  13694. "type": "string",
  13695. "x-go-name": "AuthUsername"
  13696. },
  13697. "clone_addr": {
  13698. "type": "string",
  13699. "x-go-name": "CloneAddr"
  13700. },
  13701. "description": {
  13702. "type": "string",
  13703. "x-go-name": "Description"
  13704. },
  13705. "issues": {
  13706. "type": "boolean",
  13707. "x-go-name": "Issues"
  13708. },
  13709. "labels": {
  13710. "type": "boolean",
  13711. "x-go-name": "Labels"
  13712. },
  13713. "milestones": {
  13714. "type": "boolean",
  13715. "x-go-name": "Milestones"
  13716. },
  13717. "mirror": {
  13718. "type": "boolean",
  13719. "x-go-name": "Mirror"
  13720. },
  13721. "private": {
  13722. "type": "boolean",
  13723. "x-go-name": "Private"
  13724. },
  13725. "pull_requests": {
  13726. "type": "boolean",
  13727. "x-go-name": "PullRequests"
  13728. },
  13729. "releases": {
  13730. "type": "boolean",
  13731. "x-go-name": "Releases"
  13732. },
  13733. "repo_name": {
  13734. "type": "string",
  13735. "x-go-name": "RepoName"
  13736. },
  13737. "repo_owner": {
  13738. "description": "Name of User or Organisation who will own Repo after migration",
  13739. "type": "string",
  13740. "x-go-name": "RepoOwner"
  13741. },
  13742. "service": {
  13743. "type": "string",
  13744. "enum": [
  13745. "git",
  13746. "github",
  13747. "gitea",
  13748. "gitlab"
  13749. ],
  13750. "x-go-name": "Service"
  13751. },
  13752. "uid": {
  13753. "description": "deprecated (only for backwards compatibility)",
  13754. "type": "integer",
  13755. "format": "int64",
  13756. "x-go-name": "RepoOwnerID"
  13757. },
  13758. "wiki": {
  13759. "type": "boolean",
  13760. "x-go-name": "Wiki"
  13761. }
  13762. },
  13763. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13764. },
  13765. "Milestone": {
  13766. "description": "Milestone milestone is a collection of issues on one repository",
  13767. "type": "object",
  13768. "properties": {
  13769. "closed_at": {
  13770. "type": "string",
  13771. "format": "date-time",
  13772. "x-go-name": "Closed"
  13773. },
  13774. "closed_issues": {
  13775. "type": "integer",
  13776. "format": "int64",
  13777. "x-go-name": "ClosedIssues"
  13778. },
  13779. "created_at": {
  13780. "type": "string",
  13781. "format": "date-time",
  13782. "x-go-name": "Created"
  13783. },
  13784. "description": {
  13785. "type": "string",
  13786. "x-go-name": "Description"
  13787. },
  13788. "due_on": {
  13789. "type": "string",
  13790. "format": "date-time",
  13791. "x-go-name": "Deadline"
  13792. },
  13793. "id": {
  13794. "type": "integer",
  13795. "format": "int64",
  13796. "x-go-name": "ID"
  13797. },
  13798. "open_issues": {
  13799. "type": "integer",
  13800. "format": "int64",
  13801. "x-go-name": "OpenIssues"
  13802. },
  13803. "state": {
  13804. "$ref": "#/definitions/StateType"
  13805. },
  13806. "title": {
  13807. "type": "string",
  13808. "x-go-name": "Title"
  13809. },
  13810. "updated_at": {
  13811. "type": "string",
  13812. "format": "date-time",
  13813. "x-go-name": "Updated"
  13814. }
  13815. },
  13816. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13817. },
  13818. "NotificationCount": {
  13819. "description": "NotificationCount number of unread notifications",
  13820. "type": "object",
  13821. "properties": {
  13822. "new": {
  13823. "type": "integer",
  13824. "format": "int64",
  13825. "x-go-name": "New"
  13826. }
  13827. },
  13828. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13829. },
  13830. "NotificationSubject": {
  13831. "description": "NotificationSubject contains the notification subject (Issue/Pull/Commit)",
  13832. "type": "object",
  13833. "properties": {
  13834. "latest_comment_url": {
  13835. "type": "string",
  13836. "x-go-name": "LatestCommentURL"
  13837. },
  13838. "state": {
  13839. "$ref": "#/definitions/StateType"
  13840. },
  13841. "title": {
  13842. "type": "string",
  13843. "x-go-name": "Title"
  13844. },
  13845. "type": {
  13846. "type": "string",
  13847. "x-go-name": "Type"
  13848. },
  13849. "url": {
  13850. "type": "string",
  13851. "x-go-name": "URL"
  13852. }
  13853. },
  13854. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13855. },
  13856. "NotificationThread": {
  13857. "description": "NotificationThread expose Notification on API",
  13858. "type": "object",
  13859. "properties": {
  13860. "id": {
  13861. "type": "integer",
  13862. "format": "int64",
  13863. "x-go-name": "ID"
  13864. },
  13865. "pinned": {
  13866. "type": "boolean",
  13867. "x-go-name": "Pinned"
  13868. },
  13869. "repository": {
  13870. "$ref": "#/definitions/Repository"
  13871. },
  13872. "subject": {
  13873. "$ref": "#/definitions/NotificationSubject"
  13874. },
  13875. "unread": {
  13876. "type": "boolean",
  13877. "x-go-name": "Unread"
  13878. },
  13879. "updated_at": {
  13880. "type": "string",
  13881. "format": "date-time",
  13882. "x-go-name": "UpdatedAt"
  13883. },
  13884. "url": {
  13885. "type": "string",
  13886. "x-go-name": "URL"
  13887. }
  13888. },
  13889. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13890. },
  13891. "OAuth2Application": {
  13892. "type": "object",
  13893. "title": "OAuth2Application represents an OAuth2 application.",
  13894. "properties": {
  13895. "client_id": {
  13896. "type": "string",
  13897. "x-go-name": "ClientID"
  13898. },
  13899. "client_secret": {
  13900. "type": "string",
  13901. "x-go-name": "ClientSecret"
  13902. },
  13903. "created": {
  13904. "type": "string",
  13905. "format": "date-time",
  13906. "x-go-name": "Created"
  13907. },
  13908. "id": {
  13909. "type": "integer",
  13910. "format": "int64",
  13911. "x-go-name": "ID"
  13912. },
  13913. "name": {
  13914. "type": "string",
  13915. "x-go-name": "Name"
  13916. },
  13917. "redirect_uris": {
  13918. "type": "array",
  13919. "items": {
  13920. "type": "string"
  13921. },
  13922. "x-go-name": "RedirectURIs"
  13923. }
  13924. },
  13925. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13926. },
  13927. "Organization": {
  13928. "description": "Organization represents an organization",
  13929. "type": "object",
  13930. "properties": {
  13931. "avatar_url": {
  13932. "type": "string",
  13933. "x-go-name": "AvatarURL"
  13934. },
  13935. "description": {
  13936. "type": "string",
  13937. "x-go-name": "Description"
  13938. },
  13939. "full_name": {
  13940. "type": "string",
  13941. "x-go-name": "FullName"
  13942. },
  13943. "id": {
  13944. "type": "integer",
  13945. "format": "int64",
  13946. "x-go-name": "ID"
  13947. },
  13948. "location": {
  13949. "type": "string",
  13950. "x-go-name": "Location"
  13951. },
  13952. "repo_admin_change_team_access": {
  13953. "type": "boolean",
  13954. "x-go-name": "RepoAdminChangeTeamAccess"
  13955. },
  13956. "username": {
  13957. "type": "string",
  13958. "x-go-name": "UserName"
  13959. },
  13960. "visibility": {
  13961. "type": "string",
  13962. "x-go-name": "Visibility"
  13963. },
  13964. "website": {
  13965. "type": "string",
  13966. "x-go-name": "Website"
  13967. }
  13968. },
  13969. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13970. },
  13971. "PRBranchInfo": {
  13972. "description": "PRBranchInfo information about a branch",
  13973. "type": "object",
  13974. "properties": {
  13975. "label": {
  13976. "type": "string",
  13977. "x-go-name": "Name"
  13978. },
  13979. "ref": {
  13980. "type": "string",
  13981. "x-go-name": "Ref"
  13982. },
  13983. "repo": {
  13984. "$ref": "#/definitions/Repository"
  13985. },
  13986. "repo_id": {
  13987. "type": "integer",
  13988. "format": "int64",
  13989. "x-go-name": "RepoID"
  13990. },
  13991. "sha": {
  13992. "type": "string",
  13993. "x-go-name": "Sha"
  13994. }
  13995. },
  13996. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13997. },
  13998. "PayloadCommit": {
  13999. "description": "PayloadCommit represents a commit",
  14000. "type": "object",
  14001. "properties": {
  14002. "added": {
  14003. "type": "array",
  14004. "items": {
  14005. "type": "string"
  14006. },
  14007. "x-go-name": "Added"
  14008. },
  14009. "author": {
  14010. "$ref": "#/definitions/PayloadUser"
  14011. },
  14012. "committer": {
  14013. "$ref": "#/definitions/PayloadUser"
  14014. },
  14015. "id": {
  14016. "description": "sha1 hash of the commit",
  14017. "type": "string",
  14018. "x-go-name": "ID"
  14019. },
  14020. "message": {
  14021. "type": "string",
  14022. "x-go-name": "Message"
  14023. },
  14024. "modified": {
  14025. "type": "array",
  14026. "items": {
  14027. "type": "string"
  14028. },
  14029. "x-go-name": "Modified"
  14030. },
  14031. "removed": {
  14032. "type": "array",
  14033. "items": {
  14034. "type": "string"
  14035. },
  14036. "x-go-name": "Removed"
  14037. },
  14038. "timestamp": {
  14039. "type": "string",
  14040. "format": "date-time",
  14041. "x-go-name": "Timestamp"
  14042. },
  14043. "url": {
  14044. "type": "string",
  14045. "x-go-name": "URL"
  14046. },
  14047. "verification": {
  14048. "$ref": "#/definitions/PayloadCommitVerification"
  14049. }
  14050. },
  14051. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14052. },
  14053. "PayloadCommitVerification": {
  14054. "description": "PayloadCommitVerification represents the GPG verification of a commit",
  14055. "type": "object",
  14056. "properties": {
  14057. "payload": {
  14058. "type": "string",
  14059. "x-go-name": "Payload"
  14060. },
  14061. "reason": {
  14062. "type": "string",
  14063. "x-go-name": "Reason"
  14064. },
  14065. "signature": {
  14066. "type": "string",
  14067. "x-go-name": "Signature"
  14068. },
  14069. "signer": {
  14070. "$ref": "#/definitions/PayloadUser"
  14071. },
  14072. "verified": {
  14073. "type": "boolean",
  14074. "x-go-name": "Verified"
  14075. }
  14076. },
  14077. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14078. },
  14079. "PayloadUser": {
  14080. "description": "PayloadUser represents the author or committer of a commit",
  14081. "type": "object",
  14082. "properties": {
  14083. "email": {
  14084. "type": "string",
  14085. "format": "email",
  14086. "x-go-name": "Email"
  14087. },
  14088. "name": {
  14089. "description": "Full name of the commit author",
  14090. "type": "string",
  14091. "x-go-name": "Name"
  14092. },
  14093. "username": {
  14094. "type": "string",
  14095. "x-go-name": "UserName"
  14096. }
  14097. },
  14098. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14099. },
  14100. "Permission": {
  14101. "description": "Permission represents a set of permissions",
  14102. "type": "object",
  14103. "properties": {
  14104. "admin": {
  14105. "type": "boolean",
  14106. "x-go-name": "Admin"
  14107. },
  14108. "pull": {
  14109. "type": "boolean",
  14110. "x-go-name": "Pull"
  14111. },
  14112. "push": {
  14113. "type": "boolean",
  14114. "x-go-name": "Push"
  14115. }
  14116. },
  14117. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14118. },
  14119. "PublicKey": {
  14120. "description": "PublicKey publickey is a user key to push code to repository",
  14121. "type": "object",
  14122. "properties": {
  14123. "created_at": {
  14124. "type": "string",
  14125. "format": "date-time",
  14126. "x-go-name": "Created"
  14127. },
  14128. "fingerprint": {
  14129. "type": "string",
  14130. "x-go-name": "Fingerprint"
  14131. },
  14132. "id": {
  14133. "type": "integer",
  14134. "format": "int64",
  14135. "x-go-name": "ID"
  14136. },
  14137. "key": {
  14138. "type": "string",
  14139. "x-go-name": "Key"
  14140. },
  14141. "key_type": {
  14142. "type": "string",
  14143. "x-go-name": "KeyType"
  14144. },
  14145. "read_only": {
  14146. "type": "boolean",
  14147. "x-go-name": "ReadOnly"
  14148. },
  14149. "title": {
  14150. "type": "string",
  14151. "x-go-name": "Title"
  14152. },
  14153. "url": {
  14154. "type": "string",
  14155. "x-go-name": "URL"
  14156. },
  14157. "user": {
  14158. "$ref": "#/definitions/User"
  14159. }
  14160. },
  14161. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14162. },
  14163. "PullRequest": {
  14164. "description": "PullRequest represents a pull request",
  14165. "type": "object",
  14166. "properties": {
  14167. "assignee": {
  14168. "$ref": "#/definitions/User"
  14169. },
  14170. "assignees": {
  14171. "type": "array",
  14172. "items": {
  14173. "$ref": "#/definitions/User"
  14174. },
  14175. "x-go-name": "Assignees"
  14176. },
  14177. "base": {
  14178. "$ref": "#/definitions/PRBranchInfo"
  14179. },
  14180. "body": {
  14181. "type": "string",
  14182. "x-go-name": "Body"
  14183. },
  14184. "closed_at": {
  14185. "type": "string",
  14186. "format": "date-time",
  14187. "x-go-name": "Closed"
  14188. },
  14189. "comments": {
  14190. "type": "integer",
  14191. "format": "int64",
  14192. "x-go-name": "Comments"
  14193. },
  14194. "created_at": {
  14195. "type": "string",
  14196. "format": "date-time",
  14197. "x-go-name": "Created"
  14198. },
  14199. "diff_url": {
  14200. "type": "string",
  14201. "x-go-name": "DiffURL"
  14202. },
  14203. "due_date": {
  14204. "type": "string",
  14205. "format": "date-time",
  14206. "x-go-name": "Deadline"
  14207. },
  14208. "head": {
  14209. "$ref": "#/definitions/PRBranchInfo"
  14210. },
  14211. "html_url": {
  14212. "type": "string",
  14213. "x-go-name": "HTMLURL"
  14214. },
  14215. "id": {
  14216. "type": "integer",
  14217. "format": "int64",
  14218. "x-go-name": "ID"
  14219. },
  14220. "is_locked": {
  14221. "type": "boolean",
  14222. "x-go-name": "IsLocked"
  14223. },
  14224. "labels": {
  14225. "type": "array",
  14226. "items": {
  14227. "$ref": "#/definitions/Label"
  14228. },
  14229. "x-go-name": "Labels"
  14230. },
  14231. "merge_base": {
  14232. "type": "string",
  14233. "x-go-name": "MergeBase"
  14234. },
  14235. "merge_commit_sha": {
  14236. "type": "string",
  14237. "x-go-name": "MergedCommitID"
  14238. },
  14239. "mergeable": {
  14240. "type": "boolean",
  14241. "x-go-name": "Mergeable"
  14242. },
  14243. "merged": {
  14244. "type": "boolean",
  14245. "x-go-name": "HasMerged"
  14246. },
  14247. "merged_at": {
  14248. "type": "string",
  14249. "format": "date-time",
  14250. "x-go-name": "Merged"
  14251. },
  14252. "merged_by": {
  14253. "$ref": "#/definitions/User"
  14254. },
  14255. "milestone": {
  14256. "$ref": "#/definitions/Milestone"
  14257. },
  14258. "number": {
  14259. "type": "integer",
  14260. "format": "int64",
  14261. "x-go-name": "Index"
  14262. },
  14263. "patch_url": {
  14264. "type": "string",
  14265. "x-go-name": "PatchURL"
  14266. },
  14267. "state": {
  14268. "$ref": "#/definitions/StateType"
  14269. },
  14270. "title": {
  14271. "type": "string",
  14272. "x-go-name": "Title"
  14273. },
  14274. "updated_at": {
  14275. "type": "string",
  14276. "format": "date-time",
  14277. "x-go-name": "Updated"
  14278. },
  14279. "url": {
  14280. "type": "string",
  14281. "x-go-name": "URL"
  14282. },
  14283. "user": {
  14284. "$ref": "#/definitions/User"
  14285. }
  14286. },
  14287. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14288. },
  14289. "PullRequestMeta": {
  14290. "description": "PullRequestMeta PR info if an issue is a PR",
  14291. "type": "object",
  14292. "properties": {
  14293. "merged": {
  14294. "type": "boolean",
  14295. "x-go-name": "HasMerged"
  14296. },
  14297. "merged_at": {
  14298. "type": "string",
  14299. "format": "date-time",
  14300. "x-go-name": "Merged"
  14301. }
  14302. },
  14303. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14304. },
  14305. "PullReview": {
  14306. "description": "PullReview represents a pull request review",
  14307. "type": "object",
  14308. "properties": {
  14309. "body": {
  14310. "type": "string",
  14311. "x-go-name": "Body"
  14312. },
  14313. "comments_count": {
  14314. "type": "integer",
  14315. "format": "int64",
  14316. "x-go-name": "CodeCommentsCount"
  14317. },
  14318. "commit_id": {
  14319. "type": "string",
  14320. "x-go-name": "CommitID"
  14321. },
  14322. "html_url": {
  14323. "type": "string",
  14324. "x-go-name": "HTMLURL"
  14325. },
  14326. "id": {
  14327. "type": "integer",
  14328. "format": "int64",
  14329. "x-go-name": "ID"
  14330. },
  14331. "official": {
  14332. "type": "boolean",
  14333. "x-go-name": "Official"
  14334. },
  14335. "pull_request_url": {
  14336. "type": "string",
  14337. "x-go-name": "HTMLPullURL"
  14338. },
  14339. "stale": {
  14340. "type": "boolean",
  14341. "x-go-name": "Stale"
  14342. },
  14343. "state": {
  14344. "$ref": "#/definitions/ReviewStateType"
  14345. },
  14346. "submitted_at": {
  14347. "type": "string",
  14348. "format": "date-time",
  14349. "x-go-name": "Submitted"
  14350. },
  14351. "user": {
  14352. "$ref": "#/definitions/User"
  14353. }
  14354. },
  14355. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14356. },
  14357. "PullReviewComment": {
  14358. "description": "PullReviewComment represents a comment on a pull request review",
  14359. "type": "object",
  14360. "properties": {
  14361. "body": {
  14362. "type": "string",
  14363. "x-go-name": "Body"
  14364. },
  14365. "commit_id": {
  14366. "type": "string",
  14367. "x-go-name": "CommitID"
  14368. },
  14369. "created_at": {
  14370. "type": "string",
  14371. "format": "date-time",
  14372. "x-go-name": "Created"
  14373. },
  14374. "diff_hunk": {
  14375. "type": "string",
  14376. "x-go-name": "DiffHunk"
  14377. },
  14378. "html_url": {
  14379. "type": "string",
  14380. "x-go-name": "HTMLURL"
  14381. },
  14382. "id": {
  14383. "type": "integer",
  14384. "format": "int64",
  14385. "x-go-name": "ID"
  14386. },
  14387. "original_commit_id": {
  14388. "type": "string",
  14389. "x-go-name": "OrigCommitID"
  14390. },
  14391. "original_position": {
  14392. "type": "integer",
  14393. "format": "uint64",
  14394. "x-go-name": "OldLineNum"
  14395. },
  14396. "path": {
  14397. "type": "string",
  14398. "x-go-name": "Path"
  14399. },
  14400. "position": {
  14401. "type": "integer",
  14402. "format": "uint64",
  14403. "x-go-name": "LineNum"
  14404. },
  14405. "pull_request_review_id": {
  14406. "type": "integer",
  14407. "format": "int64",
  14408. "x-go-name": "ReviewID"
  14409. },
  14410. "pull_request_url": {
  14411. "type": "string",
  14412. "x-go-name": "HTMLPullURL"
  14413. },
  14414. "updated_at": {
  14415. "type": "string",
  14416. "format": "date-time",
  14417. "x-go-name": "Updated"
  14418. },
  14419. "user": {
  14420. "$ref": "#/definitions/User"
  14421. }
  14422. },
  14423. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14424. },
  14425. "Reaction": {
  14426. "description": "Reaction contain one reaction",
  14427. "type": "object",
  14428. "properties": {
  14429. "content": {
  14430. "type": "string",
  14431. "x-go-name": "Reaction"
  14432. },
  14433. "created_at": {
  14434. "type": "string",
  14435. "format": "date-time",
  14436. "x-go-name": "Created"
  14437. },
  14438. "user": {
  14439. "$ref": "#/definitions/User"
  14440. }
  14441. },
  14442. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14443. },
  14444. "Reference": {
  14445. "type": "object",
  14446. "title": "Reference represents a Git reference.",
  14447. "properties": {
  14448. "object": {
  14449. "$ref": "#/definitions/GitObject"
  14450. },
  14451. "ref": {
  14452. "type": "string",
  14453. "x-go-name": "Ref"
  14454. },
  14455. "url": {
  14456. "type": "string",
  14457. "x-go-name": "URL"
  14458. }
  14459. },
  14460. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14461. },
  14462. "Release": {
  14463. "description": "Release represents a repository release",
  14464. "type": "object",
  14465. "properties": {
  14466. "assets": {
  14467. "type": "array",
  14468. "items": {
  14469. "$ref": "#/definitions/Attachment"
  14470. },
  14471. "x-go-name": "Attachments"
  14472. },
  14473. "author": {
  14474. "$ref": "#/definitions/User"
  14475. },
  14476. "body": {
  14477. "type": "string",
  14478. "x-go-name": "Note"
  14479. },
  14480. "created_at": {
  14481. "type": "string",
  14482. "format": "date-time",
  14483. "x-go-name": "CreatedAt"
  14484. },
  14485. "draft": {
  14486. "type": "boolean",
  14487. "x-go-name": "IsDraft"
  14488. },
  14489. "html_url": {
  14490. "type": "string",
  14491. "x-go-name": "HTMLURL"
  14492. },
  14493. "id": {
  14494. "type": "integer",
  14495. "format": "int64",
  14496. "x-go-name": "ID"
  14497. },
  14498. "name": {
  14499. "type": "string",
  14500. "x-go-name": "Title"
  14501. },
  14502. "prerelease": {
  14503. "type": "boolean",
  14504. "x-go-name": "IsPrerelease"
  14505. },
  14506. "published_at": {
  14507. "type": "string",
  14508. "format": "date-time",
  14509. "x-go-name": "PublishedAt"
  14510. },
  14511. "tag_name": {
  14512. "type": "string",
  14513. "x-go-name": "TagName"
  14514. },
  14515. "tarball_url": {
  14516. "type": "string",
  14517. "x-go-name": "TarURL"
  14518. },
  14519. "target_commitish": {
  14520. "type": "string",
  14521. "x-go-name": "Target"
  14522. },
  14523. "url": {
  14524. "type": "string",
  14525. "x-go-name": "URL"
  14526. },
  14527. "zipball_url": {
  14528. "type": "string",
  14529. "x-go-name": "ZipURL"
  14530. }
  14531. },
  14532. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14533. },
  14534. "RepoCommit": {
  14535. "type": "object",
  14536. "title": "RepoCommit contains information of a commit in the context of a repository.",
  14537. "properties": {
  14538. "author": {
  14539. "$ref": "#/definitions/CommitUser"
  14540. },
  14541. "committer": {
  14542. "$ref": "#/definitions/CommitUser"
  14543. },
  14544. "message": {
  14545. "type": "string",
  14546. "x-go-name": "Message"
  14547. },
  14548. "tree": {
  14549. "$ref": "#/definitions/CommitMeta"
  14550. },
  14551. "url": {
  14552. "type": "string",
  14553. "x-go-name": "URL"
  14554. }
  14555. },
  14556. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14557. },
  14558. "RepoTopicOptions": {
  14559. "description": "RepoTopicOptions a collection of repo topic names",
  14560. "type": "object",
  14561. "properties": {
  14562. "topics": {
  14563. "description": "list of topic names",
  14564. "type": "array",
  14565. "items": {
  14566. "type": "string"
  14567. },
  14568. "x-go-name": "Topics"
  14569. }
  14570. },
  14571. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14572. },
  14573. "Repository": {
  14574. "description": "Repository represents a repository",
  14575. "type": "object",
  14576. "properties": {
  14577. "allow_merge_commits": {
  14578. "type": "boolean",
  14579. "x-go-name": "AllowMerge"
  14580. },
  14581. "allow_rebase": {
  14582. "type": "boolean",
  14583. "x-go-name": "AllowRebase"
  14584. },
  14585. "allow_rebase_explicit": {
  14586. "type": "boolean",
  14587. "x-go-name": "AllowRebaseMerge"
  14588. },
  14589. "allow_squash_merge": {
  14590. "type": "boolean",
  14591. "x-go-name": "AllowSquash"
  14592. },
  14593. "archived": {
  14594. "type": "boolean",
  14595. "x-go-name": "Archived"
  14596. },
  14597. "avatar_url": {
  14598. "type": "string",
  14599. "x-go-name": "AvatarURL"
  14600. },
  14601. "clone_url": {
  14602. "type": "string",
  14603. "x-go-name": "CloneURL"
  14604. },
  14605. "created_at": {
  14606. "type": "string",
  14607. "format": "date-time",
  14608. "x-go-name": "Created"
  14609. },
  14610. "default_branch": {
  14611. "type": "string",
  14612. "x-go-name": "DefaultBranch"
  14613. },
  14614. "description": {
  14615. "type": "string",
  14616. "x-go-name": "Description"
  14617. },
  14618. "empty": {
  14619. "type": "boolean",
  14620. "x-go-name": "Empty"
  14621. },
  14622. "external_tracker": {
  14623. "$ref": "#/definitions/ExternalTracker"
  14624. },
  14625. "external_wiki": {
  14626. "$ref": "#/definitions/ExternalWiki"
  14627. },
  14628. "fork": {
  14629. "type": "boolean",
  14630. "x-go-name": "Fork"
  14631. },
  14632. "forks_count": {
  14633. "type": "integer",
  14634. "format": "int64",
  14635. "x-go-name": "Forks"
  14636. },
  14637. "full_name": {
  14638. "type": "string",
  14639. "x-go-name": "FullName"
  14640. },
  14641. "has_issues": {
  14642. "type": "boolean",
  14643. "x-go-name": "HasIssues"
  14644. },
  14645. "has_projects": {
  14646. "type": "boolean",
  14647. "x-go-name": "HasProjects"
  14648. },
  14649. "has_pull_requests": {
  14650. "type": "boolean",
  14651. "x-go-name": "HasPullRequests"
  14652. },
  14653. "has_wiki": {
  14654. "type": "boolean",
  14655. "x-go-name": "HasWiki"
  14656. },
  14657. "html_url": {
  14658. "type": "string",
  14659. "x-go-name": "HTMLURL"
  14660. },
  14661. "id": {
  14662. "type": "integer",
  14663. "format": "int64",
  14664. "x-go-name": "ID"
  14665. },
  14666. "ignore_whitespace_conflicts": {
  14667. "type": "boolean",
  14668. "x-go-name": "IgnoreWhitespaceConflicts"
  14669. },
  14670. "internal": {
  14671. "type": "boolean",
  14672. "x-go-name": "Internal"
  14673. },
  14674. "internal_tracker": {
  14675. "$ref": "#/definitions/InternalTracker"
  14676. },
  14677. "mirror": {
  14678. "type": "boolean",
  14679. "x-go-name": "Mirror"
  14680. },
  14681. "name": {
  14682. "type": "string",
  14683. "x-go-name": "Name"
  14684. },
  14685. "open_issues_count": {
  14686. "type": "integer",
  14687. "format": "int64",
  14688. "x-go-name": "OpenIssues"
  14689. },
  14690. "open_pr_counter": {
  14691. "type": "integer",
  14692. "format": "int64",
  14693. "x-go-name": "OpenPulls"
  14694. },
  14695. "original_url": {
  14696. "type": "string",
  14697. "x-go-name": "OriginalURL"
  14698. },
  14699. "owner": {
  14700. "$ref": "#/definitions/User"
  14701. },
  14702. "parent": {
  14703. "$ref": "#/definitions/Repository"
  14704. },
  14705. "permissions": {
  14706. "$ref": "#/definitions/Permission"
  14707. },
  14708. "private": {
  14709. "type": "boolean",
  14710. "x-go-name": "Private"
  14711. },
  14712. "release_counter": {
  14713. "type": "integer",
  14714. "format": "int64",
  14715. "x-go-name": "Releases"
  14716. },
  14717. "size": {
  14718. "type": "integer",
  14719. "format": "int64",
  14720. "x-go-name": "Size"
  14721. },
  14722. "ssh_url": {
  14723. "type": "string",
  14724. "x-go-name": "SSHURL"
  14725. },
  14726. "stars_count": {
  14727. "type": "integer",
  14728. "format": "int64",
  14729. "x-go-name": "Stars"
  14730. },
  14731. "template": {
  14732. "type": "boolean",
  14733. "x-go-name": "Template"
  14734. },
  14735. "updated_at": {
  14736. "type": "string",
  14737. "format": "date-time",
  14738. "x-go-name": "Updated"
  14739. },
  14740. "watchers_count": {
  14741. "type": "integer",
  14742. "format": "int64",
  14743. "x-go-name": "Watchers"
  14744. },
  14745. "website": {
  14746. "type": "string",
  14747. "x-go-name": "Website"
  14748. }
  14749. },
  14750. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14751. },
  14752. "RepositoryMeta": {
  14753. "description": "RepositoryMeta basic repository information",
  14754. "type": "object",
  14755. "properties": {
  14756. "full_name": {
  14757. "type": "string",
  14758. "x-go-name": "FullName"
  14759. },
  14760. "id": {
  14761. "type": "integer",
  14762. "format": "int64",
  14763. "x-go-name": "ID"
  14764. },
  14765. "name": {
  14766. "type": "string",
  14767. "x-go-name": "Name"
  14768. },
  14769. "owner": {
  14770. "type": "string",
  14771. "x-go-name": "Owner"
  14772. }
  14773. },
  14774. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14775. },
  14776. "ReviewStateType": {
  14777. "description": "ReviewStateType review state type",
  14778. "type": "string",
  14779. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14780. },
  14781. "SearchResults": {
  14782. "description": "SearchResults results of a successful search",
  14783. "type": "object",
  14784. "properties": {
  14785. "data": {
  14786. "type": "array",
  14787. "items": {
  14788. "$ref": "#/definitions/Repository"
  14789. },
  14790. "x-go-name": "Data"
  14791. },
  14792. "ok": {
  14793. "type": "boolean",
  14794. "x-go-name": "OK"
  14795. }
  14796. },
  14797. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14798. },
  14799. "ServerVersion": {
  14800. "description": "ServerVersion wraps the version of the server",
  14801. "type": "object",
  14802. "properties": {
  14803. "version": {
  14804. "type": "string",
  14805. "x-go-name": "Version"
  14806. }
  14807. },
  14808. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14809. },
  14810. "StateType": {
  14811. "description": "StateType issue state type",
  14812. "type": "string",
  14813. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14814. },
  14815. "Status": {
  14816. "description": "Status holds a single Status of a single Commit",
  14817. "type": "object",
  14818. "properties": {
  14819. "context": {
  14820. "type": "string",
  14821. "x-go-name": "Context"
  14822. },
  14823. "created_at": {
  14824. "type": "string",
  14825. "format": "date-time",
  14826. "x-go-name": "Created"
  14827. },
  14828. "creator": {
  14829. "$ref": "#/definitions/User"
  14830. },
  14831. "description": {
  14832. "type": "string",
  14833. "x-go-name": "Description"
  14834. },
  14835. "id": {
  14836. "type": "integer",
  14837. "format": "int64",
  14838. "x-go-name": "ID"
  14839. },
  14840. "status": {
  14841. "$ref": "#/definitions/StatusState"
  14842. },
  14843. "target_url": {
  14844. "type": "string",
  14845. "x-go-name": "TargetURL"
  14846. },
  14847. "updated_at": {
  14848. "type": "string",
  14849. "format": "date-time",
  14850. "x-go-name": "Updated"
  14851. },
  14852. "url": {
  14853. "type": "string",
  14854. "x-go-name": "URL"
  14855. }
  14856. },
  14857. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14858. },
  14859. "StatusState": {
  14860. "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"",
  14861. "type": "string",
  14862. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14863. },
  14864. "StopWatch": {
  14865. "description": "StopWatch represent a running stopwatch",
  14866. "type": "object",
  14867. "properties": {
  14868. "created": {
  14869. "type": "string",
  14870. "format": "date-time",
  14871. "x-go-name": "Created"
  14872. },
  14873. "issue_index": {
  14874. "type": "integer",
  14875. "format": "int64",
  14876. "x-go-name": "IssueIndex"
  14877. },
  14878. "issue_title": {
  14879. "type": "string",
  14880. "x-go-name": "IssueTitle"
  14881. },
  14882. "repo_name": {
  14883. "type": "string",
  14884. "x-go-name": "RepoName"
  14885. },
  14886. "repo_owner_name": {
  14887. "type": "string",
  14888. "x-go-name": "RepoOwnerName"
  14889. }
  14890. },
  14891. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14892. },
  14893. "SubmitPullReviewOptions": {
  14894. "description": "SubmitPullReviewOptions are options to submit a pending pull review",
  14895. "type": "object",
  14896. "properties": {
  14897. "body": {
  14898. "type": "string",
  14899. "x-go-name": "Body"
  14900. },
  14901. "event": {
  14902. "$ref": "#/definitions/ReviewStateType"
  14903. }
  14904. },
  14905. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14906. },
  14907. "Tag": {
  14908. "description": "Tag represents a repository tag",
  14909. "type": "object",
  14910. "properties": {
  14911. "commit": {
  14912. "$ref": "#/definitions/CommitMeta"
  14913. },
  14914. "id": {
  14915. "type": "string",
  14916. "x-go-name": "ID"
  14917. },
  14918. "name": {
  14919. "type": "string",
  14920. "x-go-name": "Name"
  14921. },
  14922. "tarball_url": {
  14923. "type": "string",
  14924. "x-go-name": "TarballURL"
  14925. },
  14926. "zipball_url": {
  14927. "type": "string",
  14928. "x-go-name": "ZipballURL"
  14929. }
  14930. },
  14931. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14932. },
  14933. "Team": {
  14934. "description": "Team represents a team in an organization",
  14935. "type": "object",
  14936. "properties": {
  14937. "can_create_org_repo": {
  14938. "type": "boolean",
  14939. "x-go-name": "CanCreateOrgRepo"
  14940. },
  14941. "description": {
  14942. "type": "string",
  14943. "x-go-name": "Description"
  14944. },
  14945. "id": {
  14946. "type": "integer",
  14947. "format": "int64",
  14948. "x-go-name": "ID"
  14949. },
  14950. "includes_all_repositories": {
  14951. "type": "boolean",
  14952. "x-go-name": "IncludesAllRepositories"
  14953. },
  14954. "name": {
  14955. "type": "string",
  14956. "x-go-name": "Name"
  14957. },
  14958. "organization": {
  14959. "$ref": "#/definitions/Organization"
  14960. },
  14961. "permission": {
  14962. "type": "string",
  14963. "enum": [
  14964. "none",
  14965. "read",
  14966. "write",
  14967. "admin",
  14968. "owner"
  14969. ],
  14970. "x-go-name": "Permission"
  14971. },
  14972. "units": {
  14973. "type": "array",
  14974. "items": {
  14975. "type": "string"
  14976. },
  14977. "x-go-name": "Units",
  14978. "example": [
  14979. "repo.code",
  14980. "repo.issues",
  14981. "repo.ext_issues",
  14982. "repo.wiki",
  14983. "repo.pulls",
  14984. "repo.releases",
  14985. "repo.ext_wiki"
  14986. ]
  14987. }
  14988. },
  14989. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14990. },
  14991. "TimeStamp": {
  14992. "description": "TimeStamp defines a timestamp",
  14993. "type": "integer",
  14994. "format": "int64",
  14995. "x-go-package": "code.gitea.io/gitea/modules/timeutil"
  14996. },
  14997. "TopicName": {
  14998. "description": "TopicName a list of repo topic names",
  14999. "type": "object",
  15000. "properties": {
  15001. "topics": {
  15002. "type": "array",
  15003. "items": {
  15004. "type": "string"
  15005. },
  15006. "x-go-name": "TopicNames"
  15007. }
  15008. },
  15009. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15010. },
  15011. "TopicResponse": {
  15012. "description": "TopicResponse for returning topics",
  15013. "type": "object",
  15014. "properties": {
  15015. "created": {
  15016. "type": "string",
  15017. "format": "date-time",
  15018. "x-go-name": "Created"
  15019. },
  15020. "id": {
  15021. "type": "integer",
  15022. "format": "int64",
  15023. "x-go-name": "ID"
  15024. },
  15025. "repo_count": {
  15026. "type": "integer",
  15027. "format": "int64",
  15028. "x-go-name": "RepoCount"
  15029. },
  15030. "topic_name": {
  15031. "type": "string",
  15032. "x-go-name": "Name"
  15033. },
  15034. "updated": {
  15035. "type": "string",
  15036. "format": "date-time",
  15037. "x-go-name": "Updated"
  15038. }
  15039. },
  15040. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15041. },
  15042. "TrackedTime": {
  15043. "description": "TrackedTime worked time for an issue / pr",
  15044. "type": "object",
  15045. "properties": {
  15046. "created": {
  15047. "type": "string",
  15048. "format": "date-time",
  15049. "x-go-name": "Created"
  15050. },
  15051. "id": {
  15052. "type": "integer",
  15053. "format": "int64",
  15054. "x-go-name": "ID"
  15055. },
  15056. "issue": {
  15057. "$ref": "#/definitions/Issue"
  15058. },
  15059. "issue_id": {
  15060. "description": "deprecated (only for backwards compatibility)",
  15061. "type": "integer",
  15062. "format": "int64",
  15063. "x-go-name": "IssueID"
  15064. },
  15065. "time": {
  15066. "description": "Time in seconds",
  15067. "type": "integer",
  15068. "format": "int64",
  15069. "x-go-name": "Time"
  15070. },
  15071. "user_id": {
  15072. "description": "deprecated (only for backwards compatibility)",
  15073. "type": "integer",
  15074. "format": "int64",
  15075. "x-go-name": "UserID"
  15076. },
  15077. "user_name": {
  15078. "type": "string",
  15079. "x-go-name": "UserName"
  15080. }
  15081. },
  15082. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15083. },
  15084. "TransferRepoOption": {
  15085. "description": "TransferRepoOption options when transfer a repository's ownership",
  15086. "type": "object",
  15087. "required": [
  15088. "new_owner"
  15089. ],
  15090. "properties": {
  15091. "new_owner": {
  15092. "type": "string",
  15093. "x-go-name": "NewOwner"
  15094. },
  15095. "team_ids": {
  15096. "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.",
  15097. "type": "array",
  15098. "items": {
  15099. "type": "integer",
  15100. "format": "int64"
  15101. },
  15102. "x-go-name": "TeamIDs"
  15103. }
  15104. },
  15105. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15106. },
  15107. "UpdateFileOptions": {
  15108. "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)",
  15109. "type": "object",
  15110. "required": [
  15111. "sha",
  15112. "content"
  15113. ],
  15114. "properties": {
  15115. "author": {
  15116. "$ref": "#/definitions/Identity"
  15117. },
  15118. "branch": {
  15119. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  15120. "type": "string",
  15121. "x-go-name": "BranchName"
  15122. },
  15123. "committer": {
  15124. "$ref": "#/definitions/Identity"
  15125. },
  15126. "content": {
  15127. "description": "content must be base64 encoded",
  15128. "type": "string",
  15129. "x-go-name": "Content"
  15130. },
  15131. "dates": {
  15132. "$ref": "#/definitions/CommitDateOptions"
  15133. },
  15134. "from_path": {
  15135. "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL",
  15136. "type": "string",
  15137. "x-go-name": "FromPath"
  15138. },
  15139. "message": {
  15140. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  15141. "type": "string",
  15142. "x-go-name": "Message"
  15143. },
  15144. "new_branch": {
  15145. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  15146. "type": "string",
  15147. "x-go-name": "NewBranchName"
  15148. },
  15149. "sha": {
  15150. "description": "sha is the SHA for the file that already exists",
  15151. "type": "string",
  15152. "x-go-name": "SHA"
  15153. }
  15154. },
  15155. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15156. },
  15157. "User": {
  15158. "description": "User represents a user",
  15159. "type": "object",
  15160. "properties": {
  15161. "avatar_url": {
  15162. "description": "URL to the user's avatar",
  15163. "type": "string",
  15164. "x-go-name": "AvatarURL"
  15165. },
  15166. "created": {
  15167. "type": "string",
  15168. "format": "date-time",
  15169. "x-go-name": "Created"
  15170. },
  15171. "email": {
  15172. "type": "string",
  15173. "format": "email",
  15174. "x-go-name": "Email"
  15175. },
  15176. "full_name": {
  15177. "description": "the user's full name",
  15178. "type": "string",
  15179. "x-go-name": "FullName"
  15180. },
  15181. "id": {
  15182. "description": "the user's id",
  15183. "type": "integer",
  15184. "format": "int64",
  15185. "x-go-name": "ID"
  15186. },
  15187. "is_admin": {
  15188. "description": "Is the user an administrator",
  15189. "type": "boolean",
  15190. "x-go-name": "IsAdmin"
  15191. },
  15192. "language": {
  15193. "description": "User locale",
  15194. "type": "string",
  15195. "x-go-name": "Language"
  15196. },
  15197. "last_login": {
  15198. "type": "string",
  15199. "format": "date-time",
  15200. "x-go-name": "LastLogin"
  15201. },
  15202. "login": {
  15203. "description": "the user's username",
  15204. "type": "string",
  15205. "x-go-name": "UserName"
  15206. }
  15207. },
  15208. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15209. },
  15210. "UserHeatmapData": {
  15211. "description": "UserHeatmapData represents the data needed to create a heatmap",
  15212. "type": "object",
  15213. "properties": {
  15214. "contributions": {
  15215. "type": "integer",
  15216. "format": "int64",
  15217. "x-go-name": "Contributions"
  15218. },
  15219. "timestamp": {
  15220. "$ref": "#/definitions/TimeStamp"
  15221. }
  15222. },
  15223. "x-go-package": "code.gitea.io/gitea/models"
  15224. },
  15225. "WatchInfo": {
  15226. "description": "WatchInfo represents an API watch status of one repository",
  15227. "type": "object",
  15228. "properties": {
  15229. "created_at": {
  15230. "type": "string",
  15231. "format": "date-time",
  15232. "x-go-name": "CreatedAt"
  15233. },
  15234. "ignored": {
  15235. "type": "boolean",
  15236. "x-go-name": "Ignored"
  15237. },
  15238. "reason": {
  15239. "type": "object",
  15240. "x-go-name": "Reason"
  15241. },
  15242. "repository_url": {
  15243. "type": "string",
  15244. "x-go-name": "RepositoryURL"
  15245. },
  15246. "subscribed": {
  15247. "type": "boolean",
  15248. "x-go-name": "Subscribed"
  15249. },
  15250. "url": {
  15251. "type": "string",
  15252. "x-go-name": "URL"
  15253. }
  15254. },
  15255. "x-go-package": "code.gitea.io/gitea/modules/structs"
  15256. }
  15257. },
  15258. "responses": {
  15259. "AccessToken": {
  15260. "description": "AccessToken represents an API access token.",
  15261. "headers": {
  15262. "id": {
  15263. "type": "integer",
  15264. "format": "int64"
  15265. },
  15266. "name": {
  15267. "type": "string"
  15268. },
  15269. "sha1": {
  15270. "type": "string"
  15271. },
  15272. "token_last_eight": {
  15273. "type": "string"
  15274. }
  15275. }
  15276. },
  15277. "AccessTokenList": {
  15278. "description": "AccessTokenList represents a list of API access token.",
  15279. "schema": {
  15280. "type": "array",
  15281. "items": {
  15282. "$ref": "#/definitions/AccessToken"
  15283. }
  15284. }
  15285. },
  15286. "AnnotatedTag": {
  15287. "description": "AnnotatedTag",
  15288. "schema": {
  15289. "$ref": "#/definitions/AnnotatedTag"
  15290. }
  15291. },
  15292. "Attachment": {
  15293. "description": "Attachment",
  15294. "schema": {
  15295. "$ref": "#/definitions/Attachment"
  15296. }
  15297. },
  15298. "AttachmentList": {
  15299. "description": "AttachmentList",
  15300. "schema": {
  15301. "type": "array",
  15302. "items": {
  15303. "$ref": "#/definitions/Attachment"
  15304. }
  15305. }
  15306. },
  15307. "Branch": {
  15308. "description": "Branch",
  15309. "schema": {
  15310. "$ref": "#/definitions/Branch"
  15311. }
  15312. },
  15313. "BranchList": {
  15314. "description": "BranchList",
  15315. "schema": {
  15316. "type": "array",
  15317. "items": {
  15318. "$ref": "#/definitions/Branch"
  15319. }
  15320. }
  15321. },
  15322. "BranchProtection": {
  15323. "description": "BranchProtection",
  15324. "schema": {
  15325. "$ref": "#/definitions/BranchProtection"
  15326. }
  15327. },
  15328. "BranchProtectionList": {
  15329. "description": "BranchProtectionList",
  15330. "schema": {
  15331. "type": "array",
  15332. "items": {
  15333. "$ref": "#/definitions/BranchProtection"
  15334. }
  15335. }
  15336. },
  15337. "Comment": {
  15338. "description": "Comment",
  15339. "schema": {
  15340. "$ref": "#/definitions/Comment"
  15341. }
  15342. },
  15343. "CommentList": {
  15344. "description": "CommentList",
  15345. "schema": {
  15346. "type": "array",
  15347. "items": {
  15348. "$ref": "#/definitions/Comment"
  15349. }
  15350. }
  15351. },
  15352. "Commit": {
  15353. "description": "Commit",
  15354. "schema": {
  15355. "$ref": "#/definitions/Commit"
  15356. }
  15357. },
  15358. "CommitList": {
  15359. "description": "CommitList",
  15360. "schema": {
  15361. "type": "array",
  15362. "items": {
  15363. "$ref": "#/definitions/Commit"
  15364. }
  15365. },
  15366. "headers": {
  15367. "X-HasMore": {
  15368. "type": "boolean",
  15369. "description": "True if there is another page"
  15370. },
  15371. "X-Page": {
  15372. "type": "integer",
  15373. "format": "int64",
  15374. "description": "The current page"
  15375. },
  15376. "X-PageCount": {
  15377. "type": "integer",
  15378. "format": "int64",
  15379. "description": "Total number of pages"
  15380. },
  15381. "X-PerPage": {
  15382. "type": "integer",
  15383. "format": "int64",
  15384. "description": "Commits per page"
  15385. },
  15386. "X-Total": {
  15387. "type": "integer",
  15388. "format": "int64",
  15389. "description": "Total commit count"
  15390. }
  15391. }
  15392. },
  15393. "ContentsListResponse": {
  15394. "description": "ContentsListResponse",
  15395. "schema": {
  15396. "type": "array",
  15397. "items": {
  15398. "$ref": "#/definitions/ContentsResponse"
  15399. }
  15400. }
  15401. },
  15402. "ContentsResponse": {
  15403. "description": "ContentsResponse",
  15404. "schema": {
  15405. "$ref": "#/definitions/ContentsResponse"
  15406. }
  15407. },
  15408. "CronList": {
  15409. "description": "CronList",
  15410. "schema": {
  15411. "type": "array",
  15412. "items": {
  15413. "$ref": "#/definitions/Cron"
  15414. }
  15415. }
  15416. },
  15417. "DeployKey": {
  15418. "description": "DeployKey",
  15419. "schema": {
  15420. "$ref": "#/definitions/DeployKey"
  15421. }
  15422. },
  15423. "DeployKeyList": {
  15424. "description": "DeployKeyList",
  15425. "schema": {
  15426. "type": "array",
  15427. "items": {
  15428. "$ref": "#/definitions/DeployKey"
  15429. }
  15430. }
  15431. },
  15432. "EmailList": {
  15433. "description": "EmailList",
  15434. "schema": {
  15435. "type": "array",
  15436. "items": {
  15437. "$ref": "#/definitions/Email"
  15438. }
  15439. }
  15440. },
  15441. "EmptyRepository": {
  15442. "description": "EmptyRepository",
  15443. "schema": {
  15444. "$ref": "#/definitions/APIError"
  15445. }
  15446. },
  15447. "FileDeleteResponse": {
  15448. "description": "FileDeleteResponse",
  15449. "schema": {
  15450. "$ref": "#/definitions/FileDeleteResponse"
  15451. }
  15452. },
  15453. "FileResponse": {
  15454. "description": "FileResponse",
  15455. "schema": {
  15456. "$ref": "#/definitions/FileResponse"
  15457. }
  15458. },
  15459. "GPGKey": {
  15460. "description": "GPGKey",
  15461. "schema": {
  15462. "$ref": "#/definitions/GPGKey"
  15463. }
  15464. },
  15465. "GPGKeyList": {
  15466. "description": "GPGKeyList",
  15467. "schema": {
  15468. "type": "array",
  15469. "items": {
  15470. "$ref": "#/definitions/GPGKey"
  15471. }
  15472. }
  15473. },
  15474. "GeneralAPISettings": {
  15475. "description": "GeneralAPISettings",
  15476. "schema": {
  15477. "$ref": "#/definitions/GeneralAPISettings"
  15478. }
  15479. },
  15480. "GeneralAttachmentSettings": {
  15481. "description": "GeneralAttachmentSettings",
  15482. "schema": {
  15483. "$ref": "#/definitions/GeneralAttachmentSettings"
  15484. }
  15485. },
  15486. "GeneralRepoSettings": {
  15487. "description": "GeneralRepoSettings",
  15488. "schema": {
  15489. "$ref": "#/definitions/GeneralRepoSettings"
  15490. }
  15491. },
  15492. "GeneralUISettings": {
  15493. "description": "GeneralUISettings",
  15494. "schema": {
  15495. "$ref": "#/definitions/GeneralUISettings"
  15496. }
  15497. },
  15498. "GitBlobResponse": {
  15499. "description": "GitBlobResponse",
  15500. "schema": {
  15501. "$ref": "#/definitions/GitBlobResponse"
  15502. }
  15503. },
  15504. "GitHook": {
  15505. "description": "GitHook",
  15506. "schema": {
  15507. "$ref": "#/definitions/GitHook"
  15508. }
  15509. },
  15510. "GitHookList": {
  15511. "description": "GitHookList",
  15512. "schema": {
  15513. "type": "array",
  15514. "items": {
  15515. "$ref": "#/definitions/GitHook"
  15516. }
  15517. }
  15518. },
  15519. "GitTreeResponse": {
  15520. "description": "GitTreeResponse",
  15521. "schema": {
  15522. "$ref": "#/definitions/GitTreeResponse"
  15523. }
  15524. },
  15525. "Hook": {
  15526. "description": "Hook",
  15527. "schema": {
  15528. "$ref": "#/definitions/Hook"
  15529. }
  15530. },
  15531. "HookList": {
  15532. "description": "HookList",
  15533. "schema": {
  15534. "type": "array",
  15535. "items": {
  15536. "$ref": "#/definitions/Hook"
  15537. }
  15538. }
  15539. },
  15540. "Issue": {
  15541. "description": "Issue",
  15542. "schema": {
  15543. "$ref": "#/definitions/Issue"
  15544. }
  15545. },
  15546. "IssueDeadline": {
  15547. "description": "IssueDeadline",
  15548. "schema": {
  15549. "$ref": "#/definitions/IssueDeadline"
  15550. }
  15551. },
  15552. "IssueList": {
  15553. "description": "IssueList",
  15554. "schema": {
  15555. "type": "array",
  15556. "items": {
  15557. "$ref": "#/definitions/Issue"
  15558. }
  15559. }
  15560. },
  15561. "IssueTemplates": {
  15562. "description": "IssueTemplates",
  15563. "schema": {
  15564. "type": "array",
  15565. "items": {
  15566. "$ref": "#/definitions/IssueTemplate"
  15567. }
  15568. }
  15569. },
  15570. "Label": {
  15571. "description": "Label",
  15572. "schema": {
  15573. "$ref": "#/definitions/Label"
  15574. }
  15575. },
  15576. "LabelList": {
  15577. "description": "LabelList",
  15578. "schema": {
  15579. "type": "array",
  15580. "items": {
  15581. "$ref": "#/definitions/Label"
  15582. }
  15583. }
  15584. },
  15585. "LanguageStatistics": {
  15586. "description": "LanguageStatistics",
  15587. "schema": {
  15588. "type": "object",
  15589. "additionalProperties": {
  15590. "type": "integer",
  15591. "format": "int64"
  15592. }
  15593. }
  15594. },
  15595. "MarkdownRender": {
  15596. "description": "MarkdownRender is a rendered markdown document",
  15597. "schema": {
  15598. "type": "string"
  15599. }
  15600. },
  15601. "Milestone": {
  15602. "description": "Milestone",
  15603. "schema": {
  15604. "$ref": "#/definitions/Milestone"
  15605. }
  15606. },
  15607. "MilestoneList": {
  15608. "description": "MilestoneList",
  15609. "schema": {
  15610. "type": "array",
  15611. "items": {
  15612. "$ref": "#/definitions/Milestone"
  15613. }
  15614. }
  15615. },
  15616. "NotificationCount": {
  15617. "description": "Number of unread notifications",
  15618. "schema": {
  15619. "$ref": "#/definitions/NotificationCount"
  15620. }
  15621. },
  15622. "NotificationThread": {
  15623. "description": "NotificationThread",
  15624. "schema": {
  15625. "$ref": "#/definitions/NotificationThread"
  15626. }
  15627. },
  15628. "NotificationThreadList": {
  15629. "description": "NotificationThreadList",
  15630. "schema": {
  15631. "type": "array",
  15632. "items": {
  15633. "$ref": "#/definitions/NotificationThread"
  15634. }
  15635. }
  15636. },
  15637. "OAuth2Application": {
  15638. "description": "OAuth2Application",
  15639. "schema": {
  15640. "$ref": "#/definitions/OAuth2Application"
  15641. }
  15642. },
  15643. "OAuth2ApplicationList": {
  15644. "description": "OAuth2ApplicationList represents a list of OAuth2 applications.",
  15645. "schema": {
  15646. "type": "array",
  15647. "items": {
  15648. "$ref": "#/definitions/OAuth2Application"
  15649. }
  15650. }
  15651. },
  15652. "Organization": {
  15653. "description": "Organization",
  15654. "schema": {
  15655. "$ref": "#/definitions/Organization"
  15656. }
  15657. },
  15658. "OrganizationList": {
  15659. "description": "OrganizationList",
  15660. "schema": {
  15661. "type": "array",
  15662. "items": {
  15663. "$ref": "#/definitions/Organization"
  15664. }
  15665. }
  15666. },
  15667. "PublicKey": {
  15668. "description": "PublicKey",
  15669. "schema": {
  15670. "$ref": "#/definitions/PublicKey"
  15671. }
  15672. },
  15673. "PublicKeyList": {
  15674. "description": "PublicKeyList",
  15675. "schema": {
  15676. "type": "array",
  15677. "items": {
  15678. "$ref": "#/definitions/PublicKey"
  15679. }
  15680. }
  15681. },
  15682. "PullRequest": {
  15683. "description": "PullRequest",
  15684. "schema": {
  15685. "$ref": "#/definitions/PullRequest"
  15686. }
  15687. },
  15688. "PullRequestList": {
  15689. "description": "PullRequestList",
  15690. "schema": {
  15691. "type": "array",
  15692. "items": {
  15693. "$ref": "#/definitions/PullRequest"
  15694. }
  15695. }
  15696. },
  15697. "PullReview": {
  15698. "description": "PullReview",
  15699. "schema": {
  15700. "$ref": "#/definitions/PullReview"
  15701. }
  15702. },
  15703. "PullReviewComment": {
  15704. "description": "PullComment",
  15705. "schema": {
  15706. "$ref": "#/definitions/PullReviewComment"
  15707. }
  15708. },
  15709. "PullReviewCommentList": {
  15710. "description": "PullCommentList",
  15711. "schema": {
  15712. "type": "array",
  15713. "items": {
  15714. "$ref": "#/definitions/PullReviewComment"
  15715. }
  15716. }
  15717. },
  15718. "PullReviewList": {
  15719. "description": "PullReviewList",
  15720. "schema": {
  15721. "type": "array",
  15722. "items": {
  15723. "$ref": "#/definitions/PullReview"
  15724. }
  15725. }
  15726. },
  15727. "Reaction": {
  15728. "description": "Reaction",
  15729. "schema": {
  15730. "$ref": "#/definitions/Reaction"
  15731. }
  15732. },
  15733. "ReactionList": {
  15734. "description": "ReactionList",
  15735. "schema": {
  15736. "type": "array",
  15737. "items": {
  15738. "$ref": "#/definitions/Reaction"
  15739. }
  15740. }
  15741. },
  15742. "Reference": {
  15743. "description": "Reference",
  15744. "schema": {
  15745. "$ref": "#/definitions/Reference"
  15746. }
  15747. },
  15748. "ReferenceList": {
  15749. "description": "ReferenceList",
  15750. "schema": {
  15751. "type": "array",
  15752. "items": {
  15753. "$ref": "#/definitions/Reference"
  15754. }
  15755. }
  15756. },
  15757. "Release": {
  15758. "description": "Release",
  15759. "schema": {
  15760. "$ref": "#/definitions/Release"
  15761. }
  15762. },
  15763. "ReleaseList": {
  15764. "description": "ReleaseList",
  15765. "schema": {
  15766. "type": "array",
  15767. "items": {
  15768. "$ref": "#/definitions/Release"
  15769. }
  15770. }
  15771. },
  15772. "Repository": {
  15773. "description": "Repository",
  15774. "schema": {
  15775. "$ref": "#/definitions/Repository"
  15776. }
  15777. },
  15778. "RepositoryList": {
  15779. "description": "RepositoryList",
  15780. "schema": {
  15781. "type": "array",
  15782. "items": {
  15783. "$ref": "#/definitions/Repository"
  15784. }
  15785. }
  15786. },
  15787. "SearchResults": {
  15788. "description": "SearchResults",
  15789. "schema": {
  15790. "$ref": "#/definitions/SearchResults"
  15791. }
  15792. },
  15793. "ServerVersion": {
  15794. "description": "ServerVersion",
  15795. "schema": {
  15796. "$ref": "#/definitions/ServerVersion"
  15797. }
  15798. },
  15799. "Status": {
  15800. "description": "Status",
  15801. "schema": {
  15802. "$ref": "#/definitions/Status"
  15803. }
  15804. },
  15805. "StatusList": {
  15806. "description": "StatusList",
  15807. "schema": {
  15808. "type": "array",
  15809. "items": {
  15810. "$ref": "#/definitions/Status"
  15811. }
  15812. }
  15813. },
  15814. "StopWatch": {
  15815. "description": "StopWatch",
  15816. "schema": {
  15817. "$ref": "#/definitions/StopWatch"
  15818. }
  15819. },
  15820. "StopWatchList": {
  15821. "description": "StopWatchList",
  15822. "schema": {
  15823. "type": "array",
  15824. "items": {
  15825. "$ref": "#/definitions/StopWatch"
  15826. }
  15827. }
  15828. },
  15829. "StringSlice": {
  15830. "description": "StringSlice",
  15831. "schema": {
  15832. "type": "array",
  15833. "items": {
  15834. "type": "string"
  15835. }
  15836. }
  15837. },
  15838. "Tag": {
  15839. "description": "Tag",
  15840. "schema": {
  15841. "$ref": "#/definitions/Tag"
  15842. }
  15843. },
  15844. "TagList": {
  15845. "description": "TagList",
  15846. "schema": {
  15847. "type": "array",
  15848. "items": {
  15849. "$ref": "#/definitions/Tag"
  15850. }
  15851. }
  15852. },
  15853. "Team": {
  15854. "description": "Team",
  15855. "schema": {
  15856. "$ref": "#/definitions/Team"
  15857. }
  15858. },
  15859. "TeamList": {
  15860. "description": "TeamList",
  15861. "schema": {
  15862. "type": "array",
  15863. "items": {
  15864. "$ref": "#/definitions/Team"
  15865. }
  15866. }
  15867. },
  15868. "TopicListResponse": {
  15869. "description": "TopicListResponse",
  15870. "schema": {
  15871. "type": "array",
  15872. "items": {
  15873. "$ref": "#/definitions/TopicResponse"
  15874. }
  15875. }
  15876. },
  15877. "TopicNames": {
  15878. "description": "TopicNames",
  15879. "schema": {
  15880. "$ref": "#/definitions/TopicName"
  15881. }
  15882. },
  15883. "TrackedTime": {
  15884. "description": "TrackedTime",
  15885. "schema": {
  15886. "$ref": "#/definitions/TrackedTime"
  15887. }
  15888. },
  15889. "TrackedTimeList": {
  15890. "description": "TrackedTimeList",
  15891. "schema": {
  15892. "type": "array",
  15893. "items": {
  15894. "$ref": "#/definitions/TrackedTime"
  15895. }
  15896. }
  15897. },
  15898. "User": {
  15899. "description": "User",
  15900. "schema": {
  15901. "$ref": "#/definitions/User"
  15902. }
  15903. },
  15904. "UserHeatmapData": {
  15905. "description": "UserHeatmapData",
  15906. "schema": {
  15907. "type": "array",
  15908. "items": {
  15909. "$ref": "#/definitions/UserHeatmapData"
  15910. }
  15911. }
  15912. },
  15913. "UserList": {
  15914. "description": "UserList",
  15915. "schema": {
  15916. "type": "array",
  15917. "items": {
  15918. "$ref": "#/definitions/User"
  15919. }
  15920. }
  15921. },
  15922. "WatchInfo": {
  15923. "description": "WatchInfo",
  15924. "schema": {
  15925. "$ref": "#/definitions/WatchInfo"
  15926. }
  15927. },
  15928. "empty": {
  15929. "description": "APIEmpty is an empty response"
  15930. },
  15931. "error": {
  15932. "description": "APIError is error format response",
  15933. "headers": {
  15934. "message": {
  15935. "type": "string"
  15936. },
  15937. "url": {
  15938. "type": "string"
  15939. }
  15940. }
  15941. },
  15942. "forbidden": {
  15943. "description": "APIForbiddenError is a forbidden error response",
  15944. "headers": {
  15945. "message": {
  15946. "type": "string"
  15947. },
  15948. "url": {
  15949. "type": "string"
  15950. }
  15951. }
  15952. },
  15953. "invalidTopicsError": {
  15954. "description": "APIInvalidTopicsError is error format response to invalid topics",
  15955. "headers": {
  15956. "invalidTopics": {
  15957. "type": "array",
  15958. "items": {
  15959. "type": "string"
  15960. }
  15961. },
  15962. "message": {
  15963. "type": "string"
  15964. }
  15965. }
  15966. },
  15967. "notFound": {
  15968. "description": "APINotFound is a not found empty response"
  15969. },
  15970. "parameterBodies": {
  15971. "description": "parameterBodies",
  15972. "schema": {
  15973. "$ref": "#/definitions/MigrateRepoOptions"
  15974. }
  15975. },
  15976. "redirect": {
  15977. "description": "APIRedirect is a redirect response"
  15978. },
  15979. "string": {
  15980. "description": "APIString is a string response",
  15981. "schema": {
  15982. "type": "string"
  15983. }
  15984. },
  15985. "validationError": {
  15986. "description": "APIValidationError is error format response related to input validation",
  15987. "headers": {
  15988. "message": {
  15989. "type": "string"
  15990. },
  15991. "url": {
  15992. "type": "string"
  15993. }
  15994. }
  15995. }
  15996. },
  15997. "securityDefinitions": {
  15998. "AccessToken": {
  15999. "type": "apiKey",
  16000. "name": "access_token",
  16001. "in": "query"
  16002. },
  16003. "AuthorizationHeaderToken": {
  16004. "description": "API tokens must be prepended with \"token\" followed by a space.",
  16005. "type": "apiKey",
  16006. "name": "Authorization",
  16007. "in": "header"
  16008. },
  16009. "BasicAuth": {
  16010. "type": "basic"
  16011. },
  16012. "SudoHeader": {
  16013. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  16014. "type": "apiKey",
  16015. "name": "Sudo",
  16016. "in": "header"
  16017. },
  16018. "SudoParam": {
  16019. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  16020. "type": "apiKey",
  16021. "name": "sudo",
  16022. "in": "query"
  16023. },
  16024. "TOTPHeader": {
  16025. "description": "Must be used in combination with BasicAuth if two-factor authentication is enabled.",
  16026. "type": "apiKey",
  16027. "name": "X-GITEA-OTP",
  16028. "in": "header"
  16029. },
  16030. "Token": {
  16031. "type": "apiKey",
  16032. "name": "token",
  16033. "in": "query"
  16034. }
  16035. },
  16036. "security": [
  16037. {
  16038. "BasicAuth": []
  16039. },
  16040. {
  16041. "Token": []
  16042. },
  16043. {
  16044. "AccessToken": []
  16045. },
  16046. {
  16047. "AuthorizationHeaderToken": []
  16048. },
  16049. {
  16050. "SudoParam": []
  16051. },
  16052. {
  16053. "SudoHeader": []
  16054. },
  16055. {
  16056. "TOTPHeader": []
  16057. }
  16058. ]
  16059. }