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.

v1_json.tmpl 383KB

API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to 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
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to 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
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
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
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
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
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
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
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
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
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 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
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251
  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/orgs": {
  27. "get": {
  28. "produces": [
  29. "application/json"
  30. ],
  31. "tags": [
  32. "admin"
  33. ],
  34. "summary": "List all organizations",
  35. "operationId": "adminGetAllOrgs",
  36. "parameters": [
  37. {
  38. "type": "integer",
  39. "description": "page number of results to return (1-based)",
  40. "name": "page",
  41. "in": "query"
  42. },
  43. {
  44. "type": "integer",
  45. "description": "page size of results, maximum page size is 50",
  46. "name": "limit",
  47. "in": "query"
  48. }
  49. ],
  50. "responses": {
  51. "200": {
  52. "$ref": "#/responses/OrganizationList"
  53. },
  54. "403": {
  55. "$ref": "#/responses/forbidden"
  56. }
  57. }
  58. }
  59. },
  60. "/admin/users": {
  61. "get": {
  62. "produces": [
  63. "application/json"
  64. ],
  65. "tags": [
  66. "admin"
  67. ],
  68. "summary": "List all users",
  69. "operationId": "adminGetAllUsers",
  70. "parameters": [
  71. {
  72. "type": "integer",
  73. "description": "page number of results to return (1-based)",
  74. "name": "page",
  75. "in": "query"
  76. },
  77. {
  78. "type": "integer",
  79. "description": "page size of results, maximum page size is 50",
  80. "name": "limit",
  81. "in": "query"
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "$ref": "#/responses/UserList"
  87. },
  88. "403": {
  89. "$ref": "#/responses/forbidden"
  90. }
  91. }
  92. },
  93. "post": {
  94. "consumes": [
  95. "application/json"
  96. ],
  97. "produces": [
  98. "application/json"
  99. ],
  100. "tags": [
  101. "admin"
  102. ],
  103. "summary": "Create a user",
  104. "operationId": "adminCreateUser",
  105. "parameters": [
  106. {
  107. "name": "body",
  108. "in": "body",
  109. "schema": {
  110. "$ref": "#/definitions/CreateUserOption"
  111. }
  112. }
  113. ],
  114. "responses": {
  115. "201": {
  116. "$ref": "#/responses/User"
  117. },
  118. "400": {
  119. "$ref": "#/responses/error"
  120. },
  121. "403": {
  122. "$ref": "#/responses/forbidden"
  123. },
  124. "422": {
  125. "$ref": "#/responses/validationError"
  126. }
  127. }
  128. }
  129. },
  130. "/admin/users/{username}": {
  131. "delete": {
  132. "produces": [
  133. "application/json"
  134. ],
  135. "tags": [
  136. "admin"
  137. ],
  138. "summary": "Delete a user",
  139. "operationId": "adminDeleteUser",
  140. "parameters": [
  141. {
  142. "type": "string",
  143. "description": "username of user to delete",
  144. "name": "username",
  145. "in": "path",
  146. "required": true
  147. }
  148. ],
  149. "responses": {
  150. "204": {
  151. "$ref": "#/responses/empty"
  152. },
  153. "403": {
  154. "$ref": "#/responses/forbidden"
  155. },
  156. "422": {
  157. "$ref": "#/responses/validationError"
  158. }
  159. }
  160. },
  161. "patch": {
  162. "consumes": [
  163. "application/json"
  164. ],
  165. "produces": [
  166. "application/json"
  167. ],
  168. "tags": [
  169. "admin"
  170. ],
  171. "summary": "Edit an existing user",
  172. "operationId": "adminEditUser",
  173. "parameters": [
  174. {
  175. "type": "string",
  176. "description": "username of user to edit",
  177. "name": "username",
  178. "in": "path",
  179. "required": true
  180. },
  181. {
  182. "name": "body",
  183. "in": "body",
  184. "schema": {
  185. "$ref": "#/definitions/EditUserOption"
  186. }
  187. }
  188. ],
  189. "responses": {
  190. "200": {
  191. "$ref": "#/responses/User"
  192. },
  193. "403": {
  194. "$ref": "#/responses/forbidden"
  195. },
  196. "422": {
  197. "$ref": "#/responses/validationError"
  198. }
  199. }
  200. }
  201. },
  202. "/admin/users/{username}/keys": {
  203. "post": {
  204. "consumes": [
  205. "application/json"
  206. ],
  207. "produces": [
  208. "application/json"
  209. ],
  210. "tags": [
  211. "admin"
  212. ],
  213. "summary": "Add a public key on behalf of a user",
  214. "operationId": "adminCreatePublicKey",
  215. "parameters": [
  216. {
  217. "type": "string",
  218. "description": "username of the user",
  219. "name": "username",
  220. "in": "path",
  221. "required": true
  222. },
  223. {
  224. "name": "key",
  225. "in": "body",
  226. "schema": {
  227. "$ref": "#/definitions/CreateKeyOption"
  228. }
  229. }
  230. ],
  231. "responses": {
  232. "201": {
  233. "$ref": "#/responses/PublicKey"
  234. },
  235. "403": {
  236. "$ref": "#/responses/forbidden"
  237. },
  238. "422": {
  239. "$ref": "#/responses/validationError"
  240. }
  241. }
  242. }
  243. },
  244. "/admin/users/{username}/keys/{id}": {
  245. "delete": {
  246. "produces": [
  247. "application/json"
  248. ],
  249. "tags": [
  250. "admin"
  251. ],
  252. "summary": "Delete a user's public key",
  253. "operationId": "adminDeleteUserPublicKey",
  254. "parameters": [
  255. {
  256. "type": "string",
  257. "description": "username of user",
  258. "name": "username",
  259. "in": "path",
  260. "required": true
  261. },
  262. {
  263. "type": "integer",
  264. "format": "int64",
  265. "description": "id of the key to delete",
  266. "name": "id",
  267. "in": "path",
  268. "required": true
  269. }
  270. ],
  271. "responses": {
  272. "204": {
  273. "$ref": "#/responses/empty"
  274. },
  275. "403": {
  276. "$ref": "#/responses/forbidden"
  277. },
  278. "404": {
  279. "$ref": "#/responses/notFound"
  280. }
  281. }
  282. }
  283. },
  284. "/admin/users/{username}/orgs": {
  285. "post": {
  286. "consumes": [
  287. "application/json"
  288. ],
  289. "produces": [
  290. "application/json"
  291. ],
  292. "tags": [
  293. "admin"
  294. ],
  295. "summary": "Create an organization",
  296. "operationId": "adminCreateOrg",
  297. "parameters": [
  298. {
  299. "type": "string",
  300. "description": "username of the user that will own the created organization",
  301. "name": "username",
  302. "in": "path",
  303. "required": true
  304. },
  305. {
  306. "name": "organization",
  307. "in": "body",
  308. "required": true,
  309. "schema": {
  310. "$ref": "#/definitions/CreateOrgOption"
  311. }
  312. }
  313. ],
  314. "responses": {
  315. "201": {
  316. "$ref": "#/responses/Organization"
  317. },
  318. "403": {
  319. "$ref": "#/responses/forbidden"
  320. },
  321. "422": {
  322. "$ref": "#/responses/validationError"
  323. }
  324. }
  325. }
  326. },
  327. "/admin/users/{username}/repos": {
  328. "post": {
  329. "consumes": [
  330. "application/json"
  331. ],
  332. "produces": [
  333. "application/json"
  334. ],
  335. "tags": [
  336. "admin"
  337. ],
  338. "summary": "Create a repository on behalf of a user",
  339. "operationId": "adminCreateRepo",
  340. "parameters": [
  341. {
  342. "type": "string",
  343. "description": "username of the user. This user will own the created repository",
  344. "name": "username",
  345. "in": "path",
  346. "required": true
  347. },
  348. {
  349. "name": "repository",
  350. "in": "body",
  351. "required": true,
  352. "schema": {
  353. "$ref": "#/definitions/CreateRepoOption"
  354. }
  355. }
  356. ],
  357. "responses": {
  358. "201": {
  359. "$ref": "#/responses/Repository"
  360. },
  361. "403": {
  362. "$ref": "#/responses/forbidden"
  363. },
  364. "404": {
  365. "$ref": "#/responses/notFound"
  366. },
  367. "409": {
  368. "$ref": "#/responses/error"
  369. },
  370. "422": {
  371. "$ref": "#/responses/validationError"
  372. }
  373. }
  374. }
  375. },
  376. "/markdown": {
  377. "post": {
  378. "consumes": [
  379. "application/json"
  380. ],
  381. "produces": [
  382. "text/html"
  383. ],
  384. "tags": [
  385. "miscellaneous"
  386. ],
  387. "summary": "Render a markdown document as HTML",
  388. "operationId": "renderMarkdown",
  389. "parameters": [
  390. {
  391. "name": "body",
  392. "in": "body",
  393. "schema": {
  394. "$ref": "#/definitions/MarkdownOption"
  395. }
  396. }
  397. ],
  398. "responses": {
  399. "200": {
  400. "$ref": "#/responses/MarkdownRender"
  401. },
  402. "422": {
  403. "$ref": "#/responses/validationError"
  404. }
  405. }
  406. }
  407. },
  408. "/markdown/raw": {
  409. "post": {
  410. "consumes": [
  411. "text/plain"
  412. ],
  413. "produces": [
  414. "text/html"
  415. ],
  416. "tags": [
  417. "miscellaneous"
  418. ],
  419. "summary": "Render raw markdown as HTML",
  420. "operationId": "renderMarkdownRaw",
  421. "parameters": [
  422. {
  423. "description": "Request body to render",
  424. "name": "body",
  425. "in": "body",
  426. "required": true,
  427. "schema": {
  428. "type": "string"
  429. }
  430. }
  431. ],
  432. "responses": {
  433. "200": {
  434. "$ref": "#/responses/MarkdownRender"
  435. },
  436. "422": {
  437. "$ref": "#/responses/validationError"
  438. }
  439. }
  440. }
  441. },
  442. "/notifications": {
  443. "get": {
  444. "consumes": [
  445. "application/json"
  446. ],
  447. "produces": [
  448. "application/json"
  449. ],
  450. "tags": [
  451. "notification"
  452. ],
  453. "summary": "List users's notification threads",
  454. "operationId": "notifyGetList",
  455. "parameters": [
  456. {
  457. "type": "string",
  458. "description": "If true, show notifications marked as read. Default value is false",
  459. "name": "all",
  460. "in": "query"
  461. },
  462. {
  463. "type": "string",
  464. "format": "date-time",
  465. "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
  466. "name": "since",
  467. "in": "query"
  468. },
  469. {
  470. "type": "string",
  471. "format": "date-time",
  472. "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
  473. "name": "before",
  474. "in": "query"
  475. },
  476. {
  477. "type": "integer",
  478. "description": "page number of results to return (1-based)",
  479. "name": "page",
  480. "in": "query"
  481. },
  482. {
  483. "type": "integer",
  484. "description": "page size of results, maximum page size is 50",
  485. "name": "limit",
  486. "in": "query"
  487. }
  488. ],
  489. "responses": {
  490. "200": {
  491. "$ref": "#/responses/NotificationThreadList"
  492. }
  493. }
  494. },
  495. "put": {
  496. "consumes": [
  497. "application/json"
  498. ],
  499. "produces": [
  500. "application/json"
  501. ],
  502. "tags": [
  503. "notification"
  504. ],
  505. "summary": "Mark notification threads as read",
  506. "operationId": "notifyReadList",
  507. "parameters": [
  508. {
  509. "type": "string",
  510. "format": "date-time",
  511. "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
  512. "name": "last_read_at",
  513. "in": "query"
  514. }
  515. ],
  516. "responses": {
  517. "205": {
  518. "$ref": "#/responses/empty"
  519. }
  520. }
  521. }
  522. },
  523. "/notifications/new": {
  524. "get": {
  525. "tags": [
  526. "notification"
  527. ],
  528. "summary": "Check if unread notifications exist",
  529. "operationId": "notifyNewAvailable",
  530. "responses": {
  531. "200": {
  532. "$ref": "#/responses/NotificationCount"
  533. }
  534. }
  535. }
  536. },
  537. "/notifications/threads/{id}": {
  538. "get": {
  539. "consumes": [
  540. "application/json"
  541. ],
  542. "produces": [
  543. "application/json"
  544. ],
  545. "tags": [
  546. "notification"
  547. ],
  548. "summary": "Get notification thread by ID",
  549. "operationId": "notifyGetThread",
  550. "parameters": [
  551. {
  552. "type": "string",
  553. "description": "id of notification thread",
  554. "name": "id",
  555. "in": "path",
  556. "required": true
  557. }
  558. ],
  559. "responses": {
  560. "200": {
  561. "$ref": "#/responses/NotificationThread"
  562. },
  563. "403": {
  564. "$ref": "#/responses/forbidden"
  565. },
  566. "404": {
  567. "$ref": "#/responses/notFound"
  568. }
  569. }
  570. },
  571. "patch": {
  572. "consumes": [
  573. "application/json"
  574. ],
  575. "produces": [
  576. "application/json"
  577. ],
  578. "tags": [
  579. "notification"
  580. ],
  581. "summary": "Mark notification thread as read by ID",
  582. "operationId": "notifyReadThread",
  583. "parameters": [
  584. {
  585. "type": "string",
  586. "description": "id of notification thread",
  587. "name": "id",
  588. "in": "path",
  589. "required": true
  590. }
  591. ],
  592. "responses": {
  593. "205": {
  594. "$ref": "#/responses/empty"
  595. },
  596. "403": {
  597. "$ref": "#/responses/forbidden"
  598. },
  599. "404": {
  600. "$ref": "#/responses/notFound"
  601. }
  602. }
  603. }
  604. },
  605. "/org/{org}/repos": {
  606. "post": {
  607. "consumes": [
  608. "application/json"
  609. ],
  610. "produces": [
  611. "application/json"
  612. ],
  613. "tags": [
  614. "organization"
  615. ],
  616. "summary": "Create a repository in an organization",
  617. "operationId": "createOrgRepoDeprecated",
  618. "deprecated": true,
  619. "parameters": [
  620. {
  621. "type": "string",
  622. "description": "name of organization",
  623. "name": "org",
  624. "in": "path",
  625. "required": true
  626. },
  627. {
  628. "name": "body",
  629. "in": "body",
  630. "schema": {
  631. "$ref": "#/definitions/CreateRepoOption"
  632. }
  633. }
  634. ],
  635. "responses": {
  636. "201": {
  637. "$ref": "#/responses/Repository"
  638. },
  639. "403": {
  640. "$ref": "#/responses/forbidden"
  641. },
  642. "422": {
  643. "$ref": "#/responses/validationError"
  644. }
  645. }
  646. }
  647. },
  648. "/orgs": {
  649. "get": {
  650. "produces": [
  651. "application/json"
  652. ],
  653. "tags": [
  654. "organization"
  655. ],
  656. "summary": "Get list of organizations",
  657. "operationId": "orgGetAll",
  658. "parameters": [
  659. {
  660. "type": "integer",
  661. "description": "page number of results to return (1-based)",
  662. "name": "page",
  663. "in": "query"
  664. },
  665. {
  666. "type": "integer",
  667. "description": "page size of results, maximum page size is 50",
  668. "name": "limit",
  669. "in": "query"
  670. }
  671. ],
  672. "responses": {
  673. "200": {
  674. "$ref": "#/responses/OrganizationList"
  675. }
  676. }
  677. },
  678. "post": {
  679. "consumes": [
  680. "application/json"
  681. ],
  682. "produces": [
  683. "application/json"
  684. ],
  685. "tags": [
  686. "organization"
  687. ],
  688. "summary": "Create an organization",
  689. "operationId": "orgCreate",
  690. "parameters": [
  691. {
  692. "name": "organization",
  693. "in": "body",
  694. "required": true,
  695. "schema": {
  696. "$ref": "#/definitions/CreateOrgOption"
  697. }
  698. }
  699. ],
  700. "responses": {
  701. "201": {
  702. "$ref": "#/responses/Organization"
  703. },
  704. "403": {
  705. "$ref": "#/responses/forbidden"
  706. },
  707. "422": {
  708. "$ref": "#/responses/validationError"
  709. }
  710. }
  711. }
  712. },
  713. "/orgs/{org}": {
  714. "get": {
  715. "produces": [
  716. "application/json"
  717. ],
  718. "tags": [
  719. "organization"
  720. ],
  721. "summary": "Get an organization",
  722. "operationId": "orgGet",
  723. "parameters": [
  724. {
  725. "type": "string",
  726. "description": "name of the organization to get",
  727. "name": "org",
  728. "in": "path",
  729. "required": true
  730. }
  731. ],
  732. "responses": {
  733. "200": {
  734. "$ref": "#/responses/Organization"
  735. }
  736. }
  737. },
  738. "delete": {
  739. "produces": [
  740. "application/json"
  741. ],
  742. "tags": [
  743. "organization"
  744. ],
  745. "summary": "Delete an organization",
  746. "operationId": "orgDelete",
  747. "parameters": [
  748. {
  749. "type": "string",
  750. "description": "organization that is to be deleted",
  751. "name": "org",
  752. "in": "path",
  753. "required": true
  754. }
  755. ],
  756. "responses": {
  757. "204": {
  758. "$ref": "#/responses/empty"
  759. }
  760. }
  761. },
  762. "patch": {
  763. "consumes": [
  764. "application/json"
  765. ],
  766. "produces": [
  767. "application/json"
  768. ],
  769. "tags": [
  770. "organization"
  771. ],
  772. "summary": "Edit an organization",
  773. "operationId": "orgEdit",
  774. "parameters": [
  775. {
  776. "type": "string",
  777. "description": "name of the organization to edit",
  778. "name": "org",
  779. "in": "path",
  780. "required": true
  781. },
  782. {
  783. "name": "body",
  784. "in": "body",
  785. "required": true,
  786. "schema": {
  787. "$ref": "#/definitions/EditOrgOption"
  788. }
  789. }
  790. ],
  791. "responses": {
  792. "200": {
  793. "$ref": "#/responses/Organization"
  794. }
  795. }
  796. }
  797. },
  798. "/orgs/{org}/hooks": {
  799. "get": {
  800. "produces": [
  801. "application/json"
  802. ],
  803. "tags": [
  804. "organization"
  805. ],
  806. "summary": "List an organization's webhooks",
  807. "operationId": "orgListHooks",
  808. "parameters": [
  809. {
  810. "type": "string",
  811. "description": "name of the organization",
  812. "name": "org",
  813. "in": "path",
  814. "required": true
  815. },
  816. {
  817. "type": "integer",
  818. "description": "page number of results to return (1-based)",
  819. "name": "page",
  820. "in": "query"
  821. },
  822. {
  823. "type": "integer",
  824. "description": "page size of results, maximum page size is 50",
  825. "name": "limit",
  826. "in": "query"
  827. }
  828. ],
  829. "responses": {
  830. "200": {
  831. "$ref": "#/responses/HookList"
  832. }
  833. }
  834. }
  835. },
  836. "/orgs/{org}/hooks/": {
  837. "post": {
  838. "consumes": [
  839. "application/json"
  840. ],
  841. "produces": [
  842. "application/json"
  843. ],
  844. "tags": [
  845. "organization"
  846. ],
  847. "summary": "Create a hook",
  848. "operationId": "orgCreateHook",
  849. "parameters": [
  850. {
  851. "type": "string",
  852. "description": "name of the organization",
  853. "name": "org",
  854. "in": "path",
  855. "required": true
  856. },
  857. {
  858. "name": "body",
  859. "in": "body",
  860. "required": true,
  861. "schema": {
  862. "$ref": "#/definitions/CreateHookOption"
  863. }
  864. }
  865. ],
  866. "responses": {
  867. "201": {
  868. "$ref": "#/responses/Hook"
  869. }
  870. }
  871. }
  872. },
  873. "/orgs/{org}/hooks/{id}": {
  874. "get": {
  875. "produces": [
  876. "application/json"
  877. ],
  878. "tags": [
  879. "organization"
  880. ],
  881. "summary": "Get a hook",
  882. "operationId": "orgGetHook",
  883. "parameters": [
  884. {
  885. "type": "string",
  886. "description": "name of the organization",
  887. "name": "org",
  888. "in": "path",
  889. "required": true
  890. },
  891. {
  892. "type": "integer",
  893. "format": "int64",
  894. "description": "id of the hook to get",
  895. "name": "id",
  896. "in": "path",
  897. "required": true
  898. }
  899. ],
  900. "responses": {
  901. "200": {
  902. "$ref": "#/responses/Hook"
  903. }
  904. }
  905. },
  906. "delete": {
  907. "produces": [
  908. "application/json"
  909. ],
  910. "tags": [
  911. "organization"
  912. ],
  913. "summary": "Delete a hook",
  914. "operationId": "orgDeleteHook",
  915. "parameters": [
  916. {
  917. "type": "string",
  918. "description": "name of the organization",
  919. "name": "org",
  920. "in": "path",
  921. "required": true
  922. },
  923. {
  924. "type": "integer",
  925. "format": "int64",
  926. "description": "id of the hook to delete",
  927. "name": "id",
  928. "in": "path",
  929. "required": true
  930. }
  931. ],
  932. "responses": {
  933. "204": {
  934. "$ref": "#/responses/empty"
  935. }
  936. }
  937. },
  938. "patch": {
  939. "consumes": [
  940. "application/json"
  941. ],
  942. "produces": [
  943. "application/json"
  944. ],
  945. "tags": [
  946. "organization"
  947. ],
  948. "summary": "Update a hook",
  949. "operationId": "orgEditHook",
  950. "parameters": [
  951. {
  952. "type": "string",
  953. "description": "name of the organization",
  954. "name": "org",
  955. "in": "path",
  956. "required": true
  957. },
  958. {
  959. "type": "integer",
  960. "format": "int64",
  961. "description": "id of the hook to update",
  962. "name": "id",
  963. "in": "path",
  964. "required": true
  965. },
  966. {
  967. "name": "body",
  968. "in": "body",
  969. "schema": {
  970. "$ref": "#/definitions/EditHookOption"
  971. }
  972. }
  973. ],
  974. "responses": {
  975. "200": {
  976. "$ref": "#/responses/Hook"
  977. }
  978. }
  979. }
  980. },
  981. "/orgs/{org}/labels": {
  982. "get": {
  983. "produces": [
  984. "application/json"
  985. ],
  986. "tags": [
  987. "organization"
  988. ],
  989. "summary": "List an organization's labels",
  990. "operationId": "orgListLabels",
  991. "parameters": [
  992. {
  993. "type": "string",
  994. "description": "name of the organization",
  995. "name": "org",
  996. "in": "path",
  997. "required": true
  998. },
  999. {
  1000. "type": "integer",
  1001. "description": "page number of results to return (1-based)",
  1002. "name": "page",
  1003. "in": "query"
  1004. },
  1005. {
  1006. "type": "integer",
  1007. "description": "page size of results, maximum page size is 50",
  1008. "name": "limit",
  1009. "in": "query"
  1010. }
  1011. ],
  1012. "responses": {
  1013. "200": {
  1014. "$ref": "#/responses/LabelList"
  1015. }
  1016. }
  1017. },
  1018. "post": {
  1019. "consumes": [
  1020. "application/json"
  1021. ],
  1022. "produces": [
  1023. "application/json"
  1024. ],
  1025. "tags": [
  1026. "organization"
  1027. ],
  1028. "summary": "Create a label for an organization",
  1029. "operationId": "orgCreateLabel",
  1030. "parameters": [
  1031. {
  1032. "type": "string",
  1033. "description": "name of the organization",
  1034. "name": "org",
  1035. "in": "path",
  1036. "required": true
  1037. },
  1038. {
  1039. "name": "body",
  1040. "in": "body",
  1041. "schema": {
  1042. "$ref": "#/definitions/CreateLabelOption"
  1043. }
  1044. }
  1045. ],
  1046. "responses": {
  1047. "201": {
  1048. "$ref": "#/responses/Label"
  1049. },
  1050. "422": {
  1051. "$ref": "#/responses/validationError"
  1052. }
  1053. }
  1054. }
  1055. },
  1056. "/orgs/{org}/labels/{id}": {
  1057. "get": {
  1058. "produces": [
  1059. "application/json"
  1060. ],
  1061. "tags": [
  1062. "organization"
  1063. ],
  1064. "summary": "Get a single label",
  1065. "operationId": "orgGetLabel",
  1066. "parameters": [
  1067. {
  1068. "type": "string",
  1069. "description": "name of the organization",
  1070. "name": "org",
  1071. "in": "path",
  1072. "required": true
  1073. },
  1074. {
  1075. "type": "integer",
  1076. "format": "int64",
  1077. "description": "id of the label to get",
  1078. "name": "id",
  1079. "in": "path",
  1080. "required": true
  1081. }
  1082. ],
  1083. "responses": {
  1084. "200": {
  1085. "$ref": "#/responses/Label"
  1086. }
  1087. }
  1088. },
  1089. "delete": {
  1090. "tags": [
  1091. "organization"
  1092. ],
  1093. "summary": "Delete a label",
  1094. "operationId": "orgDeleteLabel",
  1095. "parameters": [
  1096. {
  1097. "type": "string",
  1098. "description": "name of the organization",
  1099. "name": "org",
  1100. "in": "path",
  1101. "required": true
  1102. },
  1103. {
  1104. "type": "integer",
  1105. "format": "int64",
  1106. "description": "id of the label to delete",
  1107. "name": "id",
  1108. "in": "path",
  1109. "required": true
  1110. }
  1111. ],
  1112. "responses": {
  1113. "204": {
  1114. "$ref": "#/responses/empty"
  1115. }
  1116. }
  1117. },
  1118. "patch": {
  1119. "consumes": [
  1120. "application/json"
  1121. ],
  1122. "produces": [
  1123. "application/json"
  1124. ],
  1125. "tags": [
  1126. "organization"
  1127. ],
  1128. "summary": "Update a label",
  1129. "operationId": "orgEditLabel",
  1130. "parameters": [
  1131. {
  1132. "type": "string",
  1133. "description": "name of the organization",
  1134. "name": "org",
  1135. "in": "path",
  1136. "required": true
  1137. },
  1138. {
  1139. "type": "integer",
  1140. "format": "int64",
  1141. "description": "id of the label to edit",
  1142. "name": "id",
  1143. "in": "path",
  1144. "required": true
  1145. },
  1146. {
  1147. "name": "body",
  1148. "in": "body",
  1149. "schema": {
  1150. "$ref": "#/definitions/EditLabelOption"
  1151. }
  1152. }
  1153. ],
  1154. "responses": {
  1155. "200": {
  1156. "$ref": "#/responses/Label"
  1157. },
  1158. "422": {
  1159. "$ref": "#/responses/validationError"
  1160. }
  1161. }
  1162. }
  1163. },
  1164. "/orgs/{org}/members": {
  1165. "get": {
  1166. "produces": [
  1167. "application/json"
  1168. ],
  1169. "tags": [
  1170. "organization"
  1171. ],
  1172. "summary": "List an organization's members",
  1173. "operationId": "orgListMembers",
  1174. "parameters": [
  1175. {
  1176. "type": "string",
  1177. "description": "name of the organization",
  1178. "name": "org",
  1179. "in": "path",
  1180. "required": true
  1181. },
  1182. {
  1183. "type": "integer",
  1184. "description": "page number of results to return (1-based)",
  1185. "name": "page",
  1186. "in": "query"
  1187. },
  1188. {
  1189. "type": "integer",
  1190. "description": "page size of results, maximum page size is 50",
  1191. "name": "limit",
  1192. "in": "query"
  1193. }
  1194. ],
  1195. "responses": {
  1196. "200": {
  1197. "$ref": "#/responses/UserList"
  1198. }
  1199. }
  1200. }
  1201. },
  1202. "/orgs/{org}/members/{username}": {
  1203. "get": {
  1204. "tags": [
  1205. "organization"
  1206. ],
  1207. "summary": "Check if a user is a member of an organization",
  1208. "operationId": "orgIsMember",
  1209. "parameters": [
  1210. {
  1211. "type": "string",
  1212. "description": "name of the organization",
  1213. "name": "org",
  1214. "in": "path",
  1215. "required": true
  1216. },
  1217. {
  1218. "type": "string",
  1219. "description": "username of the user",
  1220. "name": "username",
  1221. "in": "path",
  1222. "required": true
  1223. }
  1224. ],
  1225. "responses": {
  1226. "204": {
  1227. "description": "user is a member"
  1228. },
  1229. "302": {
  1230. "description": "redirection to /orgs/{org}/public_members/{username}"
  1231. },
  1232. "404": {
  1233. "description": "user is not a member"
  1234. }
  1235. }
  1236. },
  1237. "delete": {
  1238. "produces": [
  1239. "application/json"
  1240. ],
  1241. "tags": [
  1242. "organization"
  1243. ],
  1244. "summary": "Remove a member from an organization",
  1245. "operationId": "orgDeleteMember",
  1246. "parameters": [
  1247. {
  1248. "type": "string",
  1249. "description": "name of the organization",
  1250. "name": "org",
  1251. "in": "path",
  1252. "required": true
  1253. },
  1254. {
  1255. "type": "string",
  1256. "description": "username of the user",
  1257. "name": "username",
  1258. "in": "path",
  1259. "required": true
  1260. }
  1261. ],
  1262. "responses": {
  1263. "204": {
  1264. "description": "member removed"
  1265. }
  1266. }
  1267. }
  1268. },
  1269. "/orgs/{org}/public_members": {
  1270. "get": {
  1271. "produces": [
  1272. "application/json"
  1273. ],
  1274. "tags": [
  1275. "organization"
  1276. ],
  1277. "summary": "List an organization's public members",
  1278. "operationId": "orgListPublicMembers",
  1279. "parameters": [
  1280. {
  1281. "type": "string",
  1282. "description": "name of the organization",
  1283. "name": "org",
  1284. "in": "path",
  1285. "required": true
  1286. },
  1287. {
  1288. "type": "integer",
  1289. "description": "page number of results to return (1-based)",
  1290. "name": "page",
  1291. "in": "query"
  1292. },
  1293. {
  1294. "type": "integer",
  1295. "description": "page size of results, maximum page size is 50",
  1296. "name": "limit",
  1297. "in": "query"
  1298. }
  1299. ],
  1300. "responses": {
  1301. "200": {
  1302. "$ref": "#/responses/UserList"
  1303. }
  1304. }
  1305. }
  1306. },
  1307. "/orgs/{org}/public_members/{username}": {
  1308. "get": {
  1309. "tags": [
  1310. "organization"
  1311. ],
  1312. "summary": "Check if a user is a public member of an organization",
  1313. "operationId": "orgIsPublicMember",
  1314. "parameters": [
  1315. {
  1316. "type": "string",
  1317. "description": "name of the organization",
  1318. "name": "org",
  1319. "in": "path",
  1320. "required": true
  1321. },
  1322. {
  1323. "type": "string",
  1324. "description": "username of the user",
  1325. "name": "username",
  1326. "in": "path",
  1327. "required": true
  1328. }
  1329. ],
  1330. "responses": {
  1331. "204": {
  1332. "description": "user is a public member"
  1333. },
  1334. "404": {
  1335. "description": "user is not a public member"
  1336. }
  1337. }
  1338. },
  1339. "put": {
  1340. "produces": [
  1341. "application/json"
  1342. ],
  1343. "tags": [
  1344. "organization"
  1345. ],
  1346. "summary": "Publicize a user's membership",
  1347. "operationId": "orgPublicizeMember",
  1348. "parameters": [
  1349. {
  1350. "type": "string",
  1351. "description": "name of the organization",
  1352. "name": "org",
  1353. "in": "path",
  1354. "required": true
  1355. },
  1356. {
  1357. "type": "string",
  1358. "description": "username of the user",
  1359. "name": "username",
  1360. "in": "path",
  1361. "required": true
  1362. }
  1363. ],
  1364. "responses": {
  1365. "204": {
  1366. "description": "membership publicized"
  1367. },
  1368. "403": {
  1369. "$ref": "#/responses/forbidden"
  1370. }
  1371. }
  1372. },
  1373. "delete": {
  1374. "produces": [
  1375. "application/json"
  1376. ],
  1377. "tags": [
  1378. "organization"
  1379. ],
  1380. "summary": "Conceal a user's membership",
  1381. "operationId": "orgConcealMember",
  1382. "parameters": [
  1383. {
  1384. "type": "string",
  1385. "description": "name of the organization",
  1386. "name": "org",
  1387. "in": "path",
  1388. "required": true
  1389. },
  1390. {
  1391. "type": "string",
  1392. "description": "username of the user",
  1393. "name": "username",
  1394. "in": "path",
  1395. "required": true
  1396. }
  1397. ],
  1398. "responses": {
  1399. "204": {
  1400. "$ref": "#/responses/empty"
  1401. },
  1402. "403": {
  1403. "$ref": "#/responses/forbidden"
  1404. }
  1405. }
  1406. }
  1407. },
  1408. "/orgs/{org}/repos": {
  1409. "get": {
  1410. "produces": [
  1411. "application/json"
  1412. ],
  1413. "tags": [
  1414. "organization"
  1415. ],
  1416. "summary": "List an organization's repos",
  1417. "operationId": "orgListRepos",
  1418. "parameters": [
  1419. {
  1420. "type": "string",
  1421. "description": "name of the organization",
  1422. "name": "org",
  1423. "in": "path",
  1424. "required": true
  1425. },
  1426. {
  1427. "type": "integer",
  1428. "description": "page number of results to return (1-based)",
  1429. "name": "page",
  1430. "in": "query"
  1431. },
  1432. {
  1433. "type": "integer",
  1434. "description": "page size of results, maximum page size is 50",
  1435. "name": "limit",
  1436. "in": "query"
  1437. }
  1438. ],
  1439. "responses": {
  1440. "200": {
  1441. "$ref": "#/responses/RepositoryList"
  1442. }
  1443. }
  1444. },
  1445. "post": {
  1446. "consumes": [
  1447. "application/json"
  1448. ],
  1449. "produces": [
  1450. "application/json"
  1451. ],
  1452. "tags": [
  1453. "organization"
  1454. ],
  1455. "summary": "Create a repository in an organization",
  1456. "operationId": "createOrgRepo",
  1457. "parameters": [
  1458. {
  1459. "type": "string",
  1460. "description": "name of organization",
  1461. "name": "org",
  1462. "in": "path",
  1463. "required": true
  1464. },
  1465. {
  1466. "name": "body",
  1467. "in": "body",
  1468. "schema": {
  1469. "$ref": "#/definitions/CreateRepoOption"
  1470. }
  1471. }
  1472. ],
  1473. "responses": {
  1474. "201": {
  1475. "$ref": "#/responses/Repository"
  1476. },
  1477. "403": {
  1478. "$ref": "#/responses/forbidden"
  1479. },
  1480. "404": {
  1481. "$ref": "#/responses/notFound"
  1482. }
  1483. }
  1484. }
  1485. },
  1486. "/orgs/{org}/teams": {
  1487. "get": {
  1488. "produces": [
  1489. "application/json"
  1490. ],
  1491. "tags": [
  1492. "organization"
  1493. ],
  1494. "summary": "List an organization's teams",
  1495. "operationId": "orgListTeams",
  1496. "parameters": [
  1497. {
  1498. "type": "string",
  1499. "description": "name of the organization",
  1500. "name": "org",
  1501. "in": "path",
  1502. "required": true
  1503. },
  1504. {
  1505. "type": "integer",
  1506. "description": "page number of results to return (1-based)",
  1507. "name": "page",
  1508. "in": "query"
  1509. },
  1510. {
  1511. "type": "integer",
  1512. "description": "page size of results, maximum page size is 50",
  1513. "name": "limit",
  1514. "in": "query"
  1515. }
  1516. ],
  1517. "responses": {
  1518. "200": {
  1519. "$ref": "#/responses/TeamList"
  1520. }
  1521. }
  1522. },
  1523. "post": {
  1524. "consumes": [
  1525. "application/json"
  1526. ],
  1527. "produces": [
  1528. "application/json"
  1529. ],
  1530. "tags": [
  1531. "organization"
  1532. ],
  1533. "summary": "Create a team",
  1534. "operationId": "orgCreateTeam",
  1535. "parameters": [
  1536. {
  1537. "type": "string",
  1538. "description": "name of the organization",
  1539. "name": "org",
  1540. "in": "path",
  1541. "required": true
  1542. },
  1543. {
  1544. "name": "body",
  1545. "in": "body",
  1546. "schema": {
  1547. "$ref": "#/definitions/CreateTeamOption"
  1548. }
  1549. }
  1550. ],
  1551. "responses": {
  1552. "201": {
  1553. "$ref": "#/responses/Team"
  1554. },
  1555. "422": {
  1556. "$ref": "#/responses/validationError"
  1557. }
  1558. }
  1559. }
  1560. },
  1561. "/orgs/{org}/teams/search": {
  1562. "get": {
  1563. "produces": [
  1564. "application/json"
  1565. ],
  1566. "tags": [
  1567. "organization"
  1568. ],
  1569. "summary": "Search for teams within an organization",
  1570. "operationId": "teamSearch",
  1571. "parameters": [
  1572. {
  1573. "type": "string",
  1574. "description": "name of the organization",
  1575. "name": "org",
  1576. "in": "path",
  1577. "required": true
  1578. },
  1579. {
  1580. "type": "string",
  1581. "description": "keywords to search",
  1582. "name": "q",
  1583. "in": "query"
  1584. },
  1585. {
  1586. "type": "boolean",
  1587. "description": "include search within team description (defaults to true)",
  1588. "name": "include_desc",
  1589. "in": "query"
  1590. },
  1591. {
  1592. "type": "integer",
  1593. "description": "page number of results to return (1-based)",
  1594. "name": "page",
  1595. "in": "query"
  1596. },
  1597. {
  1598. "type": "integer",
  1599. "description": "page size of results, maximum page size is 50",
  1600. "name": "limit",
  1601. "in": "query"
  1602. }
  1603. ],
  1604. "responses": {
  1605. "200": {
  1606. "description": "SearchResults of a successful search",
  1607. "schema": {
  1608. "type": "object",
  1609. "properties": {
  1610. "data": {
  1611. "type": "array",
  1612. "items": {
  1613. "$ref": "#/definitions/Team"
  1614. }
  1615. },
  1616. "ok": {
  1617. "type": "boolean"
  1618. }
  1619. }
  1620. }
  1621. }
  1622. }
  1623. }
  1624. },
  1625. "/repos/issues/search": {
  1626. "get": {
  1627. "produces": [
  1628. "application/json"
  1629. ],
  1630. "tags": [
  1631. "issue"
  1632. ],
  1633. "summary": "Search for issues across the repositories that the user has access to",
  1634. "operationId": "issueSearchIssues",
  1635. "parameters": [
  1636. {
  1637. "type": "string",
  1638. "description": "whether issue is open or closed",
  1639. "name": "state",
  1640. "in": "query"
  1641. },
  1642. {
  1643. "type": "string",
  1644. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  1645. "name": "labels",
  1646. "in": "query"
  1647. },
  1648. {
  1649. "type": "string",
  1650. "description": "search string",
  1651. "name": "q",
  1652. "in": "query"
  1653. },
  1654. {
  1655. "type": "integer",
  1656. "format": "int64",
  1657. "description": "repository to prioritize in the results",
  1658. "name": "priority_repo_id",
  1659. "in": "query"
  1660. },
  1661. {
  1662. "type": "string",
  1663. "description": "filter by type (issues / pulls) if set",
  1664. "name": "type",
  1665. "in": "query"
  1666. },
  1667. {
  1668. "type": "integer",
  1669. "description": "page number of requested issues",
  1670. "name": "page",
  1671. "in": "query"
  1672. }
  1673. ],
  1674. "responses": {
  1675. "200": {
  1676. "$ref": "#/responses/IssueList"
  1677. }
  1678. }
  1679. }
  1680. },
  1681. "/repos/migrate": {
  1682. "post": {
  1683. "consumes": [
  1684. "application/json"
  1685. ],
  1686. "produces": [
  1687. "application/json"
  1688. ],
  1689. "tags": [
  1690. "repository"
  1691. ],
  1692. "summary": "Migrate a remote git repository",
  1693. "operationId": "repoMigrate",
  1694. "parameters": [
  1695. {
  1696. "name": "body",
  1697. "in": "body",
  1698. "schema": {
  1699. "$ref": "#/definitions/MigrateRepoForm"
  1700. }
  1701. }
  1702. ],
  1703. "responses": {
  1704. "201": {
  1705. "$ref": "#/responses/Repository"
  1706. },
  1707. "403": {
  1708. "$ref": "#/responses/forbidden"
  1709. },
  1710. "422": {
  1711. "$ref": "#/responses/validationError"
  1712. }
  1713. }
  1714. }
  1715. },
  1716. "/repos/search": {
  1717. "get": {
  1718. "produces": [
  1719. "application/json"
  1720. ],
  1721. "tags": [
  1722. "repository"
  1723. ],
  1724. "summary": "Search for repositories",
  1725. "operationId": "repoSearch",
  1726. "parameters": [
  1727. {
  1728. "type": "string",
  1729. "description": "keyword",
  1730. "name": "q",
  1731. "in": "query"
  1732. },
  1733. {
  1734. "type": "boolean",
  1735. "description": "Limit search to repositories with keyword as topic",
  1736. "name": "topic",
  1737. "in": "query"
  1738. },
  1739. {
  1740. "type": "boolean",
  1741. "description": "include search of keyword within repository description",
  1742. "name": "includeDesc",
  1743. "in": "query"
  1744. },
  1745. {
  1746. "type": "integer",
  1747. "format": "int64",
  1748. "description": "search only for repos that the user with the given id owns or contributes to",
  1749. "name": "uid",
  1750. "in": "query"
  1751. },
  1752. {
  1753. "type": "integer",
  1754. "format": "int64",
  1755. "description": "repo owner to prioritize in the results",
  1756. "name": "priority_owner_id",
  1757. "in": "query"
  1758. },
  1759. {
  1760. "type": "integer",
  1761. "format": "int64",
  1762. "description": "search only for repos that the user with the given id has starred",
  1763. "name": "starredBy",
  1764. "in": "query"
  1765. },
  1766. {
  1767. "type": "boolean",
  1768. "description": "include private repositories this user has access to (defaults to true)",
  1769. "name": "private",
  1770. "in": "query"
  1771. },
  1772. {
  1773. "type": "boolean",
  1774. "description": "show only pubic, private or all repositories (defaults to all)",
  1775. "name": "is_private",
  1776. "in": "query"
  1777. },
  1778. {
  1779. "type": "boolean",
  1780. "description": "include template repositories this user has access to (defaults to true)",
  1781. "name": "template",
  1782. "in": "query"
  1783. },
  1784. {
  1785. "type": "boolean",
  1786. "description": "show only archived, non-archived or all repositories (defaults to all)",
  1787. "name": "archived",
  1788. "in": "query"
  1789. },
  1790. {
  1791. "type": "string",
  1792. "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"",
  1793. "name": "mode",
  1794. "in": "query"
  1795. },
  1796. {
  1797. "type": "boolean",
  1798. "description": "if `uid` is given, search only for repos that the user owns",
  1799. "name": "exclusive",
  1800. "in": "query"
  1801. },
  1802. {
  1803. "type": "string",
  1804. "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"",
  1805. "name": "sort",
  1806. "in": "query"
  1807. },
  1808. {
  1809. "type": "string",
  1810. "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.",
  1811. "name": "order",
  1812. "in": "query"
  1813. },
  1814. {
  1815. "type": "integer",
  1816. "description": "page number of results to return (1-based)",
  1817. "name": "page",
  1818. "in": "query"
  1819. },
  1820. {
  1821. "type": "integer",
  1822. "description": "page size of results, maximum page size is 50",
  1823. "name": "limit",
  1824. "in": "query"
  1825. }
  1826. ],
  1827. "responses": {
  1828. "200": {
  1829. "$ref": "#/responses/SearchResults"
  1830. },
  1831. "422": {
  1832. "$ref": "#/responses/validationError"
  1833. }
  1834. }
  1835. }
  1836. },
  1837. "/repos/{owner}/{repo}": {
  1838. "get": {
  1839. "produces": [
  1840. "application/json"
  1841. ],
  1842. "tags": [
  1843. "repository"
  1844. ],
  1845. "summary": "Get a repository",
  1846. "operationId": "repoGet",
  1847. "parameters": [
  1848. {
  1849. "type": "string",
  1850. "description": "owner of the repo",
  1851. "name": "owner",
  1852. "in": "path",
  1853. "required": true
  1854. },
  1855. {
  1856. "type": "string",
  1857. "description": "name of the repo",
  1858. "name": "repo",
  1859. "in": "path",
  1860. "required": true
  1861. }
  1862. ],
  1863. "responses": {
  1864. "200": {
  1865. "$ref": "#/responses/Repository"
  1866. }
  1867. }
  1868. },
  1869. "delete": {
  1870. "produces": [
  1871. "application/json"
  1872. ],
  1873. "tags": [
  1874. "repository"
  1875. ],
  1876. "summary": "Delete a repository",
  1877. "operationId": "repoDelete",
  1878. "parameters": [
  1879. {
  1880. "type": "string",
  1881. "description": "owner of the repo to delete",
  1882. "name": "owner",
  1883. "in": "path",
  1884. "required": true
  1885. },
  1886. {
  1887. "type": "string",
  1888. "description": "name of the repo to delete",
  1889. "name": "repo",
  1890. "in": "path",
  1891. "required": true
  1892. }
  1893. ],
  1894. "responses": {
  1895. "204": {
  1896. "$ref": "#/responses/empty"
  1897. },
  1898. "403": {
  1899. "$ref": "#/responses/forbidden"
  1900. }
  1901. }
  1902. },
  1903. "patch": {
  1904. "produces": [
  1905. "application/json"
  1906. ],
  1907. "tags": [
  1908. "repository"
  1909. ],
  1910. "summary": "Edit a repository's properties. Only fields that are set will be changed.",
  1911. "operationId": "repoEdit",
  1912. "parameters": [
  1913. {
  1914. "type": "string",
  1915. "description": "owner of the repo to edit",
  1916. "name": "owner",
  1917. "in": "path",
  1918. "required": true
  1919. },
  1920. {
  1921. "type": "string",
  1922. "description": "name of the repo to edit",
  1923. "name": "repo",
  1924. "in": "path",
  1925. "required": true
  1926. },
  1927. {
  1928. "description": "Properties of a repo that you can edit",
  1929. "name": "body",
  1930. "in": "body",
  1931. "schema": {
  1932. "$ref": "#/definitions/EditRepoOption"
  1933. }
  1934. }
  1935. ],
  1936. "responses": {
  1937. "200": {
  1938. "$ref": "#/responses/Repository"
  1939. },
  1940. "403": {
  1941. "$ref": "#/responses/forbidden"
  1942. },
  1943. "422": {
  1944. "$ref": "#/responses/validationError"
  1945. }
  1946. }
  1947. }
  1948. },
  1949. "/repos/{owner}/{repo}/archive/{archive}": {
  1950. "get": {
  1951. "produces": [
  1952. "application/json"
  1953. ],
  1954. "tags": [
  1955. "repository"
  1956. ],
  1957. "summary": "Get an archive of a repository",
  1958. "operationId": "repoGetArchive",
  1959. "parameters": [
  1960. {
  1961. "type": "string",
  1962. "description": "owner of the repo",
  1963. "name": "owner",
  1964. "in": "path",
  1965. "required": true
  1966. },
  1967. {
  1968. "type": "string",
  1969. "description": "name of the repo",
  1970. "name": "repo",
  1971. "in": "path",
  1972. "required": true
  1973. },
  1974. {
  1975. "type": "string",
  1976. "description": "archive to download, consisting of a git reference and archive",
  1977. "name": "archive",
  1978. "in": "path",
  1979. "required": true
  1980. }
  1981. ],
  1982. "responses": {
  1983. "200": {
  1984. "description": "success"
  1985. },
  1986. "404": {
  1987. "$ref": "#/responses/notFound"
  1988. }
  1989. }
  1990. }
  1991. },
  1992. "/repos/{owner}/{repo}/branch_protections": {
  1993. "get": {
  1994. "produces": [
  1995. "application/json"
  1996. ],
  1997. "tags": [
  1998. "repository"
  1999. ],
  2000. "summary": "List branch protections for a repository",
  2001. "operationId": "repoListBranchProtection",
  2002. "parameters": [
  2003. {
  2004. "type": "string",
  2005. "description": "owner of the repo",
  2006. "name": "owner",
  2007. "in": "path",
  2008. "required": true
  2009. },
  2010. {
  2011. "type": "string",
  2012. "description": "name of the repo",
  2013. "name": "repo",
  2014. "in": "path",
  2015. "required": true
  2016. }
  2017. ],
  2018. "responses": {
  2019. "200": {
  2020. "$ref": "#/responses/BranchProtectionList"
  2021. }
  2022. }
  2023. },
  2024. "post": {
  2025. "consumes": [
  2026. "application/json"
  2027. ],
  2028. "produces": [
  2029. "application/json"
  2030. ],
  2031. "tags": [
  2032. "repository"
  2033. ],
  2034. "summary": "Create a branch protections for a repository",
  2035. "operationId": "repoCreateBranchProtection",
  2036. "parameters": [
  2037. {
  2038. "type": "string",
  2039. "description": "owner of the repo",
  2040. "name": "owner",
  2041. "in": "path",
  2042. "required": true
  2043. },
  2044. {
  2045. "type": "string",
  2046. "description": "name of the repo",
  2047. "name": "repo",
  2048. "in": "path",
  2049. "required": true
  2050. },
  2051. {
  2052. "name": "body",
  2053. "in": "body",
  2054. "schema": {
  2055. "$ref": "#/definitions/CreateBranchProtectionOption"
  2056. }
  2057. }
  2058. ],
  2059. "responses": {
  2060. "201": {
  2061. "$ref": "#/responses/BranchProtection"
  2062. },
  2063. "403": {
  2064. "$ref": "#/responses/forbidden"
  2065. },
  2066. "404": {
  2067. "$ref": "#/responses/notFound"
  2068. },
  2069. "422": {
  2070. "$ref": "#/responses/validationError"
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "/repos/{owner}/{repo}/branch_protections/{name}": {
  2076. "get": {
  2077. "produces": [
  2078. "application/json"
  2079. ],
  2080. "tags": [
  2081. "repository"
  2082. ],
  2083. "summary": "Get a specific branch protection for the repository",
  2084. "operationId": "repoGetBranchProtection",
  2085. "parameters": [
  2086. {
  2087. "type": "string",
  2088. "description": "owner of the repo",
  2089. "name": "owner",
  2090. "in": "path",
  2091. "required": true
  2092. },
  2093. {
  2094. "type": "string",
  2095. "description": "name of the repo",
  2096. "name": "repo",
  2097. "in": "path",
  2098. "required": true
  2099. },
  2100. {
  2101. "type": "string",
  2102. "description": "name of protected branch",
  2103. "name": "name",
  2104. "in": "path",
  2105. "required": true
  2106. }
  2107. ],
  2108. "responses": {
  2109. "200": {
  2110. "$ref": "#/responses/BranchProtection"
  2111. },
  2112. "404": {
  2113. "$ref": "#/responses/notFound"
  2114. }
  2115. }
  2116. },
  2117. "delete": {
  2118. "produces": [
  2119. "application/json"
  2120. ],
  2121. "tags": [
  2122. "repository"
  2123. ],
  2124. "summary": "Delete a specific branch protection for the repository",
  2125. "operationId": "repoDeleteBranchProtection",
  2126. "parameters": [
  2127. {
  2128. "type": "string",
  2129. "description": "owner of the repo",
  2130. "name": "owner",
  2131. "in": "path",
  2132. "required": true
  2133. },
  2134. {
  2135. "type": "string",
  2136. "description": "name of the repo",
  2137. "name": "repo",
  2138. "in": "path",
  2139. "required": true
  2140. },
  2141. {
  2142. "type": "string",
  2143. "description": "name of protected branch",
  2144. "name": "name",
  2145. "in": "path",
  2146. "required": true
  2147. }
  2148. ],
  2149. "responses": {
  2150. "204": {
  2151. "$ref": "#/responses/empty"
  2152. },
  2153. "404": {
  2154. "$ref": "#/responses/notFound"
  2155. }
  2156. }
  2157. },
  2158. "patch": {
  2159. "consumes": [
  2160. "application/json"
  2161. ],
  2162. "produces": [
  2163. "application/json"
  2164. ],
  2165. "tags": [
  2166. "repository"
  2167. ],
  2168. "summary": "Edit a branch protections for a repository. Only fields that are set will be changed",
  2169. "operationId": "repoEditBranchProtection",
  2170. "parameters": [
  2171. {
  2172. "type": "string",
  2173. "description": "owner of the repo",
  2174. "name": "owner",
  2175. "in": "path",
  2176. "required": true
  2177. },
  2178. {
  2179. "type": "string",
  2180. "description": "name of the repo",
  2181. "name": "repo",
  2182. "in": "path",
  2183. "required": true
  2184. },
  2185. {
  2186. "type": "string",
  2187. "description": "name of protected branch",
  2188. "name": "name",
  2189. "in": "path",
  2190. "required": true
  2191. },
  2192. {
  2193. "name": "body",
  2194. "in": "body",
  2195. "schema": {
  2196. "$ref": "#/definitions/EditBranchProtectionOption"
  2197. }
  2198. }
  2199. ],
  2200. "responses": {
  2201. "200": {
  2202. "$ref": "#/responses/BranchProtection"
  2203. },
  2204. "404": {
  2205. "$ref": "#/responses/notFound"
  2206. },
  2207. "422": {
  2208. "$ref": "#/responses/validationError"
  2209. }
  2210. }
  2211. }
  2212. },
  2213. "/repos/{owner}/{repo}/branches": {
  2214. "get": {
  2215. "produces": [
  2216. "application/json"
  2217. ],
  2218. "tags": [
  2219. "repository"
  2220. ],
  2221. "summary": "List a repository's branches",
  2222. "operationId": "repoListBranches",
  2223. "parameters": [
  2224. {
  2225. "type": "string",
  2226. "description": "owner of the repo",
  2227. "name": "owner",
  2228. "in": "path",
  2229. "required": true
  2230. },
  2231. {
  2232. "type": "string",
  2233. "description": "name of the repo",
  2234. "name": "repo",
  2235. "in": "path",
  2236. "required": true
  2237. }
  2238. ],
  2239. "responses": {
  2240. "200": {
  2241. "$ref": "#/responses/BranchList"
  2242. }
  2243. }
  2244. },
  2245. "post": {
  2246. "consumes": [
  2247. "application/json"
  2248. ],
  2249. "produces": [
  2250. "application/json"
  2251. ],
  2252. "tags": [
  2253. "repository"
  2254. ],
  2255. "summary": "Create a branch",
  2256. "operationId": "repoCreateBranch",
  2257. "parameters": [
  2258. {
  2259. "type": "string",
  2260. "description": "owner of the repo",
  2261. "name": "owner",
  2262. "in": "path",
  2263. "required": true
  2264. },
  2265. {
  2266. "type": "string",
  2267. "description": "name of the repo",
  2268. "name": "repo",
  2269. "in": "path",
  2270. "required": true
  2271. },
  2272. {
  2273. "name": "body",
  2274. "in": "body",
  2275. "schema": {
  2276. "$ref": "#/definitions/CreateBranchRepoOption"
  2277. }
  2278. }
  2279. ],
  2280. "responses": {
  2281. "201": {
  2282. "$ref": "#/responses/Branch"
  2283. },
  2284. "404": {
  2285. "description": "The old branch does not exist."
  2286. },
  2287. "409": {
  2288. "description": "The branch with the same name already exists."
  2289. }
  2290. }
  2291. }
  2292. },
  2293. "/repos/{owner}/{repo}/branches/{branch}": {
  2294. "get": {
  2295. "produces": [
  2296. "application/json"
  2297. ],
  2298. "tags": [
  2299. "repository"
  2300. ],
  2301. "summary": "Retrieve a specific branch from a repository, including its effective branch protection",
  2302. "operationId": "repoGetBranch",
  2303. "parameters": [
  2304. {
  2305. "type": "string",
  2306. "description": "owner of the repo",
  2307. "name": "owner",
  2308. "in": "path",
  2309. "required": true
  2310. },
  2311. {
  2312. "type": "string",
  2313. "description": "name of the repo",
  2314. "name": "repo",
  2315. "in": "path",
  2316. "required": true
  2317. },
  2318. {
  2319. "type": "string",
  2320. "description": "branch to get",
  2321. "name": "branch",
  2322. "in": "path",
  2323. "required": true
  2324. }
  2325. ],
  2326. "responses": {
  2327. "200": {
  2328. "$ref": "#/responses/Branch"
  2329. }
  2330. }
  2331. },
  2332. "delete": {
  2333. "produces": [
  2334. "application/json"
  2335. ],
  2336. "tags": [
  2337. "repository"
  2338. ],
  2339. "summary": "Delete a specific branch from a repository",
  2340. "operationId": "repoDeleteBranch",
  2341. "parameters": [
  2342. {
  2343. "type": "string",
  2344. "description": "owner of the repo",
  2345. "name": "owner",
  2346. "in": "path",
  2347. "required": true
  2348. },
  2349. {
  2350. "type": "string",
  2351. "description": "name of the repo",
  2352. "name": "repo",
  2353. "in": "path",
  2354. "required": true
  2355. },
  2356. {
  2357. "type": "string",
  2358. "description": "branch to delete",
  2359. "name": "branch",
  2360. "in": "path",
  2361. "required": true
  2362. }
  2363. ],
  2364. "responses": {
  2365. "204": {
  2366. "$ref": "#/responses/empty"
  2367. },
  2368. "403": {
  2369. "$ref": "#/responses/error"
  2370. }
  2371. }
  2372. }
  2373. },
  2374. "/repos/{owner}/{repo}/collaborators": {
  2375. "get": {
  2376. "produces": [
  2377. "application/json"
  2378. ],
  2379. "tags": [
  2380. "repository"
  2381. ],
  2382. "summary": "List a repository's collaborators",
  2383. "operationId": "repoListCollaborators",
  2384. "parameters": [
  2385. {
  2386. "type": "string",
  2387. "description": "owner of the repo",
  2388. "name": "owner",
  2389. "in": "path",
  2390. "required": true
  2391. },
  2392. {
  2393. "type": "string",
  2394. "description": "name of the repo",
  2395. "name": "repo",
  2396. "in": "path",
  2397. "required": true
  2398. },
  2399. {
  2400. "type": "integer",
  2401. "description": "page number of results to return (1-based)",
  2402. "name": "page",
  2403. "in": "query"
  2404. },
  2405. {
  2406. "type": "integer",
  2407. "description": "page size of results, maximum page size is 50",
  2408. "name": "limit",
  2409. "in": "query"
  2410. }
  2411. ],
  2412. "responses": {
  2413. "200": {
  2414. "$ref": "#/responses/UserList"
  2415. }
  2416. }
  2417. }
  2418. },
  2419. "/repos/{owner}/{repo}/collaborators/{collaborator}": {
  2420. "get": {
  2421. "produces": [
  2422. "application/json"
  2423. ],
  2424. "tags": [
  2425. "repository"
  2426. ],
  2427. "summary": "Check if a user is a collaborator of a repository",
  2428. "operationId": "repoCheckCollaborator",
  2429. "parameters": [
  2430. {
  2431. "type": "string",
  2432. "description": "owner of the repo",
  2433. "name": "owner",
  2434. "in": "path",
  2435. "required": true
  2436. },
  2437. {
  2438. "type": "string",
  2439. "description": "name of the repo",
  2440. "name": "repo",
  2441. "in": "path",
  2442. "required": true
  2443. },
  2444. {
  2445. "type": "string",
  2446. "description": "username of the collaborator",
  2447. "name": "collaborator",
  2448. "in": "path",
  2449. "required": true
  2450. }
  2451. ],
  2452. "responses": {
  2453. "204": {
  2454. "$ref": "#/responses/empty"
  2455. },
  2456. "404": {
  2457. "$ref": "#/responses/notFound"
  2458. },
  2459. "422": {
  2460. "$ref": "#/responses/validationError"
  2461. }
  2462. }
  2463. },
  2464. "put": {
  2465. "produces": [
  2466. "application/json"
  2467. ],
  2468. "tags": [
  2469. "repository"
  2470. ],
  2471. "summary": "Add a collaborator to a repository",
  2472. "operationId": "repoAddCollaborator",
  2473. "parameters": [
  2474. {
  2475. "type": "string",
  2476. "description": "owner of the repo",
  2477. "name": "owner",
  2478. "in": "path",
  2479. "required": true
  2480. },
  2481. {
  2482. "type": "string",
  2483. "description": "name of the repo",
  2484. "name": "repo",
  2485. "in": "path",
  2486. "required": true
  2487. },
  2488. {
  2489. "type": "string",
  2490. "description": "username of the collaborator to add",
  2491. "name": "collaborator",
  2492. "in": "path",
  2493. "required": true
  2494. },
  2495. {
  2496. "name": "body",
  2497. "in": "body",
  2498. "schema": {
  2499. "$ref": "#/definitions/AddCollaboratorOption"
  2500. }
  2501. }
  2502. ],
  2503. "responses": {
  2504. "204": {
  2505. "$ref": "#/responses/empty"
  2506. },
  2507. "422": {
  2508. "$ref": "#/responses/validationError"
  2509. }
  2510. }
  2511. },
  2512. "delete": {
  2513. "produces": [
  2514. "application/json"
  2515. ],
  2516. "tags": [
  2517. "repository"
  2518. ],
  2519. "summary": "Delete a collaborator from a repository",
  2520. "operationId": "repoDeleteCollaborator",
  2521. "parameters": [
  2522. {
  2523. "type": "string",
  2524. "description": "owner of the repo",
  2525. "name": "owner",
  2526. "in": "path",
  2527. "required": true
  2528. },
  2529. {
  2530. "type": "string",
  2531. "description": "name of the repo",
  2532. "name": "repo",
  2533. "in": "path",
  2534. "required": true
  2535. },
  2536. {
  2537. "type": "string",
  2538. "description": "username of the collaborator to delete",
  2539. "name": "collaborator",
  2540. "in": "path",
  2541. "required": true
  2542. }
  2543. ],
  2544. "responses": {
  2545. "204": {
  2546. "$ref": "#/responses/empty"
  2547. },
  2548. "422": {
  2549. "$ref": "#/responses/validationError"
  2550. }
  2551. }
  2552. }
  2553. },
  2554. "/repos/{owner}/{repo}/commits": {
  2555. "get": {
  2556. "produces": [
  2557. "application/json"
  2558. ],
  2559. "tags": [
  2560. "repository"
  2561. ],
  2562. "summary": "Get a list of all commits from a repository",
  2563. "operationId": "repoGetAllCommits",
  2564. "parameters": [
  2565. {
  2566. "type": "string",
  2567. "description": "owner of the repo",
  2568. "name": "owner",
  2569. "in": "path",
  2570. "required": true
  2571. },
  2572. {
  2573. "type": "string",
  2574. "description": "name of the repo",
  2575. "name": "repo",
  2576. "in": "path",
  2577. "required": true
  2578. },
  2579. {
  2580. "type": "string",
  2581. "description": "SHA or branch to start listing commits from (usually 'master')",
  2582. "name": "sha",
  2583. "in": "query"
  2584. },
  2585. {
  2586. "type": "integer",
  2587. "description": "page number of results to return (1-based)",
  2588. "name": "page",
  2589. "in": "query"
  2590. },
  2591. {
  2592. "type": "integer",
  2593. "description": "page size of results, maximum page size is 50",
  2594. "name": "limit",
  2595. "in": "query"
  2596. }
  2597. ],
  2598. "responses": {
  2599. "200": {
  2600. "$ref": "#/responses/CommitList"
  2601. },
  2602. "404": {
  2603. "$ref": "#/responses/notFound"
  2604. },
  2605. "409": {
  2606. "$ref": "#/responses/EmptyRepository"
  2607. }
  2608. }
  2609. }
  2610. },
  2611. "/repos/{owner}/{repo}/commits/{ref}/statuses": {
  2612. "get": {
  2613. "produces": [
  2614. "application/json"
  2615. ],
  2616. "tags": [
  2617. "repository"
  2618. ],
  2619. "summary": "Get a commit's combined status, by branch/tag/commit reference",
  2620. "operationId": "repoGetCombinedStatusByRef",
  2621. "parameters": [
  2622. {
  2623. "type": "string",
  2624. "description": "owner of the repo",
  2625. "name": "owner",
  2626. "in": "path",
  2627. "required": true
  2628. },
  2629. {
  2630. "type": "string",
  2631. "description": "name of the repo",
  2632. "name": "repo",
  2633. "in": "path",
  2634. "required": true
  2635. },
  2636. {
  2637. "type": "string",
  2638. "description": "name of branch/tag/commit",
  2639. "name": "ref",
  2640. "in": "path",
  2641. "required": true
  2642. },
  2643. {
  2644. "type": "integer",
  2645. "description": "page number of results",
  2646. "name": "page",
  2647. "in": "query"
  2648. }
  2649. ],
  2650. "responses": {
  2651. "200": {
  2652. "$ref": "#/responses/Status"
  2653. },
  2654. "400": {
  2655. "$ref": "#/responses/error"
  2656. }
  2657. }
  2658. }
  2659. },
  2660. "/repos/{owner}/{repo}/contents": {
  2661. "get": {
  2662. "produces": [
  2663. "application/json"
  2664. ],
  2665. "tags": [
  2666. "repository"
  2667. ],
  2668. "summary": "Gets the metadata of all the entries of the root dir",
  2669. "operationId": "repoGetContentsList",
  2670. "parameters": [
  2671. {
  2672. "type": "string",
  2673. "description": "owner of the repo",
  2674. "name": "owner",
  2675. "in": "path",
  2676. "required": true
  2677. },
  2678. {
  2679. "type": "string",
  2680. "description": "name of the repo",
  2681. "name": "repo",
  2682. "in": "path",
  2683. "required": true
  2684. },
  2685. {
  2686. "type": "string",
  2687. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  2688. "name": "ref",
  2689. "in": "query"
  2690. }
  2691. ],
  2692. "responses": {
  2693. "200": {
  2694. "$ref": "#/responses/ContentsListResponse"
  2695. },
  2696. "404": {
  2697. "$ref": "#/responses/notFound"
  2698. }
  2699. }
  2700. }
  2701. },
  2702. "/repos/{owner}/{repo}/contents/{filepath}": {
  2703. "get": {
  2704. "produces": [
  2705. "application/json"
  2706. ],
  2707. "tags": [
  2708. "repository"
  2709. ],
  2710. "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir",
  2711. "operationId": "repoGetContents",
  2712. "parameters": [
  2713. {
  2714. "type": "string",
  2715. "description": "owner of the repo",
  2716. "name": "owner",
  2717. "in": "path",
  2718. "required": true
  2719. },
  2720. {
  2721. "type": "string",
  2722. "description": "name of the repo",
  2723. "name": "repo",
  2724. "in": "path",
  2725. "required": true
  2726. },
  2727. {
  2728. "type": "string",
  2729. "description": "path of the dir, file, symlink or submodule in the repo",
  2730. "name": "filepath",
  2731. "in": "path",
  2732. "required": true
  2733. },
  2734. {
  2735. "type": "string",
  2736. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  2737. "name": "ref",
  2738. "in": "query"
  2739. }
  2740. ],
  2741. "responses": {
  2742. "200": {
  2743. "$ref": "#/responses/ContentsResponse"
  2744. },
  2745. "404": {
  2746. "$ref": "#/responses/notFound"
  2747. }
  2748. }
  2749. },
  2750. "put": {
  2751. "consumes": [
  2752. "application/json"
  2753. ],
  2754. "produces": [
  2755. "application/json"
  2756. ],
  2757. "tags": [
  2758. "repository"
  2759. ],
  2760. "summary": "Update a file in a repository",
  2761. "operationId": "repoUpdateFile",
  2762. "parameters": [
  2763. {
  2764. "type": "string",
  2765. "description": "owner of the repo",
  2766. "name": "owner",
  2767. "in": "path",
  2768. "required": true
  2769. },
  2770. {
  2771. "type": "string",
  2772. "description": "name of the repo",
  2773. "name": "repo",
  2774. "in": "path",
  2775. "required": true
  2776. },
  2777. {
  2778. "type": "string",
  2779. "description": "path of the file to update",
  2780. "name": "filepath",
  2781. "in": "path",
  2782. "required": true
  2783. },
  2784. {
  2785. "name": "body",
  2786. "in": "body",
  2787. "required": true,
  2788. "schema": {
  2789. "$ref": "#/definitions/UpdateFileOptions"
  2790. }
  2791. }
  2792. ],
  2793. "responses": {
  2794. "200": {
  2795. "$ref": "#/responses/FileResponse"
  2796. },
  2797. "403": {
  2798. "$ref": "#/responses/error"
  2799. },
  2800. "404": {
  2801. "$ref": "#/responses/notFound"
  2802. },
  2803. "422": {
  2804. "$ref": "#/responses/error"
  2805. }
  2806. }
  2807. },
  2808. "post": {
  2809. "consumes": [
  2810. "application/json"
  2811. ],
  2812. "produces": [
  2813. "application/json"
  2814. ],
  2815. "tags": [
  2816. "repository"
  2817. ],
  2818. "summary": "Create a file in a repository",
  2819. "operationId": "repoCreateFile",
  2820. "parameters": [
  2821. {
  2822. "type": "string",
  2823. "description": "owner of the repo",
  2824. "name": "owner",
  2825. "in": "path",
  2826. "required": true
  2827. },
  2828. {
  2829. "type": "string",
  2830. "description": "name of the repo",
  2831. "name": "repo",
  2832. "in": "path",
  2833. "required": true
  2834. },
  2835. {
  2836. "type": "string",
  2837. "description": "path of the file to create",
  2838. "name": "filepath",
  2839. "in": "path",
  2840. "required": true
  2841. },
  2842. {
  2843. "name": "body",
  2844. "in": "body",
  2845. "required": true,
  2846. "schema": {
  2847. "$ref": "#/definitions/CreateFileOptions"
  2848. }
  2849. }
  2850. ],
  2851. "responses": {
  2852. "201": {
  2853. "$ref": "#/responses/FileResponse"
  2854. },
  2855. "403": {
  2856. "$ref": "#/responses/error"
  2857. },
  2858. "404": {
  2859. "$ref": "#/responses/notFound"
  2860. },
  2861. "422": {
  2862. "$ref": "#/responses/error"
  2863. }
  2864. }
  2865. },
  2866. "delete": {
  2867. "consumes": [
  2868. "application/json"
  2869. ],
  2870. "produces": [
  2871. "application/json"
  2872. ],
  2873. "tags": [
  2874. "repository"
  2875. ],
  2876. "summary": "Delete a file in a repository",
  2877. "operationId": "repoDeleteFile",
  2878. "parameters": [
  2879. {
  2880. "type": "string",
  2881. "description": "owner of the repo",
  2882. "name": "owner",
  2883. "in": "path",
  2884. "required": true
  2885. },
  2886. {
  2887. "type": "string",
  2888. "description": "name of the repo",
  2889. "name": "repo",
  2890. "in": "path",
  2891. "required": true
  2892. },
  2893. {
  2894. "type": "string",
  2895. "description": "path of the file to delete",
  2896. "name": "filepath",
  2897. "in": "path",
  2898. "required": true
  2899. },
  2900. {
  2901. "name": "body",
  2902. "in": "body",
  2903. "required": true,
  2904. "schema": {
  2905. "$ref": "#/definitions/DeleteFileOptions"
  2906. }
  2907. }
  2908. ],
  2909. "responses": {
  2910. "200": {
  2911. "$ref": "#/responses/FileDeleteResponse"
  2912. },
  2913. "400": {
  2914. "$ref": "#/responses/error"
  2915. },
  2916. "403": {
  2917. "$ref": "#/responses/error"
  2918. },
  2919. "404": {
  2920. "$ref": "#/responses/error"
  2921. }
  2922. }
  2923. }
  2924. },
  2925. "/repos/{owner}/{repo}/editorconfig/{filepath}": {
  2926. "get": {
  2927. "produces": [
  2928. "application/json"
  2929. ],
  2930. "tags": [
  2931. "repository"
  2932. ],
  2933. "summary": "Get the EditorConfig definitions of a file in a repository",
  2934. "operationId": "repoGetEditorConfig",
  2935. "parameters": [
  2936. {
  2937. "type": "string",
  2938. "description": "owner of the repo",
  2939. "name": "owner",
  2940. "in": "path",
  2941. "required": true
  2942. },
  2943. {
  2944. "type": "string",
  2945. "description": "name of the repo",
  2946. "name": "repo",
  2947. "in": "path",
  2948. "required": true
  2949. },
  2950. {
  2951. "type": "string",
  2952. "description": "filepath of file to get",
  2953. "name": "filepath",
  2954. "in": "path",
  2955. "required": true
  2956. }
  2957. ],
  2958. "responses": {
  2959. "200": {
  2960. "description": "success"
  2961. },
  2962. "404": {
  2963. "$ref": "#/responses/notFound"
  2964. }
  2965. }
  2966. }
  2967. },
  2968. "/repos/{owner}/{repo}/forks": {
  2969. "get": {
  2970. "produces": [
  2971. "application/json"
  2972. ],
  2973. "tags": [
  2974. "repository"
  2975. ],
  2976. "summary": "List a repository's forks",
  2977. "operationId": "listForks",
  2978. "parameters": [
  2979. {
  2980. "type": "string",
  2981. "description": "owner of the repo",
  2982. "name": "owner",
  2983. "in": "path",
  2984. "required": true
  2985. },
  2986. {
  2987. "type": "string",
  2988. "description": "name of the repo",
  2989. "name": "repo",
  2990. "in": "path",
  2991. "required": true
  2992. },
  2993. {
  2994. "type": "integer",
  2995. "description": "page number of results to return (1-based)",
  2996. "name": "page",
  2997. "in": "query"
  2998. },
  2999. {
  3000. "type": "integer",
  3001. "description": "page size of results, maximum page size is 50",
  3002. "name": "limit",
  3003. "in": "query"
  3004. }
  3005. ],
  3006. "responses": {
  3007. "200": {
  3008. "$ref": "#/responses/RepositoryList"
  3009. }
  3010. }
  3011. },
  3012. "post": {
  3013. "produces": [
  3014. "application/json"
  3015. ],
  3016. "tags": [
  3017. "repository"
  3018. ],
  3019. "summary": "Fork a repository",
  3020. "operationId": "createFork",
  3021. "parameters": [
  3022. {
  3023. "type": "string",
  3024. "description": "owner of the repo to fork",
  3025. "name": "owner",
  3026. "in": "path",
  3027. "required": true
  3028. },
  3029. {
  3030. "type": "string",
  3031. "description": "name of the repo to fork",
  3032. "name": "repo",
  3033. "in": "path",
  3034. "required": true
  3035. },
  3036. {
  3037. "name": "body",
  3038. "in": "body",
  3039. "schema": {
  3040. "$ref": "#/definitions/CreateForkOption"
  3041. }
  3042. }
  3043. ],
  3044. "responses": {
  3045. "202": {
  3046. "$ref": "#/responses/Repository"
  3047. },
  3048. "403": {
  3049. "$ref": "#/responses/forbidden"
  3050. },
  3051. "422": {
  3052. "$ref": "#/responses/validationError"
  3053. }
  3054. }
  3055. }
  3056. },
  3057. "/repos/{owner}/{repo}/git/blobs/{sha}": {
  3058. "get": {
  3059. "produces": [
  3060. "application/json"
  3061. ],
  3062. "tags": [
  3063. "repository"
  3064. ],
  3065. "summary": "Gets the blob of a repository.",
  3066. "operationId": "GetBlob",
  3067. "parameters": [
  3068. {
  3069. "type": "string",
  3070. "description": "owner of the repo",
  3071. "name": "owner",
  3072. "in": "path",
  3073. "required": true
  3074. },
  3075. {
  3076. "type": "string",
  3077. "description": "name of the repo",
  3078. "name": "repo",
  3079. "in": "path",
  3080. "required": true
  3081. },
  3082. {
  3083. "type": "string",
  3084. "description": "sha of the commit",
  3085. "name": "sha",
  3086. "in": "path",
  3087. "required": true
  3088. }
  3089. ],
  3090. "responses": {
  3091. "200": {
  3092. "$ref": "#/responses/GitBlobResponse"
  3093. },
  3094. "400": {
  3095. "$ref": "#/responses/error"
  3096. }
  3097. }
  3098. }
  3099. },
  3100. "/repos/{owner}/{repo}/git/commits/{sha}": {
  3101. "get": {
  3102. "produces": [
  3103. "application/json"
  3104. ],
  3105. "tags": [
  3106. "repository"
  3107. ],
  3108. "summary": "Get a single commit from a repository",
  3109. "operationId": "repoGetSingleCommit",
  3110. "parameters": [
  3111. {
  3112. "type": "string",
  3113. "description": "owner of the repo",
  3114. "name": "owner",
  3115. "in": "path",
  3116. "required": true
  3117. },
  3118. {
  3119. "type": "string",
  3120. "description": "name of the repo",
  3121. "name": "repo",
  3122. "in": "path",
  3123. "required": true
  3124. },
  3125. {
  3126. "type": "string",
  3127. "description": "a git ref or commit sha",
  3128. "name": "sha",
  3129. "in": "path",
  3130. "required": true
  3131. }
  3132. ],
  3133. "responses": {
  3134. "200": {
  3135. "$ref": "#/responses/Commit"
  3136. },
  3137. "404": {
  3138. "$ref": "#/responses/notFound"
  3139. },
  3140. "422": {
  3141. "$ref": "#/responses/validationError"
  3142. }
  3143. }
  3144. }
  3145. },
  3146. "/repos/{owner}/{repo}/git/refs": {
  3147. "get": {
  3148. "produces": [
  3149. "application/json"
  3150. ],
  3151. "tags": [
  3152. "repository"
  3153. ],
  3154. "summary": "Get specified ref or filtered repository's refs",
  3155. "operationId": "repoListAllGitRefs",
  3156. "parameters": [
  3157. {
  3158. "type": "string",
  3159. "description": "owner of the repo",
  3160. "name": "owner",
  3161. "in": "path",
  3162. "required": true
  3163. },
  3164. {
  3165. "type": "string",
  3166. "description": "name of the repo",
  3167. "name": "repo",
  3168. "in": "path",
  3169. "required": true
  3170. }
  3171. ],
  3172. "responses": {
  3173. "200": {
  3174. "$ref": "#/responses/ReferenceList"
  3175. },
  3176. "404": {
  3177. "$ref": "#/responses/notFound"
  3178. }
  3179. }
  3180. }
  3181. },
  3182. "/repos/{owner}/{repo}/git/refs/{ref}": {
  3183. "get": {
  3184. "produces": [
  3185. "application/json"
  3186. ],
  3187. "tags": [
  3188. "repository"
  3189. ],
  3190. "summary": "Get specified ref or filtered repository's refs",
  3191. "operationId": "repoListGitRefs",
  3192. "parameters": [
  3193. {
  3194. "type": "string",
  3195. "description": "owner of the repo",
  3196. "name": "owner",
  3197. "in": "path",
  3198. "required": true
  3199. },
  3200. {
  3201. "type": "string",
  3202. "description": "name of the repo",
  3203. "name": "repo",
  3204. "in": "path",
  3205. "required": true
  3206. },
  3207. {
  3208. "type": "string",
  3209. "description": "part or full name of the ref",
  3210. "name": "ref",
  3211. "in": "path",
  3212. "required": true
  3213. }
  3214. ],
  3215. "responses": {
  3216. "200": {
  3217. "$ref": "#/responses/ReferenceList"
  3218. },
  3219. "404": {
  3220. "$ref": "#/responses/notFound"
  3221. }
  3222. }
  3223. }
  3224. },
  3225. "/repos/{owner}/{repo}/git/tags/{sha}": {
  3226. "get": {
  3227. "produces": [
  3228. "application/json"
  3229. ],
  3230. "tags": [
  3231. "repository"
  3232. ],
  3233. "summary": "Gets the tag object of an annotated tag (not lightweight tags)",
  3234. "operationId": "GetTag",
  3235. "parameters": [
  3236. {
  3237. "type": "string",
  3238. "description": "owner of the repo",
  3239. "name": "owner",
  3240. "in": "path",
  3241. "required": true
  3242. },
  3243. {
  3244. "type": "string",
  3245. "description": "name of the repo",
  3246. "name": "repo",
  3247. "in": "path",
  3248. "required": true
  3249. },
  3250. {
  3251. "type": "string",
  3252. "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.",
  3253. "name": "sha",
  3254. "in": "path",
  3255. "required": true
  3256. }
  3257. ],
  3258. "responses": {
  3259. "200": {
  3260. "$ref": "#/responses/AnnotatedTag"
  3261. },
  3262. "400": {
  3263. "$ref": "#/responses/error"
  3264. }
  3265. }
  3266. }
  3267. },
  3268. "/repos/{owner}/{repo}/git/trees/{sha}": {
  3269. "get": {
  3270. "produces": [
  3271. "application/json"
  3272. ],
  3273. "tags": [
  3274. "repository"
  3275. ],
  3276. "summary": "Gets the tree of a repository.",
  3277. "operationId": "GetTree",
  3278. "parameters": [
  3279. {
  3280. "type": "string",
  3281. "description": "owner of the repo",
  3282. "name": "owner",
  3283. "in": "path",
  3284. "required": true
  3285. },
  3286. {
  3287. "type": "string",
  3288. "description": "name of the repo",
  3289. "name": "repo",
  3290. "in": "path",
  3291. "required": true
  3292. },
  3293. {
  3294. "type": "string",
  3295. "description": "sha of the commit",
  3296. "name": "sha",
  3297. "in": "path",
  3298. "required": true
  3299. },
  3300. {
  3301. "type": "boolean",
  3302. "description": "show all directories and files",
  3303. "name": "recursive",
  3304. "in": "query"
  3305. },
  3306. {
  3307. "type": "integer",
  3308. "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",
  3309. "name": "page",
  3310. "in": "query"
  3311. },
  3312. {
  3313. "type": "integer",
  3314. "description": "number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE",
  3315. "name": "per_page",
  3316. "in": "query"
  3317. }
  3318. ],
  3319. "responses": {
  3320. "200": {
  3321. "$ref": "#/responses/GitTreeResponse"
  3322. },
  3323. "400": {
  3324. "$ref": "#/responses/error"
  3325. }
  3326. }
  3327. }
  3328. },
  3329. "/repos/{owner}/{repo}/hooks": {
  3330. "get": {
  3331. "produces": [
  3332. "application/json"
  3333. ],
  3334. "tags": [
  3335. "repository"
  3336. ],
  3337. "summary": "List the hooks in a repository",
  3338. "operationId": "repoListHooks",
  3339. "parameters": [
  3340. {
  3341. "type": "string",
  3342. "description": "owner of the repo",
  3343. "name": "owner",
  3344. "in": "path",
  3345. "required": true
  3346. },
  3347. {
  3348. "type": "string",
  3349. "description": "name of the repo",
  3350. "name": "repo",
  3351. "in": "path",
  3352. "required": true
  3353. },
  3354. {
  3355. "type": "integer",
  3356. "description": "page number of results to return (1-based)",
  3357. "name": "page",
  3358. "in": "query"
  3359. },
  3360. {
  3361. "type": "integer",
  3362. "description": "page size of results, maximum page size is 50",
  3363. "name": "limit",
  3364. "in": "query"
  3365. }
  3366. ],
  3367. "responses": {
  3368. "200": {
  3369. "$ref": "#/responses/HookList"
  3370. }
  3371. }
  3372. },
  3373. "post": {
  3374. "consumes": [
  3375. "application/json"
  3376. ],
  3377. "produces": [
  3378. "application/json"
  3379. ],
  3380. "tags": [
  3381. "repository"
  3382. ],
  3383. "summary": "Create a hook",
  3384. "operationId": "repoCreateHook",
  3385. "parameters": [
  3386. {
  3387. "type": "string",
  3388. "description": "owner of the repo",
  3389. "name": "owner",
  3390. "in": "path",
  3391. "required": true
  3392. },
  3393. {
  3394. "type": "string",
  3395. "description": "name of the repo",
  3396. "name": "repo",
  3397. "in": "path",
  3398. "required": true
  3399. },
  3400. {
  3401. "name": "body",
  3402. "in": "body",
  3403. "schema": {
  3404. "$ref": "#/definitions/CreateHookOption"
  3405. }
  3406. }
  3407. ],
  3408. "responses": {
  3409. "201": {
  3410. "$ref": "#/responses/Hook"
  3411. }
  3412. }
  3413. }
  3414. },
  3415. "/repos/{owner}/{repo}/hooks/git": {
  3416. "get": {
  3417. "produces": [
  3418. "application/json"
  3419. ],
  3420. "tags": [
  3421. "repository"
  3422. ],
  3423. "summary": "List the Git hooks in a repository",
  3424. "operationId": "repoListGitHooks",
  3425. "parameters": [
  3426. {
  3427. "type": "string",
  3428. "description": "owner of the repo",
  3429. "name": "owner",
  3430. "in": "path",
  3431. "required": true
  3432. },
  3433. {
  3434. "type": "string",
  3435. "description": "name of the repo",
  3436. "name": "repo",
  3437. "in": "path",
  3438. "required": true
  3439. }
  3440. ],
  3441. "responses": {
  3442. "200": {
  3443. "$ref": "#/responses/GitHookList"
  3444. }
  3445. }
  3446. }
  3447. },
  3448. "/repos/{owner}/{repo}/hooks/git/{id}": {
  3449. "get": {
  3450. "produces": [
  3451. "application/json"
  3452. ],
  3453. "tags": [
  3454. "repository"
  3455. ],
  3456. "summary": "Get a Git hook",
  3457. "operationId": "repoGetGitHook",
  3458. "parameters": [
  3459. {
  3460. "type": "string",
  3461. "description": "owner of the repo",
  3462. "name": "owner",
  3463. "in": "path",
  3464. "required": true
  3465. },
  3466. {
  3467. "type": "string",
  3468. "description": "name of the repo",
  3469. "name": "repo",
  3470. "in": "path",
  3471. "required": true
  3472. },
  3473. {
  3474. "type": "string",
  3475. "description": "id of the hook to get",
  3476. "name": "id",
  3477. "in": "path",
  3478. "required": true
  3479. }
  3480. ],
  3481. "responses": {
  3482. "200": {
  3483. "$ref": "#/responses/GitHook"
  3484. },
  3485. "404": {
  3486. "$ref": "#/responses/notFound"
  3487. }
  3488. }
  3489. },
  3490. "delete": {
  3491. "produces": [
  3492. "application/json"
  3493. ],
  3494. "tags": [
  3495. "repository"
  3496. ],
  3497. "summary": "Delete a Git hook in a repository",
  3498. "operationId": "repoDeleteGitHook",
  3499. "parameters": [
  3500. {
  3501. "type": "string",
  3502. "description": "owner of the repo",
  3503. "name": "owner",
  3504. "in": "path",
  3505. "required": true
  3506. },
  3507. {
  3508. "type": "string",
  3509. "description": "name of the repo",
  3510. "name": "repo",
  3511. "in": "path",
  3512. "required": true
  3513. },
  3514. {
  3515. "type": "string",
  3516. "description": "id of the hook to get",
  3517. "name": "id",
  3518. "in": "path",
  3519. "required": true
  3520. }
  3521. ],
  3522. "responses": {
  3523. "204": {
  3524. "$ref": "#/responses/empty"
  3525. },
  3526. "404": {
  3527. "$ref": "#/responses/notFound"
  3528. }
  3529. }
  3530. },
  3531. "patch": {
  3532. "produces": [
  3533. "application/json"
  3534. ],
  3535. "tags": [
  3536. "repository"
  3537. ],
  3538. "summary": "Edit a Git hook in a repository",
  3539. "operationId": "repoEditGitHook",
  3540. "parameters": [
  3541. {
  3542. "type": "string",
  3543. "description": "owner of the repo",
  3544. "name": "owner",
  3545. "in": "path",
  3546. "required": true
  3547. },
  3548. {
  3549. "type": "string",
  3550. "description": "name of the repo",
  3551. "name": "repo",
  3552. "in": "path",
  3553. "required": true
  3554. },
  3555. {
  3556. "type": "string",
  3557. "description": "id of the hook to get",
  3558. "name": "id",
  3559. "in": "path",
  3560. "required": true
  3561. },
  3562. {
  3563. "name": "body",
  3564. "in": "body",
  3565. "schema": {
  3566. "$ref": "#/definitions/EditGitHookOption"
  3567. }
  3568. }
  3569. ],
  3570. "responses": {
  3571. "200": {
  3572. "$ref": "#/responses/GitHook"
  3573. },
  3574. "404": {
  3575. "$ref": "#/responses/notFound"
  3576. }
  3577. }
  3578. }
  3579. },
  3580. "/repos/{owner}/{repo}/hooks/{id}": {
  3581. "get": {
  3582. "produces": [
  3583. "application/json"
  3584. ],
  3585. "tags": [
  3586. "repository"
  3587. ],
  3588. "summary": "Get a hook",
  3589. "operationId": "repoGetHook",
  3590. "parameters": [
  3591. {
  3592. "type": "string",
  3593. "description": "owner of the repo",
  3594. "name": "owner",
  3595. "in": "path",
  3596. "required": true
  3597. },
  3598. {
  3599. "type": "string",
  3600. "description": "name of the repo",
  3601. "name": "repo",
  3602. "in": "path",
  3603. "required": true
  3604. },
  3605. {
  3606. "type": "integer",
  3607. "format": "int64",
  3608. "description": "id of the hook to get",
  3609. "name": "id",
  3610. "in": "path",
  3611. "required": true
  3612. }
  3613. ],
  3614. "responses": {
  3615. "200": {
  3616. "$ref": "#/responses/Hook"
  3617. },
  3618. "404": {
  3619. "$ref": "#/responses/notFound"
  3620. }
  3621. }
  3622. },
  3623. "delete": {
  3624. "produces": [
  3625. "application/json"
  3626. ],
  3627. "tags": [
  3628. "repository"
  3629. ],
  3630. "summary": "Delete a hook in a repository",
  3631. "operationId": "repoDeleteHook",
  3632. "parameters": [
  3633. {
  3634. "type": "string",
  3635. "description": "owner of the repo",
  3636. "name": "owner",
  3637. "in": "path",
  3638. "required": true
  3639. },
  3640. {
  3641. "type": "string",
  3642. "description": "name of the repo",
  3643. "name": "repo",
  3644. "in": "path",
  3645. "required": true
  3646. },
  3647. {
  3648. "type": "integer",
  3649. "format": "int64",
  3650. "description": "id of the hook to delete",
  3651. "name": "id",
  3652. "in": "path",
  3653. "required": true
  3654. }
  3655. ],
  3656. "responses": {
  3657. "204": {
  3658. "$ref": "#/responses/empty"
  3659. },
  3660. "404": {
  3661. "$ref": "#/responses/notFound"
  3662. }
  3663. }
  3664. },
  3665. "patch": {
  3666. "produces": [
  3667. "application/json"
  3668. ],
  3669. "tags": [
  3670. "repository"
  3671. ],
  3672. "summary": "Edit a hook in a repository",
  3673. "operationId": "repoEditHook",
  3674. "parameters": [
  3675. {
  3676. "type": "string",
  3677. "description": "owner of the repo",
  3678. "name": "owner",
  3679. "in": "path",
  3680. "required": true
  3681. },
  3682. {
  3683. "type": "string",
  3684. "description": "name of the repo",
  3685. "name": "repo",
  3686. "in": "path",
  3687. "required": true
  3688. },
  3689. {
  3690. "type": "integer",
  3691. "format": "int64",
  3692. "description": "index of the hook",
  3693. "name": "id",
  3694. "in": "path",
  3695. "required": true
  3696. },
  3697. {
  3698. "name": "body",
  3699. "in": "body",
  3700. "schema": {
  3701. "$ref": "#/definitions/EditHookOption"
  3702. }
  3703. }
  3704. ],
  3705. "responses": {
  3706. "200": {
  3707. "$ref": "#/responses/Hook"
  3708. }
  3709. }
  3710. }
  3711. },
  3712. "/repos/{owner}/{repo}/hooks/{id}/tests": {
  3713. "post": {
  3714. "produces": [
  3715. "application/json"
  3716. ],
  3717. "tags": [
  3718. "repository"
  3719. ],
  3720. "summary": "Test a push webhook",
  3721. "operationId": "repoTestHook",
  3722. "parameters": [
  3723. {
  3724. "type": "string",
  3725. "description": "owner of the repo",
  3726. "name": "owner",
  3727. "in": "path",
  3728. "required": true
  3729. },
  3730. {
  3731. "type": "string",
  3732. "description": "name of the repo",
  3733. "name": "repo",
  3734. "in": "path",
  3735. "required": true
  3736. },
  3737. {
  3738. "type": "integer",
  3739. "format": "int64",
  3740. "description": "id of the hook to test",
  3741. "name": "id",
  3742. "in": "path",
  3743. "required": true
  3744. }
  3745. ],
  3746. "responses": {
  3747. "204": {
  3748. "$ref": "#/responses/empty"
  3749. }
  3750. }
  3751. }
  3752. },
  3753. "/repos/{owner}/{repo}/issues": {
  3754. "get": {
  3755. "produces": [
  3756. "application/json"
  3757. ],
  3758. "tags": [
  3759. "issue"
  3760. ],
  3761. "summary": "List a repository's issues",
  3762. "operationId": "issueListIssues",
  3763. "parameters": [
  3764. {
  3765. "type": "string",
  3766. "description": "owner of the repo",
  3767. "name": "owner",
  3768. "in": "path",
  3769. "required": true
  3770. },
  3771. {
  3772. "type": "string",
  3773. "description": "name of the repo",
  3774. "name": "repo",
  3775. "in": "path",
  3776. "required": true
  3777. },
  3778. {
  3779. "type": "string",
  3780. "description": "whether issue is open or closed",
  3781. "name": "state",
  3782. "in": "query"
  3783. },
  3784. {
  3785. "type": "string",
  3786. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  3787. "name": "labels",
  3788. "in": "query"
  3789. },
  3790. {
  3791. "type": "string",
  3792. "description": "search string",
  3793. "name": "q",
  3794. "in": "query"
  3795. },
  3796. {
  3797. "type": "string",
  3798. "description": "filter by type (issues / pulls) if set",
  3799. "name": "type",
  3800. "in": "query"
  3801. },
  3802. {
  3803. "type": "string",
  3804. "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",
  3805. "name": "milestones",
  3806. "in": "query"
  3807. },
  3808. {
  3809. "type": "integer",
  3810. "description": "page number of results to return (1-based)",
  3811. "name": "page",
  3812. "in": "query"
  3813. },
  3814. {
  3815. "type": "integer",
  3816. "description": "page size of results, maximum page size is 50",
  3817. "name": "limit",
  3818. "in": "query"
  3819. }
  3820. ],
  3821. "responses": {
  3822. "200": {
  3823. "$ref": "#/responses/IssueList"
  3824. }
  3825. }
  3826. },
  3827. "post": {
  3828. "consumes": [
  3829. "application/json"
  3830. ],
  3831. "produces": [
  3832. "application/json"
  3833. ],
  3834. "tags": [
  3835. "issue"
  3836. ],
  3837. "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  3838. "operationId": "issueCreateIssue",
  3839. "parameters": [
  3840. {
  3841. "type": "string",
  3842. "description": "owner of the repo",
  3843. "name": "owner",
  3844. "in": "path",
  3845. "required": true
  3846. },
  3847. {
  3848. "type": "string",
  3849. "description": "name of the repo",
  3850. "name": "repo",
  3851. "in": "path",
  3852. "required": true
  3853. },
  3854. {
  3855. "name": "body",
  3856. "in": "body",
  3857. "schema": {
  3858. "$ref": "#/definitions/CreateIssueOption"
  3859. }
  3860. }
  3861. ],
  3862. "responses": {
  3863. "201": {
  3864. "$ref": "#/responses/Issue"
  3865. },
  3866. "403": {
  3867. "$ref": "#/responses/forbidden"
  3868. },
  3869. "412": {
  3870. "$ref": "#/responses/error"
  3871. },
  3872. "422": {
  3873. "$ref": "#/responses/validationError"
  3874. }
  3875. }
  3876. }
  3877. },
  3878. "/repos/{owner}/{repo}/issues/comments": {
  3879. "get": {
  3880. "produces": [
  3881. "application/json"
  3882. ],
  3883. "tags": [
  3884. "issue"
  3885. ],
  3886. "summary": "List all comments in a repository",
  3887. "operationId": "issueGetRepoComments",
  3888. "parameters": [
  3889. {
  3890. "type": "string",
  3891. "description": "owner of the repo",
  3892. "name": "owner",
  3893. "in": "path",
  3894. "required": true
  3895. },
  3896. {
  3897. "type": "string",
  3898. "description": "name of the repo",
  3899. "name": "repo",
  3900. "in": "path",
  3901. "required": true
  3902. },
  3903. {
  3904. "type": "string",
  3905. "format": "date-time",
  3906. "description": "if provided, only comments updated since the provided time are returned.",
  3907. "name": "since",
  3908. "in": "query"
  3909. },
  3910. {
  3911. "type": "string",
  3912. "format": "date-time",
  3913. "description": "if provided, only comments updated before the provided time are returned.",
  3914. "name": "before",
  3915. "in": "query"
  3916. },
  3917. {
  3918. "type": "integer",
  3919. "description": "page number of results to return (1-based)",
  3920. "name": "page",
  3921. "in": "query"
  3922. },
  3923. {
  3924. "type": "integer",
  3925. "description": "page size of results, maximum page size is 50",
  3926. "name": "limit",
  3927. "in": "query"
  3928. }
  3929. ],
  3930. "responses": {
  3931. "200": {
  3932. "$ref": "#/responses/CommentList"
  3933. }
  3934. }
  3935. }
  3936. },
  3937. "/repos/{owner}/{repo}/issues/comments/{id}": {
  3938. "get": {
  3939. "consumes": [
  3940. "application/json"
  3941. ],
  3942. "produces": [
  3943. "application/json"
  3944. ],
  3945. "tags": [
  3946. "issue"
  3947. ],
  3948. "summary": "Get a comment",
  3949. "operationId": "issueGetComment",
  3950. "parameters": [
  3951. {
  3952. "type": "string",
  3953. "description": "owner of the repo",
  3954. "name": "owner",
  3955. "in": "path",
  3956. "required": true
  3957. },
  3958. {
  3959. "type": "string",
  3960. "description": "name of the repo",
  3961. "name": "repo",
  3962. "in": "path",
  3963. "required": true
  3964. },
  3965. {
  3966. "type": "integer",
  3967. "format": "int64",
  3968. "description": "id of the comment",
  3969. "name": "id",
  3970. "in": "path",
  3971. "required": true
  3972. }
  3973. ],
  3974. "responses": {
  3975. "200": {
  3976. "$ref": "#/responses/Comment"
  3977. },
  3978. "204": {
  3979. "$ref": "#/responses/empty"
  3980. },
  3981. "403": {
  3982. "$ref": "#/responses/forbidden"
  3983. },
  3984. "404": {
  3985. "$ref": "#/responses/notFound"
  3986. }
  3987. }
  3988. },
  3989. "delete": {
  3990. "tags": [
  3991. "issue"
  3992. ],
  3993. "summary": "Delete a comment",
  3994. "operationId": "issueDeleteComment",
  3995. "parameters": [
  3996. {
  3997. "type": "string",
  3998. "description": "owner of the repo",
  3999. "name": "owner",
  4000. "in": "path",
  4001. "required": true
  4002. },
  4003. {
  4004. "type": "string",
  4005. "description": "name of the repo",
  4006. "name": "repo",
  4007. "in": "path",
  4008. "required": true
  4009. },
  4010. {
  4011. "type": "integer",
  4012. "format": "int64",
  4013. "description": "id of comment to delete",
  4014. "name": "id",
  4015. "in": "path",
  4016. "required": true
  4017. }
  4018. ],
  4019. "responses": {
  4020. "204": {
  4021. "$ref": "#/responses/empty"
  4022. },
  4023. "403": {
  4024. "$ref": "#/responses/forbidden"
  4025. },
  4026. "404": {
  4027. "$ref": "#/responses/notFound"
  4028. }
  4029. }
  4030. },
  4031. "patch": {
  4032. "consumes": [
  4033. "application/json"
  4034. ],
  4035. "produces": [
  4036. "application/json"
  4037. ],
  4038. "tags": [
  4039. "issue"
  4040. ],
  4041. "summary": "Edit a comment",
  4042. "operationId": "issueEditComment",
  4043. "parameters": [
  4044. {
  4045. "type": "string",
  4046. "description": "owner of the repo",
  4047. "name": "owner",
  4048. "in": "path",
  4049. "required": true
  4050. },
  4051. {
  4052. "type": "string",
  4053. "description": "name of the repo",
  4054. "name": "repo",
  4055. "in": "path",
  4056. "required": true
  4057. },
  4058. {
  4059. "type": "integer",
  4060. "format": "int64",
  4061. "description": "id of the comment to edit",
  4062. "name": "id",
  4063. "in": "path",
  4064. "required": true
  4065. },
  4066. {
  4067. "name": "body",
  4068. "in": "body",
  4069. "schema": {
  4070. "$ref": "#/definitions/EditIssueCommentOption"
  4071. }
  4072. }
  4073. ],
  4074. "responses": {
  4075. "200": {
  4076. "$ref": "#/responses/Comment"
  4077. },
  4078. "204": {
  4079. "$ref": "#/responses/empty"
  4080. },
  4081. "403": {
  4082. "$ref": "#/responses/forbidden"
  4083. },
  4084. "404": {
  4085. "$ref": "#/responses/notFound"
  4086. }
  4087. }
  4088. }
  4089. },
  4090. "/repos/{owner}/{repo}/issues/comments/{id}/reactions": {
  4091. "get": {
  4092. "consumes": [
  4093. "application/json"
  4094. ],
  4095. "produces": [
  4096. "application/json"
  4097. ],
  4098. "tags": [
  4099. "issue"
  4100. ],
  4101. "summary": "Get a list of reactions from a comment of an issue",
  4102. "operationId": "issueGetCommentReactions",
  4103. "parameters": [
  4104. {
  4105. "type": "string",
  4106. "description": "owner of the repo",
  4107. "name": "owner",
  4108. "in": "path",
  4109. "required": true
  4110. },
  4111. {
  4112. "type": "string",
  4113. "description": "name of the repo",
  4114. "name": "repo",
  4115. "in": "path",
  4116. "required": true
  4117. },
  4118. {
  4119. "type": "integer",
  4120. "format": "int64",
  4121. "description": "id of the comment to edit",
  4122. "name": "id",
  4123. "in": "path",
  4124. "required": true
  4125. }
  4126. ],
  4127. "responses": {
  4128. "200": {
  4129. "$ref": "#/responses/ReactionList"
  4130. },
  4131. "403": {
  4132. "$ref": "#/responses/forbidden"
  4133. }
  4134. }
  4135. },
  4136. "post": {
  4137. "consumes": [
  4138. "application/json"
  4139. ],
  4140. "produces": [
  4141. "application/json"
  4142. ],
  4143. "tags": [
  4144. "issue"
  4145. ],
  4146. "summary": "Add a reaction to a comment of an issue",
  4147. "operationId": "issuePostCommentReaction",
  4148. "parameters": [
  4149. {
  4150. "type": "string",
  4151. "description": "owner of the repo",
  4152. "name": "owner",
  4153. "in": "path",
  4154. "required": true
  4155. },
  4156. {
  4157. "type": "string",
  4158. "description": "name of the repo",
  4159. "name": "repo",
  4160. "in": "path",
  4161. "required": true
  4162. },
  4163. {
  4164. "type": "integer",
  4165. "format": "int64",
  4166. "description": "id of the comment to edit",
  4167. "name": "id",
  4168. "in": "path",
  4169. "required": true
  4170. },
  4171. {
  4172. "name": "content",
  4173. "in": "body",
  4174. "schema": {
  4175. "$ref": "#/definitions/EditReactionOption"
  4176. }
  4177. }
  4178. ],
  4179. "responses": {
  4180. "200": {
  4181. "$ref": "#/responses/Reaction"
  4182. },
  4183. "201": {
  4184. "$ref": "#/responses/Reaction"
  4185. },
  4186. "403": {
  4187. "$ref": "#/responses/forbidden"
  4188. }
  4189. }
  4190. },
  4191. "delete": {
  4192. "consumes": [
  4193. "application/json"
  4194. ],
  4195. "produces": [
  4196. "application/json"
  4197. ],
  4198. "tags": [
  4199. "issue"
  4200. ],
  4201. "summary": "Remove a reaction from a comment of an issue",
  4202. "operationId": "issueDeleteCommentReaction",
  4203. "parameters": [
  4204. {
  4205. "type": "string",
  4206. "description": "owner of the repo",
  4207. "name": "owner",
  4208. "in": "path",
  4209. "required": true
  4210. },
  4211. {
  4212. "type": "string",
  4213. "description": "name of the repo",
  4214. "name": "repo",
  4215. "in": "path",
  4216. "required": true
  4217. },
  4218. {
  4219. "type": "integer",
  4220. "format": "int64",
  4221. "description": "id of the comment to edit",
  4222. "name": "id",
  4223. "in": "path",
  4224. "required": true
  4225. },
  4226. {
  4227. "name": "content",
  4228. "in": "body",
  4229. "schema": {
  4230. "$ref": "#/definitions/EditReactionOption"
  4231. }
  4232. }
  4233. ],
  4234. "responses": {
  4235. "200": {
  4236. "$ref": "#/responses/empty"
  4237. },
  4238. "403": {
  4239. "$ref": "#/responses/forbidden"
  4240. }
  4241. }
  4242. }
  4243. },
  4244. "/repos/{owner}/{repo}/issues/{index}": {
  4245. "get": {
  4246. "produces": [
  4247. "application/json"
  4248. ],
  4249. "tags": [
  4250. "issue"
  4251. ],
  4252. "summary": "Get an issue",
  4253. "operationId": "issueGetIssue",
  4254. "parameters": [
  4255. {
  4256. "type": "string",
  4257. "description": "owner of the repo",
  4258. "name": "owner",
  4259. "in": "path",
  4260. "required": true
  4261. },
  4262. {
  4263. "type": "string",
  4264. "description": "name of the repo",
  4265. "name": "repo",
  4266. "in": "path",
  4267. "required": true
  4268. },
  4269. {
  4270. "type": "integer",
  4271. "format": "int64",
  4272. "description": "index of the issue to get",
  4273. "name": "index",
  4274. "in": "path",
  4275. "required": true
  4276. }
  4277. ],
  4278. "responses": {
  4279. "200": {
  4280. "$ref": "#/responses/Issue"
  4281. },
  4282. "404": {
  4283. "$ref": "#/responses/notFound"
  4284. }
  4285. }
  4286. },
  4287. "patch": {
  4288. "consumes": [
  4289. "application/json"
  4290. ],
  4291. "produces": [
  4292. "application/json"
  4293. ],
  4294. "tags": [
  4295. "issue"
  4296. ],
  4297. "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  4298. "operationId": "issueEditIssue",
  4299. "parameters": [
  4300. {
  4301. "type": "string",
  4302. "description": "owner of the repo",
  4303. "name": "owner",
  4304. "in": "path",
  4305. "required": true
  4306. },
  4307. {
  4308. "type": "string",
  4309. "description": "name of the repo",
  4310. "name": "repo",
  4311. "in": "path",
  4312. "required": true
  4313. },
  4314. {
  4315. "type": "integer",
  4316. "format": "int64",
  4317. "description": "index of the issue to edit",
  4318. "name": "index",
  4319. "in": "path",
  4320. "required": true
  4321. },
  4322. {
  4323. "name": "body",
  4324. "in": "body",
  4325. "schema": {
  4326. "$ref": "#/definitions/EditIssueOption"
  4327. }
  4328. }
  4329. ],
  4330. "responses": {
  4331. "201": {
  4332. "$ref": "#/responses/Issue"
  4333. },
  4334. "403": {
  4335. "$ref": "#/responses/forbidden"
  4336. },
  4337. "404": {
  4338. "$ref": "#/responses/notFound"
  4339. },
  4340. "412": {
  4341. "$ref": "#/responses/error"
  4342. }
  4343. }
  4344. }
  4345. },
  4346. "/repos/{owner}/{repo}/issues/{index}/comments": {
  4347. "get": {
  4348. "produces": [
  4349. "application/json"
  4350. ],
  4351. "tags": [
  4352. "issue"
  4353. ],
  4354. "summary": "List all comments on an issue",
  4355. "operationId": "issueGetComments",
  4356. "parameters": [
  4357. {
  4358. "type": "string",
  4359. "description": "owner of the repo",
  4360. "name": "owner",
  4361. "in": "path",
  4362. "required": true
  4363. },
  4364. {
  4365. "type": "string",
  4366. "description": "name of the repo",
  4367. "name": "repo",
  4368. "in": "path",
  4369. "required": true
  4370. },
  4371. {
  4372. "type": "integer",
  4373. "format": "int64",
  4374. "description": "index of the issue",
  4375. "name": "index",
  4376. "in": "path",
  4377. "required": true
  4378. },
  4379. {
  4380. "type": "string",
  4381. "format": "date-time",
  4382. "description": "if provided, only comments updated since the specified time are returned.",
  4383. "name": "since",
  4384. "in": "query"
  4385. },
  4386. {
  4387. "type": "string",
  4388. "format": "date-time",
  4389. "description": "if provided, only comments updated before the provided time are returned.",
  4390. "name": "before",
  4391. "in": "query"
  4392. }
  4393. ],
  4394. "responses": {
  4395. "200": {
  4396. "$ref": "#/responses/CommentList"
  4397. }
  4398. }
  4399. },
  4400. "post": {
  4401. "consumes": [
  4402. "application/json"
  4403. ],
  4404. "produces": [
  4405. "application/json"
  4406. ],
  4407. "tags": [
  4408. "issue"
  4409. ],
  4410. "summary": "Add a comment to an issue",
  4411. "operationId": "issueCreateComment",
  4412. "parameters": [
  4413. {
  4414. "type": "string",
  4415. "description": "owner of the repo",
  4416. "name": "owner",
  4417. "in": "path",
  4418. "required": true
  4419. },
  4420. {
  4421. "type": "string",
  4422. "description": "name of the repo",
  4423. "name": "repo",
  4424. "in": "path",
  4425. "required": true
  4426. },
  4427. {
  4428. "type": "integer",
  4429. "format": "int64",
  4430. "description": "index of the issue",
  4431. "name": "index",
  4432. "in": "path",
  4433. "required": true
  4434. },
  4435. {
  4436. "name": "body",
  4437. "in": "body",
  4438. "schema": {
  4439. "$ref": "#/definitions/CreateIssueCommentOption"
  4440. }
  4441. }
  4442. ],
  4443. "responses": {
  4444. "201": {
  4445. "$ref": "#/responses/Comment"
  4446. },
  4447. "403": {
  4448. "$ref": "#/responses/forbidden"
  4449. }
  4450. }
  4451. }
  4452. },
  4453. "/repos/{owner}/{repo}/issues/{index}/comments/{id}": {
  4454. "delete": {
  4455. "tags": [
  4456. "issue"
  4457. ],
  4458. "summary": "Delete a comment",
  4459. "operationId": "issueDeleteCommentDeprecated",
  4460. "deprecated": true,
  4461. "parameters": [
  4462. {
  4463. "type": "string",
  4464. "description": "owner of the repo",
  4465. "name": "owner",
  4466. "in": "path",
  4467. "required": true
  4468. },
  4469. {
  4470. "type": "string",
  4471. "description": "name of the repo",
  4472. "name": "repo",
  4473. "in": "path",
  4474. "required": true
  4475. },
  4476. {
  4477. "type": "integer",
  4478. "description": "this parameter is ignored",
  4479. "name": "index",
  4480. "in": "path",
  4481. "required": true
  4482. },
  4483. {
  4484. "type": "integer",
  4485. "format": "int64",
  4486. "description": "id of comment to delete",
  4487. "name": "id",
  4488. "in": "path",
  4489. "required": true
  4490. }
  4491. ],
  4492. "responses": {
  4493. "204": {
  4494. "$ref": "#/responses/empty"
  4495. },
  4496. "403": {
  4497. "$ref": "#/responses/forbidden"
  4498. },
  4499. "404": {
  4500. "$ref": "#/responses/notFound"
  4501. }
  4502. }
  4503. },
  4504. "patch": {
  4505. "consumes": [
  4506. "application/json"
  4507. ],
  4508. "produces": [
  4509. "application/json"
  4510. ],
  4511. "tags": [
  4512. "issue"
  4513. ],
  4514. "summary": "Edit a comment",
  4515. "operationId": "issueEditCommentDeprecated",
  4516. "deprecated": true,
  4517. "parameters": [
  4518. {
  4519. "type": "string",
  4520. "description": "owner of the repo",
  4521. "name": "owner",
  4522. "in": "path",
  4523. "required": true
  4524. },
  4525. {
  4526. "type": "string",
  4527. "description": "name of the repo",
  4528. "name": "repo",
  4529. "in": "path",
  4530. "required": true
  4531. },
  4532. {
  4533. "type": "integer",
  4534. "description": "this parameter is ignored",
  4535. "name": "index",
  4536. "in": "path",
  4537. "required": true
  4538. },
  4539. {
  4540. "type": "integer",
  4541. "format": "int64",
  4542. "description": "id of the comment to edit",
  4543. "name": "id",
  4544. "in": "path",
  4545. "required": true
  4546. },
  4547. {
  4548. "name": "body",
  4549. "in": "body",
  4550. "schema": {
  4551. "$ref": "#/definitions/EditIssueCommentOption"
  4552. }
  4553. }
  4554. ],
  4555. "responses": {
  4556. "200": {
  4557. "$ref": "#/responses/Comment"
  4558. },
  4559. "204": {
  4560. "$ref": "#/responses/empty"
  4561. },
  4562. "403": {
  4563. "$ref": "#/responses/forbidden"
  4564. },
  4565. "404": {
  4566. "$ref": "#/responses/notFound"
  4567. }
  4568. }
  4569. }
  4570. },
  4571. "/repos/{owner}/{repo}/issues/{index}/deadline": {
  4572. "post": {
  4573. "consumes": [
  4574. "application/json"
  4575. ],
  4576. "produces": [
  4577. "application/json"
  4578. ],
  4579. "tags": [
  4580. "issue"
  4581. ],
  4582. "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.",
  4583. "operationId": "issueEditIssueDeadline",
  4584. "parameters": [
  4585. {
  4586. "type": "string",
  4587. "description": "owner of the repo",
  4588. "name": "owner",
  4589. "in": "path",
  4590. "required": true
  4591. },
  4592. {
  4593. "type": "string",
  4594. "description": "name of the repo",
  4595. "name": "repo",
  4596. "in": "path",
  4597. "required": true
  4598. },
  4599. {
  4600. "type": "integer",
  4601. "format": "int64",
  4602. "description": "index of the issue to create or update a deadline on",
  4603. "name": "index",
  4604. "in": "path",
  4605. "required": true
  4606. },
  4607. {
  4608. "name": "body",
  4609. "in": "body",
  4610. "schema": {
  4611. "$ref": "#/definitions/EditDeadlineOption"
  4612. }
  4613. }
  4614. ],
  4615. "responses": {
  4616. "201": {
  4617. "$ref": "#/responses/IssueDeadline"
  4618. },
  4619. "403": {
  4620. "$ref": "#/responses/forbidden"
  4621. },
  4622. "404": {
  4623. "$ref": "#/responses/notFound"
  4624. }
  4625. }
  4626. }
  4627. },
  4628. "/repos/{owner}/{repo}/issues/{index}/labels": {
  4629. "get": {
  4630. "produces": [
  4631. "application/json"
  4632. ],
  4633. "tags": [
  4634. "issue"
  4635. ],
  4636. "summary": "Get an issue's labels",
  4637. "operationId": "issueGetLabels",
  4638. "parameters": [
  4639. {
  4640. "type": "string",
  4641. "description": "owner of the repo",
  4642. "name": "owner",
  4643. "in": "path",
  4644. "required": true
  4645. },
  4646. {
  4647. "type": "string",
  4648. "description": "name of the repo",
  4649. "name": "repo",
  4650. "in": "path",
  4651. "required": true
  4652. },
  4653. {
  4654. "type": "integer",
  4655. "format": "int64",
  4656. "description": "index of the issue",
  4657. "name": "index",
  4658. "in": "path",
  4659. "required": true
  4660. }
  4661. ],
  4662. "responses": {
  4663. "200": {
  4664. "$ref": "#/responses/LabelList"
  4665. },
  4666. "404": {
  4667. "$ref": "#/responses/notFound"
  4668. }
  4669. }
  4670. },
  4671. "put": {
  4672. "consumes": [
  4673. "application/json"
  4674. ],
  4675. "produces": [
  4676. "application/json"
  4677. ],
  4678. "tags": [
  4679. "issue"
  4680. ],
  4681. "summary": "Replace an issue's labels",
  4682. "operationId": "issueReplaceLabels",
  4683. "parameters": [
  4684. {
  4685. "type": "string",
  4686. "description": "owner of the repo",
  4687. "name": "owner",
  4688. "in": "path",
  4689. "required": true
  4690. },
  4691. {
  4692. "type": "string",
  4693. "description": "name of the repo",
  4694. "name": "repo",
  4695. "in": "path",
  4696. "required": true
  4697. },
  4698. {
  4699. "type": "integer",
  4700. "format": "int64",
  4701. "description": "index of the issue",
  4702. "name": "index",
  4703. "in": "path",
  4704. "required": true
  4705. },
  4706. {
  4707. "name": "body",
  4708. "in": "body",
  4709. "schema": {
  4710. "$ref": "#/definitions/IssueLabelsOption"
  4711. }
  4712. }
  4713. ],
  4714. "responses": {
  4715. "200": {
  4716. "$ref": "#/responses/LabelList"
  4717. },
  4718. "403": {
  4719. "$ref": "#/responses/forbidden"
  4720. }
  4721. }
  4722. },
  4723. "post": {
  4724. "consumes": [
  4725. "application/json"
  4726. ],
  4727. "produces": [
  4728. "application/json"
  4729. ],
  4730. "tags": [
  4731. "issue"
  4732. ],
  4733. "summary": "Add a label to an issue",
  4734. "operationId": "issueAddLabel",
  4735. "parameters": [
  4736. {
  4737. "type": "string",
  4738. "description": "owner of the repo",
  4739. "name": "owner",
  4740. "in": "path",
  4741. "required": true
  4742. },
  4743. {
  4744. "type": "string",
  4745. "description": "name of the repo",
  4746. "name": "repo",
  4747. "in": "path",
  4748. "required": true
  4749. },
  4750. {
  4751. "type": "integer",
  4752. "format": "int64",
  4753. "description": "index of the issue",
  4754. "name": "index",
  4755. "in": "path",
  4756. "required": true
  4757. },
  4758. {
  4759. "name": "body",
  4760. "in": "body",
  4761. "schema": {
  4762. "$ref": "#/definitions/IssueLabelsOption"
  4763. }
  4764. }
  4765. ],
  4766. "responses": {
  4767. "200": {
  4768. "$ref": "#/responses/LabelList"
  4769. },
  4770. "403": {
  4771. "$ref": "#/responses/forbidden"
  4772. }
  4773. }
  4774. },
  4775. "delete": {
  4776. "produces": [
  4777. "application/json"
  4778. ],
  4779. "tags": [
  4780. "issue"
  4781. ],
  4782. "summary": "Remove all labels from an issue",
  4783. "operationId": "issueClearLabels",
  4784. "parameters": [
  4785. {
  4786. "type": "string",
  4787. "description": "owner of the repo",
  4788. "name": "owner",
  4789. "in": "path",
  4790. "required": true
  4791. },
  4792. {
  4793. "type": "string",
  4794. "description": "name of the repo",
  4795. "name": "repo",
  4796. "in": "path",
  4797. "required": true
  4798. },
  4799. {
  4800. "type": "integer",
  4801. "format": "int64",
  4802. "description": "index of the issue",
  4803. "name": "index",
  4804. "in": "path",
  4805. "required": true
  4806. }
  4807. ],
  4808. "responses": {
  4809. "204": {
  4810. "$ref": "#/responses/empty"
  4811. },
  4812. "403": {
  4813. "$ref": "#/responses/forbidden"
  4814. }
  4815. }
  4816. }
  4817. },
  4818. "/repos/{owner}/{repo}/issues/{index}/labels/{id}": {
  4819. "delete": {
  4820. "produces": [
  4821. "application/json"
  4822. ],
  4823. "tags": [
  4824. "issue"
  4825. ],
  4826. "summary": "Remove a label from an issue",
  4827. "operationId": "issueRemoveLabel",
  4828. "parameters": [
  4829. {
  4830. "type": "string",
  4831. "description": "owner of the repo",
  4832. "name": "owner",
  4833. "in": "path",
  4834. "required": true
  4835. },
  4836. {
  4837. "type": "string",
  4838. "description": "name of the repo",
  4839. "name": "repo",
  4840. "in": "path",
  4841. "required": true
  4842. },
  4843. {
  4844. "type": "integer",
  4845. "format": "int64",
  4846. "description": "index of the issue",
  4847. "name": "index",
  4848. "in": "path",
  4849. "required": true
  4850. },
  4851. {
  4852. "type": "integer",
  4853. "format": "int64",
  4854. "description": "id of the label to remove",
  4855. "name": "id",
  4856. "in": "path",
  4857. "required": true
  4858. }
  4859. ],
  4860. "responses": {
  4861. "204": {
  4862. "$ref": "#/responses/empty"
  4863. },
  4864. "403": {
  4865. "$ref": "#/responses/forbidden"
  4866. },
  4867. "422": {
  4868. "$ref": "#/responses/validationError"
  4869. }
  4870. }
  4871. }
  4872. },
  4873. "/repos/{owner}/{repo}/issues/{index}/reactions": {
  4874. "get": {
  4875. "consumes": [
  4876. "application/json"
  4877. ],
  4878. "produces": [
  4879. "application/json"
  4880. ],
  4881. "tags": [
  4882. "issue"
  4883. ],
  4884. "summary": "Get a list reactions of an issue",
  4885. "operationId": "issueGetIssueReactions",
  4886. "parameters": [
  4887. {
  4888. "type": "string",
  4889. "description": "owner of the repo",
  4890. "name": "owner",
  4891. "in": "path",
  4892. "required": true
  4893. },
  4894. {
  4895. "type": "string",
  4896. "description": "name of the repo",
  4897. "name": "repo",
  4898. "in": "path",
  4899. "required": true
  4900. },
  4901. {
  4902. "type": "integer",
  4903. "format": "int64",
  4904. "description": "index of the issue",
  4905. "name": "index",
  4906. "in": "path",
  4907. "required": true
  4908. },
  4909. {
  4910. "type": "integer",
  4911. "description": "page number of results to return (1-based)",
  4912. "name": "page",
  4913. "in": "query"
  4914. },
  4915. {
  4916. "type": "integer",
  4917. "description": "page size of results, maximum page size is 50",
  4918. "name": "limit",
  4919. "in": "query"
  4920. }
  4921. ],
  4922. "responses": {
  4923. "200": {
  4924. "$ref": "#/responses/ReactionList"
  4925. },
  4926. "403": {
  4927. "$ref": "#/responses/forbidden"
  4928. }
  4929. }
  4930. },
  4931. "post": {
  4932. "consumes": [
  4933. "application/json"
  4934. ],
  4935. "produces": [
  4936. "application/json"
  4937. ],
  4938. "tags": [
  4939. "issue"
  4940. ],
  4941. "summary": "Add a reaction to an issue",
  4942. "operationId": "issuePostIssueReaction",
  4943. "parameters": [
  4944. {
  4945. "type": "string",
  4946. "description": "owner of the repo",
  4947. "name": "owner",
  4948. "in": "path",
  4949. "required": true
  4950. },
  4951. {
  4952. "type": "string",
  4953. "description": "name of the repo",
  4954. "name": "repo",
  4955. "in": "path",
  4956. "required": true
  4957. },
  4958. {
  4959. "type": "integer",
  4960. "format": "int64",
  4961. "description": "index of the issue",
  4962. "name": "index",
  4963. "in": "path",
  4964. "required": true
  4965. },
  4966. {
  4967. "name": "content",
  4968. "in": "body",
  4969. "schema": {
  4970. "$ref": "#/definitions/EditReactionOption"
  4971. }
  4972. }
  4973. ],
  4974. "responses": {
  4975. "200": {
  4976. "$ref": "#/responses/Reaction"
  4977. },
  4978. "201": {
  4979. "$ref": "#/responses/Reaction"
  4980. },
  4981. "403": {
  4982. "$ref": "#/responses/forbidden"
  4983. }
  4984. }
  4985. },
  4986. "delete": {
  4987. "consumes": [
  4988. "application/json"
  4989. ],
  4990. "produces": [
  4991. "application/json"
  4992. ],
  4993. "tags": [
  4994. "issue"
  4995. ],
  4996. "summary": "Remove a reaction from an issue",
  4997. "operationId": "issueDeleteIssueReaction",
  4998. "parameters": [
  4999. {
  5000. "type": "string",
  5001. "description": "owner of the repo",
  5002. "name": "owner",
  5003. "in": "path",
  5004. "required": true
  5005. },
  5006. {
  5007. "type": "string",
  5008. "description": "name of the repo",
  5009. "name": "repo",
  5010. "in": "path",
  5011. "required": true
  5012. },
  5013. {
  5014. "type": "integer",
  5015. "format": "int64",
  5016. "description": "index of the issue",
  5017. "name": "index",
  5018. "in": "path",
  5019. "required": true
  5020. },
  5021. {
  5022. "name": "content",
  5023. "in": "body",
  5024. "schema": {
  5025. "$ref": "#/definitions/EditReactionOption"
  5026. }
  5027. }
  5028. ],
  5029. "responses": {
  5030. "200": {
  5031. "$ref": "#/responses/empty"
  5032. },
  5033. "403": {
  5034. "$ref": "#/responses/forbidden"
  5035. }
  5036. }
  5037. }
  5038. },
  5039. "/repos/{owner}/{repo}/issues/{index}/stopwatch/delete": {
  5040. "delete": {
  5041. "consumes": [
  5042. "application/json"
  5043. ],
  5044. "produces": [
  5045. "application/json"
  5046. ],
  5047. "tags": [
  5048. "issue"
  5049. ],
  5050. "summary": "Delete an issue's existing stopwatch.",
  5051. "operationId": "issueDeleteStopWatch",
  5052. "parameters": [
  5053. {
  5054. "type": "string",
  5055. "description": "owner of the repo",
  5056. "name": "owner",
  5057. "in": "path",
  5058. "required": true
  5059. },
  5060. {
  5061. "type": "string",
  5062. "description": "name of the repo",
  5063. "name": "repo",
  5064. "in": "path",
  5065. "required": true
  5066. },
  5067. {
  5068. "type": "integer",
  5069. "format": "int64",
  5070. "description": "index of the issue to stop the stopwatch on",
  5071. "name": "index",
  5072. "in": "path",
  5073. "required": true
  5074. }
  5075. ],
  5076. "responses": {
  5077. "204": {
  5078. "$ref": "#/responses/empty"
  5079. },
  5080. "403": {
  5081. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5082. },
  5083. "404": {
  5084. "$ref": "#/responses/notFound"
  5085. },
  5086. "409": {
  5087. "description": "Cannot cancel a non existent stopwatch"
  5088. }
  5089. }
  5090. }
  5091. },
  5092. "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": {
  5093. "post": {
  5094. "consumes": [
  5095. "application/json"
  5096. ],
  5097. "produces": [
  5098. "application/json"
  5099. ],
  5100. "tags": [
  5101. "issue"
  5102. ],
  5103. "summary": "Start stopwatch on an issue.",
  5104. "operationId": "issueStartStopWatch",
  5105. "parameters": [
  5106. {
  5107. "type": "string",
  5108. "description": "owner of the repo",
  5109. "name": "owner",
  5110. "in": "path",
  5111. "required": true
  5112. },
  5113. {
  5114. "type": "string",
  5115. "description": "name of the repo",
  5116. "name": "repo",
  5117. "in": "path",
  5118. "required": true
  5119. },
  5120. {
  5121. "type": "integer",
  5122. "format": "int64",
  5123. "description": "index of the issue to create the stopwatch on",
  5124. "name": "index",
  5125. "in": "path",
  5126. "required": true
  5127. }
  5128. ],
  5129. "responses": {
  5130. "201": {
  5131. "$ref": "#/responses/empty"
  5132. },
  5133. "403": {
  5134. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5135. },
  5136. "404": {
  5137. "$ref": "#/responses/notFound"
  5138. },
  5139. "409": {
  5140. "description": "Cannot start a stopwatch again if it already exists"
  5141. }
  5142. }
  5143. }
  5144. },
  5145. "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": {
  5146. "post": {
  5147. "consumes": [
  5148. "application/json"
  5149. ],
  5150. "produces": [
  5151. "application/json"
  5152. ],
  5153. "tags": [
  5154. "issue"
  5155. ],
  5156. "summary": "Stop an issue's existing stopwatch.",
  5157. "operationId": "issueStopStopWatch",
  5158. "parameters": [
  5159. {
  5160. "type": "string",
  5161. "description": "owner of the repo",
  5162. "name": "owner",
  5163. "in": "path",
  5164. "required": true
  5165. },
  5166. {
  5167. "type": "string",
  5168. "description": "name of the repo",
  5169. "name": "repo",
  5170. "in": "path",
  5171. "required": true
  5172. },
  5173. {
  5174. "type": "integer",
  5175. "format": "int64",
  5176. "description": "index of the issue to stop the stopwatch on",
  5177. "name": "index",
  5178. "in": "path",
  5179. "required": true
  5180. }
  5181. ],
  5182. "responses": {
  5183. "201": {
  5184. "$ref": "#/responses/empty"
  5185. },
  5186. "403": {
  5187. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5188. },
  5189. "404": {
  5190. "$ref": "#/responses/notFound"
  5191. },
  5192. "409": {
  5193. "description": "Cannot stop a non existent stopwatch"
  5194. }
  5195. }
  5196. }
  5197. },
  5198. "/repos/{owner}/{repo}/issues/{index}/subscriptions": {
  5199. "get": {
  5200. "consumes": [
  5201. "application/json"
  5202. ],
  5203. "produces": [
  5204. "application/json"
  5205. ],
  5206. "tags": [
  5207. "issue"
  5208. ],
  5209. "summary": "Get users who subscribed on an issue.",
  5210. "operationId": "issueSubscriptions",
  5211. "parameters": [
  5212. {
  5213. "type": "string",
  5214. "description": "owner of the repo",
  5215. "name": "owner",
  5216. "in": "path",
  5217. "required": true
  5218. },
  5219. {
  5220. "type": "string",
  5221. "description": "name of the repo",
  5222. "name": "repo",
  5223. "in": "path",
  5224. "required": true
  5225. },
  5226. {
  5227. "type": "integer",
  5228. "format": "int64",
  5229. "description": "index of the issue",
  5230. "name": "index",
  5231. "in": "path",
  5232. "required": true
  5233. },
  5234. {
  5235. "type": "integer",
  5236. "description": "page number of results to return (1-based)",
  5237. "name": "page",
  5238. "in": "query"
  5239. },
  5240. {
  5241. "type": "integer",
  5242. "description": "page size of results, maximum page size is 50",
  5243. "name": "limit",
  5244. "in": "query"
  5245. }
  5246. ],
  5247. "responses": {
  5248. "200": {
  5249. "$ref": "#/responses/UserList"
  5250. },
  5251. "404": {
  5252. "$ref": "#/responses/notFound"
  5253. }
  5254. }
  5255. }
  5256. },
  5257. "/repos/{owner}/{repo}/issues/{index}/subscriptions/check": {
  5258. "get": {
  5259. "consumes": [
  5260. "application/json"
  5261. ],
  5262. "produces": [
  5263. "application/json"
  5264. ],
  5265. "tags": [
  5266. "issue"
  5267. ],
  5268. "summary": "Check if user is subscribed to an issue",
  5269. "operationId": "issueCheckSubscription",
  5270. "parameters": [
  5271. {
  5272. "type": "string",
  5273. "description": "owner of the repo",
  5274. "name": "owner",
  5275. "in": "path",
  5276. "required": true
  5277. },
  5278. {
  5279. "type": "string",
  5280. "description": "name of the repo",
  5281. "name": "repo",
  5282. "in": "path",
  5283. "required": true
  5284. },
  5285. {
  5286. "type": "integer",
  5287. "format": "int64",
  5288. "description": "index of the issue",
  5289. "name": "index",
  5290. "in": "path",
  5291. "required": true
  5292. }
  5293. ],
  5294. "responses": {
  5295. "200": {
  5296. "$ref": "#/responses/WatchInfo"
  5297. },
  5298. "404": {
  5299. "$ref": "#/responses/notFound"
  5300. }
  5301. }
  5302. }
  5303. },
  5304. "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}": {
  5305. "put": {
  5306. "consumes": [
  5307. "application/json"
  5308. ],
  5309. "produces": [
  5310. "application/json"
  5311. ],
  5312. "tags": [
  5313. "issue"
  5314. ],
  5315. "summary": "Subscribe user to issue",
  5316. "operationId": "issueAddSubscription",
  5317. "parameters": [
  5318. {
  5319. "type": "string",
  5320. "description": "owner of the repo",
  5321. "name": "owner",
  5322. "in": "path",
  5323. "required": true
  5324. },
  5325. {
  5326. "type": "string",
  5327. "description": "name of the repo",
  5328. "name": "repo",
  5329. "in": "path",
  5330. "required": true
  5331. },
  5332. {
  5333. "type": "integer",
  5334. "format": "int64",
  5335. "description": "index of the issue",
  5336. "name": "index",
  5337. "in": "path",
  5338. "required": true
  5339. },
  5340. {
  5341. "type": "string",
  5342. "description": "user to subscribe",
  5343. "name": "user",
  5344. "in": "path",
  5345. "required": true
  5346. }
  5347. ],
  5348. "responses": {
  5349. "200": {
  5350. "description": "Already subscribed"
  5351. },
  5352. "201": {
  5353. "description": "Successfully Subscribed"
  5354. },
  5355. "304": {
  5356. "description": "User can only subscribe itself if he is no admin"
  5357. },
  5358. "404": {
  5359. "$ref": "#/responses/notFound"
  5360. }
  5361. }
  5362. },
  5363. "delete": {
  5364. "consumes": [
  5365. "application/json"
  5366. ],
  5367. "produces": [
  5368. "application/json"
  5369. ],
  5370. "tags": [
  5371. "issue"
  5372. ],
  5373. "summary": "Unsubscribe user from issue",
  5374. "operationId": "issueDeleteSubscription",
  5375. "parameters": [
  5376. {
  5377. "type": "string",
  5378. "description": "owner of the repo",
  5379. "name": "owner",
  5380. "in": "path",
  5381. "required": true
  5382. },
  5383. {
  5384. "type": "string",
  5385. "description": "name of the repo",
  5386. "name": "repo",
  5387. "in": "path",
  5388. "required": true
  5389. },
  5390. {
  5391. "type": "integer",
  5392. "format": "int64",
  5393. "description": "index of the issue",
  5394. "name": "index",
  5395. "in": "path",
  5396. "required": true
  5397. },
  5398. {
  5399. "type": "string",
  5400. "description": "user witch unsubscribe",
  5401. "name": "user",
  5402. "in": "path",
  5403. "required": true
  5404. }
  5405. ],
  5406. "responses": {
  5407. "200": {
  5408. "description": "Already unsubscribed"
  5409. },
  5410. "201": {
  5411. "description": "Successfully Unsubscribed"
  5412. },
  5413. "304": {
  5414. "description": "User can only subscribe itself if he is no admin"
  5415. },
  5416. "404": {
  5417. "$ref": "#/responses/notFound"
  5418. }
  5419. }
  5420. }
  5421. },
  5422. "/repos/{owner}/{repo}/issues/{index}/times": {
  5423. "get": {
  5424. "produces": [
  5425. "application/json"
  5426. ],
  5427. "tags": [
  5428. "issue"
  5429. ],
  5430. "summary": "List an issue's tracked times",
  5431. "operationId": "issueTrackedTimes",
  5432. "parameters": [
  5433. {
  5434. "type": "string",
  5435. "description": "owner of the repo",
  5436. "name": "owner",
  5437. "in": "path",
  5438. "required": true
  5439. },
  5440. {
  5441. "type": "string",
  5442. "description": "name of the repo",
  5443. "name": "repo",
  5444. "in": "path",
  5445. "required": true
  5446. },
  5447. {
  5448. "type": "integer",
  5449. "format": "int64",
  5450. "description": "index of the issue",
  5451. "name": "index",
  5452. "in": "path",
  5453. "required": true
  5454. },
  5455. {
  5456. "type": "string",
  5457. "format": "date-time",
  5458. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  5459. "name": "since",
  5460. "in": "query"
  5461. },
  5462. {
  5463. "type": "string",
  5464. "format": "date-time",
  5465. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  5466. "name": "before",
  5467. "in": "query"
  5468. },
  5469. {
  5470. "type": "integer",
  5471. "description": "page number of results to return (1-based)",
  5472. "name": "page",
  5473. "in": "query"
  5474. },
  5475. {
  5476. "type": "integer",
  5477. "description": "page size of results, maximum page size is 50",
  5478. "name": "limit",
  5479. "in": "query"
  5480. }
  5481. ],
  5482. "responses": {
  5483. "200": {
  5484. "$ref": "#/responses/TrackedTimeList"
  5485. },
  5486. "404": {
  5487. "$ref": "#/responses/notFound"
  5488. }
  5489. }
  5490. },
  5491. "post": {
  5492. "consumes": [
  5493. "application/json"
  5494. ],
  5495. "produces": [
  5496. "application/json"
  5497. ],
  5498. "tags": [
  5499. "issue"
  5500. ],
  5501. "summary": "Add tracked time to a issue",
  5502. "operationId": "issueAddTime",
  5503. "parameters": [
  5504. {
  5505. "type": "string",
  5506. "description": "owner of the repo",
  5507. "name": "owner",
  5508. "in": "path",
  5509. "required": true
  5510. },
  5511. {
  5512. "type": "string",
  5513. "description": "name of the repo",
  5514. "name": "repo",
  5515. "in": "path",
  5516. "required": true
  5517. },
  5518. {
  5519. "type": "integer",
  5520. "format": "int64",
  5521. "description": "index of the issue",
  5522. "name": "index",
  5523. "in": "path",
  5524. "required": true
  5525. },
  5526. {
  5527. "name": "body",
  5528. "in": "body",
  5529. "schema": {
  5530. "$ref": "#/definitions/AddTimeOption"
  5531. }
  5532. }
  5533. ],
  5534. "responses": {
  5535. "200": {
  5536. "$ref": "#/responses/TrackedTime"
  5537. },
  5538. "400": {
  5539. "$ref": "#/responses/error"
  5540. },
  5541. "403": {
  5542. "$ref": "#/responses/forbidden"
  5543. }
  5544. }
  5545. },
  5546. "delete": {
  5547. "consumes": [
  5548. "application/json"
  5549. ],
  5550. "produces": [
  5551. "application/json"
  5552. ],
  5553. "tags": [
  5554. "issue"
  5555. ],
  5556. "summary": "Reset a tracked time of an issue",
  5557. "operationId": "issueResetTime",
  5558. "parameters": [
  5559. {
  5560. "type": "string",
  5561. "description": "owner of the repo",
  5562. "name": "owner",
  5563. "in": "path",
  5564. "required": true
  5565. },
  5566. {
  5567. "type": "string",
  5568. "description": "name of the repo",
  5569. "name": "repo",
  5570. "in": "path",
  5571. "required": true
  5572. },
  5573. {
  5574. "type": "integer",
  5575. "format": "int64",
  5576. "description": "index of the issue to add tracked time to",
  5577. "name": "index",
  5578. "in": "path",
  5579. "required": true
  5580. }
  5581. ],
  5582. "responses": {
  5583. "204": {
  5584. "$ref": "#/responses/empty"
  5585. },
  5586. "400": {
  5587. "$ref": "#/responses/error"
  5588. },
  5589. "403": {
  5590. "$ref": "#/responses/forbidden"
  5591. }
  5592. }
  5593. }
  5594. },
  5595. "/repos/{owner}/{repo}/issues/{index}/times/{id}": {
  5596. "delete": {
  5597. "consumes": [
  5598. "application/json"
  5599. ],
  5600. "produces": [
  5601. "application/json"
  5602. ],
  5603. "tags": [
  5604. "issue"
  5605. ],
  5606. "summary": "Delete specific tracked time",
  5607. "operationId": "issueDeleteTime",
  5608. "parameters": [
  5609. {
  5610. "type": "string",
  5611. "description": "owner of the repo",
  5612. "name": "owner",
  5613. "in": "path",
  5614. "required": true
  5615. },
  5616. {
  5617. "type": "string",
  5618. "description": "name of the repo",
  5619. "name": "repo",
  5620. "in": "path",
  5621. "required": true
  5622. },
  5623. {
  5624. "type": "integer",
  5625. "format": "int64",
  5626. "description": "index of the issue",
  5627. "name": "index",
  5628. "in": "path",
  5629. "required": true
  5630. },
  5631. {
  5632. "type": "integer",
  5633. "format": "int64",
  5634. "description": "id of time to delete",
  5635. "name": "id",
  5636. "in": "path",
  5637. "required": true
  5638. }
  5639. ],
  5640. "responses": {
  5641. "204": {
  5642. "$ref": "#/responses/empty"
  5643. },
  5644. "400": {
  5645. "$ref": "#/responses/error"
  5646. },
  5647. "403": {
  5648. "$ref": "#/responses/forbidden"
  5649. }
  5650. }
  5651. }
  5652. },
  5653. "/repos/{owner}/{repo}/keys": {
  5654. "get": {
  5655. "produces": [
  5656. "application/json"
  5657. ],
  5658. "tags": [
  5659. "repository"
  5660. ],
  5661. "summary": "List a repository's keys",
  5662. "operationId": "repoListKeys",
  5663. "parameters": [
  5664. {
  5665. "type": "string",
  5666. "description": "owner of the repo",
  5667. "name": "owner",
  5668. "in": "path",
  5669. "required": true
  5670. },
  5671. {
  5672. "type": "string",
  5673. "description": "name of the repo",
  5674. "name": "repo",
  5675. "in": "path",
  5676. "required": true
  5677. },
  5678. {
  5679. "type": "integer",
  5680. "description": "the key_id to search for",
  5681. "name": "key_id",
  5682. "in": "query"
  5683. },
  5684. {
  5685. "type": "string",
  5686. "description": "fingerprint of the key",
  5687. "name": "fingerprint",
  5688. "in": "query"
  5689. },
  5690. {
  5691. "type": "integer",
  5692. "description": "page number of results to return (1-based)",
  5693. "name": "page",
  5694. "in": "query"
  5695. },
  5696. {
  5697. "type": "integer",
  5698. "description": "page size of results, maximum page size is 50",
  5699. "name": "limit",
  5700. "in": "query"
  5701. }
  5702. ],
  5703. "responses": {
  5704. "200": {
  5705. "$ref": "#/responses/DeployKeyList"
  5706. }
  5707. }
  5708. },
  5709. "post": {
  5710. "consumes": [
  5711. "application/json"
  5712. ],
  5713. "produces": [
  5714. "application/json"
  5715. ],
  5716. "tags": [
  5717. "repository"
  5718. ],
  5719. "summary": "Add a key to a repository",
  5720. "operationId": "repoCreateKey",
  5721. "parameters": [
  5722. {
  5723. "type": "string",
  5724. "description": "owner of the repo",
  5725. "name": "owner",
  5726. "in": "path",
  5727. "required": true
  5728. },
  5729. {
  5730. "type": "string",
  5731. "description": "name of the repo",
  5732. "name": "repo",
  5733. "in": "path",
  5734. "required": true
  5735. },
  5736. {
  5737. "name": "body",
  5738. "in": "body",
  5739. "schema": {
  5740. "$ref": "#/definitions/CreateKeyOption"
  5741. }
  5742. }
  5743. ],
  5744. "responses": {
  5745. "201": {
  5746. "$ref": "#/responses/DeployKey"
  5747. },
  5748. "422": {
  5749. "$ref": "#/responses/validationError"
  5750. }
  5751. }
  5752. }
  5753. },
  5754. "/repos/{owner}/{repo}/keys/{id}": {
  5755. "get": {
  5756. "produces": [
  5757. "application/json"
  5758. ],
  5759. "tags": [
  5760. "repository"
  5761. ],
  5762. "summary": "Get a repository's key by id",
  5763. "operationId": "repoGetKey",
  5764. "parameters": [
  5765. {
  5766. "type": "string",
  5767. "description": "owner of the repo",
  5768. "name": "owner",
  5769. "in": "path",
  5770. "required": true
  5771. },
  5772. {
  5773. "type": "string",
  5774. "description": "name of the repo",
  5775. "name": "repo",
  5776. "in": "path",
  5777. "required": true
  5778. },
  5779. {
  5780. "type": "integer",
  5781. "format": "int64",
  5782. "description": "id of the key to get",
  5783. "name": "id",
  5784. "in": "path",
  5785. "required": true
  5786. }
  5787. ],
  5788. "responses": {
  5789. "200": {
  5790. "$ref": "#/responses/DeployKey"
  5791. }
  5792. }
  5793. },
  5794. "delete": {
  5795. "tags": [
  5796. "repository"
  5797. ],
  5798. "summary": "Delete a key from a repository",
  5799. "operationId": "repoDeleteKey",
  5800. "parameters": [
  5801. {
  5802. "type": "string",
  5803. "description": "owner of the repo",
  5804. "name": "owner",
  5805. "in": "path",
  5806. "required": true
  5807. },
  5808. {
  5809. "type": "string",
  5810. "description": "name of the repo",
  5811. "name": "repo",
  5812. "in": "path",
  5813. "required": true
  5814. },
  5815. {
  5816. "type": "integer",
  5817. "format": "int64",
  5818. "description": "id of the key to delete",
  5819. "name": "id",
  5820. "in": "path",
  5821. "required": true
  5822. }
  5823. ],
  5824. "responses": {
  5825. "204": {
  5826. "$ref": "#/responses/empty"
  5827. },
  5828. "403": {
  5829. "$ref": "#/responses/forbidden"
  5830. }
  5831. }
  5832. }
  5833. },
  5834. "/repos/{owner}/{repo}/labels": {
  5835. "get": {
  5836. "produces": [
  5837. "application/json"
  5838. ],
  5839. "tags": [
  5840. "issue"
  5841. ],
  5842. "summary": "Get all of a repository's labels",
  5843. "operationId": "issueListLabels",
  5844. "parameters": [
  5845. {
  5846. "type": "string",
  5847. "description": "owner of the repo",
  5848. "name": "owner",
  5849. "in": "path",
  5850. "required": true
  5851. },
  5852. {
  5853. "type": "string",
  5854. "description": "name of the repo",
  5855. "name": "repo",
  5856. "in": "path",
  5857. "required": true
  5858. },
  5859. {
  5860. "type": "integer",
  5861. "description": "page number of results to return (1-based)",
  5862. "name": "page",
  5863. "in": "query"
  5864. },
  5865. {
  5866. "type": "integer",
  5867. "description": "page size of results, maximum page size is 50",
  5868. "name": "limit",
  5869. "in": "query"
  5870. }
  5871. ],
  5872. "responses": {
  5873. "200": {
  5874. "$ref": "#/responses/LabelList"
  5875. }
  5876. }
  5877. },
  5878. "post": {
  5879. "consumes": [
  5880. "application/json"
  5881. ],
  5882. "produces": [
  5883. "application/json"
  5884. ],
  5885. "tags": [
  5886. "issue"
  5887. ],
  5888. "summary": "Create a label",
  5889. "operationId": "issueCreateLabel",
  5890. "parameters": [
  5891. {
  5892. "type": "string",
  5893. "description": "owner of the repo",
  5894. "name": "owner",
  5895. "in": "path",
  5896. "required": true
  5897. },
  5898. {
  5899. "type": "string",
  5900. "description": "name of the repo",
  5901. "name": "repo",
  5902. "in": "path",
  5903. "required": true
  5904. },
  5905. {
  5906. "name": "body",
  5907. "in": "body",
  5908. "schema": {
  5909. "$ref": "#/definitions/CreateLabelOption"
  5910. }
  5911. }
  5912. ],
  5913. "responses": {
  5914. "201": {
  5915. "$ref": "#/responses/Label"
  5916. },
  5917. "422": {
  5918. "$ref": "#/responses/validationError"
  5919. }
  5920. }
  5921. }
  5922. },
  5923. "/repos/{owner}/{repo}/labels/{id}": {
  5924. "get": {
  5925. "produces": [
  5926. "application/json"
  5927. ],
  5928. "tags": [
  5929. "issue"
  5930. ],
  5931. "summary": "Get a single label",
  5932. "operationId": "issueGetLabel",
  5933. "parameters": [
  5934. {
  5935. "type": "string",
  5936. "description": "owner of the repo",
  5937. "name": "owner",
  5938. "in": "path",
  5939. "required": true
  5940. },
  5941. {
  5942. "type": "string",
  5943. "description": "name of the repo",
  5944. "name": "repo",
  5945. "in": "path",
  5946. "required": true
  5947. },
  5948. {
  5949. "type": "integer",
  5950. "format": "int64",
  5951. "description": "id of the label to get",
  5952. "name": "id",
  5953. "in": "path",
  5954. "required": true
  5955. }
  5956. ],
  5957. "responses": {
  5958. "200": {
  5959. "$ref": "#/responses/Label"
  5960. }
  5961. }
  5962. },
  5963. "delete": {
  5964. "tags": [
  5965. "issue"
  5966. ],
  5967. "summary": "Delete a label",
  5968. "operationId": "issueDeleteLabel",
  5969. "parameters": [
  5970. {
  5971. "type": "string",
  5972. "description": "owner of the repo",
  5973. "name": "owner",
  5974. "in": "path",
  5975. "required": true
  5976. },
  5977. {
  5978. "type": "string",
  5979. "description": "name of the repo",
  5980. "name": "repo",
  5981. "in": "path",
  5982. "required": true
  5983. },
  5984. {
  5985. "type": "integer",
  5986. "format": "int64",
  5987. "description": "id of the label to delete",
  5988. "name": "id",
  5989. "in": "path",
  5990. "required": true
  5991. }
  5992. ],
  5993. "responses": {
  5994. "204": {
  5995. "$ref": "#/responses/empty"
  5996. }
  5997. }
  5998. },
  5999. "patch": {
  6000. "consumes": [
  6001. "application/json"
  6002. ],
  6003. "produces": [
  6004. "application/json"
  6005. ],
  6006. "tags": [
  6007. "issue"
  6008. ],
  6009. "summary": "Update a label",
  6010. "operationId": "issueEditLabel",
  6011. "parameters": [
  6012. {
  6013. "type": "string",
  6014. "description": "owner of the repo",
  6015. "name": "owner",
  6016. "in": "path",
  6017. "required": true
  6018. },
  6019. {
  6020. "type": "string",
  6021. "description": "name of the repo",
  6022. "name": "repo",
  6023. "in": "path",
  6024. "required": true
  6025. },
  6026. {
  6027. "type": "integer",
  6028. "format": "int64",
  6029. "description": "id of the label to edit",
  6030. "name": "id",
  6031. "in": "path",
  6032. "required": true
  6033. },
  6034. {
  6035. "name": "body",
  6036. "in": "body",
  6037. "schema": {
  6038. "$ref": "#/definitions/EditLabelOption"
  6039. }
  6040. }
  6041. ],
  6042. "responses": {
  6043. "200": {
  6044. "$ref": "#/responses/Label"
  6045. },
  6046. "422": {
  6047. "$ref": "#/responses/validationError"
  6048. }
  6049. }
  6050. }
  6051. },
  6052. "/repos/{owner}/{repo}/milestones": {
  6053. "get": {
  6054. "produces": [
  6055. "application/json"
  6056. ],
  6057. "tags": [
  6058. "issue"
  6059. ],
  6060. "summary": "Get all of a repository's opened milestones",
  6061. "operationId": "issueGetMilestonesList",
  6062. "parameters": [
  6063. {
  6064. "type": "string",
  6065. "description": "owner of the repo",
  6066. "name": "owner",
  6067. "in": "path",
  6068. "required": true
  6069. },
  6070. {
  6071. "type": "string",
  6072. "description": "name of the repo",
  6073. "name": "repo",
  6074. "in": "path",
  6075. "required": true
  6076. },
  6077. {
  6078. "type": "string",
  6079. "description": "Milestone state, Recognised values are open, closed and all. Defaults to \"open\"",
  6080. "name": "state",
  6081. "in": "query"
  6082. },
  6083. {
  6084. "type": "integer",
  6085. "description": "page number of results to return (1-based)",
  6086. "name": "page",
  6087. "in": "query"
  6088. },
  6089. {
  6090. "type": "integer",
  6091. "description": "page size of results, maximum page size is 50",
  6092. "name": "limit",
  6093. "in": "query"
  6094. }
  6095. ],
  6096. "responses": {
  6097. "200": {
  6098. "$ref": "#/responses/MilestoneList"
  6099. }
  6100. }
  6101. },
  6102. "post": {
  6103. "consumes": [
  6104. "application/json"
  6105. ],
  6106. "produces": [
  6107. "application/json"
  6108. ],
  6109. "tags": [
  6110. "issue"
  6111. ],
  6112. "summary": "Create a milestone",
  6113. "operationId": "issueCreateMilestone",
  6114. "parameters": [
  6115. {
  6116. "type": "string",
  6117. "description": "owner of the repo",
  6118. "name": "owner",
  6119. "in": "path",
  6120. "required": true
  6121. },
  6122. {
  6123. "type": "string",
  6124. "description": "name of the repo",
  6125. "name": "repo",
  6126. "in": "path",
  6127. "required": true
  6128. },
  6129. {
  6130. "name": "body",
  6131. "in": "body",
  6132. "schema": {
  6133. "$ref": "#/definitions/CreateMilestoneOption"
  6134. }
  6135. }
  6136. ],
  6137. "responses": {
  6138. "201": {
  6139. "$ref": "#/responses/Milestone"
  6140. }
  6141. }
  6142. }
  6143. },
  6144. "/repos/{owner}/{repo}/milestones/{id}": {
  6145. "get": {
  6146. "produces": [
  6147. "application/json"
  6148. ],
  6149. "tags": [
  6150. "issue"
  6151. ],
  6152. "summary": "Get a milestone",
  6153. "operationId": "issueGetMilestone",
  6154. "parameters": [
  6155. {
  6156. "type": "string",
  6157. "description": "owner of the repo",
  6158. "name": "owner",
  6159. "in": "path",
  6160. "required": true
  6161. },
  6162. {
  6163. "type": "string",
  6164. "description": "name of the repo",
  6165. "name": "repo",
  6166. "in": "path",
  6167. "required": true
  6168. },
  6169. {
  6170. "type": "integer",
  6171. "format": "int64",
  6172. "description": "id of the milestone",
  6173. "name": "id",
  6174. "in": "path",
  6175. "required": true
  6176. }
  6177. ],
  6178. "responses": {
  6179. "200": {
  6180. "$ref": "#/responses/Milestone"
  6181. }
  6182. }
  6183. },
  6184. "delete": {
  6185. "tags": [
  6186. "issue"
  6187. ],
  6188. "summary": "Delete a milestone",
  6189. "operationId": "issueDeleteMilestone",
  6190. "parameters": [
  6191. {
  6192. "type": "string",
  6193. "description": "owner of the repo",
  6194. "name": "owner",
  6195. "in": "path",
  6196. "required": true
  6197. },
  6198. {
  6199. "type": "string",
  6200. "description": "name of the repo",
  6201. "name": "repo",
  6202. "in": "path",
  6203. "required": true
  6204. },
  6205. {
  6206. "type": "integer",
  6207. "format": "int64",
  6208. "description": "id of the milestone to delete",
  6209. "name": "id",
  6210. "in": "path",
  6211. "required": true
  6212. }
  6213. ],
  6214. "responses": {
  6215. "204": {
  6216. "$ref": "#/responses/empty"
  6217. }
  6218. }
  6219. },
  6220. "patch": {
  6221. "consumes": [
  6222. "application/json"
  6223. ],
  6224. "produces": [
  6225. "application/json"
  6226. ],
  6227. "tags": [
  6228. "issue"
  6229. ],
  6230. "summary": "Update a milestone",
  6231. "operationId": "issueEditMilestone",
  6232. "parameters": [
  6233. {
  6234. "type": "string",
  6235. "description": "owner of the repo",
  6236. "name": "owner",
  6237. "in": "path",
  6238. "required": true
  6239. },
  6240. {
  6241. "type": "string",
  6242. "description": "name of the repo",
  6243. "name": "repo",
  6244. "in": "path",
  6245. "required": true
  6246. },
  6247. {
  6248. "type": "integer",
  6249. "format": "int64",
  6250. "description": "id of the milestone",
  6251. "name": "id",
  6252. "in": "path",
  6253. "required": true
  6254. },
  6255. {
  6256. "name": "body",
  6257. "in": "body",
  6258. "schema": {
  6259. "$ref": "#/definitions/EditMilestoneOption"
  6260. }
  6261. }
  6262. ],
  6263. "responses": {
  6264. "200": {
  6265. "$ref": "#/responses/Milestone"
  6266. }
  6267. }
  6268. }
  6269. },
  6270. "/repos/{owner}/{repo}/mirror-sync": {
  6271. "post": {
  6272. "produces": [
  6273. "application/json"
  6274. ],
  6275. "tags": [
  6276. "repository"
  6277. ],
  6278. "summary": "Sync a mirrored repository",
  6279. "operationId": "repoMirrorSync",
  6280. "parameters": [
  6281. {
  6282. "type": "string",
  6283. "description": "owner of the repo to sync",
  6284. "name": "owner",
  6285. "in": "path",
  6286. "required": true
  6287. },
  6288. {
  6289. "type": "string",
  6290. "description": "name of the repo to sync",
  6291. "name": "repo",
  6292. "in": "path",
  6293. "required": true
  6294. }
  6295. ],
  6296. "responses": {
  6297. "200": {
  6298. "$ref": "#/responses/empty"
  6299. },
  6300. "403": {
  6301. "$ref": "#/responses/forbidden"
  6302. }
  6303. }
  6304. }
  6305. },
  6306. "/repos/{owner}/{repo}/notifications": {
  6307. "get": {
  6308. "consumes": [
  6309. "application/json"
  6310. ],
  6311. "produces": [
  6312. "application/json"
  6313. ],
  6314. "tags": [
  6315. "notification"
  6316. ],
  6317. "summary": "List users's notification threads on a specific repo",
  6318. "operationId": "notifyGetRepoList",
  6319. "parameters": [
  6320. {
  6321. "type": "string",
  6322. "description": "owner of the repo",
  6323. "name": "owner",
  6324. "in": "path",
  6325. "required": true
  6326. },
  6327. {
  6328. "type": "string",
  6329. "description": "name of the repo",
  6330. "name": "repo",
  6331. "in": "path",
  6332. "required": true
  6333. },
  6334. {
  6335. "type": "string",
  6336. "description": "If true, show notifications marked as read. Default value is false",
  6337. "name": "all",
  6338. "in": "query"
  6339. },
  6340. {
  6341. "type": "string",
  6342. "format": "date-time",
  6343. "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
  6344. "name": "since",
  6345. "in": "query"
  6346. },
  6347. {
  6348. "type": "string",
  6349. "format": "date-time",
  6350. "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
  6351. "name": "before",
  6352. "in": "query"
  6353. },
  6354. {
  6355. "type": "integer",
  6356. "description": "page number of results to return (1-based)",
  6357. "name": "page",
  6358. "in": "query"
  6359. },
  6360. {
  6361. "type": "integer",
  6362. "description": "page size of results, maximum page size is 50",
  6363. "name": "limit",
  6364. "in": "query"
  6365. }
  6366. ],
  6367. "responses": {
  6368. "200": {
  6369. "$ref": "#/responses/NotificationThreadList"
  6370. }
  6371. }
  6372. },
  6373. "put": {
  6374. "consumes": [
  6375. "application/json"
  6376. ],
  6377. "produces": [
  6378. "application/json"
  6379. ],
  6380. "tags": [
  6381. "notification"
  6382. ],
  6383. "summary": "Mark notification threads as read on a specific repo",
  6384. "operationId": "notifyReadRepoList",
  6385. "parameters": [
  6386. {
  6387. "type": "string",
  6388. "description": "owner of the repo",
  6389. "name": "owner",
  6390. "in": "path",
  6391. "required": true
  6392. },
  6393. {
  6394. "type": "string",
  6395. "description": "name of the repo",
  6396. "name": "repo",
  6397. "in": "path",
  6398. "required": true
  6399. },
  6400. {
  6401. "type": "string",
  6402. "format": "date-time",
  6403. "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
  6404. "name": "last_read_at",
  6405. "in": "query"
  6406. }
  6407. ],
  6408. "responses": {
  6409. "205": {
  6410. "$ref": "#/responses/empty"
  6411. }
  6412. }
  6413. }
  6414. },
  6415. "/repos/{owner}/{repo}/pulls": {
  6416. "get": {
  6417. "produces": [
  6418. "application/json"
  6419. ],
  6420. "tags": [
  6421. "repository"
  6422. ],
  6423. "summary": "List a repo's pull requests",
  6424. "operationId": "repoListPullRequests",
  6425. "parameters": [
  6426. {
  6427. "type": "string",
  6428. "description": "owner of the repo",
  6429. "name": "owner",
  6430. "in": "path",
  6431. "required": true
  6432. },
  6433. {
  6434. "type": "string",
  6435. "description": "name of the repo",
  6436. "name": "repo",
  6437. "in": "path",
  6438. "required": true
  6439. },
  6440. {
  6441. "enum": [
  6442. "closed",
  6443. "open",
  6444. "all"
  6445. ],
  6446. "type": "string",
  6447. "description": "State of pull request: open or closed (optional)",
  6448. "name": "state",
  6449. "in": "query"
  6450. },
  6451. {
  6452. "enum": [
  6453. "oldest",
  6454. "recentupdate",
  6455. "leastupdate",
  6456. "mostcomment",
  6457. "leastcomment",
  6458. "priority"
  6459. ],
  6460. "type": "string",
  6461. "description": "Type of sort",
  6462. "name": "sort",
  6463. "in": "query"
  6464. },
  6465. {
  6466. "type": "integer",
  6467. "format": "int64",
  6468. "description": "ID of the milestone",
  6469. "name": "milestone",
  6470. "in": "query"
  6471. },
  6472. {
  6473. "type": "array",
  6474. "items": {
  6475. "type": "integer",
  6476. "format": "int64"
  6477. },
  6478. "collectionFormat": "multi",
  6479. "description": "Label IDs",
  6480. "name": "labels",
  6481. "in": "query"
  6482. },
  6483. {
  6484. "type": "integer",
  6485. "description": "page number of results to return (1-based)",
  6486. "name": "page",
  6487. "in": "query"
  6488. },
  6489. {
  6490. "type": "integer",
  6491. "description": "page size of results, maximum page size is 50",
  6492. "name": "limit",
  6493. "in": "query"
  6494. }
  6495. ],
  6496. "responses": {
  6497. "200": {
  6498. "$ref": "#/responses/PullRequestList"
  6499. }
  6500. }
  6501. },
  6502. "post": {
  6503. "consumes": [
  6504. "application/json"
  6505. ],
  6506. "produces": [
  6507. "application/json"
  6508. ],
  6509. "tags": [
  6510. "repository"
  6511. ],
  6512. "summary": "Create a pull request",
  6513. "operationId": "repoCreatePullRequest",
  6514. "parameters": [
  6515. {
  6516. "type": "string",
  6517. "description": "owner of the repo",
  6518. "name": "owner",
  6519. "in": "path",
  6520. "required": true
  6521. },
  6522. {
  6523. "type": "string",
  6524. "description": "name of the repo",
  6525. "name": "repo",
  6526. "in": "path",
  6527. "required": true
  6528. },
  6529. {
  6530. "name": "body",
  6531. "in": "body",
  6532. "schema": {
  6533. "$ref": "#/definitions/CreatePullRequestOption"
  6534. }
  6535. }
  6536. ],
  6537. "responses": {
  6538. "201": {
  6539. "$ref": "#/responses/PullRequest"
  6540. },
  6541. "409": {
  6542. "$ref": "#/responses/error"
  6543. },
  6544. "422": {
  6545. "$ref": "#/responses/validationError"
  6546. }
  6547. }
  6548. }
  6549. },
  6550. "/repos/{owner}/{repo}/pulls/{index}": {
  6551. "get": {
  6552. "produces": [
  6553. "application/json"
  6554. ],
  6555. "tags": [
  6556. "repository"
  6557. ],
  6558. "summary": "Get a pull request",
  6559. "operationId": "repoGetPullRequest",
  6560. "parameters": [
  6561. {
  6562. "type": "string",
  6563. "description": "owner of the repo",
  6564. "name": "owner",
  6565. "in": "path",
  6566. "required": true
  6567. },
  6568. {
  6569. "type": "string",
  6570. "description": "name of the repo",
  6571. "name": "repo",
  6572. "in": "path",
  6573. "required": true
  6574. },
  6575. {
  6576. "type": "integer",
  6577. "format": "int64",
  6578. "description": "index of the pull request to get",
  6579. "name": "index",
  6580. "in": "path",
  6581. "required": true
  6582. }
  6583. ],
  6584. "responses": {
  6585. "200": {
  6586. "$ref": "#/responses/PullRequest"
  6587. },
  6588. "404": {
  6589. "$ref": "#/responses/notFound"
  6590. }
  6591. }
  6592. },
  6593. "patch": {
  6594. "consumes": [
  6595. "application/json"
  6596. ],
  6597. "produces": [
  6598. "application/json"
  6599. ],
  6600. "tags": [
  6601. "repository"
  6602. ],
  6603. "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.",
  6604. "operationId": "repoEditPullRequest",
  6605. "parameters": [
  6606. {
  6607. "type": "string",
  6608. "description": "owner of the repo",
  6609. "name": "owner",
  6610. "in": "path",
  6611. "required": true
  6612. },
  6613. {
  6614. "type": "string",
  6615. "description": "name of the repo",
  6616. "name": "repo",
  6617. "in": "path",
  6618. "required": true
  6619. },
  6620. {
  6621. "type": "integer",
  6622. "format": "int64",
  6623. "description": "index of the pull request to edit",
  6624. "name": "index",
  6625. "in": "path",
  6626. "required": true
  6627. },
  6628. {
  6629. "name": "body",
  6630. "in": "body",
  6631. "schema": {
  6632. "$ref": "#/definitions/EditPullRequestOption"
  6633. }
  6634. }
  6635. ],
  6636. "responses": {
  6637. "201": {
  6638. "$ref": "#/responses/PullRequest"
  6639. },
  6640. "403": {
  6641. "$ref": "#/responses/forbidden"
  6642. },
  6643. "412": {
  6644. "$ref": "#/responses/error"
  6645. },
  6646. "422": {
  6647. "$ref": "#/responses/validationError"
  6648. }
  6649. }
  6650. }
  6651. },
  6652. "/repos/{owner}/{repo}/pulls/{index}/merge": {
  6653. "get": {
  6654. "produces": [
  6655. "application/json"
  6656. ],
  6657. "tags": [
  6658. "repository"
  6659. ],
  6660. "summary": "Check if a pull request has been merged",
  6661. "operationId": "repoPullRequestIsMerged",
  6662. "parameters": [
  6663. {
  6664. "type": "string",
  6665. "description": "owner of the repo",
  6666. "name": "owner",
  6667. "in": "path",
  6668. "required": true
  6669. },
  6670. {
  6671. "type": "string",
  6672. "description": "name of the repo",
  6673. "name": "repo",
  6674. "in": "path",
  6675. "required": true
  6676. },
  6677. {
  6678. "type": "integer",
  6679. "format": "int64",
  6680. "description": "index of the pull request",
  6681. "name": "index",
  6682. "in": "path",
  6683. "required": true
  6684. }
  6685. ],
  6686. "responses": {
  6687. "204": {
  6688. "description": "pull request has been merged"
  6689. },
  6690. "404": {
  6691. "description": "pull request has not been merged"
  6692. }
  6693. }
  6694. },
  6695. "post": {
  6696. "produces": [
  6697. "application/json"
  6698. ],
  6699. "tags": [
  6700. "repository"
  6701. ],
  6702. "summary": "Merge a pull request",
  6703. "operationId": "repoMergePullRequest",
  6704. "parameters": [
  6705. {
  6706. "type": "string",
  6707. "description": "owner of the repo",
  6708. "name": "owner",
  6709. "in": "path",
  6710. "required": true
  6711. },
  6712. {
  6713. "type": "string",
  6714. "description": "name of the repo",
  6715. "name": "repo",
  6716. "in": "path",
  6717. "required": true
  6718. },
  6719. {
  6720. "type": "integer",
  6721. "format": "int64",
  6722. "description": "index of the pull request to merge",
  6723. "name": "index",
  6724. "in": "path",
  6725. "required": true
  6726. },
  6727. {
  6728. "name": "body",
  6729. "in": "body",
  6730. "schema": {
  6731. "$ref": "#/definitions/MergePullRequestOption"
  6732. }
  6733. }
  6734. ],
  6735. "responses": {
  6736. "200": {
  6737. "$ref": "#/responses/empty"
  6738. },
  6739. "405": {
  6740. "$ref": "#/responses/empty"
  6741. },
  6742. "409": {
  6743. "$ref": "#/responses/error"
  6744. }
  6745. }
  6746. }
  6747. },
  6748. "/repos/{owner}/{repo}/pulls/{index}/reviews": {
  6749. "get": {
  6750. "produces": [
  6751. "application/json"
  6752. ],
  6753. "tags": [
  6754. "repository"
  6755. ],
  6756. "summary": "List all reviews for a pull request",
  6757. "operationId": "repoListPullReviews",
  6758. "parameters": [
  6759. {
  6760. "type": "string",
  6761. "description": "owner of the repo",
  6762. "name": "owner",
  6763. "in": "path",
  6764. "required": true
  6765. },
  6766. {
  6767. "type": "string",
  6768. "description": "name of the repo",
  6769. "name": "repo",
  6770. "in": "path",
  6771. "required": true
  6772. },
  6773. {
  6774. "type": "integer",
  6775. "format": "int64",
  6776. "description": "index of the pull request",
  6777. "name": "index",
  6778. "in": "path",
  6779. "required": true
  6780. },
  6781. {
  6782. "type": "integer",
  6783. "description": "page number of results to return (1-based)",
  6784. "name": "page",
  6785. "in": "query"
  6786. },
  6787. {
  6788. "type": "integer",
  6789. "description": "page size of results, maximum page size is 50",
  6790. "name": "limit",
  6791. "in": "query"
  6792. }
  6793. ],
  6794. "responses": {
  6795. "200": {
  6796. "$ref": "#/responses/PullReviewList"
  6797. },
  6798. "404": {
  6799. "$ref": "#/responses/notFound"
  6800. }
  6801. }
  6802. },
  6803. "post": {
  6804. "produces": [
  6805. "application/json"
  6806. ],
  6807. "tags": [
  6808. "repository"
  6809. ],
  6810. "summary": "Create a review to an pull request",
  6811. "operationId": "repoCreatePullReview",
  6812. "parameters": [
  6813. {
  6814. "type": "string",
  6815. "description": "owner of the repo",
  6816. "name": "owner",
  6817. "in": "path",
  6818. "required": true
  6819. },
  6820. {
  6821. "type": "string",
  6822. "description": "name of the repo",
  6823. "name": "repo",
  6824. "in": "path",
  6825. "required": true
  6826. },
  6827. {
  6828. "type": "integer",
  6829. "format": "int64",
  6830. "description": "index of the pull request",
  6831. "name": "index",
  6832. "in": "path",
  6833. "required": true
  6834. },
  6835. {
  6836. "name": "body",
  6837. "in": "body",
  6838. "required": true,
  6839. "schema": {
  6840. "$ref": "#/definitions/CreatePullReviewOptions"
  6841. }
  6842. }
  6843. ],
  6844. "responses": {
  6845. "200": {
  6846. "$ref": "#/responses/PullReview"
  6847. },
  6848. "404": {
  6849. "$ref": "#/responses/notFound"
  6850. },
  6851. "422": {
  6852. "$ref": "#/responses/validationError"
  6853. }
  6854. }
  6855. }
  6856. },
  6857. "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}": {
  6858. "get": {
  6859. "produces": [
  6860. "application/json"
  6861. ],
  6862. "tags": [
  6863. "repository"
  6864. ],
  6865. "summary": "Get a specific review for a pull request",
  6866. "operationId": "repoGetPullReview",
  6867. "parameters": [
  6868. {
  6869. "type": "string",
  6870. "description": "owner of the repo",
  6871. "name": "owner",
  6872. "in": "path",
  6873. "required": true
  6874. },
  6875. {
  6876. "type": "string",
  6877. "description": "name of the repo",
  6878. "name": "repo",
  6879. "in": "path",
  6880. "required": true
  6881. },
  6882. {
  6883. "type": "integer",
  6884. "format": "int64",
  6885. "description": "index of the pull request",
  6886. "name": "index",
  6887. "in": "path",
  6888. "required": true
  6889. },
  6890. {
  6891. "type": "integer",
  6892. "format": "int64",
  6893. "description": "id of the review",
  6894. "name": "id",
  6895. "in": "path",
  6896. "required": true
  6897. }
  6898. ],
  6899. "responses": {
  6900. "200": {
  6901. "$ref": "#/responses/PullReview"
  6902. },
  6903. "404": {
  6904. "$ref": "#/responses/notFound"
  6905. }
  6906. }
  6907. },
  6908. "post": {
  6909. "produces": [
  6910. "application/json"
  6911. ],
  6912. "tags": [
  6913. "repository"
  6914. ],
  6915. "summary": "Submit a pending review to an pull request",
  6916. "operationId": "repoSubmitPullReview",
  6917. "parameters": [
  6918. {
  6919. "type": "string",
  6920. "description": "owner of the repo",
  6921. "name": "owner",
  6922. "in": "path",
  6923. "required": true
  6924. },
  6925. {
  6926. "type": "string",
  6927. "description": "name of the repo",
  6928. "name": "repo",
  6929. "in": "path",
  6930. "required": true
  6931. },
  6932. {
  6933. "type": "integer",
  6934. "format": "int64",
  6935. "description": "index of the pull request",
  6936. "name": "index",
  6937. "in": "path",
  6938. "required": true
  6939. },
  6940. {
  6941. "type": "integer",
  6942. "format": "int64",
  6943. "description": "id of the review",
  6944. "name": "id",
  6945. "in": "path",
  6946. "required": true
  6947. },
  6948. {
  6949. "name": "body",
  6950. "in": "body",
  6951. "required": true,
  6952. "schema": {
  6953. "$ref": "#/definitions/SubmitPullReviewOptions"
  6954. }
  6955. }
  6956. ],
  6957. "responses": {
  6958. "200": {
  6959. "$ref": "#/responses/PullReview"
  6960. },
  6961. "404": {
  6962. "$ref": "#/responses/notFound"
  6963. },
  6964. "422": {
  6965. "$ref": "#/responses/validationError"
  6966. }
  6967. }
  6968. },
  6969. "delete": {
  6970. "produces": [
  6971. "application/json"
  6972. ],
  6973. "tags": [
  6974. "repository"
  6975. ],
  6976. "summary": "Delete a specific review from a pull request",
  6977. "operationId": "repoDeletePullReview",
  6978. "parameters": [
  6979. {
  6980. "type": "string",
  6981. "description": "owner of the repo",
  6982. "name": "owner",
  6983. "in": "path",
  6984. "required": true
  6985. },
  6986. {
  6987. "type": "string",
  6988. "description": "name of the repo",
  6989. "name": "repo",
  6990. "in": "path",
  6991. "required": true
  6992. },
  6993. {
  6994. "type": "integer",
  6995. "format": "int64",
  6996. "description": "index of the pull request",
  6997. "name": "index",
  6998. "in": "path",
  6999. "required": true
  7000. },
  7001. {
  7002. "type": "integer",
  7003. "format": "int64",
  7004. "description": "id of the review",
  7005. "name": "id",
  7006. "in": "path",
  7007. "required": true
  7008. }
  7009. ],
  7010. "responses": {
  7011. "204": {
  7012. "$ref": "#/responses/empty"
  7013. },
  7014. "403": {
  7015. "$ref": "#/responses/forbidden"
  7016. },
  7017. "404": {
  7018. "$ref": "#/responses/notFound"
  7019. }
  7020. }
  7021. }
  7022. },
  7023. "/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments": {
  7024. "get": {
  7025. "produces": [
  7026. "application/json"
  7027. ],
  7028. "tags": [
  7029. "repository"
  7030. ],
  7031. "summary": "Get a specific review for a pull request",
  7032. "operationId": "repoGetPullReviewComments",
  7033. "parameters": [
  7034. {
  7035. "type": "string",
  7036. "description": "owner of the repo",
  7037. "name": "owner",
  7038. "in": "path",
  7039. "required": true
  7040. },
  7041. {
  7042. "type": "string",
  7043. "description": "name of the repo",
  7044. "name": "repo",
  7045. "in": "path",
  7046. "required": true
  7047. },
  7048. {
  7049. "type": "integer",
  7050. "format": "int64",
  7051. "description": "index of the pull request",
  7052. "name": "index",
  7053. "in": "path",
  7054. "required": true
  7055. },
  7056. {
  7057. "type": "integer",
  7058. "format": "int64",
  7059. "description": "id of the review",
  7060. "name": "id",
  7061. "in": "path",
  7062. "required": true
  7063. }
  7064. ],
  7065. "responses": {
  7066. "200": {
  7067. "$ref": "#/responses/PullReviewCommentList"
  7068. },
  7069. "404": {
  7070. "$ref": "#/responses/notFound"
  7071. }
  7072. }
  7073. }
  7074. },
  7075. "/repos/{owner}/{repo}/raw/{filepath}": {
  7076. "get": {
  7077. "produces": [
  7078. "application/json"
  7079. ],
  7080. "tags": [
  7081. "repository"
  7082. ],
  7083. "summary": "Get a file from a repository",
  7084. "operationId": "repoGetRawFile",
  7085. "parameters": [
  7086. {
  7087. "type": "string",
  7088. "description": "owner of the repo",
  7089. "name": "owner",
  7090. "in": "path",
  7091. "required": true
  7092. },
  7093. {
  7094. "type": "string",
  7095. "description": "name of the repo",
  7096. "name": "repo",
  7097. "in": "path",
  7098. "required": true
  7099. },
  7100. {
  7101. "type": "string",
  7102. "description": "filepath of the file to get",
  7103. "name": "filepath",
  7104. "in": "path",
  7105. "required": true
  7106. }
  7107. ],
  7108. "responses": {
  7109. "200": {
  7110. "description": "success"
  7111. },
  7112. "404": {
  7113. "$ref": "#/responses/notFound"
  7114. }
  7115. }
  7116. }
  7117. },
  7118. "/repos/{owner}/{repo}/releases": {
  7119. "get": {
  7120. "produces": [
  7121. "application/json"
  7122. ],
  7123. "tags": [
  7124. "repository"
  7125. ],
  7126. "summary": "List a repo's releases",
  7127. "operationId": "repoListReleases",
  7128. "parameters": [
  7129. {
  7130. "type": "string",
  7131. "description": "owner of the repo",
  7132. "name": "owner",
  7133. "in": "path",
  7134. "required": true
  7135. },
  7136. {
  7137. "type": "string",
  7138. "description": "name of the repo",
  7139. "name": "repo",
  7140. "in": "path",
  7141. "required": true
  7142. },
  7143. {
  7144. "type": "integer",
  7145. "description": "items count every page wants to load",
  7146. "name": "per_page",
  7147. "in": "query"
  7148. },
  7149. {
  7150. "type": "integer",
  7151. "description": "page number of results to return (1-based)",
  7152. "name": "page",
  7153. "in": "query"
  7154. },
  7155. {
  7156. "type": "integer",
  7157. "description": "page size of results, maximum page size is 50",
  7158. "name": "limit",
  7159. "in": "query"
  7160. }
  7161. ],
  7162. "responses": {
  7163. "200": {
  7164. "$ref": "#/responses/ReleaseList"
  7165. }
  7166. }
  7167. },
  7168. "post": {
  7169. "consumes": [
  7170. "application/json"
  7171. ],
  7172. "produces": [
  7173. "application/json"
  7174. ],
  7175. "tags": [
  7176. "repository"
  7177. ],
  7178. "summary": "Create a release",
  7179. "operationId": "repoCreateRelease",
  7180. "parameters": [
  7181. {
  7182. "type": "string",
  7183. "description": "owner of the repo",
  7184. "name": "owner",
  7185. "in": "path",
  7186. "required": true
  7187. },
  7188. {
  7189. "type": "string",
  7190. "description": "name of the repo",
  7191. "name": "repo",
  7192. "in": "path",
  7193. "required": true
  7194. },
  7195. {
  7196. "name": "body",
  7197. "in": "body",
  7198. "schema": {
  7199. "$ref": "#/definitions/CreateReleaseOption"
  7200. }
  7201. }
  7202. ],
  7203. "responses": {
  7204. "201": {
  7205. "$ref": "#/responses/Release"
  7206. },
  7207. "409": {
  7208. "$ref": "#/responses/error"
  7209. }
  7210. }
  7211. }
  7212. },
  7213. "/repos/{owner}/{repo}/releases/{id}": {
  7214. "get": {
  7215. "produces": [
  7216. "application/json"
  7217. ],
  7218. "tags": [
  7219. "repository"
  7220. ],
  7221. "summary": "Get a release",
  7222. "operationId": "repoGetRelease",
  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": "id of the release to get",
  7242. "name": "id",
  7243. "in": "path",
  7244. "required": true
  7245. }
  7246. ],
  7247. "responses": {
  7248. "200": {
  7249. "$ref": "#/responses/Release"
  7250. }
  7251. }
  7252. },
  7253. "delete": {
  7254. "tags": [
  7255. "repository"
  7256. ],
  7257. "summary": "Delete a release",
  7258. "operationId": "repoDeleteRelease",
  7259. "parameters": [
  7260. {
  7261. "type": "string",
  7262. "description": "owner of the repo",
  7263. "name": "owner",
  7264. "in": "path",
  7265. "required": true
  7266. },
  7267. {
  7268. "type": "string",
  7269. "description": "name of the repo",
  7270. "name": "repo",
  7271. "in": "path",
  7272. "required": true
  7273. },
  7274. {
  7275. "type": "integer",
  7276. "format": "int64",
  7277. "description": "id of the release to delete",
  7278. "name": "id",
  7279. "in": "path",
  7280. "required": true
  7281. }
  7282. ],
  7283. "responses": {
  7284. "204": {
  7285. "$ref": "#/responses/empty"
  7286. }
  7287. }
  7288. },
  7289. "patch": {
  7290. "consumes": [
  7291. "application/json"
  7292. ],
  7293. "produces": [
  7294. "application/json"
  7295. ],
  7296. "tags": [
  7297. "repository"
  7298. ],
  7299. "summary": "Update a release",
  7300. "operationId": "repoEditRelease",
  7301. "parameters": [
  7302. {
  7303. "type": "string",
  7304. "description": "owner of the repo",
  7305. "name": "owner",
  7306. "in": "path",
  7307. "required": true
  7308. },
  7309. {
  7310. "type": "string",
  7311. "description": "name of the repo",
  7312. "name": "repo",
  7313. "in": "path",
  7314. "required": true
  7315. },
  7316. {
  7317. "type": "integer",
  7318. "format": "int64",
  7319. "description": "id of the release to edit",
  7320. "name": "id",
  7321. "in": "path",
  7322. "required": true
  7323. },
  7324. {
  7325. "name": "body",
  7326. "in": "body",
  7327. "schema": {
  7328. "$ref": "#/definitions/EditReleaseOption"
  7329. }
  7330. }
  7331. ],
  7332. "responses": {
  7333. "200": {
  7334. "$ref": "#/responses/Release"
  7335. }
  7336. }
  7337. }
  7338. },
  7339. "/repos/{owner}/{repo}/releases/{id}/assets": {
  7340. "get": {
  7341. "produces": [
  7342. "application/json"
  7343. ],
  7344. "tags": [
  7345. "repository"
  7346. ],
  7347. "summary": "List release's attachments",
  7348. "operationId": "repoListReleaseAttachments",
  7349. "parameters": [
  7350. {
  7351. "type": "string",
  7352. "description": "owner of the repo",
  7353. "name": "owner",
  7354. "in": "path",
  7355. "required": true
  7356. },
  7357. {
  7358. "type": "string",
  7359. "description": "name of the repo",
  7360. "name": "repo",
  7361. "in": "path",
  7362. "required": true
  7363. },
  7364. {
  7365. "type": "integer",
  7366. "format": "int64",
  7367. "description": "id of the release",
  7368. "name": "id",
  7369. "in": "path",
  7370. "required": true
  7371. }
  7372. ],
  7373. "responses": {
  7374. "200": {
  7375. "$ref": "#/responses/AttachmentList"
  7376. }
  7377. }
  7378. },
  7379. "post": {
  7380. "consumes": [
  7381. "multipart/form-data"
  7382. ],
  7383. "produces": [
  7384. "application/json"
  7385. ],
  7386. "tags": [
  7387. "repository"
  7388. ],
  7389. "summary": "Create a release attachment",
  7390. "operationId": "repoCreateReleaseAttachment",
  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": "id of the release",
  7410. "name": "id",
  7411. "in": "path",
  7412. "required": true
  7413. },
  7414. {
  7415. "type": "string",
  7416. "description": "name of the attachment",
  7417. "name": "name",
  7418. "in": "query"
  7419. },
  7420. {
  7421. "type": "file",
  7422. "description": "attachment to upload",
  7423. "name": "attachment",
  7424. "in": "formData",
  7425. "required": true
  7426. }
  7427. ],
  7428. "responses": {
  7429. "201": {
  7430. "$ref": "#/responses/Attachment"
  7431. },
  7432. "400": {
  7433. "$ref": "#/responses/error"
  7434. }
  7435. }
  7436. }
  7437. },
  7438. "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": {
  7439. "get": {
  7440. "produces": [
  7441. "application/json"
  7442. ],
  7443. "tags": [
  7444. "repository"
  7445. ],
  7446. "summary": "Get a release attachment",
  7447. "operationId": "repoGetReleaseAttachment",
  7448. "parameters": [
  7449. {
  7450. "type": "string",
  7451. "description": "owner of the repo",
  7452. "name": "owner",
  7453. "in": "path",
  7454. "required": true
  7455. },
  7456. {
  7457. "type": "string",
  7458. "description": "name of the repo",
  7459. "name": "repo",
  7460. "in": "path",
  7461. "required": true
  7462. },
  7463. {
  7464. "type": "integer",
  7465. "format": "int64",
  7466. "description": "id of the release",
  7467. "name": "id",
  7468. "in": "path",
  7469. "required": true
  7470. },
  7471. {
  7472. "type": "integer",
  7473. "format": "int64",
  7474. "description": "id of the attachment to get",
  7475. "name": "attachment_id",
  7476. "in": "path",
  7477. "required": true
  7478. }
  7479. ],
  7480. "responses": {
  7481. "200": {
  7482. "$ref": "#/responses/Attachment"
  7483. }
  7484. }
  7485. },
  7486. "delete": {
  7487. "produces": [
  7488. "application/json"
  7489. ],
  7490. "tags": [
  7491. "repository"
  7492. ],
  7493. "summary": "Delete a release attachment",
  7494. "operationId": "repoDeleteReleaseAttachment",
  7495. "parameters": [
  7496. {
  7497. "type": "string",
  7498. "description": "owner of the repo",
  7499. "name": "owner",
  7500. "in": "path",
  7501. "required": true
  7502. },
  7503. {
  7504. "type": "string",
  7505. "description": "name of the repo",
  7506. "name": "repo",
  7507. "in": "path",
  7508. "required": true
  7509. },
  7510. {
  7511. "type": "integer",
  7512. "format": "int64",
  7513. "description": "id of the release",
  7514. "name": "id",
  7515. "in": "path",
  7516. "required": true
  7517. },
  7518. {
  7519. "type": "integer",
  7520. "format": "int64",
  7521. "description": "id of the attachment to delete",
  7522. "name": "attachment_id",
  7523. "in": "path",
  7524. "required": true
  7525. }
  7526. ],
  7527. "responses": {
  7528. "204": {
  7529. "$ref": "#/responses/empty"
  7530. }
  7531. }
  7532. },
  7533. "patch": {
  7534. "consumes": [
  7535. "application/json"
  7536. ],
  7537. "produces": [
  7538. "application/json"
  7539. ],
  7540. "tags": [
  7541. "repository"
  7542. ],
  7543. "summary": "Edit a release attachment",
  7544. "operationId": "repoEditReleaseAttachment",
  7545. "parameters": [
  7546. {
  7547. "type": "string",
  7548. "description": "owner of the repo",
  7549. "name": "owner",
  7550. "in": "path",
  7551. "required": true
  7552. },
  7553. {
  7554. "type": "string",
  7555. "description": "name of the repo",
  7556. "name": "repo",
  7557. "in": "path",
  7558. "required": true
  7559. },
  7560. {
  7561. "type": "integer",
  7562. "format": "int64",
  7563. "description": "id of the release",
  7564. "name": "id",
  7565. "in": "path",
  7566. "required": true
  7567. },
  7568. {
  7569. "type": "integer",
  7570. "format": "int64",
  7571. "description": "id of the attachment to edit",
  7572. "name": "attachment_id",
  7573. "in": "path",
  7574. "required": true
  7575. },
  7576. {
  7577. "name": "body",
  7578. "in": "body",
  7579. "schema": {
  7580. "$ref": "#/definitions/EditAttachmentOptions"
  7581. }
  7582. }
  7583. ],
  7584. "responses": {
  7585. "201": {
  7586. "$ref": "#/responses/Attachment"
  7587. }
  7588. }
  7589. }
  7590. },
  7591. "/repos/{owner}/{repo}/signing-key.gpg": {
  7592. "get": {
  7593. "produces": [
  7594. "text/plain"
  7595. ],
  7596. "tags": [
  7597. "repository"
  7598. ],
  7599. "summary": "Get signing-key.gpg for given repository",
  7600. "operationId": "repoSigningKey",
  7601. "parameters": [
  7602. {
  7603. "type": "string",
  7604. "description": "owner of the repo",
  7605. "name": "owner",
  7606. "in": "path",
  7607. "required": true
  7608. },
  7609. {
  7610. "type": "string",
  7611. "description": "name of the repo",
  7612. "name": "repo",
  7613. "in": "path",
  7614. "required": true
  7615. }
  7616. ],
  7617. "responses": {
  7618. "200": {
  7619. "description": "GPG armored public key",
  7620. "schema": {
  7621. "type": "string"
  7622. }
  7623. }
  7624. }
  7625. }
  7626. },
  7627. "/repos/{owner}/{repo}/stargazers": {
  7628. "get": {
  7629. "produces": [
  7630. "application/json"
  7631. ],
  7632. "tags": [
  7633. "repository"
  7634. ],
  7635. "summary": "List a repo's stargazers",
  7636. "operationId": "repoListStargazers",
  7637. "parameters": [
  7638. {
  7639. "type": "string",
  7640. "description": "owner of the repo",
  7641. "name": "owner",
  7642. "in": "path",
  7643. "required": true
  7644. },
  7645. {
  7646. "type": "string",
  7647. "description": "name of the repo",
  7648. "name": "repo",
  7649. "in": "path",
  7650. "required": true
  7651. },
  7652. {
  7653. "type": "integer",
  7654. "description": "page number of results to return (1-based)",
  7655. "name": "page",
  7656. "in": "query"
  7657. },
  7658. {
  7659. "type": "integer",
  7660. "description": "page size of results, maximum page size is 50",
  7661. "name": "limit",
  7662. "in": "query"
  7663. }
  7664. ],
  7665. "responses": {
  7666. "200": {
  7667. "$ref": "#/responses/UserList"
  7668. }
  7669. }
  7670. }
  7671. },
  7672. "/repos/{owner}/{repo}/statuses/{sha}": {
  7673. "get": {
  7674. "produces": [
  7675. "application/json"
  7676. ],
  7677. "tags": [
  7678. "repository"
  7679. ],
  7680. "summary": "Get a commit's statuses",
  7681. "operationId": "repoListStatuses",
  7682. "parameters": [
  7683. {
  7684. "type": "string",
  7685. "description": "owner of the repo",
  7686. "name": "owner",
  7687. "in": "path",
  7688. "required": true
  7689. },
  7690. {
  7691. "type": "string",
  7692. "description": "name of the repo",
  7693. "name": "repo",
  7694. "in": "path",
  7695. "required": true
  7696. },
  7697. {
  7698. "type": "string",
  7699. "description": "sha of the commit",
  7700. "name": "sha",
  7701. "in": "path",
  7702. "required": true
  7703. },
  7704. {
  7705. "enum": [
  7706. "oldest",
  7707. "recentupdate",
  7708. "leastupdate",
  7709. "leastindex",
  7710. "highestindex"
  7711. ],
  7712. "type": "string",
  7713. "description": "type of sort",
  7714. "name": "sort",
  7715. "in": "query"
  7716. },
  7717. {
  7718. "enum": [
  7719. "pending",
  7720. "success",
  7721. "error",
  7722. "failure",
  7723. "warning"
  7724. ],
  7725. "type": "string",
  7726. "description": "type of state",
  7727. "name": "state",
  7728. "in": "query"
  7729. },
  7730. {
  7731. "type": "integer",
  7732. "description": "page number of results to return (1-based)",
  7733. "name": "page",
  7734. "in": "query"
  7735. },
  7736. {
  7737. "type": "integer",
  7738. "description": "page size of results, maximum page size is 50",
  7739. "name": "limit",
  7740. "in": "query"
  7741. }
  7742. ],
  7743. "responses": {
  7744. "200": {
  7745. "$ref": "#/responses/StatusList"
  7746. },
  7747. "400": {
  7748. "$ref": "#/responses/error"
  7749. }
  7750. }
  7751. },
  7752. "post": {
  7753. "produces": [
  7754. "application/json"
  7755. ],
  7756. "tags": [
  7757. "repository"
  7758. ],
  7759. "summary": "Create a commit status",
  7760. "operationId": "repoCreateStatus",
  7761. "parameters": [
  7762. {
  7763. "type": "string",
  7764. "description": "owner of the repo",
  7765. "name": "owner",
  7766. "in": "path",
  7767. "required": true
  7768. },
  7769. {
  7770. "type": "string",
  7771. "description": "name of the repo",
  7772. "name": "repo",
  7773. "in": "path",
  7774. "required": true
  7775. },
  7776. {
  7777. "type": "string",
  7778. "description": "sha of the commit",
  7779. "name": "sha",
  7780. "in": "path",
  7781. "required": true
  7782. },
  7783. {
  7784. "name": "body",
  7785. "in": "body",
  7786. "schema": {
  7787. "$ref": "#/definitions/CreateStatusOption"
  7788. }
  7789. }
  7790. ],
  7791. "responses": {
  7792. "201": {
  7793. "$ref": "#/responses/Status"
  7794. },
  7795. "400": {
  7796. "$ref": "#/responses/error"
  7797. }
  7798. }
  7799. }
  7800. },
  7801. "/repos/{owner}/{repo}/subscribers": {
  7802. "get": {
  7803. "produces": [
  7804. "application/json"
  7805. ],
  7806. "tags": [
  7807. "repository"
  7808. ],
  7809. "summary": "List a repo's watchers",
  7810. "operationId": "repoListSubscribers",
  7811. "parameters": [
  7812. {
  7813. "type": "string",
  7814. "description": "owner of the repo",
  7815. "name": "owner",
  7816. "in": "path",
  7817. "required": true
  7818. },
  7819. {
  7820. "type": "string",
  7821. "description": "name of the repo",
  7822. "name": "repo",
  7823. "in": "path",
  7824. "required": true
  7825. },
  7826. {
  7827. "type": "integer",
  7828. "description": "page number of results to return (1-based)",
  7829. "name": "page",
  7830. "in": "query"
  7831. },
  7832. {
  7833. "type": "integer",
  7834. "description": "page size of results, maximum page size is 50",
  7835. "name": "limit",
  7836. "in": "query"
  7837. }
  7838. ],
  7839. "responses": {
  7840. "200": {
  7841. "$ref": "#/responses/UserList"
  7842. }
  7843. }
  7844. }
  7845. },
  7846. "/repos/{owner}/{repo}/subscription": {
  7847. "get": {
  7848. "tags": [
  7849. "repository"
  7850. ],
  7851. "summary": "Check if the current user is watching a repo",
  7852. "operationId": "userCurrentCheckSubscription",
  7853. "parameters": [
  7854. {
  7855. "type": "string",
  7856. "description": "owner of the repo",
  7857. "name": "owner",
  7858. "in": "path",
  7859. "required": true
  7860. },
  7861. {
  7862. "type": "string",
  7863. "description": "name of the repo",
  7864. "name": "repo",
  7865. "in": "path",
  7866. "required": true
  7867. }
  7868. ],
  7869. "responses": {
  7870. "200": {
  7871. "$ref": "#/responses/WatchInfo"
  7872. },
  7873. "404": {
  7874. "description": "User is not watching this repo or repo do not exist"
  7875. }
  7876. }
  7877. },
  7878. "put": {
  7879. "tags": [
  7880. "repository"
  7881. ],
  7882. "summary": "Watch a repo",
  7883. "operationId": "userCurrentPutSubscription",
  7884. "parameters": [
  7885. {
  7886. "type": "string",
  7887. "description": "owner of the repo",
  7888. "name": "owner",
  7889. "in": "path",
  7890. "required": true
  7891. },
  7892. {
  7893. "type": "string",
  7894. "description": "name of the repo",
  7895. "name": "repo",
  7896. "in": "path",
  7897. "required": true
  7898. }
  7899. ],
  7900. "responses": {
  7901. "200": {
  7902. "$ref": "#/responses/WatchInfo"
  7903. }
  7904. }
  7905. },
  7906. "delete": {
  7907. "tags": [
  7908. "repository"
  7909. ],
  7910. "summary": "Unwatch a repo",
  7911. "operationId": "userCurrentDeleteSubscription",
  7912. "parameters": [
  7913. {
  7914. "type": "string",
  7915. "description": "owner of the repo",
  7916. "name": "owner",
  7917. "in": "path",
  7918. "required": true
  7919. },
  7920. {
  7921. "type": "string",
  7922. "description": "name of the repo",
  7923. "name": "repo",
  7924. "in": "path",
  7925. "required": true
  7926. }
  7927. ],
  7928. "responses": {
  7929. "204": {
  7930. "$ref": "#/responses/empty"
  7931. }
  7932. }
  7933. }
  7934. },
  7935. "/repos/{owner}/{repo}/tags": {
  7936. "get": {
  7937. "produces": [
  7938. "application/json"
  7939. ],
  7940. "tags": [
  7941. "repository"
  7942. ],
  7943. "summary": "List a repository's tags",
  7944. "operationId": "repoListTags",
  7945. "parameters": [
  7946. {
  7947. "type": "string",
  7948. "description": "owner of the repo",
  7949. "name": "owner",
  7950. "in": "path",
  7951. "required": true
  7952. },
  7953. {
  7954. "type": "string",
  7955. "description": "name of the repo",
  7956. "name": "repo",
  7957. "in": "path",
  7958. "required": true
  7959. },
  7960. {
  7961. "type": "integer",
  7962. "description": "page number of results to return (1-based)",
  7963. "name": "page",
  7964. "in": "query"
  7965. },
  7966. {
  7967. "type": "integer",
  7968. "description": "page size of results, default maximum page size is 50",
  7969. "name": "limit",
  7970. "in": "query"
  7971. }
  7972. ],
  7973. "responses": {
  7974. "200": {
  7975. "$ref": "#/responses/TagList"
  7976. }
  7977. }
  7978. }
  7979. },
  7980. "/repos/{owner}/{repo}/times": {
  7981. "get": {
  7982. "produces": [
  7983. "application/json"
  7984. ],
  7985. "tags": [
  7986. "repository"
  7987. ],
  7988. "summary": "List a repo's tracked times",
  7989. "operationId": "repoTrackedTimes",
  7990. "parameters": [
  7991. {
  7992. "type": "string",
  7993. "description": "owner of the repo",
  7994. "name": "owner",
  7995. "in": "path",
  7996. "required": true
  7997. },
  7998. {
  7999. "type": "string",
  8000. "description": "name of the repo",
  8001. "name": "repo",
  8002. "in": "path",
  8003. "required": true
  8004. },
  8005. {
  8006. "type": "string",
  8007. "description": "optional filter by user",
  8008. "name": "user",
  8009. "in": "query"
  8010. },
  8011. {
  8012. "type": "string",
  8013. "format": "date-time",
  8014. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  8015. "name": "since",
  8016. "in": "query"
  8017. },
  8018. {
  8019. "type": "string",
  8020. "format": "date-time",
  8021. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  8022. "name": "before",
  8023. "in": "query"
  8024. },
  8025. {
  8026. "type": "integer",
  8027. "description": "page number of results to return (1-based)",
  8028. "name": "page",
  8029. "in": "query"
  8030. },
  8031. {
  8032. "type": "integer",
  8033. "description": "page size of results, maximum page size is 50",
  8034. "name": "limit",
  8035. "in": "query"
  8036. }
  8037. ],
  8038. "responses": {
  8039. "200": {
  8040. "$ref": "#/responses/TrackedTimeList"
  8041. },
  8042. "400": {
  8043. "$ref": "#/responses/error"
  8044. },
  8045. "403": {
  8046. "$ref": "#/responses/forbidden"
  8047. }
  8048. }
  8049. }
  8050. },
  8051. "/repos/{owner}/{repo}/times/{user}": {
  8052. "get": {
  8053. "produces": [
  8054. "application/json"
  8055. ],
  8056. "tags": [
  8057. "repository"
  8058. ],
  8059. "summary": "List a user's tracked times in a repo",
  8060. "operationId": "userTrackedTimes",
  8061. "deprecated": true,
  8062. "parameters": [
  8063. {
  8064. "type": "string",
  8065. "description": "owner of the repo",
  8066. "name": "owner",
  8067. "in": "path",
  8068. "required": true
  8069. },
  8070. {
  8071. "type": "string",
  8072. "description": "name of the repo",
  8073. "name": "repo",
  8074. "in": "path",
  8075. "required": true
  8076. },
  8077. {
  8078. "type": "string",
  8079. "description": "username of user",
  8080. "name": "user",
  8081. "in": "path",
  8082. "required": true
  8083. }
  8084. ],
  8085. "responses": {
  8086. "200": {
  8087. "$ref": "#/responses/TrackedTimeList"
  8088. },
  8089. "400": {
  8090. "$ref": "#/responses/error"
  8091. },
  8092. "403": {
  8093. "$ref": "#/responses/forbidden"
  8094. }
  8095. }
  8096. }
  8097. },
  8098. "/repos/{owner}/{repo}/topics": {
  8099. "get": {
  8100. "produces": [
  8101. "application/json"
  8102. ],
  8103. "tags": [
  8104. "repository"
  8105. ],
  8106. "summary": "Get list of topics that a repository has",
  8107. "operationId": "repoListTopics",
  8108. "parameters": [
  8109. {
  8110. "type": "string",
  8111. "description": "owner of the repo",
  8112. "name": "owner",
  8113. "in": "path",
  8114. "required": true
  8115. },
  8116. {
  8117. "type": "string",
  8118. "description": "name of the repo",
  8119. "name": "repo",
  8120. "in": "path",
  8121. "required": true
  8122. },
  8123. {
  8124. "type": "integer",
  8125. "description": "page number of results to return (1-based)",
  8126. "name": "page",
  8127. "in": "query"
  8128. },
  8129. {
  8130. "type": "integer",
  8131. "description": "page size of results, maximum page size is 50",
  8132. "name": "limit",
  8133. "in": "query"
  8134. }
  8135. ],
  8136. "responses": {
  8137. "200": {
  8138. "$ref": "#/responses/TopicNames"
  8139. }
  8140. }
  8141. },
  8142. "put": {
  8143. "produces": [
  8144. "application/json"
  8145. ],
  8146. "tags": [
  8147. "repository"
  8148. ],
  8149. "summary": "Replace list of topics for a repository",
  8150. "operationId": "repoUpdateTopics",
  8151. "parameters": [
  8152. {
  8153. "type": "string",
  8154. "description": "owner of the repo",
  8155. "name": "owner",
  8156. "in": "path",
  8157. "required": true
  8158. },
  8159. {
  8160. "type": "string",
  8161. "description": "name of the repo",
  8162. "name": "repo",
  8163. "in": "path",
  8164. "required": true
  8165. },
  8166. {
  8167. "name": "body",
  8168. "in": "body",
  8169. "schema": {
  8170. "$ref": "#/definitions/RepoTopicOptions"
  8171. }
  8172. }
  8173. ],
  8174. "responses": {
  8175. "204": {
  8176. "$ref": "#/responses/empty"
  8177. },
  8178. "422": {
  8179. "$ref": "#/responses/invalidTopicsError"
  8180. }
  8181. }
  8182. }
  8183. },
  8184. "/repos/{owner}/{repo}/topics/{topic}": {
  8185. "put": {
  8186. "produces": [
  8187. "application/json"
  8188. ],
  8189. "tags": [
  8190. "repository"
  8191. ],
  8192. "summary": "Add a topic to a repository",
  8193. "operationId": "repoAddTopíc",
  8194. "parameters": [
  8195. {
  8196. "type": "string",
  8197. "description": "owner of the repo",
  8198. "name": "owner",
  8199. "in": "path",
  8200. "required": true
  8201. },
  8202. {
  8203. "type": "string",
  8204. "description": "name of the repo",
  8205. "name": "repo",
  8206. "in": "path",
  8207. "required": true
  8208. },
  8209. {
  8210. "type": "string",
  8211. "description": "name of the topic to add",
  8212. "name": "topic",
  8213. "in": "path",
  8214. "required": true
  8215. }
  8216. ],
  8217. "responses": {
  8218. "204": {
  8219. "$ref": "#/responses/empty"
  8220. },
  8221. "422": {
  8222. "$ref": "#/responses/invalidTopicsError"
  8223. }
  8224. }
  8225. },
  8226. "delete": {
  8227. "produces": [
  8228. "application/json"
  8229. ],
  8230. "tags": [
  8231. "repository"
  8232. ],
  8233. "summary": "Delete a topic from a repository",
  8234. "operationId": "repoDeleteTopic",
  8235. "parameters": [
  8236. {
  8237. "type": "string",
  8238. "description": "owner of the repo",
  8239. "name": "owner",
  8240. "in": "path",
  8241. "required": true
  8242. },
  8243. {
  8244. "type": "string",
  8245. "description": "name of the repo",
  8246. "name": "repo",
  8247. "in": "path",
  8248. "required": true
  8249. },
  8250. {
  8251. "type": "string",
  8252. "description": "name of the topic to delete",
  8253. "name": "topic",
  8254. "in": "path",
  8255. "required": true
  8256. }
  8257. ],
  8258. "responses": {
  8259. "204": {
  8260. "$ref": "#/responses/empty"
  8261. },
  8262. "422": {
  8263. "$ref": "#/responses/invalidTopicsError"
  8264. }
  8265. }
  8266. }
  8267. },
  8268. "/repos/{owner}/{repo}/transfer": {
  8269. "post": {
  8270. "produces": [
  8271. "application/json"
  8272. ],
  8273. "tags": [
  8274. "repository"
  8275. ],
  8276. "summary": "Transfer a repo ownership",
  8277. "operationId": "repoTransfer",
  8278. "parameters": [
  8279. {
  8280. "type": "string",
  8281. "description": "owner of the repo to transfer",
  8282. "name": "owner",
  8283. "in": "path",
  8284. "required": true
  8285. },
  8286. {
  8287. "type": "string",
  8288. "description": "name of the repo to transfer",
  8289. "name": "repo",
  8290. "in": "path",
  8291. "required": true
  8292. },
  8293. {
  8294. "description": "Transfer Options",
  8295. "name": "body",
  8296. "in": "body",
  8297. "required": true,
  8298. "schema": {
  8299. "$ref": "#/definitions/TransferRepoOption"
  8300. }
  8301. }
  8302. ],
  8303. "responses": {
  8304. "202": {
  8305. "$ref": "#/responses/Repository"
  8306. },
  8307. "403": {
  8308. "$ref": "#/responses/forbidden"
  8309. },
  8310. "404": {
  8311. "$ref": "#/responses/notFound"
  8312. },
  8313. "422": {
  8314. "$ref": "#/responses/validationError"
  8315. }
  8316. }
  8317. }
  8318. },
  8319. "/repositories/{id}": {
  8320. "get": {
  8321. "produces": [
  8322. "application/json"
  8323. ],
  8324. "tags": [
  8325. "repository"
  8326. ],
  8327. "summary": "Get a repository by id",
  8328. "operationId": "repoGetByID",
  8329. "parameters": [
  8330. {
  8331. "type": "integer",
  8332. "format": "int64",
  8333. "description": "id of the repo to get",
  8334. "name": "id",
  8335. "in": "path",
  8336. "required": true
  8337. }
  8338. ],
  8339. "responses": {
  8340. "200": {
  8341. "$ref": "#/responses/Repository"
  8342. }
  8343. }
  8344. }
  8345. },
  8346. "/signing-key.gpg": {
  8347. "get": {
  8348. "produces": [
  8349. "text/plain"
  8350. ],
  8351. "tags": [
  8352. "miscellaneous"
  8353. ],
  8354. "summary": "Get default signing-key.gpg",
  8355. "operationId": "getSigningKey",
  8356. "responses": {
  8357. "200": {
  8358. "description": "GPG armored public key",
  8359. "schema": {
  8360. "type": "string"
  8361. }
  8362. }
  8363. }
  8364. }
  8365. },
  8366. "/teams/{id}": {
  8367. "get": {
  8368. "produces": [
  8369. "application/json"
  8370. ],
  8371. "tags": [
  8372. "organization"
  8373. ],
  8374. "summary": "Get a team",
  8375. "operationId": "orgGetTeam",
  8376. "parameters": [
  8377. {
  8378. "type": "integer",
  8379. "format": "int64",
  8380. "description": "id of the team to get",
  8381. "name": "id",
  8382. "in": "path",
  8383. "required": true
  8384. }
  8385. ],
  8386. "responses": {
  8387. "200": {
  8388. "$ref": "#/responses/Team"
  8389. }
  8390. }
  8391. },
  8392. "delete": {
  8393. "tags": [
  8394. "organization"
  8395. ],
  8396. "summary": "Delete a team",
  8397. "operationId": "orgDeleteTeam",
  8398. "parameters": [
  8399. {
  8400. "type": "integer",
  8401. "format": "int64",
  8402. "description": "id of the team to delete",
  8403. "name": "id",
  8404. "in": "path",
  8405. "required": true
  8406. }
  8407. ],
  8408. "responses": {
  8409. "204": {
  8410. "description": "team deleted"
  8411. }
  8412. }
  8413. },
  8414. "patch": {
  8415. "consumes": [
  8416. "application/json"
  8417. ],
  8418. "produces": [
  8419. "application/json"
  8420. ],
  8421. "tags": [
  8422. "organization"
  8423. ],
  8424. "summary": "Edit a team",
  8425. "operationId": "orgEditTeam",
  8426. "parameters": [
  8427. {
  8428. "type": "integer",
  8429. "description": "id of the team to edit",
  8430. "name": "id",
  8431. "in": "path",
  8432. "required": true
  8433. },
  8434. {
  8435. "name": "body",
  8436. "in": "body",
  8437. "schema": {
  8438. "$ref": "#/definitions/EditTeamOption"
  8439. }
  8440. }
  8441. ],
  8442. "responses": {
  8443. "200": {
  8444. "$ref": "#/responses/Team"
  8445. }
  8446. }
  8447. }
  8448. },
  8449. "/teams/{id}/members": {
  8450. "get": {
  8451. "produces": [
  8452. "application/json"
  8453. ],
  8454. "tags": [
  8455. "organization"
  8456. ],
  8457. "summary": "List a team's members",
  8458. "operationId": "orgListTeamMembers",
  8459. "parameters": [
  8460. {
  8461. "type": "integer",
  8462. "format": "int64",
  8463. "description": "id of the team",
  8464. "name": "id",
  8465. "in": "path",
  8466. "required": true
  8467. },
  8468. {
  8469. "type": "integer",
  8470. "description": "page number of results to return (1-based)",
  8471. "name": "page",
  8472. "in": "query"
  8473. },
  8474. {
  8475. "type": "integer",
  8476. "description": "page size of results, maximum page size is 50",
  8477. "name": "limit",
  8478. "in": "query"
  8479. }
  8480. ],
  8481. "responses": {
  8482. "200": {
  8483. "$ref": "#/responses/UserList"
  8484. }
  8485. }
  8486. }
  8487. },
  8488. "/teams/{id}/members/{username}": {
  8489. "get": {
  8490. "produces": [
  8491. "application/json"
  8492. ],
  8493. "tags": [
  8494. "organization"
  8495. ],
  8496. "summary": "List a particular member of team",
  8497. "operationId": "orgListTeamMember",
  8498. "parameters": [
  8499. {
  8500. "type": "integer",
  8501. "format": "int64",
  8502. "description": "id of the team",
  8503. "name": "id",
  8504. "in": "path",
  8505. "required": true
  8506. },
  8507. {
  8508. "type": "string",
  8509. "description": "username of the member to list",
  8510. "name": "username",
  8511. "in": "path",
  8512. "required": true
  8513. }
  8514. ],
  8515. "responses": {
  8516. "200": {
  8517. "$ref": "#/responses/User"
  8518. },
  8519. "404": {
  8520. "$ref": "#/responses/notFound"
  8521. }
  8522. }
  8523. },
  8524. "put": {
  8525. "produces": [
  8526. "application/json"
  8527. ],
  8528. "tags": [
  8529. "organization"
  8530. ],
  8531. "summary": "Add a team member",
  8532. "operationId": "orgAddTeamMember",
  8533. "parameters": [
  8534. {
  8535. "type": "integer",
  8536. "format": "int64",
  8537. "description": "id of the team",
  8538. "name": "id",
  8539. "in": "path",
  8540. "required": true
  8541. },
  8542. {
  8543. "type": "string",
  8544. "description": "username of the user to add",
  8545. "name": "username",
  8546. "in": "path",
  8547. "required": true
  8548. }
  8549. ],
  8550. "responses": {
  8551. "204": {
  8552. "$ref": "#/responses/empty"
  8553. },
  8554. "404": {
  8555. "$ref": "#/responses/notFound"
  8556. }
  8557. }
  8558. },
  8559. "delete": {
  8560. "produces": [
  8561. "application/json"
  8562. ],
  8563. "tags": [
  8564. "organization"
  8565. ],
  8566. "summary": "Remove a team member",
  8567. "operationId": "orgRemoveTeamMember",
  8568. "parameters": [
  8569. {
  8570. "type": "integer",
  8571. "format": "int64",
  8572. "description": "id of the team",
  8573. "name": "id",
  8574. "in": "path",
  8575. "required": true
  8576. },
  8577. {
  8578. "type": "string",
  8579. "description": "username of the user to remove",
  8580. "name": "username",
  8581. "in": "path",
  8582. "required": true
  8583. }
  8584. ],
  8585. "responses": {
  8586. "204": {
  8587. "$ref": "#/responses/empty"
  8588. },
  8589. "404": {
  8590. "$ref": "#/responses/notFound"
  8591. }
  8592. }
  8593. }
  8594. },
  8595. "/teams/{id}/repos": {
  8596. "get": {
  8597. "produces": [
  8598. "application/json"
  8599. ],
  8600. "tags": [
  8601. "organization"
  8602. ],
  8603. "summary": "List a team's repos",
  8604. "operationId": "orgListTeamRepos",
  8605. "parameters": [
  8606. {
  8607. "type": "integer",
  8608. "format": "int64",
  8609. "description": "id of the team",
  8610. "name": "id",
  8611. "in": "path",
  8612. "required": true
  8613. },
  8614. {
  8615. "type": "integer",
  8616. "description": "page number of results to return (1-based)",
  8617. "name": "page",
  8618. "in": "query"
  8619. },
  8620. {
  8621. "type": "integer",
  8622. "description": "page size of results, maximum page size is 50",
  8623. "name": "limit",
  8624. "in": "query"
  8625. }
  8626. ],
  8627. "responses": {
  8628. "200": {
  8629. "$ref": "#/responses/RepositoryList"
  8630. }
  8631. }
  8632. }
  8633. },
  8634. "/teams/{id}/repos/{org}/{repo}": {
  8635. "put": {
  8636. "produces": [
  8637. "application/json"
  8638. ],
  8639. "tags": [
  8640. "organization"
  8641. ],
  8642. "summary": "Add a repository to a team",
  8643. "operationId": "orgAddTeamRepository",
  8644. "parameters": [
  8645. {
  8646. "type": "integer",
  8647. "format": "int64",
  8648. "description": "id of the team",
  8649. "name": "id",
  8650. "in": "path",
  8651. "required": true
  8652. },
  8653. {
  8654. "type": "string",
  8655. "description": "organization that owns the repo to add",
  8656. "name": "org",
  8657. "in": "path",
  8658. "required": true
  8659. },
  8660. {
  8661. "type": "string",
  8662. "description": "name of the repo to add",
  8663. "name": "repo",
  8664. "in": "path",
  8665. "required": true
  8666. }
  8667. ],
  8668. "responses": {
  8669. "204": {
  8670. "$ref": "#/responses/empty"
  8671. },
  8672. "403": {
  8673. "$ref": "#/responses/forbidden"
  8674. }
  8675. }
  8676. },
  8677. "delete": {
  8678. "description": "This does not delete the repository, it only removes the repository from the team.",
  8679. "produces": [
  8680. "application/json"
  8681. ],
  8682. "tags": [
  8683. "organization"
  8684. ],
  8685. "summary": "Remove a repository from a team",
  8686. "operationId": "orgRemoveTeamRepository",
  8687. "parameters": [
  8688. {
  8689. "type": "integer",
  8690. "format": "int64",
  8691. "description": "id of the team",
  8692. "name": "id",
  8693. "in": "path",
  8694. "required": true
  8695. },
  8696. {
  8697. "type": "string",
  8698. "description": "organization that owns the repo to remove",
  8699. "name": "org",
  8700. "in": "path",
  8701. "required": true
  8702. },
  8703. {
  8704. "type": "string",
  8705. "description": "name of the repo to remove",
  8706. "name": "repo",
  8707. "in": "path",
  8708. "required": true
  8709. }
  8710. ],
  8711. "responses": {
  8712. "204": {
  8713. "$ref": "#/responses/empty"
  8714. },
  8715. "403": {
  8716. "$ref": "#/responses/forbidden"
  8717. }
  8718. }
  8719. }
  8720. },
  8721. "/topics/search": {
  8722. "get": {
  8723. "produces": [
  8724. "application/json"
  8725. ],
  8726. "tags": [
  8727. "repository"
  8728. ],
  8729. "summary": "search topics via keyword",
  8730. "operationId": "topicSearch",
  8731. "parameters": [
  8732. {
  8733. "type": "string",
  8734. "description": "keywords to search",
  8735. "name": "q",
  8736. "in": "query",
  8737. "required": true
  8738. },
  8739. {
  8740. "type": "integer",
  8741. "description": "page number of results to return (1-based)",
  8742. "name": "page",
  8743. "in": "query"
  8744. },
  8745. {
  8746. "type": "integer",
  8747. "description": "page size of results, maximum page size is 50",
  8748. "name": "limit",
  8749. "in": "query"
  8750. }
  8751. ],
  8752. "responses": {
  8753. "200": {
  8754. "$ref": "#/responses/TopicListResponse"
  8755. },
  8756. "403": {
  8757. "$ref": "#/responses/forbidden"
  8758. }
  8759. }
  8760. }
  8761. },
  8762. "/user": {
  8763. "get": {
  8764. "produces": [
  8765. "application/json"
  8766. ],
  8767. "tags": [
  8768. "user"
  8769. ],
  8770. "summary": "Get the authenticated user",
  8771. "operationId": "userGetCurrent",
  8772. "responses": {
  8773. "200": {
  8774. "$ref": "#/responses/User"
  8775. }
  8776. }
  8777. }
  8778. },
  8779. "/user/applications/oauth2": {
  8780. "get": {
  8781. "produces": [
  8782. "application/json"
  8783. ],
  8784. "tags": [
  8785. "user"
  8786. ],
  8787. "summary": "List the authenticated user's oauth2 applications",
  8788. "operationId": "userGetOauth2Application",
  8789. "parameters": [
  8790. {
  8791. "type": "integer",
  8792. "description": "page number of results to return (1-based)",
  8793. "name": "page",
  8794. "in": "query"
  8795. },
  8796. {
  8797. "type": "integer",
  8798. "description": "page size of results, maximum page size is 50",
  8799. "name": "limit",
  8800. "in": "query"
  8801. }
  8802. ],
  8803. "responses": {
  8804. "200": {
  8805. "$ref": "#/responses/OAuth2ApplicationList"
  8806. }
  8807. }
  8808. },
  8809. "post": {
  8810. "produces": [
  8811. "application/json"
  8812. ],
  8813. "tags": [
  8814. "user"
  8815. ],
  8816. "summary": "creates a new OAuth2 application",
  8817. "operationId": "userCreateOAuth2Application",
  8818. "parameters": [
  8819. {
  8820. "name": "body",
  8821. "in": "body",
  8822. "required": true,
  8823. "schema": {
  8824. "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
  8825. }
  8826. }
  8827. ],
  8828. "responses": {
  8829. "201": {
  8830. "$ref": "#/responses/OAuth2Application"
  8831. }
  8832. }
  8833. }
  8834. },
  8835. "/user/applications/oauth2/{id}": {
  8836. "get": {
  8837. "produces": [
  8838. "application/json"
  8839. ],
  8840. "tags": [
  8841. "user"
  8842. ],
  8843. "summary": "get an OAuth2 Application",
  8844. "operationId": "userGetOAuth2Application",
  8845. "parameters": [
  8846. {
  8847. "type": "integer",
  8848. "format": "int64",
  8849. "description": "Application ID to be found",
  8850. "name": "id",
  8851. "in": "path",
  8852. "required": true
  8853. }
  8854. ],
  8855. "responses": {
  8856. "200": {
  8857. "$ref": "#/responses/OAuth2Application"
  8858. }
  8859. }
  8860. },
  8861. "delete": {
  8862. "produces": [
  8863. "application/json"
  8864. ],
  8865. "tags": [
  8866. "user"
  8867. ],
  8868. "summary": "delete an OAuth2 Application",
  8869. "operationId": "userDeleteOAuth2Application",
  8870. "parameters": [
  8871. {
  8872. "type": "integer",
  8873. "format": "int64",
  8874. "description": "token to be deleted",
  8875. "name": "id",
  8876. "in": "path",
  8877. "required": true
  8878. }
  8879. ],
  8880. "responses": {
  8881. "204": {
  8882. "$ref": "#/responses/empty"
  8883. }
  8884. }
  8885. },
  8886. "patch": {
  8887. "produces": [
  8888. "application/json"
  8889. ],
  8890. "tags": [
  8891. "user"
  8892. ],
  8893. "summary": "update an OAuth2 Application, this includes regenerating the client secret",
  8894. "operationId": "userUpdateOAuth2Application",
  8895. "parameters": [
  8896. {
  8897. "type": "integer",
  8898. "format": "int64",
  8899. "description": "application to be updated",
  8900. "name": "id",
  8901. "in": "path",
  8902. "required": true
  8903. },
  8904. {
  8905. "name": "body",
  8906. "in": "body",
  8907. "required": true,
  8908. "schema": {
  8909. "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
  8910. }
  8911. }
  8912. ],
  8913. "responses": {
  8914. "200": {
  8915. "$ref": "#/responses/OAuth2Application"
  8916. }
  8917. }
  8918. }
  8919. },
  8920. "/user/emails": {
  8921. "get": {
  8922. "produces": [
  8923. "application/json"
  8924. ],
  8925. "tags": [
  8926. "user"
  8927. ],
  8928. "summary": "List the authenticated user's email addresses",
  8929. "operationId": "userListEmails",
  8930. "responses": {
  8931. "200": {
  8932. "$ref": "#/responses/EmailList"
  8933. }
  8934. }
  8935. },
  8936. "post": {
  8937. "produces": [
  8938. "application/json"
  8939. ],
  8940. "tags": [
  8941. "user"
  8942. ],
  8943. "summary": "Add email addresses",
  8944. "operationId": "userAddEmail",
  8945. "parameters": [
  8946. {
  8947. "name": "body",
  8948. "in": "body",
  8949. "schema": {
  8950. "$ref": "#/definitions/CreateEmailOption"
  8951. }
  8952. }
  8953. ],
  8954. "responses": {
  8955. "201": {
  8956. "$ref": "#/responses/EmailList"
  8957. },
  8958. "422": {
  8959. "$ref": "#/responses/validationError"
  8960. }
  8961. }
  8962. },
  8963. "delete": {
  8964. "produces": [
  8965. "application/json"
  8966. ],
  8967. "tags": [
  8968. "user"
  8969. ],
  8970. "summary": "Delete email addresses",
  8971. "operationId": "userDeleteEmail",
  8972. "parameters": [
  8973. {
  8974. "name": "body",
  8975. "in": "body",
  8976. "schema": {
  8977. "$ref": "#/definitions/DeleteEmailOption"
  8978. }
  8979. }
  8980. ],
  8981. "responses": {
  8982. "204": {
  8983. "$ref": "#/responses/empty"
  8984. }
  8985. }
  8986. }
  8987. },
  8988. "/user/followers": {
  8989. "get": {
  8990. "produces": [
  8991. "application/json"
  8992. ],
  8993. "tags": [
  8994. "user"
  8995. ],
  8996. "summary": "List the authenticated user's followers",
  8997. "operationId": "userCurrentListFollowers",
  8998. "parameters": [
  8999. {
  9000. "type": "integer",
  9001. "description": "page number of results to return (1-based)",
  9002. "name": "page",
  9003. "in": "query"
  9004. },
  9005. {
  9006. "type": "integer",
  9007. "description": "page size of results, maximum page size is 50",
  9008. "name": "limit",
  9009. "in": "query"
  9010. }
  9011. ],
  9012. "responses": {
  9013. "200": {
  9014. "$ref": "#/responses/UserList"
  9015. }
  9016. }
  9017. }
  9018. },
  9019. "/user/following": {
  9020. "get": {
  9021. "produces": [
  9022. "application/json"
  9023. ],
  9024. "tags": [
  9025. "user"
  9026. ],
  9027. "summary": "List the users that the authenticated user is following",
  9028. "operationId": "userCurrentListFollowing",
  9029. "parameters": [
  9030. {
  9031. "type": "integer",
  9032. "description": "page number of results to return (1-based)",
  9033. "name": "page",
  9034. "in": "query"
  9035. },
  9036. {
  9037. "type": "integer",
  9038. "description": "page size of results, maximum page size is 50",
  9039. "name": "limit",
  9040. "in": "query"
  9041. }
  9042. ],
  9043. "responses": {
  9044. "200": {
  9045. "$ref": "#/responses/UserList"
  9046. }
  9047. }
  9048. }
  9049. },
  9050. "/user/following/{username}": {
  9051. "get": {
  9052. "tags": [
  9053. "user"
  9054. ],
  9055. "summary": "Check whether a user is followed by the authenticated user",
  9056. "operationId": "userCurrentCheckFollowing",
  9057. "parameters": [
  9058. {
  9059. "type": "string",
  9060. "description": "username of followed user",
  9061. "name": "username",
  9062. "in": "path",
  9063. "required": true
  9064. }
  9065. ],
  9066. "responses": {
  9067. "204": {
  9068. "$ref": "#/responses/empty"
  9069. },
  9070. "404": {
  9071. "$ref": "#/responses/notFound"
  9072. }
  9073. }
  9074. },
  9075. "put": {
  9076. "tags": [
  9077. "user"
  9078. ],
  9079. "summary": "Follow a user",
  9080. "operationId": "userCurrentPutFollow",
  9081. "parameters": [
  9082. {
  9083. "type": "string",
  9084. "description": "username of user to follow",
  9085. "name": "username",
  9086. "in": "path",
  9087. "required": true
  9088. }
  9089. ],
  9090. "responses": {
  9091. "204": {
  9092. "$ref": "#/responses/empty"
  9093. }
  9094. }
  9095. },
  9096. "delete": {
  9097. "tags": [
  9098. "user"
  9099. ],
  9100. "summary": "Unfollow a user",
  9101. "operationId": "userCurrentDeleteFollow",
  9102. "parameters": [
  9103. {
  9104. "type": "string",
  9105. "description": "username of user to unfollow",
  9106. "name": "username",
  9107. "in": "path",
  9108. "required": true
  9109. }
  9110. ],
  9111. "responses": {
  9112. "204": {
  9113. "$ref": "#/responses/empty"
  9114. }
  9115. }
  9116. }
  9117. },
  9118. "/user/gpg_keys": {
  9119. "get": {
  9120. "produces": [
  9121. "application/json"
  9122. ],
  9123. "tags": [
  9124. "user"
  9125. ],
  9126. "summary": "List the authenticated user's GPG keys",
  9127. "operationId": "userCurrentListGPGKeys",
  9128. "parameters": [
  9129. {
  9130. "type": "integer",
  9131. "description": "page number of results to return (1-based)",
  9132. "name": "page",
  9133. "in": "query"
  9134. },
  9135. {
  9136. "type": "integer",
  9137. "description": "page size of results, maximum page size is 50",
  9138. "name": "limit",
  9139. "in": "query"
  9140. }
  9141. ],
  9142. "responses": {
  9143. "200": {
  9144. "$ref": "#/responses/GPGKeyList"
  9145. }
  9146. }
  9147. },
  9148. "post": {
  9149. "consumes": [
  9150. "application/json"
  9151. ],
  9152. "produces": [
  9153. "application/json"
  9154. ],
  9155. "tags": [
  9156. "user"
  9157. ],
  9158. "summary": "Create a GPG key",
  9159. "operationId": "userCurrentPostGPGKey",
  9160. "parameters": [
  9161. {
  9162. "name": "Form",
  9163. "in": "body",
  9164. "schema": {
  9165. "$ref": "#/definitions/CreateGPGKeyOption"
  9166. }
  9167. }
  9168. ],
  9169. "responses": {
  9170. "201": {
  9171. "$ref": "#/responses/GPGKey"
  9172. },
  9173. "404": {
  9174. "$ref": "#/responses/notFound"
  9175. },
  9176. "422": {
  9177. "$ref": "#/responses/validationError"
  9178. }
  9179. }
  9180. }
  9181. },
  9182. "/user/gpg_keys/{id}": {
  9183. "get": {
  9184. "produces": [
  9185. "application/json"
  9186. ],
  9187. "tags": [
  9188. "user"
  9189. ],
  9190. "summary": "Get a GPG key",
  9191. "operationId": "userCurrentGetGPGKey",
  9192. "parameters": [
  9193. {
  9194. "type": "integer",
  9195. "format": "int64",
  9196. "description": "id of key to get",
  9197. "name": "id",
  9198. "in": "path",
  9199. "required": true
  9200. }
  9201. ],
  9202. "responses": {
  9203. "200": {
  9204. "$ref": "#/responses/GPGKey"
  9205. },
  9206. "404": {
  9207. "$ref": "#/responses/notFound"
  9208. }
  9209. }
  9210. },
  9211. "delete": {
  9212. "produces": [
  9213. "application/json"
  9214. ],
  9215. "tags": [
  9216. "user"
  9217. ],
  9218. "summary": "Remove a GPG key",
  9219. "operationId": "userCurrentDeleteGPGKey",
  9220. "parameters": [
  9221. {
  9222. "type": "integer",
  9223. "format": "int64",
  9224. "description": "id of key to delete",
  9225. "name": "id",
  9226. "in": "path",
  9227. "required": true
  9228. }
  9229. ],
  9230. "responses": {
  9231. "204": {
  9232. "$ref": "#/responses/empty"
  9233. },
  9234. "403": {
  9235. "$ref": "#/responses/forbidden"
  9236. },
  9237. "404": {
  9238. "$ref": "#/responses/notFound"
  9239. }
  9240. }
  9241. }
  9242. },
  9243. "/user/keys": {
  9244. "get": {
  9245. "produces": [
  9246. "application/json"
  9247. ],
  9248. "tags": [
  9249. "user"
  9250. ],
  9251. "summary": "List the authenticated user's public keys",
  9252. "operationId": "userCurrentListKeys",
  9253. "parameters": [
  9254. {
  9255. "type": "string",
  9256. "description": "fingerprint of the key",
  9257. "name": "fingerprint",
  9258. "in": "query"
  9259. },
  9260. {
  9261. "type": "integer",
  9262. "description": "page number of results to return (1-based)",
  9263. "name": "page",
  9264. "in": "query"
  9265. },
  9266. {
  9267. "type": "integer",
  9268. "description": "page size of results, maximum page size is 50",
  9269. "name": "limit",
  9270. "in": "query"
  9271. }
  9272. ],
  9273. "responses": {
  9274. "200": {
  9275. "$ref": "#/responses/PublicKeyList"
  9276. }
  9277. }
  9278. },
  9279. "post": {
  9280. "consumes": [
  9281. "application/json"
  9282. ],
  9283. "produces": [
  9284. "application/json"
  9285. ],
  9286. "tags": [
  9287. "user"
  9288. ],
  9289. "summary": "Create a public key",
  9290. "operationId": "userCurrentPostKey",
  9291. "parameters": [
  9292. {
  9293. "name": "body",
  9294. "in": "body",
  9295. "schema": {
  9296. "$ref": "#/definitions/CreateKeyOption"
  9297. }
  9298. }
  9299. ],
  9300. "responses": {
  9301. "201": {
  9302. "$ref": "#/responses/PublicKey"
  9303. },
  9304. "422": {
  9305. "$ref": "#/responses/validationError"
  9306. }
  9307. }
  9308. }
  9309. },
  9310. "/user/keys/{id}": {
  9311. "get": {
  9312. "produces": [
  9313. "application/json"
  9314. ],
  9315. "tags": [
  9316. "user"
  9317. ],
  9318. "summary": "Get a public key",
  9319. "operationId": "userCurrentGetKey",
  9320. "parameters": [
  9321. {
  9322. "type": "integer",
  9323. "format": "int64",
  9324. "description": "id of key to get",
  9325. "name": "id",
  9326. "in": "path",
  9327. "required": true
  9328. }
  9329. ],
  9330. "responses": {
  9331. "200": {
  9332. "$ref": "#/responses/PublicKey"
  9333. },
  9334. "404": {
  9335. "$ref": "#/responses/notFound"
  9336. }
  9337. }
  9338. },
  9339. "delete": {
  9340. "produces": [
  9341. "application/json"
  9342. ],
  9343. "tags": [
  9344. "user"
  9345. ],
  9346. "summary": "Delete a public key",
  9347. "operationId": "userCurrentDeleteKey",
  9348. "parameters": [
  9349. {
  9350. "type": "integer",
  9351. "format": "int64",
  9352. "description": "id of key to delete",
  9353. "name": "id",
  9354. "in": "path",
  9355. "required": true
  9356. }
  9357. ],
  9358. "responses": {
  9359. "204": {
  9360. "$ref": "#/responses/empty"
  9361. },
  9362. "403": {
  9363. "$ref": "#/responses/forbidden"
  9364. },
  9365. "404": {
  9366. "$ref": "#/responses/notFound"
  9367. }
  9368. }
  9369. }
  9370. },
  9371. "/user/orgs": {
  9372. "get": {
  9373. "produces": [
  9374. "application/json"
  9375. ],
  9376. "tags": [
  9377. "organization"
  9378. ],
  9379. "summary": "List the current user's organizations",
  9380. "operationId": "orgListCurrentUserOrgs",
  9381. "parameters": [
  9382. {
  9383. "type": "integer",
  9384. "description": "page number of results to return (1-based)",
  9385. "name": "page",
  9386. "in": "query"
  9387. },
  9388. {
  9389. "type": "integer",
  9390. "description": "page size of results, maximum page size is 50",
  9391. "name": "limit",
  9392. "in": "query"
  9393. }
  9394. ],
  9395. "responses": {
  9396. "200": {
  9397. "$ref": "#/responses/OrganizationList"
  9398. }
  9399. }
  9400. }
  9401. },
  9402. "/user/repos": {
  9403. "get": {
  9404. "produces": [
  9405. "application/json"
  9406. ],
  9407. "tags": [
  9408. "user"
  9409. ],
  9410. "summary": "List the repos that the authenticated user owns or has access to",
  9411. "operationId": "userCurrentListRepos",
  9412. "parameters": [
  9413. {
  9414. "type": "integer",
  9415. "description": "page number of results to return (1-based)",
  9416. "name": "page",
  9417. "in": "query"
  9418. },
  9419. {
  9420. "type": "integer",
  9421. "description": "page size of results, maximum page size is 50",
  9422. "name": "limit",
  9423. "in": "query"
  9424. }
  9425. ],
  9426. "responses": {
  9427. "200": {
  9428. "$ref": "#/responses/RepositoryList"
  9429. }
  9430. }
  9431. },
  9432. "post": {
  9433. "consumes": [
  9434. "application/json"
  9435. ],
  9436. "produces": [
  9437. "application/json"
  9438. ],
  9439. "tags": [
  9440. "repository",
  9441. "user"
  9442. ],
  9443. "summary": "Create a repository",
  9444. "operationId": "createCurrentUserRepo",
  9445. "parameters": [
  9446. {
  9447. "name": "body",
  9448. "in": "body",
  9449. "schema": {
  9450. "$ref": "#/definitions/CreateRepoOption"
  9451. }
  9452. }
  9453. ],
  9454. "responses": {
  9455. "201": {
  9456. "$ref": "#/responses/Repository"
  9457. },
  9458. "409": {
  9459. "description": "The repository with the same name already exists."
  9460. },
  9461. "422": {
  9462. "$ref": "#/responses/validationError"
  9463. }
  9464. }
  9465. }
  9466. },
  9467. "/user/starred": {
  9468. "get": {
  9469. "produces": [
  9470. "application/json"
  9471. ],
  9472. "tags": [
  9473. "user"
  9474. ],
  9475. "summary": "The repos that the authenticated user has starred",
  9476. "operationId": "userCurrentListStarred",
  9477. "parameters": [
  9478. {
  9479. "type": "integer",
  9480. "description": "page number of results to return (1-based)",
  9481. "name": "page",
  9482. "in": "query"
  9483. },
  9484. {
  9485. "type": "integer",
  9486. "description": "page size of results, maximum page size is 50",
  9487. "name": "limit",
  9488. "in": "query"
  9489. }
  9490. ],
  9491. "responses": {
  9492. "200": {
  9493. "$ref": "#/responses/RepositoryList"
  9494. }
  9495. }
  9496. }
  9497. },
  9498. "/user/starred/{owner}/{repo}": {
  9499. "get": {
  9500. "tags": [
  9501. "user"
  9502. ],
  9503. "summary": "Whether the authenticated is starring the repo",
  9504. "operationId": "userCurrentCheckStarring",
  9505. "parameters": [
  9506. {
  9507. "type": "string",
  9508. "description": "owner of the repo",
  9509. "name": "owner",
  9510. "in": "path",
  9511. "required": true
  9512. },
  9513. {
  9514. "type": "string",
  9515. "description": "name of the repo",
  9516. "name": "repo",
  9517. "in": "path",
  9518. "required": true
  9519. }
  9520. ],
  9521. "responses": {
  9522. "204": {
  9523. "$ref": "#/responses/empty"
  9524. },
  9525. "404": {
  9526. "$ref": "#/responses/notFound"
  9527. }
  9528. }
  9529. },
  9530. "put": {
  9531. "tags": [
  9532. "user"
  9533. ],
  9534. "summary": "Star the given repo",
  9535. "operationId": "userCurrentPutStar",
  9536. "parameters": [
  9537. {
  9538. "type": "string",
  9539. "description": "owner of the repo to star",
  9540. "name": "owner",
  9541. "in": "path",
  9542. "required": true
  9543. },
  9544. {
  9545. "type": "string",
  9546. "description": "name of the repo to star",
  9547. "name": "repo",
  9548. "in": "path",
  9549. "required": true
  9550. }
  9551. ],
  9552. "responses": {
  9553. "204": {
  9554. "$ref": "#/responses/empty"
  9555. }
  9556. }
  9557. },
  9558. "delete": {
  9559. "tags": [
  9560. "user"
  9561. ],
  9562. "summary": "Unstar the given repo",
  9563. "operationId": "userCurrentDeleteStar",
  9564. "parameters": [
  9565. {
  9566. "type": "string",
  9567. "description": "owner of the repo to unstar",
  9568. "name": "owner",
  9569. "in": "path",
  9570. "required": true
  9571. },
  9572. {
  9573. "type": "string",
  9574. "description": "name of the repo to unstar",
  9575. "name": "repo",
  9576. "in": "path",
  9577. "required": true
  9578. }
  9579. ],
  9580. "responses": {
  9581. "204": {
  9582. "$ref": "#/responses/empty"
  9583. }
  9584. }
  9585. }
  9586. },
  9587. "/user/stopwatches": {
  9588. "get": {
  9589. "consumes": [
  9590. "application/json"
  9591. ],
  9592. "produces": [
  9593. "application/json"
  9594. ],
  9595. "tags": [
  9596. "user"
  9597. ],
  9598. "summary": "Get list of all existing stopwatches",
  9599. "operationId": "userGetStopWatches",
  9600. "parameters": [
  9601. {
  9602. "type": "integer",
  9603. "description": "page number of results to return (1-based)",
  9604. "name": "page",
  9605. "in": "query"
  9606. },
  9607. {
  9608. "type": "integer",
  9609. "description": "page size of results, maximum page size is 50",
  9610. "name": "limit",
  9611. "in": "query"
  9612. }
  9613. ],
  9614. "responses": {
  9615. "200": {
  9616. "$ref": "#/responses/StopWatchList"
  9617. }
  9618. }
  9619. }
  9620. },
  9621. "/user/subscriptions": {
  9622. "get": {
  9623. "produces": [
  9624. "application/json"
  9625. ],
  9626. "tags": [
  9627. "user"
  9628. ],
  9629. "summary": "List repositories watched by the authenticated user",
  9630. "operationId": "userCurrentListSubscriptions",
  9631. "parameters": [
  9632. {
  9633. "type": "integer",
  9634. "description": "page number of results to return (1-based)",
  9635. "name": "page",
  9636. "in": "query"
  9637. },
  9638. {
  9639. "type": "integer",
  9640. "description": "page size of results, maximum page size is 50",
  9641. "name": "limit",
  9642. "in": "query"
  9643. }
  9644. ],
  9645. "responses": {
  9646. "200": {
  9647. "$ref": "#/responses/RepositoryList"
  9648. }
  9649. }
  9650. }
  9651. },
  9652. "/user/teams": {
  9653. "get": {
  9654. "produces": [
  9655. "application/json"
  9656. ],
  9657. "tags": [
  9658. "user"
  9659. ],
  9660. "summary": "List all the teams a user belongs to",
  9661. "operationId": "userListTeams",
  9662. "parameters": [
  9663. {
  9664. "type": "integer",
  9665. "description": "page number of results to return (1-based)",
  9666. "name": "page",
  9667. "in": "query"
  9668. },
  9669. {
  9670. "type": "integer",
  9671. "description": "page size of results, maximum page size is 50",
  9672. "name": "limit",
  9673. "in": "query"
  9674. }
  9675. ],
  9676. "responses": {
  9677. "200": {
  9678. "$ref": "#/responses/TeamList"
  9679. }
  9680. }
  9681. }
  9682. },
  9683. "/user/times": {
  9684. "get": {
  9685. "produces": [
  9686. "application/json"
  9687. ],
  9688. "tags": [
  9689. "user"
  9690. ],
  9691. "summary": "List the current user's tracked times",
  9692. "operationId": "userCurrentTrackedTimes",
  9693. "parameters": [
  9694. {
  9695. "type": "string",
  9696. "format": "date-time",
  9697. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  9698. "name": "since",
  9699. "in": "query"
  9700. },
  9701. {
  9702. "type": "string",
  9703. "format": "date-time",
  9704. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  9705. "name": "before",
  9706. "in": "query"
  9707. }
  9708. ],
  9709. "responses": {
  9710. "200": {
  9711. "$ref": "#/responses/TrackedTimeList"
  9712. }
  9713. }
  9714. }
  9715. },
  9716. "/users/search": {
  9717. "get": {
  9718. "produces": [
  9719. "application/json"
  9720. ],
  9721. "tags": [
  9722. "user"
  9723. ],
  9724. "summary": "Search for users",
  9725. "operationId": "userSearch",
  9726. "parameters": [
  9727. {
  9728. "type": "string",
  9729. "description": "keyword",
  9730. "name": "q",
  9731. "in": "query"
  9732. },
  9733. {
  9734. "type": "integer",
  9735. "format": "int64",
  9736. "description": "ID of the user to search for",
  9737. "name": "uid",
  9738. "in": "query"
  9739. },
  9740. {
  9741. "type": "integer",
  9742. "description": "page number of results to return (1-based)",
  9743. "name": "page",
  9744. "in": "query"
  9745. },
  9746. {
  9747. "type": "integer",
  9748. "description": "page size of results, maximum page size is 50",
  9749. "name": "limit",
  9750. "in": "query"
  9751. }
  9752. ],
  9753. "responses": {
  9754. "200": {
  9755. "description": "SearchResults of a successful search",
  9756. "schema": {
  9757. "type": "object",
  9758. "properties": {
  9759. "data": {
  9760. "type": "array",
  9761. "items": {
  9762. "$ref": "#/definitions/User"
  9763. }
  9764. },
  9765. "ok": {
  9766. "type": "boolean"
  9767. }
  9768. }
  9769. }
  9770. }
  9771. }
  9772. }
  9773. },
  9774. "/users/{follower}/following/{followee}": {
  9775. "get": {
  9776. "tags": [
  9777. "user"
  9778. ],
  9779. "summary": "Check if one user is following another user",
  9780. "operationId": "userCheckFollowing",
  9781. "parameters": [
  9782. {
  9783. "type": "string",
  9784. "description": "username of following user",
  9785. "name": "follower",
  9786. "in": "path",
  9787. "required": true
  9788. },
  9789. {
  9790. "type": "string",
  9791. "description": "username of followed user",
  9792. "name": "followee",
  9793. "in": "path",
  9794. "required": true
  9795. }
  9796. ],
  9797. "responses": {
  9798. "204": {
  9799. "$ref": "#/responses/empty"
  9800. },
  9801. "404": {
  9802. "$ref": "#/responses/notFound"
  9803. }
  9804. }
  9805. }
  9806. },
  9807. "/users/{username}": {
  9808. "get": {
  9809. "produces": [
  9810. "application/json"
  9811. ],
  9812. "tags": [
  9813. "user"
  9814. ],
  9815. "summary": "Get a user",
  9816. "operationId": "userGet",
  9817. "parameters": [
  9818. {
  9819. "type": "string",
  9820. "description": "username of user to get",
  9821. "name": "username",
  9822. "in": "path",
  9823. "required": true
  9824. }
  9825. ],
  9826. "responses": {
  9827. "200": {
  9828. "$ref": "#/responses/User"
  9829. },
  9830. "404": {
  9831. "$ref": "#/responses/notFound"
  9832. }
  9833. }
  9834. }
  9835. },
  9836. "/users/{username}/followers": {
  9837. "get": {
  9838. "produces": [
  9839. "application/json"
  9840. ],
  9841. "tags": [
  9842. "user"
  9843. ],
  9844. "summary": "List the given user's followers",
  9845. "operationId": "userListFollowers",
  9846. "parameters": [
  9847. {
  9848. "type": "string",
  9849. "description": "username of user",
  9850. "name": "username",
  9851. "in": "path",
  9852. "required": true
  9853. },
  9854. {
  9855. "type": "integer",
  9856. "description": "page number of results to return (1-based)",
  9857. "name": "page",
  9858. "in": "query"
  9859. },
  9860. {
  9861. "type": "integer",
  9862. "description": "page size of results, maximum page size is 50",
  9863. "name": "limit",
  9864. "in": "query"
  9865. }
  9866. ],
  9867. "responses": {
  9868. "200": {
  9869. "$ref": "#/responses/UserList"
  9870. }
  9871. }
  9872. }
  9873. },
  9874. "/users/{username}/following": {
  9875. "get": {
  9876. "produces": [
  9877. "application/json"
  9878. ],
  9879. "tags": [
  9880. "user"
  9881. ],
  9882. "summary": "List the users that the given user is following",
  9883. "operationId": "userListFollowing",
  9884. "parameters": [
  9885. {
  9886. "type": "string",
  9887. "description": "username of user",
  9888. "name": "username",
  9889. "in": "path",
  9890. "required": true
  9891. },
  9892. {
  9893. "type": "integer",
  9894. "description": "page number of results to return (1-based)",
  9895. "name": "page",
  9896. "in": "query"
  9897. },
  9898. {
  9899. "type": "integer",
  9900. "description": "page size of results, maximum page size is 50",
  9901. "name": "limit",
  9902. "in": "query"
  9903. }
  9904. ],
  9905. "responses": {
  9906. "200": {
  9907. "$ref": "#/responses/UserList"
  9908. }
  9909. }
  9910. }
  9911. },
  9912. "/users/{username}/gpg_keys": {
  9913. "get": {
  9914. "produces": [
  9915. "application/json"
  9916. ],
  9917. "tags": [
  9918. "user"
  9919. ],
  9920. "summary": "List the given user's GPG keys",
  9921. "operationId": "userListGPGKeys",
  9922. "parameters": [
  9923. {
  9924. "type": "string",
  9925. "description": "username of user",
  9926. "name": "username",
  9927. "in": "path",
  9928. "required": true
  9929. },
  9930. {
  9931. "type": "integer",
  9932. "description": "page number of results to return (1-based)",
  9933. "name": "page",
  9934. "in": "query"
  9935. },
  9936. {
  9937. "type": "integer",
  9938. "description": "page size of results, maximum page size is 50",
  9939. "name": "limit",
  9940. "in": "query"
  9941. }
  9942. ],
  9943. "responses": {
  9944. "200": {
  9945. "$ref": "#/responses/GPGKeyList"
  9946. }
  9947. }
  9948. }
  9949. },
  9950. "/users/{username}/heatmap": {
  9951. "get": {
  9952. "produces": [
  9953. "application/json"
  9954. ],
  9955. "tags": [
  9956. "user"
  9957. ],
  9958. "summary": "Get a user's heatmap",
  9959. "operationId": "userGetHeatmapData",
  9960. "parameters": [
  9961. {
  9962. "type": "string",
  9963. "description": "username of user to get",
  9964. "name": "username",
  9965. "in": "path",
  9966. "required": true
  9967. }
  9968. ],
  9969. "responses": {
  9970. "200": {
  9971. "$ref": "#/responses/UserHeatmapData"
  9972. },
  9973. "404": {
  9974. "$ref": "#/responses/notFound"
  9975. }
  9976. }
  9977. }
  9978. },
  9979. "/users/{username}/keys": {
  9980. "get": {
  9981. "produces": [
  9982. "application/json"
  9983. ],
  9984. "tags": [
  9985. "user"
  9986. ],
  9987. "summary": "List the given user's public keys",
  9988. "operationId": "userListKeys",
  9989. "parameters": [
  9990. {
  9991. "type": "string",
  9992. "description": "username of user",
  9993. "name": "username",
  9994. "in": "path",
  9995. "required": true
  9996. },
  9997. {
  9998. "type": "string",
  9999. "description": "fingerprint of the key",
  10000. "name": "fingerprint",
  10001. "in": "query"
  10002. },
  10003. {
  10004. "type": "integer",
  10005. "description": "page number of results to return (1-based)",
  10006. "name": "page",
  10007. "in": "query"
  10008. },
  10009. {
  10010. "type": "integer",
  10011. "description": "page size of results, maximum page size is 50",
  10012. "name": "limit",
  10013. "in": "query"
  10014. }
  10015. ],
  10016. "responses": {
  10017. "200": {
  10018. "$ref": "#/responses/PublicKeyList"
  10019. }
  10020. }
  10021. }
  10022. },
  10023. "/users/{username}/orgs": {
  10024. "get": {
  10025. "produces": [
  10026. "application/json"
  10027. ],
  10028. "tags": [
  10029. "organization"
  10030. ],
  10031. "summary": "List a user's organizations",
  10032. "operationId": "orgListUserOrgs",
  10033. "parameters": [
  10034. {
  10035. "type": "string",
  10036. "description": "username of user",
  10037. "name": "username",
  10038. "in": "path",
  10039. "required": true
  10040. },
  10041. {
  10042. "type": "integer",
  10043. "description": "page number of results to return (1-based)",
  10044. "name": "page",
  10045. "in": "query"
  10046. },
  10047. {
  10048. "type": "integer",
  10049. "description": "page size of results, maximum page size is 50",
  10050. "name": "limit",
  10051. "in": "query"
  10052. }
  10053. ],
  10054. "responses": {
  10055. "200": {
  10056. "$ref": "#/responses/OrganizationList"
  10057. }
  10058. }
  10059. }
  10060. },
  10061. "/users/{username}/repos": {
  10062. "get": {
  10063. "produces": [
  10064. "application/json"
  10065. ],
  10066. "tags": [
  10067. "user"
  10068. ],
  10069. "summary": "List the repos owned by the given user",
  10070. "operationId": "userListRepos",
  10071. "parameters": [
  10072. {
  10073. "type": "string",
  10074. "description": "username of user",
  10075. "name": "username",
  10076. "in": "path",
  10077. "required": true
  10078. },
  10079. {
  10080. "type": "integer",
  10081. "description": "page number of results to return (1-based)",
  10082. "name": "page",
  10083. "in": "query"
  10084. },
  10085. {
  10086. "type": "integer",
  10087. "description": "page size of results, maximum page size is 50",
  10088. "name": "limit",
  10089. "in": "query"
  10090. }
  10091. ],
  10092. "responses": {
  10093. "200": {
  10094. "$ref": "#/responses/RepositoryList"
  10095. }
  10096. }
  10097. }
  10098. },
  10099. "/users/{username}/starred": {
  10100. "get": {
  10101. "produces": [
  10102. "application/json"
  10103. ],
  10104. "tags": [
  10105. "user"
  10106. ],
  10107. "summary": "The repos that the given user has starred",
  10108. "operationId": "userListStarred",
  10109. "parameters": [
  10110. {
  10111. "type": "string",
  10112. "description": "username of user",
  10113. "name": "username",
  10114. "in": "path",
  10115. "required": true
  10116. },
  10117. {
  10118. "type": "integer",
  10119. "description": "page number of results to return (1-based)",
  10120. "name": "page",
  10121. "in": "query"
  10122. },
  10123. {
  10124. "type": "integer",
  10125. "description": "page size of results, maximum page size is 50",
  10126. "name": "limit",
  10127. "in": "query"
  10128. }
  10129. ],
  10130. "responses": {
  10131. "200": {
  10132. "$ref": "#/responses/RepositoryList"
  10133. }
  10134. }
  10135. }
  10136. },
  10137. "/users/{username}/subscriptions": {
  10138. "get": {
  10139. "produces": [
  10140. "application/json"
  10141. ],
  10142. "tags": [
  10143. "user"
  10144. ],
  10145. "summary": "List the repositories watched by a user",
  10146. "operationId": "userListSubscriptions",
  10147. "parameters": [
  10148. {
  10149. "type": "string",
  10150. "description": "username of the user",
  10151. "name": "username",
  10152. "in": "path",
  10153. "required": true
  10154. },
  10155. {
  10156. "type": "integer",
  10157. "description": "page number of results to return (1-based)",
  10158. "name": "page",
  10159. "in": "query"
  10160. },
  10161. {
  10162. "type": "integer",
  10163. "description": "page size of results, maximum page size is 50",
  10164. "name": "limit",
  10165. "in": "query"
  10166. }
  10167. ],
  10168. "responses": {
  10169. "200": {
  10170. "$ref": "#/responses/RepositoryList"
  10171. }
  10172. }
  10173. }
  10174. },
  10175. "/users/{username}/tokens": {
  10176. "get": {
  10177. "produces": [
  10178. "application/json"
  10179. ],
  10180. "tags": [
  10181. "user"
  10182. ],
  10183. "summary": "List the authenticated user's access tokens",
  10184. "operationId": "userGetTokens",
  10185. "parameters": [
  10186. {
  10187. "type": "string",
  10188. "description": "username of user",
  10189. "name": "username",
  10190. "in": "path",
  10191. "required": true
  10192. },
  10193. {
  10194. "type": "integer",
  10195. "description": "page number of results to return (1-based)",
  10196. "name": "page",
  10197. "in": "query"
  10198. },
  10199. {
  10200. "type": "integer",
  10201. "description": "page size of results, maximum page size is 50",
  10202. "name": "limit",
  10203. "in": "query"
  10204. }
  10205. ],
  10206. "responses": {
  10207. "200": {
  10208. "$ref": "#/responses/AccessTokenList"
  10209. }
  10210. }
  10211. },
  10212. "post": {
  10213. "consumes": [
  10214. "application/json"
  10215. ],
  10216. "produces": [
  10217. "application/json"
  10218. ],
  10219. "tags": [
  10220. "user"
  10221. ],
  10222. "summary": "Create an access token",
  10223. "operationId": "userCreateToken",
  10224. "parameters": [
  10225. {
  10226. "type": "string",
  10227. "x-go-name": "Name",
  10228. "description": "username of user",
  10229. "name": "username",
  10230. "in": "path",
  10231. "required": true
  10232. },
  10233. {
  10234. "name": "accessToken",
  10235. "in": "body",
  10236. "schema": {
  10237. "type": "object",
  10238. "required": [
  10239. "name"
  10240. ],
  10241. "properties": {
  10242. "name": {
  10243. "type": "string"
  10244. }
  10245. }
  10246. }
  10247. }
  10248. ],
  10249. "responses": {
  10250. "200": {
  10251. "$ref": "#/responses/AccessToken"
  10252. }
  10253. }
  10254. }
  10255. },
  10256. "/users/{username}/tokens/{token}": {
  10257. "delete": {
  10258. "produces": [
  10259. "application/json"
  10260. ],
  10261. "tags": [
  10262. "user"
  10263. ],
  10264. "summary": "delete an access token",
  10265. "operationId": "userDeleteAccessToken",
  10266. "parameters": [
  10267. {
  10268. "type": "string",
  10269. "description": "username of user",
  10270. "name": "username",
  10271. "in": "path",
  10272. "required": true
  10273. },
  10274. {
  10275. "type": "integer",
  10276. "format": "int64",
  10277. "description": "token to be deleted",
  10278. "name": "token",
  10279. "in": "path",
  10280. "required": true
  10281. }
  10282. ],
  10283. "responses": {
  10284. "204": {
  10285. "$ref": "#/responses/empty"
  10286. }
  10287. }
  10288. }
  10289. },
  10290. "/version": {
  10291. "get": {
  10292. "produces": [
  10293. "application/json"
  10294. ],
  10295. "tags": [
  10296. "miscellaneous"
  10297. ],
  10298. "summary": "Returns the version of the Gitea application",
  10299. "operationId": "getVersion",
  10300. "responses": {
  10301. "200": {
  10302. "$ref": "#/responses/ServerVersion"
  10303. }
  10304. }
  10305. }
  10306. }
  10307. },
  10308. "definitions": {
  10309. "APIError": {
  10310. "description": "APIError is an api error with a message",
  10311. "type": "object",
  10312. "properties": {
  10313. "message": {
  10314. "type": "string",
  10315. "x-go-name": "Message"
  10316. },
  10317. "url": {
  10318. "type": "string",
  10319. "x-go-name": "URL"
  10320. }
  10321. },
  10322. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10323. },
  10324. "AccessToken": {
  10325. "type": "object",
  10326. "title": "AccessToken represents an API access token.",
  10327. "properties": {
  10328. "id": {
  10329. "type": "integer",
  10330. "format": "int64",
  10331. "x-go-name": "ID"
  10332. },
  10333. "name": {
  10334. "type": "string",
  10335. "x-go-name": "Name"
  10336. },
  10337. "sha1": {
  10338. "type": "string",
  10339. "x-go-name": "Token"
  10340. },
  10341. "token_last_eight": {
  10342. "type": "string",
  10343. "x-go-name": "TokenLastEight"
  10344. }
  10345. },
  10346. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10347. },
  10348. "AddCollaboratorOption": {
  10349. "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository",
  10350. "type": "object",
  10351. "properties": {
  10352. "permission": {
  10353. "type": "string",
  10354. "x-go-name": "Permission"
  10355. }
  10356. },
  10357. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10358. },
  10359. "AddTimeOption": {
  10360. "description": "AddTimeOption options for adding time to an issue",
  10361. "type": "object",
  10362. "required": [
  10363. "time"
  10364. ],
  10365. "properties": {
  10366. "created": {
  10367. "type": "string",
  10368. "format": "date-time",
  10369. "x-go-name": "Created"
  10370. },
  10371. "time": {
  10372. "description": "time in seconds",
  10373. "type": "integer",
  10374. "format": "int64",
  10375. "x-go-name": "Time"
  10376. },
  10377. "user_name": {
  10378. "description": "User who spent the time (optional)",
  10379. "type": "string",
  10380. "x-go-name": "User"
  10381. }
  10382. },
  10383. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10384. },
  10385. "AnnotatedTag": {
  10386. "description": "AnnotatedTag represents an annotated tag",
  10387. "type": "object",
  10388. "properties": {
  10389. "message": {
  10390. "type": "string",
  10391. "x-go-name": "Message"
  10392. },
  10393. "object": {
  10394. "$ref": "#/definitions/AnnotatedTagObject"
  10395. },
  10396. "sha": {
  10397. "type": "string",
  10398. "x-go-name": "SHA"
  10399. },
  10400. "tag": {
  10401. "type": "string",
  10402. "x-go-name": "Tag"
  10403. },
  10404. "tagger": {
  10405. "$ref": "#/definitions/CommitUser"
  10406. },
  10407. "url": {
  10408. "type": "string",
  10409. "x-go-name": "URL"
  10410. },
  10411. "verification": {
  10412. "$ref": "#/definitions/PayloadCommitVerification"
  10413. }
  10414. },
  10415. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10416. },
  10417. "AnnotatedTagObject": {
  10418. "description": "AnnotatedTagObject contains meta information of the tag object",
  10419. "type": "object",
  10420. "properties": {
  10421. "sha": {
  10422. "type": "string",
  10423. "x-go-name": "SHA"
  10424. },
  10425. "type": {
  10426. "type": "string",
  10427. "x-go-name": "Type"
  10428. },
  10429. "url": {
  10430. "type": "string",
  10431. "x-go-name": "URL"
  10432. }
  10433. },
  10434. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10435. },
  10436. "Attachment": {
  10437. "description": "Attachment a generic attachment",
  10438. "type": "object",
  10439. "properties": {
  10440. "browser_download_url": {
  10441. "type": "string",
  10442. "x-go-name": "DownloadURL"
  10443. },
  10444. "created_at": {
  10445. "type": "string",
  10446. "format": "date-time",
  10447. "x-go-name": "Created"
  10448. },
  10449. "download_count": {
  10450. "type": "integer",
  10451. "format": "int64",
  10452. "x-go-name": "DownloadCount"
  10453. },
  10454. "id": {
  10455. "type": "integer",
  10456. "format": "int64",
  10457. "x-go-name": "ID"
  10458. },
  10459. "name": {
  10460. "type": "string",
  10461. "x-go-name": "Name"
  10462. },
  10463. "size": {
  10464. "type": "integer",
  10465. "format": "int64",
  10466. "x-go-name": "Size"
  10467. },
  10468. "uuid": {
  10469. "type": "string",
  10470. "x-go-name": "UUID"
  10471. }
  10472. },
  10473. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10474. },
  10475. "Branch": {
  10476. "description": "Branch represents a repository branch",
  10477. "type": "object",
  10478. "properties": {
  10479. "commit": {
  10480. "$ref": "#/definitions/PayloadCommit"
  10481. },
  10482. "effective_branch_protection_name": {
  10483. "type": "string",
  10484. "x-go-name": "EffectiveBranchProtectionName"
  10485. },
  10486. "enable_status_check": {
  10487. "type": "boolean",
  10488. "x-go-name": "EnableStatusCheck"
  10489. },
  10490. "name": {
  10491. "type": "string",
  10492. "x-go-name": "Name"
  10493. },
  10494. "protected": {
  10495. "type": "boolean",
  10496. "x-go-name": "Protected"
  10497. },
  10498. "required_approvals": {
  10499. "type": "integer",
  10500. "format": "int64",
  10501. "x-go-name": "RequiredApprovals"
  10502. },
  10503. "status_check_contexts": {
  10504. "type": "array",
  10505. "items": {
  10506. "type": "string"
  10507. },
  10508. "x-go-name": "StatusCheckContexts"
  10509. },
  10510. "user_can_merge": {
  10511. "type": "boolean",
  10512. "x-go-name": "UserCanMerge"
  10513. },
  10514. "user_can_push": {
  10515. "type": "boolean",
  10516. "x-go-name": "UserCanPush"
  10517. }
  10518. },
  10519. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10520. },
  10521. "BranchProtection": {
  10522. "description": "BranchProtection represents a branch protection for a repository",
  10523. "type": "object",
  10524. "properties": {
  10525. "approvals_whitelist_teams": {
  10526. "type": "array",
  10527. "items": {
  10528. "type": "string"
  10529. },
  10530. "x-go-name": "ApprovalsWhitelistTeams"
  10531. },
  10532. "approvals_whitelist_username": {
  10533. "type": "array",
  10534. "items": {
  10535. "type": "string"
  10536. },
  10537. "x-go-name": "ApprovalsWhitelistUsernames"
  10538. },
  10539. "block_on_outdated_branch": {
  10540. "type": "boolean",
  10541. "x-go-name": "BlockOnOutdatedBranch"
  10542. },
  10543. "block_on_rejected_reviews": {
  10544. "type": "boolean",
  10545. "x-go-name": "BlockOnRejectedReviews"
  10546. },
  10547. "branch_name": {
  10548. "type": "string",
  10549. "x-go-name": "BranchName"
  10550. },
  10551. "created_at": {
  10552. "type": "string",
  10553. "format": "date-time",
  10554. "x-go-name": "Created"
  10555. },
  10556. "dismiss_stale_approvals": {
  10557. "type": "boolean",
  10558. "x-go-name": "DismissStaleApprovals"
  10559. },
  10560. "enable_approvals_whitelist": {
  10561. "type": "boolean",
  10562. "x-go-name": "EnableApprovalsWhitelist"
  10563. },
  10564. "enable_merge_whitelist": {
  10565. "type": "boolean",
  10566. "x-go-name": "EnableMergeWhitelist"
  10567. },
  10568. "enable_push": {
  10569. "type": "boolean",
  10570. "x-go-name": "EnablePush"
  10571. },
  10572. "enable_push_whitelist": {
  10573. "type": "boolean",
  10574. "x-go-name": "EnablePushWhitelist"
  10575. },
  10576. "enable_status_check": {
  10577. "type": "boolean",
  10578. "x-go-name": "EnableStatusCheck"
  10579. },
  10580. "merge_whitelist_teams": {
  10581. "type": "array",
  10582. "items": {
  10583. "type": "string"
  10584. },
  10585. "x-go-name": "MergeWhitelistTeams"
  10586. },
  10587. "merge_whitelist_usernames": {
  10588. "type": "array",
  10589. "items": {
  10590. "type": "string"
  10591. },
  10592. "x-go-name": "MergeWhitelistUsernames"
  10593. },
  10594. "protected_file_patterns": {
  10595. "type": "string",
  10596. "x-go-name": "ProtectedFilePatterns"
  10597. },
  10598. "push_whitelist_deploy_keys": {
  10599. "type": "boolean",
  10600. "x-go-name": "PushWhitelistDeployKeys"
  10601. },
  10602. "push_whitelist_teams": {
  10603. "type": "array",
  10604. "items": {
  10605. "type": "string"
  10606. },
  10607. "x-go-name": "PushWhitelistTeams"
  10608. },
  10609. "push_whitelist_usernames": {
  10610. "type": "array",
  10611. "items": {
  10612. "type": "string"
  10613. },
  10614. "x-go-name": "PushWhitelistUsernames"
  10615. },
  10616. "require_signed_commits": {
  10617. "type": "boolean",
  10618. "x-go-name": "RequireSignedCommits"
  10619. },
  10620. "required_approvals": {
  10621. "type": "integer",
  10622. "format": "int64",
  10623. "x-go-name": "RequiredApprovals"
  10624. },
  10625. "status_check_contexts": {
  10626. "type": "array",
  10627. "items": {
  10628. "type": "string"
  10629. },
  10630. "x-go-name": "StatusCheckContexts"
  10631. },
  10632. "updated_at": {
  10633. "type": "string",
  10634. "format": "date-time",
  10635. "x-go-name": "Updated"
  10636. }
  10637. },
  10638. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10639. },
  10640. "Comment": {
  10641. "description": "Comment represents a comment on a commit or issue",
  10642. "type": "object",
  10643. "properties": {
  10644. "body": {
  10645. "type": "string",
  10646. "x-go-name": "Body"
  10647. },
  10648. "created_at": {
  10649. "type": "string",
  10650. "format": "date-time",
  10651. "x-go-name": "Created"
  10652. },
  10653. "html_url": {
  10654. "type": "string",
  10655. "x-go-name": "HTMLURL"
  10656. },
  10657. "id": {
  10658. "type": "integer",
  10659. "format": "int64",
  10660. "x-go-name": "ID"
  10661. },
  10662. "issue_url": {
  10663. "type": "string",
  10664. "x-go-name": "IssueURL"
  10665. },
  10666. "original_author": {
  10667. "type": "string",
  10668. "x-go-name": "OriginalAuthor"
  10669. },
  10670. "original_author_id": {
  10671. "type": "integer",
  10672. "format": "int64",
  10673. "x-go-name": "OriginalAuthorID"
  10674. },
  10675. "pull_request_url": {
  10676. "type": "string",
  10677. "x-go-name": "PRURL"
  10678. },
  10679. "updated_at": {
  10680. "type": "string",
  10681. "format": "date-time",
  10682. "x-go-name": "Updated"
  10683. },
  10684. "user": {
  10685. "$ref": "#/definitions/User"
  10686. }
  10687. },
  10688. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10689. },
  10690. "Commit": {
  10691. "type": "object",
  10692. "title": "Commit contains information generated from a Git commit.",
  10693. "properties": {
  10694. "author": {
  10695. "$ref": "#/definitions/User"
  10696. },
  10697. "commit": {
  10698. "$ref": "#/definitions/RepoCommit"
  10699. },
  10700. "committer": {
  10701. "$ref": "#/definitions/User"
  10702. },
  10703. "html_url": {
  10704. "type": "string",
  10705. "x-go-name": "HTMLURL"
  10706. },
  10707. "parents": {
  10708. "type": "array",
  10709. "items": {
  10710. "$ref": "#/definitions/CommitMeta"
  10711. },
  10712. "x-go-name": "Parents"
  10713. },
  10714. "sha": {
  10715. "type": "string",
  10716. "x-go-name": "SHA"
  10717. },
  10718. "url": {
  10719. "type": "string",
  10720. "x-go-name": "URL"
  10721. }
  10722. },
  10723. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10724. },
  10725. "CommitDateOptions": {
  10726. "description": "CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE",
  10727. "type": "object",
  10728. "properties": {
  10729. "author": {
  10730. "type": "string",
  10731. "format": "date-time",
  10732. "x-go-name": "Author"
  10733. },
  10734. "committer": {
  10735. "type": "string",
  10736. "format": "date-time",
  10737. "x-go-name": "Committer"
  10738. }
  10739. },
  10740. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10741. },
  10742. "CommitMeta": {
  10743. "type": "object",
  10744. "title": "CommitMeta contains meta information of a commit in terms of API.",
  10745. "properties": {
  10746. "sha": {
  10747. "type": "string",
  10748. "x-go-name": "SHA"
  10749. },
  10750. "url": {
  10751. "type": "string",
  10752. "x-go-name": "URL"
  10753. }
  10754. },
  10755. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10756. },
  10757. "CommitUser": {
  10758. "type": "object",
  10759. "title": "CommitUser contains information of a user in the context of a commit.",
  10760. "properties": {
  10761. "date": {
  10762. "type": "string",
  10763. "x-go-name": "Date"
  10764. },
  10765. "email": {
  10766. "type": "string",
  10767. "format": "email",
  10768. "x-go-name": "Email"
  10769. },
  10770. "name": {
  10771. "type": "string",
  10772. "x-go-name": "Name"
  10773. }
  10774. },
  10775. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10776. },
  10777. "ContentsResponse": {
  10778. "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content",
  10779. "type": "object",
  10780. "properties": {
  10781. "_links": {
  10782. "$ref": "#/definitions/FileLinksResponse"
  10783. },
  10784. "content": {
  10785. "description": "`content` is populated when `type` is `file`, otherwise null",
  10786. "type": "string",
  10787. "x-go-name": "Content"
  10788. },
  10789. "download_url": {
  10790. "type": "string",
  10791. "x-go-name": "DownloadURL"
  10792. },
  10793. "encoding": {
  10794. "description": "`encoding` is populated when `type` is `file`, otherwise null",
  10795. "type": "string",
  10796. "x-go-name": "Encoding"
  10797. },
  10798. "git_url": {
  10799. "type": "string",
  10800. "x-go-name": "GitURL"
  10801. },
  10802. "html_url": {
  10803. "type": "string",
  10804. "x-go-name": "HTMLURL"
  10805. },
  10806. "name": {
  10807. "type": "string",
  10808. "x-go-name": "Name"
  10809. },
  10810. "path": {
  10811. "type": "string",
  10812. "x-go-name": "Path"
  10813. },
  10814. "sha": {
  10815. "type": "string",
  10816. "x-go-name": "SHA"
  10817. },
  10818. "size": {
  10819. "type": "integer",
  10820. "format": "int64",
  10821. "x-go-name": "Size"
  10822. },
  10823. "submodule_git_url": {
  10824. "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null",
  10825. "type": "string",
  10826. "x-go-name": "SubmoduleGitURL"
  10827. },
  10828. "target": {
  10829. "description": "`target` is populated when `type` is `symlink`, otherwise null",
  10830. "type": "string",
  10831. "x-go-name": "Target"
  10832. },
  10833. "type": {
  10834. "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`",
  10835. "type": "string",
  10836. "x-go-name": "Type"
  10837. },
  10838. "url": {
  10839. "type": "string",
  10840. "x-go-name": "URL"
  10841. }
  10842. },
  10843. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10844. },
  10845. "CreateBranchProtectionOption": {
  10846. "description": "CreateBranchProtectionOption options for creating a branch protection",
  10847. "type": "object",
  10848. "properties": {
  10849. "approvals_whitelist_teams": {
  10850. "type": "array",
  10851. "items": {
  10852. "type": "string"
  10853. },
  10854. "x-go-name": "ApprovalsWhitelistTeams"
  10855. },
  10856. "approvals_whitelist_username": {
  10857. "type": "array",
  10858. "items": {
  10859. "type": "string"
  10860. },
  10861. "x-go-name": "ApprovalsWhitelistUsernames"
  10862. },
  10863. "block_on_outdated_branch": {
  10864. "type": "boolean",
  10865. "x-go-name": "BlockOnOutdatedBranch"
  10866. },
  10867. "block_on_rejected_reviews": {
  10868. "type": "boolean",
  10869. "x-go-name": "BlockOnRejectedReviews"
  10870. },
  10871. "branch_name": {
  10872. "type": "string",
  10873. "x-go-name": "BranchName"
  10874. },
  10875. "dismiss_stale_approvals": {
  10876. "type": "boolean",
  10877. "x-go-name": "DismissStaleApprovals"
  10878. },
  10879. "enable_approvals_whitelist": {
  10880. "type": "boolean",
  10881. "x-go-name": "EnableApprovalsWhitelist"
  10882. },
  10883. "enable_merge_whitelist": {
  10884. "type": "boolean",
  10885. "x-go-name": "EnableMergeWhitelist"
  10886. },
  10887. "enable_push": {
  10888. "type": "boolean",
  10889. "x-go-name": "EnablePush"
  10890. },
  10891. "enable_push_whitelist": {
  10892. "type": "boolean",
  10893. "x-go-name": "EnablePushWhitelist"
  10894. },
  10895. "enable_status_check": {
  10896. "type": "boolean",
  10897. "x-go-name": "EnableStatusCheck"
  10898. },
  10899. "merge_whitelist_teams": {
  10900. "type": "array",
  10901. "items": {
  10902. "type": "string"
  10903. },
  10904. "x-go-name": "MergeWhitelistTeams"
  10905. },
  10906. "merge_whitelist_usernames": {
  10907. "type": "array",
  10908. "items": {
  10909. "type": "string"
  10910. },
  10911. "x-go-name": "MergeWhitelistUsernames"
  10912. },
  10913. "protected_file_patterns": {
  10914. "type": "string",
  10915. "x-go-name": "ProtectedFilePatterns"
  10916. },
  10917. "push_whitelist_deploy_keys": {
  10918. "type": "boolean",
  10919. "x-go-name": "PushWhitelistDeployKeys"
  10920. },
  10921. "push_whitelist_teams": {
  10922. "type": "array",
  10923. "items": {
  10924. "type": "string"
  10925. },
  10926. "x-go-name": "PushWhitelistTeams"
  10927. },
  10928. "push_whitelist_usernames": {
  10929. "type": "array",
  10930. "items": {
  10931. "type": "string"
  10932. },
  10933. "x-go-name": "PushWhitelistUsernames"
  10934. },
  10935. "require_signed_commits": {
  10936. "type": "boolean",
  10937. "x-go-name": "RequireSignedCommits"
  10938. },
  10939. "required_approvals": {
  10940. "type": "integer",
  10941. "format": "int64",
  10942. "x-go-name": "RequiredApprovals"
  10943. },
  10944. "status_check_contexts": {
  10945. "type": "array",
  10946. "items": {
  10947. "type": "string"
  10948. },
  10949. "x-go-name": "StatusCheckContexts"
  10950. }
  10951. },
  10952. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10953. },
  10954. "CreateBranchRepoOption": {
  10955. "description": "CreateBranchRepoOption options when creating a branch in a repository",
  10956. "type": "object",
  10957. "required": [
  10958. "new_branch_name"
  10959. ],
  10960. "properties": {
  10961. "new_branch_name": {
  10962. "description": "Name of the branch to create",
  10963. "type": "string",
  10964. "uniqueItems": true,
  10965. "x-go-name": "BranchName"
  10966. },
  10967. "old_branch_name": {
  10968. "description": "Name of the old branch to create from",
  10969. "type": "string",
  10970. "uniqueItems": true,
  10971. "x-go-name": "OldBranchName"
  10972. }
  10973. },
  10974. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10975. },
  10976. "CreateEmailOption": {
  10977. "description": "CreateEmailOption options when creating email addresses",
  10978. "type": "object",
  10979. "properties": {
  10980. "emails": {
  10981. "description": "email addresses to add",
  10982. "type": "array",
  10983. "items": {
  10984. "type": "string"
  10985. },
  10986. "x-go-name": "Emails"
  10987. }
  10988. },
  10989. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10990. },
  10991. "CreateFileOptions": {
  10992. "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)",
  10993. "type": "object",
  10994. "required": [
  10995. "content"
  10996. ],
  10997. "properties": {
  10998. "author": {
  10999. "$ref": "#/definitions/Identity"
  11000. },
  11001. "branch": {
  11002. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  11003. "type": "string",
  11004. "x-go-name": "BranchName"
  11005. },
  11006. "committer": {
  11007. "$ref": "#/definitions/Identity"
  11008. },
  11009. "content": {
  11010. "description": "content must be base64 encoded",
  11011. "type": "string",
  11012. "x-go-name": "Content"
  11013. },
  11014. "dates": {
  11015. "$ref": "#/definitions/CommitDateOptions"
  11016. },
  11017. "message": {
  11018. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  11019. "type": "string",
  11020. "x-go-name": "Message"
  11021. },
  11022. "new_branch": {
  11023. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  11024. "type": "string",
  11025. "x-go-name": "NewBranchName"
  11026. }
  11027. },
  11028. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11029. },
  11030. "CreateForkOption": {
  11031. "description": "CreateForkOption options for creating a fork",
  11032. "type": "object",
  11033. "properties": {
  11034. "organization": {
  11035. "description": "organization name, if forking into an organization",
  11036. "type": "string",
  11037. "x-go-name": "Organization"
  11038. }
  11039. },
  11040. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11041. },
  11042. "CreateGPGKeyOption": {
  11043. "description": "CreateGPGKeyOption options create user GPG key",
  11044. "type": "object",
  11045. "required": [
  11046. "armored_public_key"
  11047. ],
  11048. "properties": {
  11049. "armored_public_key": {
  11050. "description": "An armored GPG key to add",
  11051. "type": "string",
  11052. "uniqueItems": true,
  11053. "x-go-name": "ArmoredKey"
  11054. }
  11055. },
  11056. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11057. },
  11058. "CreateHookOption": {
  11059. "description": "CreateHookOption options when create a hook",
  11060. "type": "object",
  11061. "required": [
  11062. "type",
  11063. "config"
  11064. ],
  11065. "properties": {
  11066. "active": {
  11067. "type": "boolean",
  11068. "default": false,
  11069. "x-go-name": "Active"
  11070. },
  11071. "branch_filter": {
  11072. "type": "string",
  11073. "x-go-name": "BranchFilter"
  11074. },
  11075. "config": {
  11076. "$ref": "#/definitions/CreateHookOptionConfig"
  11077. },
  11078. "events": {
  11079. "type": "array",
  11080. "items": {
  11081. "type": "string"
  11082. },
  11083. "x-go-name": "Events"
  11084. },
  11085. "type": {
  11086. "type": "string",
  11087. "enum": [
  11088. "dingtalk",
  11089. "discord",
  11090. "gitea",
  11091. "gogs",
  11092. "msteams",
  11093. "slack",
  11094. "telegram",
  11095. "feishu"
  11096. ],
  11097. "x-go-name": "Type"
  11098. }
  11099. },
  11100. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11101. },
  11102. "CreateHookOptionConfig": {
  11103. "description": "CreateHookOptionConfig has all config options in it\nrequired are \"content_type\" and \"url\" Required",
  11104. "type": "object",
  11105. "additionalProperties": {
  11106. "type": "string"
  11107. },
  11108. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11109. },
  11110. "CreateIssueCommentOption": {
  11111. "description": "CreateIssueCommentOption options for creating a comment on an issue",
  11112. "type": "object",
  11113. "required": [
  11114. "body"
  11115. ],
  11116. "properties": {
  11117. "body": {
  11118. "type": "string",
  11119. "x-go-name": "Body"
  11120. }
  11121. },
  11122. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11123. },
  11124. "CreateIssueOption": {
  11125. "description": "CreateIssueOption options to create one issue",
  11126. "type": "object",
  11127. "required": [
  11128. "title"
  11129. ],
  11130. "properties": {
  11131. "assignee": {
  11132. "description": "username of assignee",
  11133. "type": "string",
  11134. "x-go-name": "Assignee"
  11135. },
  11136. "assignees": {
  11137. "type": "array",
  11138. "items": {
  11139. "type": "string"
  11140. },
  11141. "x-go-name": "Assignees"
  11142. },
  11143. "body": {
  11144. "type": "string",
  11145. "x-go-name": "Body"
  11146. },
  11147. "closed": {
  11148. "type": "boolean",
  11149. "x-go-name": "Closed"
  11150. },
  11151. "due_date": {
  11152. "type": "string",
  11153. "format": "date-time",
  11154. "x-go-name": "Deadline"
  11155. },
  11156. "labels": {
  11157. "description": "list of label ids",
  11158. "type": "array",
  11159. "items": {
  11160. "type": "integer",
  11161. "format": "int64"
  11162. },
  11163. "x-go-name": "Labels"
  11164. },
  11165. "milestone": {
  11166. "description": "milestone id",
  11167. "type": "integer",
  11168. "format": "int64",
  11169. "x-go-name": "Milestone"
  11170. },
  11171. "title": {
  11172. "type": "string",
  11173. "x-go-name": "Title"
  11174. }
  11175. },
  11176. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11177. },
  11178. "CreateKeyOption": {
  11179. "description": "CreateKeyOption options when creating a key",
  11180. "type": "object",
  11181. "required": [
  11182. "title",
  11183. "key"
  11184. ],
  11185. "properties": {
  11186. "key": {
  11187. "description": "An armored SSH key to add",
  11188. "type": "string",
  11189. "uniqueItems": true,
  11190. "x-go-name": "Key"
  11191. },
  11192. "read_only": {
  11193. "description": "Describe if the key has only read access or read/write",
  11194. "type": "boolean",
  11195. "x-go-name": "ReadOnly"
  11196. },
  11197. "title": {
  11198. "description": "Title of the key to add",
  11199. "type": "string",
  11200. "uniqueItems": true,
  11201. "x-go-name": "Title"
  11202. }
  11203. },
  11204. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11205. },
  11206. "CreateLabelOption": {
  11207. "description": "CreateLabelOption options for creating a label",
  11208. "type": "object",
  11209. "required": [
  11210. "name",
  11211. "color"
  11212. ],
  11213. "properties": {
  11214. "color": {
  11215. "type": "string",
  11216. "x-go-name": "Color",
  11217. "example": "#00aabb"
  11218. },
  11219. "description": {
  11220. "type": "string",
  11221. "x-go-name": "Description"
  11222. },
  11223. "name": {
  11224. "type": "string",
  11225. "x-go-name": "Name"
  11226. }
  11227. },
  11228. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11229. },
  11230. "CreateMilestoneOption": {
  11231. "description": "CreateMilestoneOption options for creating a milestone",
  11232. "type": "object",
  11233. "properties": {
  11234. "description": {
  11235. "type": "string",
  11236. "x-go-name": "Description"
  11237. },
  11238. "due_on": {
  11239. "type": "string",
  11240. "format": "date-time",
  11241. "x-go-name": "Deadline"
  11242. },
  11243. "title": {
  11244. "type": "string",
  11245. "x-go-name": "Title"
  11246. }
  11247. },
  11248. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11249. },
  11250. "CreateOAuth2ApplicationOptions": {
  11251. "description": "CreateOAuth2ApplicationOptions holds options to create an oauth2 application",
  11252. "type": "object",
  11253. "properties": {
  11254. "name": {
  11255. "type": "string",
  11256. "x-go-name": "Name"
  11257. },
  11258. "redirect_uris": {
  11259. "type": "array",
  11260. "items": {
  11261. "type": "string"
  11262. },
  11263. "x-go-name": "RedirectURIs"
  11264. }
  11265. },
  11266. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11267. },
  11268. "CreateOrgOption": {
  11269. "description": "CreateOrgOption options for creating an organization",
  11270. "type": "object",
  11271. "required": [
  11272. "username"
  11273. ],
  11274. "properties": {
  11275. "description": {
  11276. "type": "string",
  11277. "x-go-name": "Description"
  11278. },
  11279. "full_name": {
  11280. "type": "string",
  11281. "x-go-name": "FullName"
  11282. },
  11283. "location": {
  11284. "type": "string",
  11285. "x-go-name": "Location"
  11286. },
  11287. "repo_admin_change_team_access": {
  11288. "type": "boolean",
  11289. "x-go-name": "RepoAdminChangeTeamAccess"
  11290. },
  11291. "username": {
  11292. "type": "string",
  11293. "x-go-name": "UserName"
  11294. },
  11295. "visibility": {
  11296. "description": "possible values are `public` (default), `limited` or `private`",
  11297. "type": "string",
  11298. "enum": [
  11299. "public",
  11300. "limited",
  11301. "private"
  11302. ],
  11303. "x-go-name": "Visibility"
  11304. },
  11305. "website": {
  11306. "type": "string",
  11307. "x-go-name": "Website"
  11308. }
  11309. },
  11310. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11311. },
  11312. "CreatePullRequestOption": {
  11313. "description": "CreatePullRequestOption options when creating a pull request",
  11314. "type": "object",
  11315. "properties": {
  11316. "assignee": {
  11317. "type": "string",
  11318. "x-go-name": "Assignee"
  11319. },
  11320. "assignees": {
  11321. "type": "array",
  11322. "items": {
  11323. "type": "string"
  11324. },
  11325. "x-go-name": "Assignees"
  11326. },
  11327. "base": {
  11328. "type": "string",
  11329. "x-go-name": "Base"
  11330. },
  11331. "body": {
  11332. "type": "string",
  11333. "x-go-name": "Body"
  11334. },
  11335. "due_date": {
  11336. "type": "string",
  11337. "format": "date-time",
  11338. "x-go-name": "Deadline"
  11339. },
  11340. "head": {
  11341. "type": "string",
  11342. "x-go-name": "Head"
  11343. },
  11344. "labels": {
  11345. "type": "array",
  11346. "items": {
  11347. "type": "integer",
  11348. "format": "int64"
  11349. },
  11350. "x-go-name": "Labels"
  11351. },
  11352. "milestone": {
  11353. "type": "integer",
  11354. "format": "int64",
  11355. "x-go-name": "Milestone"
  11356. },
  11357. "title": {
  11358. "type": "string",
  11359. "x-go-name": "Title"
  11360. }
  11361. },
  11362. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11363. },
  11364. "CreatePullReviewComment": {
  11365. "description": "CreatePullReviewComment represent a review comment for creation api",
  11366. "type": "object",
  11367. "properties": {
  11368. "body": {
  11369. "type": "string",
  11370. "x-go-name": "Body"
  11371. },
  11372. "new_position": {
  11373. "description": "if comment to new file line or 0",
  11374. "type": "integer",
  11375. "format": "int64",
  11376. "x-go-name": "NewLineNum"
  11377. },
  11378. "old_position": {
  11379. "description": "if comment to old file line or 0",
  11380. "type": "integer",
  11381. "format": "int64",
  11382. "x-go-name": "OldLineNum"
  11383. },
  11384. "path": {
  11385. "description": "the tree path",
  11386. "type": "string",
  11387. "x-go-name": "Path"
  11388. }
  11389. },
  11390. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11391. },
  11392. "CreatePullReviewOptions": {
  11393. "description": "CreatePullReviewOptions are options to create a pull review",
  11394. "type": "object",
  11395. "properties": {
  11396. "body": {
  11397. "type": "string",
  11398. "x-go-name": "Body"
  11399. },
  11400. "comments": {
  11401. "type": "array",
  11402. "items": {
  11403. "$ref": "#/definitions/CreatePullReviewComment"
  11404. },
  11405. "x-go-name": "Comments"
  11406. },
  11407. "commit_id": {
  11408. "type": "string",
  11409. "x-go-name": "CommitID"
  11410. },
  11411. "event": {
  11412. "$ref": "#/definitions/ReviewStateType"
  11413. }
  11414. },
  11415. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11416. },
  11417. "CreateReleaseOption": {
  11418. "description": "CreateReleaseOption options when creating a release",
  11419. "type": "object",
  11420. "required": [
  11421. "tag_name"
  11422. ],
  11423. "properties": {
  11424. "body": {
  11425. "type": "string",
  11426. "x-go-name": "Note"
  11427. },
  11428. "draft": {
  11429. "type": "boolean",
  11430. "x-go-name": "IsDraft"
  11431. },
  11432. "name": {
  11433. "type": "string",
  11434. "x-go-name": "Title"
  11435. },
  11436. "prerelease": {
  11437. "type": "boolean",
  11438. "x-go-name": "IsPrerelease"
  11439. },
  11440. "tag_name": {
  11441. "type": "string",
  11442. "x-go-name": "TagName"
  11443. },
  11444. "target_commitish": {
  11445. "type": "string",
  11446. "x-go-name": "Target"
  11447. }
  11448. },
  11449. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11450. },
  11451. "CreateRepoOption": {
  11452. "description": "CreateRepoOption options when creating repository",
  11453. "type": "object",
  11454. "required": [
  11455. "name"
  11456. ],
  11457. "properties": {
  11458. "auto_init": {
  11459. "description": "Whether the repository should be auto-intialized?",
  11460. "type": "boolean",
  11461. "x-go-name": "AutoInit"
  11462. },
  11463. "default_branch": {
  11464. "description": "DefaultBranch of the repository (used when initializes and in template)",
  11465. "type": "string",
  11466. "x-go-name": "DefaultBranch"
  11467. },
  11468. "description": {
  11469. "description": "Description of the repository to create",
  11470. "type": "string",
  11471. "x-go-name": "Description"
  11472. },
  11473. "gitignores": {
  11474. "description": "Gitignores to use",
  11475. "type": "string",
  11476. "x-go-name": "Gitignores"
  11477. },
  11478. "issue_labels": {
  11479. "description": "Issue Label set to use",
  11480. "type": "string",
  11481. "x-go-name": "IssueLabels"
  11482. },
  11483. "license": {
  11484. "description": "License to use",
  11485. "type": "string",
  11486. "x-go-name": "License"
  11487. },
  11488. "name": {
  11489. "description": "Name of the repository to create",
  11490. "type": "string",
  11491. "uniqueItems": true,
  11492. "x-go-name": "Name"
  11493. },
  11494. "private": {
  11495. "description": "Whether the repository is private",
  11496. "type": "boolean",
  11497. "x-go-name": "Private"
  11498. },
  11499. "readme": {
  11500. "description": "Readme of the repository to create",
  11501. "type": "string",
  11502. "x-go-name": "Readme"
  11503. }
  11504. },
  11505. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11506. },
  11507. "CreateStatusOption": {
  11508. "description": "CreateStatusOption holds the information needed to create a new Status for a Commit",
  11509. "type": "object",
  11510. "properties": {
  11511. "context": {
  11512. "type": "string",
  11513. "x-go-name": "Context"
  11514. },
  11515. "description": {
  11516. "type": "string",
  11517. "x-go-name": "Description"
  11518. },
  11519. "state": {
  11520. "$ref": "#/definitions/StatusState"
  11521. },
  11522. "target_url": {
  11523. "type": "string",
  11524. "x-go-name": "TargetURL"
  11525. }
  11526. },
  11527. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11528. },
  11529. "CreateTeamOption": {
  11530. "description": "CreateTeamOption options for creating a team",
  11531. "type": "object",
  11532. "required": [
  11533. "name"
  11534. ],
  11535. "properties": {
  11536. "can_create_org_repo": {
  11537. "type": "boolean",
  11538. "x-go-name": "CanCreateOrgRepo"
  11539. },
  11540. "description": {
  11541. "type": "string",
  11542. "x-go-name": "Description"
  11543. },
  11544. "includes_all_repositories": {
  11545. "type": "boolean",
  11546. "x-go-name": "IncludesAllRepositories"
  11547. },
  11548. "name": {
  11549. "type": "string",
  11550. "x-go-name": "Name"
  11551. },
  11552. "permission": {
  11553. "type": "string",
  11554. "enum": [
  11555. "read",
  11556. "write",
  11557. "admin"
  11558. ],
  11559. "x-go-name": "Permission"
  11560. },
  11561. "units": {
  11562. "type": "array",
  11563. "items": {
  11564. "type": "string"
  11565. },
  11566. "x-go-name": "Units",
  11567. "example": [
  11568. "repo.code",
  11569. "repo.issues",
  11570. "repo.ext_issues",
  11571. "repo.wiki",
  11572. "repo.pulls",
  11573. "repo.releases",
  11574. "repo.ext_wiki"
  11575. ]
  11576. }
  11577. },
  11578. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11579. },
  11580. "CreateUserOption": {
  11581. "description": "CreateUserOption create user options",
  11582. "type": "object",
  11583. "required": [
  11584. "username",
  11585. "email",
  11586. "password"
  11587. ],
  11588. "properties": {
  11589. "email": {
  11590. "type": "string",
  11591. "format": "email",
  11592. "x-go-name": "Email"
  11593. },
  11594. "full_name": {
  11595. "type": "string",
  11596. "x-go-name": "FullName"
  11597. },
  11598. "login_name": {
  11599. "type": "string",
  11600. "x-go-name": "LoginName"
  11601. },
  11602. "must_change_password": {
  11603. "type": "boolean",
  11604. "x-go-name": "MustChangePassword"
  11605. },
  11606. "password": {
  11607. "type": "string",
  11608. "x-go-name": "Password"
  11609. },
  11610. "send_notify": {
  11611. "type": "boolean",
  11612. "x-go-name": "SendNotify"
  11613. },
  11614. "source_id": {
  11615. "type": "integer",
  11616. "format": "int64",
  11617. "x-go-name": "SourceID"
  11618. },
  11619. "username": {
  11620. "type": "string",
  11621. "x-go-name": "Username"
  11622. }
  11623. },
  11624. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11625. },
  11626. "DeleteEmailOption": {
  11627. "description": "DeleteEmailOption options when deleting email addresses",
  11628. "type": "object",
  11629. "properties": {
  11630. "emails": {
  11631. "description": "email addresses to delete",
  11632. "type": "array",
  11633. "items": {
  11634. "type": "string"
  11635. },
  11636. "x-go-name": "Emails"
  11637. }
  11638. },
  11639. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11640. },
  11641. "DeleteFileOptions": {
  11642. "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)",
  11643. "type": "object",
  11644. "required": [
  11645. "sha"
  11646. ],
  11647. "properties": {
  11648. "author": {
  11649. "$ref": "#/definitions/Identity"
  11650. },
  11651. "branch": {
  11652. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  11653. "type": "string",
  11654. "x-go-name": "BranchName"
  11655. },
  11656. "committer": {
  11657. "$ref": "#/definitions/Identity"
  11658. },
  11659. "dates": {
  11660. "$ref": "#/definitions/CommitDateOptions"
  11661. },
  11662. "message": {
  11663. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  11664. "type": "string",
  11665. "x-go-name": "Message"
  11666. },
  11667. "new_branch": {
  11668. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  11669. "type": "string",
  11670. "x-go-name": "NewBranchName"
  11671. },
  11672. "sha": {
  11673. "description": "sha is the SHA for the file that already exists",
  11674. "type": "string",
  11675. "x-go-name": "SHA"
  11676. }
  11677. },
  11678. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11679. },
  11680. "DeployKey": {
  11681. "description": "DeployKey a deploy key",
  11682. "type": "object",
  11683. "properties": {
  11684. "created_at": {
  11685. "type": "string",
  11686. "format": "date-time",
  11687. "x-go-name": "Created"
  11688. },
  11689. "fingerprint": {
  11690. "type": "string",
  11691. "x-go-name": "Fingerprint"
  11692. },
  11693. "id": {
  11694. "type": "integer",
  11695. "format": "int64",
  11696. "x-go-name": "ID"
  11697. },
  11698. "key": {
  11699. "type": "string",
  11700. "x-go-name": "Key"
  11701. },
  11702. "key_id": {
  11703. "type": "integer",
  11704. "format": "int64",
  11705. "x-go-name": "KeyID"
  11706. },
  11707. "read_only": {
  11708. "type": "boolean",
  11709. "x-go-name": "ReadOnly"
  11710. },
  11711. "repository": {
  11712. "$ref": "#/definitions/Repository"
  11713. },
  11714. "title": {
  11715. "type": "string",
  11716. "x-go-name": "Title"
  11717. },
  11718. "url": {
  11719. "type": "string",
  11720. "x-go-name": "URL"
  11721. }
  11722. },
  11723. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11724. },
  11725. "EditAttachmentOptions": {
  11726. "description": "EditAttachmentOptions options for editing attachments",
  11727. "type": "object",
  11728. "properties": {
  11729. "name": {
  11730. "type": "string",
  11731. "x-go-name": "Name"
  11732. }
  11733. },
  11734. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11735. },
  11736. "EditBranchProtectionOption": {
  11737. "description": "EditBranchProtectionOption options for editing a branch protection",
  11738. "type": "object",
  11739. "properties": {
  11740. "approvals_whitelist_teams": {
  11741. "type": "array",
  11742. "items": {
  11743. "type": "string"
  11744. },
  11745. "x-go-name": "ApprovalsWhitelistTeams"
  11746. },
  11747. "approvals_whitelist_username": {
  11748. "type": "array",
  11749. "items": {
  11750. "type": "string"
  11751. },
  11752. "x-go-name": "ApprovalsWhitelistUsernames"
  11753. },
  11754. "block_on_outdated_branch": {
  11755. "type": "boolean",
  11756. "x-go-name": "BlockOnOutdatedBranch"
  11757. },
  11758. "block_on_rejected_reviews": {
  11759. "type": "boolean",
  11760. "x-go-name": "BlockOnRejectedReviews"
  11761. },
  11762. "dismiss_stale_approvals": {
  11763. "type": "boolean",
  11764. "x-go-name": "DismissStaleApprovals"
  11765. },
  11766. "enable_approvals_whitelist": {
  11767. "type": "boolean",
  11768. "x-go-name": "EnableApprovalsWhitelist"
  11769. },
  11770. "enable_merge_whitelist": {
  11771. "type": "boolean",
  11772. "x-go-name": "EnableMergeWhitelist"
  11773. },
  11774. "enable_push": {
  11775. "type": "boolean",
  11776. "x-go-name": "EnablePush"
  11777. },
  11778. "enable_push_whitelist": {
  11779. "type": "boolean",
  11780. "x-go-name": "EnablePushWhitelist"
  11781. },
  11782. "enable_status_check": {
  11783. "type": "boolean",
  11784. "x-go-name": "EnableStatusCheck"
  11785. },
  11786. "merge_whitelist_teams": {
  11787. "type": "array",
  11788. "items": {
  11789. "type": "string"
  11790. },
  11791. "x-go-name": "MergeWhitelistTeams"
  11792. },
  11793. "merge_whitelist_usernames": {
  11794. "type": "array",
  11795. "items": {
  11796. "type": "string"
  11797. },
  11798. "x-go-name": "MergeWhitelistUsernames"
  11799. },
  11800. "protected_file_patterns": {
  11801. "type": "string",
  11802. "x-go-name": "ProtectedFilePatterns"
  11803. },
  11804. "push_whitelist_deploy_keys": {
  11805. "type": "boolean",
  11806. "x-go-name": "PushWhitelistDeployKeys"
  11807. },
  11808. "push_whitelist_teams": {
  11809. "type": "array",
  11810. "items": {
  11811. "type": "string"
  11812. },
  11813. "x-go-name": "PushWhitelistTeams"
  11814. },
  11815. "push_whitelist_usernames": {
  11816. "type": "array",
  11817. "items": {
  11818. "type": "string"
  11819. },
  11820. "x-go-name": "PushWhitelistUsernames"
  11821. },
  11822. "require_signed_commits": {
  11823. "type": "boolean",
  11824. "x-go-name": "RequireSignedCommits"
  11825. },
  11826. "required_approvals": {
  11827. "type": "integer",
  11828. "format": "int64",
  11829. "x-go-name": "RequiredApprovals"
  11830. },
  11831. "status_check_contexts": {
  11832. "type": "array",
  11833. "items": {
  11834. "type": "string"
  11835. },
  11836. "x-go-name": "StatusCheckContexts"
  11837. }
  11838. },
  11839. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11840. },
  11841. "EditDeadlineOption": {
  11842. "description": "EditDeadlineOption options for creating a deadline",
  11843. "type": "object",
  11844. "required": [
  11845. "due_date"
  11846. ],
  11847. "properties": {
  11848. "due_date": {
  11849. "type": "string",
  11850. "format": "date-time",
  11851. "x-go-name": "Deadline"
  11852. }
  11853. },
  11854. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11855. },
  11856. "EditGitHookOption": {
  11857. "description": "EditGitHookOption options when modifying one Git hook",
  11858. "type": "object",
  11859. "properties": {
  11860. "content": {
  11861. "type": "string",
  11862. "x-go-name": "Content"
  11863. }
  11864. },
  11865. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11866. },
  11867. "EditHookOption": {
  11868. "description": "EditHookOption options when modify one hook",
  11869. "type": "object",
  11870. "properties": {
  11871. "active": {
  11872. "type": "boolean",
  11873. "x-go-name": "Active"
  11874. },
  11875. "branch_filter": {
  11876. "type": "string",
  11877. "x-go-name": "BranchFilter"
  11878. },
  11879. "config": {
  11880. "type": "object",
  11881. "additionalProperties": {
  11882. "type": "string"
  11883. },
  11884. "x-go-name": "Config"
  11885. },
  11886. "events": {
  11887. "type": "array",
  11888. "items": {
  11889. "type": "string"
  11890. },
  11891. "x-go-name": "Events"
  11892. }
  11893. },
  11894. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11895. },
  11896. "EditIssueCommentOption": {
  11897. "description": "EditIssueCommentOption options for editing a comment",
  11898. "type": "object",
  11899. "required": [
  11900. "body"
  11901. ],
  11902. "properties": {
  11903. "body": {
  11904. "type": "string",
  11905. "x-go-name": "Body"
  11906. }
  11907. },
  11908. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11909. },
  11910. "EditIssueOption": {
  11911. "description": "EditIssueOption options for editing an issue",
  11912. "type": "object",
  11913. "properties": {
  11914. "assignee": {
  11915. "type": "string",
  11916. "x-go-name": "Assignee"
  11917. },
  11918. "assignees": {
  11919. "type": "array",
  11920. "items": {
  11921. "type": "string"
  11922. },
  11923. "x-go-name": "Assignees"
  11924. },
  11925. "body": {
  11926. "type": "string",
  11927. "x-go-name": "Body"
  11928. },
  11929. "due_date": {
  11930. "type": "string",
  11931. "format": "date-time",
  11932. "x-go-name": "Deadline"
  11933. },
  11934. "milestone": {
  11935. "type": "integer",
  11936. "format": "int64",
  11937. "x-go-name": "Milestone"
  11938. },
  11939. "state": {
  11940. "type": "string",
  11941. "x-go-name": "State"
  11942. },
  11943. "title": {
  11944. "type": "string",
  11945. "x-go-name": "Title"
  11946. },
  11947. "unset_due_date": {
  11948. "type": "boolean",
  11949. "x-go-name": "RemoveDeadline"
  11950. }
  11951. },
  11952. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11953. },
  11954. "EditLabelOption": {
  11955. "description": "EditLabelOption options for editing a label",
  11956. "type": "object",
  11957. "properties": {
  11958. "color": {
  11959. "type": "string",
  11960. "x-go-name": "Color"
  11961. },
  11962. "description": {
  11963. "type": "string",
  11964. "x-go-name": "Description"
  11965. },
  11966. "name": {
  11967. "type": "string",
  11968. "x-go-name": "Name"
  11969. }
  11970. },
  11971. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11972. },
  11973. "EditMilestoneOption": {
  11974. "description": "EditMilestoneOption options for editing a milestone",
  11975. "type": "object",
  11976. "properties": {
  11977. "description": {
  11978. "type": "string",
  11979. "x-go-name": "Description"
  11980. },
  11981. "due_on": {
  11982. "type": "string",
  11983. "format": "date-time",
  11984. "x-go-name": "Deadline"
  11985. },
  11986. "state": {
  11987. "type": "string",
  11988. "x-go-name": "State"
  11989. },
  11990. "title": {
  11991. "type": "string",
  11992. "x-go-name": "Title"
  11993. }
  11994. },
  11995. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11996. },
  11997. "EditOrgOption": {
  11998. "description": "EditOrgOption options for editing an organization",
  11999. "type": "object",
  12000. "properties": {
  12001. "description": {
  12002. "type": "string",
  12003. "x-go-name": "Description"
  12004. },
  12005. "full_name": {
  12006. "type": "string",
  12007. "x-go-name": "FullName"
  12008. },
  12009. "location": {
  12010. "type": "string",
  12011. "x-go-name": "Location"
  12012. },
  12013. "repo_admin_change_team_access": {
  12014. "type": "boolean",
  12015. "x-go-name": "RepoAdminChangeTeamAccess"
  12016. },
  12017. "visibility": {
  12018. "description": "possible values are `public`, `limited` or `private`",
  12019. "type": "string",
  12020. "enum": [
  12021. "public",
  12022. "limited",
  12023. "private"
  12024. ],
  12025. "x-go-name": "Visibility"
  12026. },
  12027. "website": {
  12028. "type": "string",
  12029. "x-go-name": "Website"
  12030. }
  12031. },
  12032. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12033. },
  12034. "EditPullRequestOption": {
  12035. "description": "EditPullRequestOption options when modify pull request",
  12036. "type": "object",
  12037. "properties": {
  12038. "assignee": {
  12039. "type": "string",
  12040. "x-go-name": "Assignee"
  12041. },
  12042. "assignees": {
  12043. "type": "array",
  12044. "items": {
  12045. "type": "string"
  12046. },
  12047. "x-go-name": "Assignees"
  12048. },
  12049. "body": {
  12050. "type": "string",
  12051. "x-go-name": "Body"
  12052. },
  12053. "due_date": {
  12054. "type": "string",
  12055. "format": "date-time",
  12056. "x-go-name": "Deadline"
  12057. },
  12058. "labels": {
  12059. "type": "array",
  12060. "items": {
  12061. "type": "integer",
  12062. "format": "int64"
  12063. },
  12064. "x-go-name": "Labels"
  12065. },
  12066. "milestone": {
  12067. "type": "integer",
  12068. "format": "int64",
  12069. "x-go-name": "Milestone"
  12070. },
  12071. "state": {
  12072. "type": "string",
  12073. "x-go-name": "State"
  12074. },
  12075. "title": {
  12076. "type": "string",
  12077. "x-go-name": "Title"
  12078. },
  12079. "unset_due_date": {
  12080. "type": "boolean",
  12081. "x-go-name": "RemoveDeadline"
  12082. }
  12083. },
  12084. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12085. },
  12086. "EditReactionOption": {
  12087. "description": "EditReactionOption contain the reaction type",
  12088. "type": "object",
  12089. "properties": {
  12090. "content": {
  12091. "type": "string",
  12092. "x-go-name": "Reaction"
  12093. }
  12094. },
  12095. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12096. },
  12097. "EditReleaseOption": {
  12098. "description": "EditReleaseOption options when editing a release",
  12099. "type": "object",
  12100. "properties": {
  12101. "body": {
  12102. "type": "string",
  12103. "x-go-name": "Note"
  12104. },
  12105. "draft": {
  12106. "type": "boolean",
  12107. "x-go-name": "IsDraft"
  12108. },
  12109. "name": {
  12110. "type": "string",
  12111. "x-go-name": "Title"
  12112. },
  12113. "prerelease": {
  12114. "type": "boolean",
  12115. "x-go-name": "IsPrerelease"
  12116. },
  12117. "tag_name": {
  12118. "type": "string",
  12119. "x-go-name": "TagName"
  12120. },
  12121. "target_commitish": {
  12122. "type": "string",
  12123. "x-go-name": "Target"
  12124. }
  12125. },
  12126. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12127. },
  12128. "EditRepoOption": {
  12129. "description": "EditRepoOption options when editing a repository's properties",
  12130. "type": "object",
  12131. "properties": {
  12132. "allow_merge_commits": {
  12133. "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`.",
  12134. "type": "boolean",
  12135. "x-go-name": "AllowMerge"
  12136. },
  12137. "allow_rebase": {
  12138. "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.",
  12139. "type": "boolean",
  12140. "x-go-name": "AllowRebase"
  12141. },
  12142. "allow_rebase_explicit": {
  12143. "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`.",
  12144. "type": "boolean",
  12145. "x-go-name": "AllowRebaseMerge"
  12146. },
  12147. "allow_squash_merge": {
  12148. "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.",
  12149. "type": "boolean",
  12150. "x-go-name": "AllowSquash"
  12151. },
  12152. "archived": {
  12153. "description": "set to `true` to archive this repository.",
  12154. "type": "boolean",
  12155. "x-go-name": "Archived"
  12156. },
  12157. "default_branch": {
  12158. "description": "sets the default branch for this repository.",
  12159. "type": "string",
  12160. "x-go-name": "DefaultBranch"
  12161. },
  12162. "description": {
  12163. "description": "a short description of the repository.",
  12164. "type": "string",
  12165. "x-go-name": "Description"
  12166. },
  12167. "external_tracker": {
  12168. "$ref": "#/definitions/ExternalTracker"
  12169. },
  12170. "external_wiki": {
  12171. "$ref": "#/definitions/ExternalWiki"
  12172. },
  12173. "has_issues": {
  12174. "description": "either `true` to enable issues for this repository or `false` to disable them.",
  12175. "type": "boolean",
  12176. "x-go-name": "HasIssues"
  12177. },
  12178. "has_pull_requests": {
  12179. "description": "either `true` to allow pull requests, or `false` to prevent pull request.",
  12180. "type": "boolean",
  12181. "x-go-name": "HasPullRequests"
  12182. },
  12183. "has_wiki": {
  12184. "description": "either `true` to enable the wiki for this repository or `false` to disable it.",
  12185. "type": "boolean",
  12186. "x-go-name": "HasWiki"
  12187. },
  12188. "ignore_whitespace_conflicts": {
  12189. "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.",
  12190. "type": "boolean",
  12191. "x-go-name": "IgnoreWhitespaceConflicts"
  12192. },
  12193. "internal_tracker": {
  12194. "$ref": "#/definitions/InternalTracker"
  12195. },
  12196. "name": {
  12197. "description": "name of the repository",
  12198. "type": "string",
  12199. "uniqueItems": true,
  12200. "x-go-name": "Name"
  12201. },
  12202. "private": {
  12203. "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.",
  12204. "type": "boolean",
  12205. "x-go-name": "Private"
  12206. },
  12207. "template": {
  12208. "description": "either `true` to make this repository a template or `false` to make it a normal repository",
  12209. "type": "boolean",
  12210. "x-go-name": "Template"
  12211. },
  12212. "website": {
  12213. "description": "a URL with more information about the repository.",
  12214. "type": "string",
  12215. "x-go-name": "Website"
  12216. }
  12217. },
  12218. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12219. },
  12220. "EditTeamOption": {
  12221. "description": "EditTeamOption options for editing a team",
  12222. "type": "object",
  12223. "required": [
  12224. "name"
  12225. ],
  12226. "properties": {
  12227. "can_create_org_repo": {
  12228. "type": "boolean",
  12229. "x-go-name": "CanCreateOrgRepo"
  12230. },
  12231. "description": {
  12232. "type": "string",
  12233. "x-go-name": "Description"
  12234. },
  12235. "includes_all_repositories": {
  12236. "type": "boolean",
  12237. "x-go-name": "IncludesAllRepositories"
  12238. },
  12239. "name": {
  12240. "type": "string",
  12241. "x-go-name": "Name"
  12242. },
  12243. "permission": {
  12244. "type": "string",
  12245. "enum": [
  12246. "read",
  12247. "write",
  12248. "admin"
  12249. ],
  12250. "x-go-name": "Permission"
  12251. },
  12252. "units": {
  12253. "type": "array",
  12254. "items": {
  12255. "type": "string"
  12256. },
  12257. "x-go-name": "Units",
  12258. "example": [
  12259. "repo.code",
  12260. "repo.issues",
  12261. "repo.ext_issues",
  12262. "repo.wiki",
  12263. "repo.pulls",
  12264. "repo.releases",
  12265. "repo.ext_wiki"
  12266. ]
  12267. }
  12268. },
  12269. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12270. },
  12271. "EditUserOption": {
  12272. "description": "EditUserOption edit user options",
  12273. "type": "object",
  12274. "required": [
  12275. "email"
  12276. ],
  12277. "properties": {
  12278. "active": {
  12279. "type": "boolean",
  12280. "x-go-name": "Active"
  12281. },
  12282. "admin": {
  12283. "type": "boolean",
  12284. "x-go-name": "Admin"
  12285. },
  12286. "allow_create_organization": {
  12287. "type": "boolean",
  12288. "x-go-name": "AllowCreateOrganization"
  12289. },
  12290. "allow_git_hook": {
  12291. "type": "boolean",
  12292. "x-go-name": "AllowGitHook"
  12293. },
  12294. "allow_import_local": {
  12295. "type": "boolean",
  12296. "x-go-name": "AllowImportLocal"
  12297. },
  12298. "email": {
  12299. "type": "string",
  12300. "format": "email",
  12301. "x-go-name": "Email"
  12302. },
  12303. "full_name": {
  12304. "type": "string",
  12305. "x-go-name": "FullName"
  12306. },
  12307. "location": {
  12308. "type": "string",
  12309. "x-go-name": "Location"
  12310. },
  12311. "login_name": {
  12312. "type": "string",
  12313. "x-go-name": "LoginName"
  12314. },
  12315. "max_repo_creation": {
  12316. "type": "integer",
  12317. "format": "int64",
  12318. "x-go-name": "MaxRepoCreation"
  12319. },
  12320. "must_change_password": {
  12321. "type": "boolean",
  12322. "x-go-name": "MustChangePassword"
  12323. },
  12324. "password": {
  12325. "type": "string",
  12326. "x-go-name": "Password"
  12327. },
  12328. "prohibit_login": {
  12329. "type": "boolean",
  12330. "x-go-name": "ProhibitLogin"
  12331. },
  12332. "source_id": {
  12333. "type": "integer",
  12334. "format": "int64",
  12335. "x-go-name": "SourceID"
  12336. },
  12337. "website": {
  12338. "type": "string",
  12339. "x-go-name": "Website"
  12340. }
  12341. },
  12342. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12343. },
  12344. "Email": {
  12345. "description": "Email an email address belonging to a user",
  12346. "type": "object",
  12347. "properties": {
  12348. "email": {
  12349. "type": "string",
  12350. "format": "email",
  12351. "x-go-name": "Email"
  12352. },
  12353. "primary": {
  12354. "type": "boolean",
  12355. "x-go-name": "Primary"
  12356. },
  12357. "verified": {
  12358. "type": "boolean",
  12359. "x-go-name": "Verified"
  12360. }
  12361. },
  12362. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12363. },
  12364. "ExternalTracker": {
  12365. "description": "ExternalTracker represents settings for external tracker",
  12366. "type": "object",
  12367. "properties": {
  12368. "external_tracker_format": {
  12369. "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.",
  12370. "type": "string",
  12371. "x-go-name": "ExternalTrackerFormat"
  12372. },
  12373. "external_tracker_style": {
  12374. "description": "External Issue Tracker Number Format, either `numeric` or `alphanumeric`",
  12375. "type": "string",
  12376. "x-go-name": "ExternalTrackerStyle"
  12377. },
  12378. "external_tracker_url": {
  12379. "description": "URL of external issue tracker.",
  12380. "type": "string",
  12381. "x-go-name": "ExternalTrackerURL"
  12382. }
  12383. },
  12384. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12385. },
  12386. "ExternalWiki": {
  12387. "description": "ExternalWiki represents setting for external wiki",
  12388. "type": "object",
  12389. "properties": {
  12390. "external_wiki_url": {
  12391. "description": "URL of external wiki.",
  12392. "type": "string",
  12393. "x-go-name": "ExternalWikiURL"
  12394. }
  12395. },
  12396. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12397. },
  12398. "FileCommitResponse": {
  12399. "type": "object",
  12400. "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.",
  12401. "properties": {
  12402. "author": {
  12403. "$ref": "#/definitions/CommitUser"
  12404. },
  12405. "committer": {
  12406. "$ref": "#/definitions/CommitUser"
  12407. },
  12408. "html_url": {
  12409. "type": "string",
  12410. "x-go-name": "HTMLURL"
  12411. },
  12412. "message": {
  12413. "type": "string",
  12414. "x-go-name": "Message"
  12415. },
  12416. "parents": {
  12417. "type": "array",
  12418. "items": {
  12419. "$ref": "#/definitions/CommitMeta"
  12420. },
  12421. "x-go-name": "Parents"
  12422. },
  12423. "sha": {
  12424. "type": "string",
  12425. "x-go-name": "SHA"
  12426. },
  12427. "tree": {
  12428. "$ref": "#/definitions/CommitMeta"
  12429. },
  12430. "url": {
  12431. "type": "string",
  12432. "x-go-name": "URL"
  12433. }
  12434. },
  12435. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12436. },
  12437. "FileDeleteResponse": {
  12438. "description": "FileDeleteResponse contains information about a repo's file that was deleted",
  12439. "type": "object",
  12440. "properties": {
  12441. "commit": {
  12442. "$ref": "#/definitions/FileCommitResponse"
  12443. },
  12444. "content": {
  12445. "type": "object",
  12446. "x-go-name": "Content"
  12447. },
  12448. "verification": {
  12449. "$ref": "#/definitions/PayloadCommitVerification"
  12450. }
  12451. },
  12452. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12453. },
  12454. "FileLinksResponse": {
  12455. "description": "FileLinksResponse contains the links for a repo's file",
  12456. "type": "object",
  12457. "properties": {
  12458. "git": {
  12459. "type": "string",
  12460. "x-go-name": "GitURL"
  12461. },
  12462. "html": {
  12463. "type": "string",
  12464. "x-go-name": "HTMLURL"
  12465. },
  12466. "self": {
  12467. "type": "string",
  12468. "x-go-name": "Self"
  12469. }
  12470. },
  12471. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12472. },
  12473. "FileResponse": {
  12474. "description": "FileResponse contains information about a repo's file",
  12475. "type": "object",
  12476. "properties": {
  12477. "commit": {
  12478. "$ref": "#/definitions/FileCommitResponse"
  12479. },
  12480. "content": {
  12481. "$ref": "#/definitions/ContentsResponse"
  12482. },
  12483. "verification": {
  12484. "$ref": "#/definitions/PayloadCommitVerification"
  12485. }
  12486. },
  12487. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12488. },
  12489. "GPGKey": {
  12490. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  12491. "type": "object",
  12492. "properties": {
  12493. "can_certify": {
  12494. "type": "boolean",
  12495. "x-go-name": "CanCertify"
  12496. },
  12497. "can_encrypt_comms": {
  12498. "type": "boolean",
  12499. "x-go-name": "CanEncryptComms"
  12500. },
  12501. "can_encrypt_storage": {
  12502. "type": "boolean",
  12503. "x-go-name": "CanEncryptStorage"
  12504. },
  12505. "can_sign": {
  12506. "type": "boolean",
  12507. "x-go-name": "CanSign"
  12508. },
  12509. "created_at": {
  12510. "type": "string",
  12511. "format": "date-time",
  12512. "x-go-name": "Created"
  12513. },
  12514. "emails": {
  12515. "type": "array",
  12516. "items": {
  12517. "$ref": "#/definitions/GPGKeyEmail"
  12518. },
  12519. "x-go-name": "Emails"
  12520. },
  12521. "expires_at": {
  12522. "type": "string",
  12523. "format": "date-time",
  12524. "x-go-name": "Expires"
  12525. },
  12526. "id": {
  12527. "type": "integer",
  12528. "format": "int64",
  12529. "x-go-name": "ID"
  12530. },
  12531. "key_id": {
  12532. "type": "string",
  12533. "x-go-name": "KeyID"
  12534. },
  12535. "primary_key_id": {
  12536. "type": "string",
  12537. "x-go-name": "PrimaryKeyID"
  12538. },
  12539. "public_key": {
  12540. "type": "string",
  12541. "x-go-name": "PublicKey"
  12542. },
  12543. "subkeys": {
  12544. "type": "array",
  12545. "items": {
  12546. "$ref": "#/definitions/GPGKey"
  12547. },
  12548. "x-go-name": "SubsKey"
  12549. }
  12550. },
  12551. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12552. },
  12553. "GPGKeyEmail": {
  12554. "description": "GPGKeyEmail an email attached to a GPGKey",
  12555. "type": "object",
  12556. "properties": {
  12557. "email": {
  12558. "type": "string",
  12559. "x-go-name": "Email"
  12560. },
  12561. "verified": {
  12562. "type": "boolean",
  12563. "x-go-name": "Verified"
  12564. }
  12565. },
  12566. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12567. },
  12568. "GitBlobResponse": {
  12569. "description": "GitBlobResponse represents a git blob",
  12570. "type": "object",
  12571. "properties": {
  12572. "content": {
  12573. "type": "string",
  12574. "x-go-name": "Content"
  12575. },
  12576. "encoding": {
  12577. "type": "string",
  12578. "x-go-name": "Encoding"
  12579. },
  12580. "sha": {
  12581. "type": "string",
  12582. "x-go-name": "SHA"
  12583. },
  12584. "size": {
  12585. "type": "integer",
  12586. "format": "int64",
  12587. "x-go-name": "Size"
  12588. },
  12589. "url": {
  12590. "type": "string",
  12591. "x-go-name": "URL"
  12592. }
  12593. },
  12594. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12595. },
  12596. "GitEntry": {
  12597. "description": "GitEntry represents a git tree",
  12598. "type": "object",
  12599. "properties": {
  12600. "mode": {
  12601. "type": "string",
  12602. "x-go-name": "Mode"
  12603. },
  12604. "path": {
  12605. "type": "string",
  12606. "x-go-name": "Path"
  12607. },
  12608. "sha": {
  12609. "type": "string",
  12610. "x-go-name": "SHA"
  12611. },
  12612. "size": {
  12613. "type": "integer",
  12614. "format": "int64",
  12615. "x-go-name": "Size"
  12616. },
  12617. "type": {
  12618. "type": "string",
  12619. "x-go-name": "Type"
  12620. },
  12621. "url": {
  12622. "type": "string",
  12623. "x-go-name": "URL"
  12624. }
  12625. },
  12626. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12627. },
  12628. "GitHook": {
  12629. "description": "GitHook represents a Git repository hook",
  12630. "type": "object",
  12631. "properties": {
  12632. "content": {
  12633. "type": "string",
  12634. "x-go-name": "Content"
  12635. },
  12636. "is_active": {
  12637. "type": "boolean",
  12638. "x-go-name": "IsActive"
  12639. },
  12640. "name": {
  12641. "type": "string",
  12642. "x-go-name": "Name"
  12643. }
  12644. },
  12645. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12646. },
  12647. "GitObject": {
  12648. "type": "object",
  12649. "title": "GitObject represents a Git object.",
  12650. "properties": {
  12651. "sha": {
  12652. "type": "string",
  12653. "x-go-name": "SHA"
  12654. },
  12655. "type": {
  12656. "type": "string",
  12657. "x-go-name": "Type"
  12658. },
  12659. "url": {
  12660. "type": "string",
  12661. "x-go-name": "URL"
  12662. }
  12663. },
  12664. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12665. },
  12666. "GitTreeResponse": {
  12667. "description": "GitTreeResponse returns a git tree",
  12668. "type": "object",
  12669. "properties": {
  12670. "page": {
  12671. "type": "integer",
  12672. "format": "int64",
  12673. "x-go-name": "Page"
  12674. },
  12675. "sha": {
  12676. "type": "string",
  12677. "x-go-name": "SHA"
  12678. },
  12679. "total_count": {
  12680. "type": "integer",
  12681. "format": "int64",
  12682. "x-go-name": "TotalCount"
  12683. },
  12684. "tree": {
  12685. "type": "array",
  12686. "items": {
  12687. "$ref": "#/definitions/GitEntry"
  12688. },
  12689. "x-go-name": "Entries"
  12690. },
  12691. "truncated": {
  12692. "type": "boolean",
  12693. "x-go-name": "Truncated"
  12694. },
  12695. "url": {
  12696. "type": "string",
  12697. "x-go-name": "URL"
  12698. }
  12699. },
  12700. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12701. },
  12702. "Hook": {
  12703. "description": "Hook a hook is a web hook when one repository changed",
  12704. "type": "object",
  12705. "properties": {
  12706. "active": {
  12707. "type": "boolean",
  12708. "x-go-name": "Active"
  12709. },
  12710. "config": {
  12711. "type": "object",
  12712. "additionalProperties": {
  12713. "type": "string"
  12714. },
  12715. "x-go-name": "Config"
  12716. },
  12717. "created_at": {
  12718. "type": "string",
  12719. "format": "date-time",
  12720. "x-go-name": "Created"
  12721. },
  12722. "events": {
  12723. "type": "array",
  12724. "items": {
  12725. "type": "string"
  12726. },
  12727. "x-go-name": "Events"
  12728. },
  12729. "id": {
  12730. "type": "integer",
  12731. "format": "int64",
  12732. "x-go-name": "ID"
  12733. },
  12734. "type": {
  12735. "type": "string",
  12736. "x-go-name": "Type"
  12737. },
  12738. "updated_at": {
  12739. "type": "string",
  12740. "format": "date-time",
  12741. "x-go-name": "Updated"
  12742. }
  12743. },
  12744. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12745. },
  12746. "Identity": {
  12747. "description": "Identity for a person's identity like an author or committer",
  12748. "type": "object",
  12749. "properties": {
  12750. "email": {
  12751. "type": "string",
  12752. "format": "email",
  12753. "x-go-name": "Email"
  12754. },
  12755. "name": {
  12756. "type": "string",
  12757. "x-go-name": "Name"
  12758. }
  12759. },
  12760. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12761. },
  12762. "InternalTracker": {
  12763. "description": "InternalTracker represents settings for internal tracker",
  12764. "type": "object",
  12765. "properties": {
  12766. "allow_only_contributors_to_track_time": {
  12767. "description": "Let only contributors track time (Built-in issue tracker)",
  12768. "type": "boolean",
  12769. "x-go-name": "AllowOnlyContributorsToTrackTime"
  12770. },
  12771. "enable_issue_dependencies": {
  12772. "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)",
  12773. "type": "boolean",
  12774. "x-go-name": "EnableIssueDependencies"
  12775. },
  12776. "enable_time_tracker": {
  12777. "description": "Enable time tracking (Built-in issue tracker)",
  12778. "type": "boolean",
  12779. "x-go-name": "EnableTimeTracker"
  12780. }
  12781. },
  12782. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12783. },
  12784. "Issue": {
  12785. "description": "Issue represents an issue in a repository",
  12786. "type": "object",
  12787. "properties": {
  12788. "assignee": {
  12789. "$ref": "#/definitions/User"
  12790. },
  12791. "assignees": {
  12792. "type": "array",
  12793. "items": {
  12794. "$ref": "#/definitions/User"
  12795. },
  12796. "x-go-name": "Assignees"
  12797. },
  12798. "body": {
  12799. "type": "string",
  12800. "x-go-name": "Body"
  12801. },
  12802. "closed_at": {
  12803. "type": "string",
  12804. "format": "date-time",
  12805. "x-go-name": "Closed"
  12806. },
  12807. "comments": {
  12808. "type": "integer",
  12809. "format": "int64",
  12810. "x-go-name": "Comments"
  12811. },
  12812. "created_at": {
  12813. "type": "string",
  12814. "format": "date-time",
  12815. "x-go-name": "Created"
  12816. },
  12817. "due_date": {
  12818. "type": "string",
  12819. "format": "date-time",
  12820. "x-go-name": "Deadline"
  12821. },
  12822. "html_url": {
  12823. "type": "string",
  12824. "x-go-name": "HTMLURL"
  12825. },
  12826. "id": {
  12827. "type": "integer",
  12828. "format": "int64",
  12829. "x-go-name": "ID"
  12830. },
  12831. "is_locked": {
  12832. "type": "boolean",
  12833. "x-go-name": "IsLocked"
  12834. },
  12835. "labels": {
  12836. "type": "array",
  12837. "items": {
  12838. "$ref": "#/definitions/Label"
  12839. },
  12840. "x-go-name": "Labels"
  12841. },
  12842. "milestone": {
  12843. "$ref": "#/definitions/Milestone"
  12844. },
  12845. "number": {
  12846. "type": "integer",
  12847. "format": "int64",
  12848. "x-go-name": "Index"
  12849. },
  12850. "original_author": {
  12851. "type": "string",
  12852. "x-go-name": "OriginalAuthor"
  12853. },
  12854. "original_author_id": {
  12855. "type": "integer",
  12856. "format": "int64",
  12857. "x-go-name": "OriginalAuthorID"
  12858. },
  12859. "pull_request": {
  12860. "$ref": "#/definitions/PullRequestMeta"
  12861. },
  12862. "repository": {
  12863. "$ref": "#/definitions/RepositoryMeta"
  12864. },
  12865. "state": {
  12866. "$ref": "#/definitions/StateType"
  12867. },
  12868. "title": {
  12869. "type": "string",
  12870. "x-go-name": "Title"
  12871. },
  12872. "updated_at": {
  12873. "type": "string",
  12874. "format": "date-time",
  12875. "x-go-name": "Updated"
  12876. },
  12877. "url": {
  12878. "type": "string",
  12879. "x-go-name": "URL"
  12880. },
  12881. "user": {
  12882. "$ref": "#/definitions/User"
  12883. }
  12884. },
  12885. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12886. },
  12887. "IssueDeadline": {
  12888. "description": "IssueDeadline represents an issue deadline",
  12889. "type": "object",
  12890. "properties": {
  12891. "due_date": {
  12892. "type": "string",
  12893. "format": "date-time",
  12894. "x-go-name": "Deadline"
  12895. }
  12896. },
  12897. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12898. },
  12899. "IssueLabelsOption": {
  12900. "description": "IssueLabelsOption a collection of labels",
  12901. "type": "object",
  12902. "properties": {
  12903. "labels": {
  12904. "description": "list of label IDs",
  12905. "type": "array",
  12906. "items": {
  12907. "type": "integer",
  12908. "format": "int64"
  12909. },
  12910. "x-go-name": "Labels"
  12911. }
  12912. },
  12913. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12914. },
  12915. "Label": {
  12916. "description": "Label a label to an issue or a pr",
  12917. "type": "object",
  12918. "properties": {
  12919. "color": {
  12920. "type": "string",
  12921. "x-go-name": "Color",
  12922. "example": "00aabb"
  12923. },
  12924. "description": {
  12925. "type": "string",
  12926. "x-go-name": "Description"
  12927. },
  12928. "id": {
  12929. "type": "integer",
  12930. "format": "int64",
  12931. "x-go-name": "ID"
  12932. },
  12933. "name": {
  12934. "type": "string",
  12935. "x-go-name": "Name"
  12936. },
  12937. "url": {
  12938. "type": "string",
  12939. "x-go-name": "URL"
  12940. }
  12941. },
  12942. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12943. },
  12944. "MarkdownOption": {
  12945. "description": "MarkdownOption markdown options",
  12946. "type": "object",
  12947. "properties": {
  12948. "Context": {
  12949. "description": "Context to render\n\nin: body",
  12950. "type": "string"
  12951. },
  12952. "Mode": {
  12953. "description": "Mode to render\n\nin: body",
  12954. "type": "string"
  12955. },
  12956. "Text": {
  12957. "description": "Text markdown to render\n\nin: body",
  12958. "type": "string"
  12959. },
  12960. "Wiki": {
  12961. "description": "Is it a wiki page ?\n\nin: body",
  12962. "type": "boolean"
  12963. }
  12964. },
  12965. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12966. },
  12967. "MergePullRequestOption": {
  12968. "description": "MergePullRequestForm form for merging Pull Request",
  12969. "type": "object",
  12970. "required": [
  12971. "Do"
  12972. ],
  12973. "properties": {
  12974. "Do": {
  12975. "type": "string",
  12976. "enum": [
  12977. "merge",
  12978. "rebase",
  12979. "rebase-merge",
  12980. "squash"
  12981. ]
  12982. },
  12983. "MergeMessageField": {
  12984. "type": "string"
  12985. },
  12986. "MergeTitleField": {
  12987. "type": "string"
  12988. },
  12989. "force_merge": {
  12990. "type": "boolean",
  12991. "x-go-name": "ForceMerge"
  12992. }
  12993. },
  12994. "x-go-name": "MergePullRequestForm",
  12995. "x-go-package": "code.gitea.io/gitea/modules/auth"
  12996. },
  12997. "MigrateRepoForm": {
  12998. "description": "MigrateRepoForm form for migrating repository",
  12999. "type": "object",
  13000. "required": [
  13001. "clone_addr",
  13002. "uid",
  13003. "repo_name"
  13004. ],
  13005. "properties": {
  13006. "auth_password": {
  13007. "type": "string",
  13008. "x-go-name": "AuthPassword"
  13009. },
  13010. "auth_username": {
  13011. "type": "string",
  13012. "x-go-name": "AuthUsername"
  13013. },
  13014. "clone_addr": {
  13015. "type": "string",
  13016. "x-go-name": "CloneAddr"
  13017. },
  13018. "description": {
  13019. "type": "string",
  13020. "x-go-name": "Description"
  13021. },
  13022. "issues": {
  13023. "type": "boolean",
  13024. "x-go-name": "Issues"
  13025. },
  13026. "labels": {
  13027. "type": "boolean",
  13028. "x-go-name": "Labels"
  13029. },
  13030. "milestones": {
  13031. "type": "boolean",
  13032. "x-go-name": "Milestones"
  13033. },
  13034. "mirror": {
  13035. "type": "boolean",
  13036. "x-go-name": "Mirror"
  13037. },
  13038. "private": {
  13039. "type": "boolean",
  13040. "x-go-name": "Private"
  13041. },
  13042. "pull_requests": {
  13043. "type": "boolean",
  13044. "x-go-name": "PullRequests"
  13045. },
  13046. "releases": {
  13047. "type": "boolean",
  13048. "x-go-name": "Releases"
  13049. },
  13050. "repo_name": {
  13051. "type": "string",
  13052. "x-go-name": "RepoName"
  13053. },
  13054. "uid": {
  13055. "type": "integer",
  13056. "format": "int64",
  13057. "x-go-name": "UID"
  13058. },
  13059. "wiki": {
  13060. "type": "boolean",
  13061. "x-go-name": "Wiki"
  13062. }
  13063. },
  13064. "x-go-package": "code.gitea.io/gitea/modules/auth"
  13065. },
  13066. "Milestone": {
  13067. "description": "Milestone milestone is a collection of issues on one repository",
  13068. "type": "object",
  13069. "properties": {
  13070. "closed_at": {
  13071. "type": "string",
  13072. "format": "date-time",
  13073. "x-go-name": "Closed"
  13074. },
  13075. "closed_issues": {
  13076. "type": "integer",
  13077. "format": "int64",
  13078. "x-go-name": "ClosedIssues"
  13079. },
  13080. "description": {
  13081. "type": "string",
  13082. "x-go-name": "Description"
  13083. },
  13084. "due_on": {
  13085. "type": "string",
  13086. "format": "date-time",
  13087. "x-go-name": "Deadline"
  13088. },
  13089. "id": {
  13090. "type": "integer",
  13091. "format": "int64",
  13092. "x-go-name": "ID"
  13093. },
  13094. "open_issues": {
  13095. "type": "integer",
  13096. "format": "int64",
  13097. "x-go-name": "OpenIssues"
  13098. },
  13099. "state": {
  13100. "$ref": "#/definitions/StateType"
  13101. },
  13102. "title": {
  13103. "type": "string",
  13104. "x-go-name": "Title"
  13105. }
  13106. },
  13107. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13108. },
  13109. "NotificationCount": {
  13110. "description": "NotificationCount number of unread notifications",
  13111. "type": "object",
  13112. "properties": {
  13113. "new": {
  13114. "type": "integer",
  13115. "format": "int64",
  13116. "x-go-name": "New"
  13117. }
  13118. },
  13119. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13120. },
  13121. "NotificationSubject": {
  13122. "description": "NotificationSubject contains the notification subject (Issue/Pull/Commit)",
  13123. "type": "object",
  13124. "properties": {
  13125. "latest_comment_url": {
  13126. "type": "string",
  13127. "x-go-name": "LatestCommentURL"
  13128. },
  13129. "title": {
  13130. "type": "string",
  13131. "x-go-name": "Title"
  13132. },
  13133. "type": {
  13134. "type": "string",
  13135. "x-go-name": "Type"
  13136. },
  13137. "url": {
  13138. "type": "string",
  13139. "x-go-name": "URL"
  13140. }
  13141. },
  13142. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13143. },
  13144. "NotificationThread": {
  13145. "description": "NotificationThread expose Notification on API",
  13146. "type": "object",
  13147. "properties": {
  13148. "id": {
  13149. "type": "integer",
  13150. "format": "int64",
  13151. "x-go-name": "ID"
  13152. },
  13153. "pinned": {
  13154. "type": "boolean",
  13155. "x-go-name": "Pinned"
  13156. },
  13157. "repository": {
  13158. "$ref": "#/definitions/Repository"
  13159. },
  13160. "subject": {
  13161. "$ref": "#/definitions/NotificationSubject"
  13162. },
  13163. "unread": {
  13164. "type": "boolean",
  13165. "x-go-name": "Unread"
  13166. },
  13167. "updated_at": {
  13168. "type": "string",
  13169. "format": "date-time",
  13170. "x-go-name": "UpdatedAt"
  13171. },
  13172. "url": {
  13173. "type": "string",
  13174. "x-go-name": "URL"
  13175. }
  13176. },
  13177. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13178. },
  13179. "OAuth2Application": {
  13180. "type": "object",
  13181. "title": "OAuth2Application represents an OAuth2 application.",
  13182. "properties": {
  13183. "client_id": {
  13184. "type": "string",
  13185. "x-go-name": "ClientID"
  13186. },
  13187. "client_secret": {
  13188. "type": "string",
  13189. "x-go-name": "ClientSecret"
  13190. },
  13191. "created": {
  13192. "type": "string",
  13193. "format": "date-time",
  13194. "x-go-name": "Created"
  13195. },
  13196. "id": {
  13197. "type": "integer",
  13198. "format": "int64",
  13199. "x-go-name": "ID"
  13200. },
  13201. "name": {
  13202. "type": "string",
  13203. "x-go-name": "Name"
  13204. },
  13205. "redirect_uris": {
  13206. "type": "array",
  13207. "items": {
  13208. "type": "string"
  13209. },
  13210. "x-go-name": "RedirectURIs"
  13211. }
  13212. },
  13213. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13214. },
  13215. "Organization": {
  13216. "description": "Organization represents an organization",
  13217. "type": "object",
  13218. "properties": {
  13219. "avatar_url": {
  13220. "type": "string",
  13221. "x-go-name": "AvatarURL"
  13222. },
  13223. "description": {
  13224. "type": "string",
  13225. "x-go-name": "Description"
  13226. },
  13227. "full_name": {
  13228. "type": "string",
  13229. "x-go-name": "FullName"
  13230. },
  13231. "id": {
  13232. "type": "integer",
  13233. "format": "int64",
  13234. "x-go-name": "ID"
  13235. },
  13236. "location": {
  13237. "type": "string",
  13238. "x-go-name": "Location"
  13239. },
  13240. "repo_admin_change_team_access": {
  13241. "type": "boolean",
  13242. "x-go-name": "RepoAdminChangeTeamAccess"
  13243. },
  13244. "username": {
  13245. "type": "string",
  13246. "x-go-name": "UserName"
  13247. },
  13248. "visibility": {
  13249. "type": "string",
  13250. "x-go-name": "Visibility"
  13251. },
  13252. "website": {
  13253. "type": "string",
  13254. "x-go-name": "Website"
  13255. }
  13256. },
  13257. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13258. },
  13259. "PRBranchInfo": {
  13260. "description": "PRBranchInfo information about a branch",
  13261. "type": "object",
  13262. "properties": {
  13263. "label": {
  13264. "type": "string",
  13265. "x-go-name": "Name"
  13266. },
  13267. "ref": {
  13268. "type": "string",
  13269. "x-go-name": "Ref"
  13270. },
  13271. "repo": {
  13272. "$ref": "#/definitions/Repository"
  13273. },
  13274. "repo_id": {
  13275. "type": "integer",
  13276. "format": "int64",
  13277. "x-go-name": "RepoID"
  13278. },
  13279. "sha": {
  13280. "type": "string",
  13281. "x-go-name": "Sha"
  13282. }
  13283. },
  13284. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13285. },
  13286. "PayloadCommit": {
  13287. "description": "PayloadCommit represents a commit",
  13288. "type": "object",
  13289. "properties": {
  13290. "added": {
  13291. "type": "array",
  13292. "items": {
  13293. "type": "string"
  13294. },
  13295. "x-go-name": "Added"
  13296. },
  13297. "author": {
  13298. "$ref": "#/definitions/PayloadUser"
  13299. },
  13300. "committer": {
  13301. "$ref": "#/definitions/PayloadUser"
  13302. },
  13303. "id": {
  13304. "description": "sha1 hash of the commit",
  13305. "type": "string",
  13306. "x-go-name": "ID"
  13307. },
  13308. "message": {
  13309. "type": "string",
  13310. "x-go-name": "Message"
  13311. },
  13312. "modified": {
  13313. "type": "array",
  13314. "items": {
  13315. "type": "string"
  13316. },
  13317. "x-go-name": "Modified"
  13318. },
  13319. "removed": {
  13320. "type": "array",
  13321. "items": {
  13322. "type": "string"
  13323. },
  13324. "x-go-name": "Removed"
  13325. },
  13326. "timestamp": {
  13327. "type": "string",
  13328. "format": "date-time",
  13329. "x-go-name": "Timestamp"
  13330. },
  13331. "url": {
  13332. "type": "string",
  13333. "x-go-name": "URL"
  13334. },
  13335. "verification": {
  13336. "$ref": "#/definitions/PayloadCommitVerification"
  13337. }
  13338. },
  13339. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13340. },
  13341. "PayloadCommitVerification": {
  13342. "description": "PayloadCommitVerification represents the GPG verification of a commit",
  13343. "type": "object",
  13344. "properties": {
  13345. "payload": {
  13346. "type": "string",
  13347. "x-go-name": "Payload"
  13348. },
  13349. "reason": {
  13350. "type": "string",
  13351. "x-go-name": "Reason"
  13352. },
  13353. "signature": {
  13354. "type": "string",
  13355. "x-go-name": "Signature"
  13356. },
  13357. "signer": {
  13358. "$ref": "#/definitions/PayloadUser"
  13359. },
  13360. "verified": {
  13361. "type": "boolean",
  13362. "x-go-name": "Verified"
  13363. }
  13364. },
  13365. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13366. },
  13367. "PayloadUser": {
  13368. "description": "PayloadUser represents the author or committer of a commit",
  13369. "type": "object",
  13370. "properties": {
  13371. "email": {
  13372. "type": "string",
  13373. "format": "email",
  13374. "x-go-name": "Email"
  13375. },
  13376. "name": {
  13377. "description": "Full name of the commit author",
  13378. "type": "string",
  13379. "x-go-name": "Name"
  13380. },
  13381. "username": {
  13382. "type": "string",
  13383. "x-go-name": "UserName"
  13384. }
  13385. },
  13386. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13387. },
  13388. "Permission": {
  13389. "description": "Permission represents a set of permissions",
  13390. "type": "object",
  13391. "properties": {
  13392. "admin": {
  13393. "type": "boolean",
  13394. "x-go-name": "Admin"
  13395. },
  13396. "pull": {
  13397. "type": "boolean",
  13398. "x-go-name": "Pull"
  13399. },
  13400. "push": {
  13401. "type": "boolean",
  13402. "x-go-name": "Push"
  13403. }
  13404. },
  13405. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13406. },
  13407. "PublicKey": {
  13408. "description": "PublicKey publickey is a user key to push code to repository",
  13409. "type": "object",
  13410. "properties": {
  13411. "created_at": {
  13412. "type": "string",
  13413. "format": "date-time",
  13414. "x-go-name": "Created"
  13415. },
  13416. "fingerprint": {
  13417. "type": "string",
  13418. "x-go-name": "Fingerprint"
  13419. },
  13420. "id": {
  13421. "type": "integer",
  13422. "format": "int64",
  13423. "x-go-name": "ID"
  13424. },
  13425. "key": {
  13426. "type": "string",
  13427. "x-go-name": "Key"
  13428. },
  13429. "key_type": {
  13430. "type": "string",
  13431. "x-go-name": "KeyType"
  13432. },
  13433. "read_only": {
  13434. "type": "boolean",
  13435. "x-go-name": "ReadOnly"
  13436. },
  13437. "title": {
  13438. "type": "string",
  13439. "x-go-name": "Title"
  13440. },
  13441. "url": {
  13442. "type": "string",
  13443. "x-go-name": "URL"
  13444. },
  13445. "user": {
  13446. "$ref": "#/definitions/User"
  13447. }
  13448. },
  13449. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13450. },
  13451. "PullRequest": {
  13452. "description": "PullRequest represents a pull request",
  13453. "type": "object",
  13454. "properties": {
  13455. "assignee": {
  13456. "$ref": "#/definitions/User"
  13457. },
  13458. "assignees": {
  13459. "type": "array",
  13460. "items": {
  13461. "$ref": "#/definitions/User"
  13462. },
  13463. "x-go-name": "Assignees"
  13464. },
  13465. "base": {
  13466. "$ref": "#/definitions/PRBranchInfo"
  13467. },
  13468. "body": {
  13469. "type": "string",
  13470. "x-go-name": "Body"
  13471. },
  13472. "closed_at": {
  13473. "type": "string",
  13474. "format": "date-time",
  13475. "x-go-name": "Closed"
  13476. },
  13477. "comments": {
  13478. "type": "integer",
  13479. "format": "int64",
  13480. "x-go-name": "Comments"
  13481. },
  13482. "created_at": {
  13483. "type": "string",
  13484. "format": "date-time",
  13485. "x-go-name": "Created"
  13486. },
  13487. "diff_url": {
  13488. "type": "string",
  13489. "x-go-name": "DiffURL"
  13490. },
  13491. "due_date": {
  13492. "type": "string",
  13493. "format": "date-time",
  13494. "x-go-name": "Deadline"
  13495. },
  13496. "head": {
  13497. "$ref": "#/definitions/PRBranchInfo"
  13498. },
  13499. "html_url": {
  13500. "type": "string",
  13501. "x-go-name": "HTMLURL"
  13502. },
  13503. "id": {
  13504. "type": "integer",
  13505. "format": "int64",
  13506. "x-go-name": "ID"
  13507. },
  13508. "is_locked": {
  13509. "type": "boolean",
  13510. "x-go-name": "IsLocked"
  13511. },
  13512. "labels": {
  13513. "type": "array",
  13514. "items": {
  13515. "$ref": "#/definitions/Label"
  13516. },
  13517. "x-go-name": "Labels"
  13518. },
  13519. "merge_base": {
  13520. "type": "string",
  13521. "x-go-name": "MergeBase"
  13522. },
  13523. "merge_commit_sha": {
  13524. "type": "string",
  13525. "x-go-name": "MergedCommitID"
  13526. },
  13527. "mergeable": {
  13528. "type": "boolean",
  13529. "x-go-name": "Mergeable"
  13530. },
  13531. "merged": {
  13532. "type": "boolean",
  13533. "x-go-name": "HasMerged"
  13534. },
  13535. "merged_at": {
  13536. "type": "string",
  13537. "format": "date-time",
  13538. "x-go-name": "Merged"
  13539. },
  13540. "merged_by": {
  13541. "$ref": "#/definitions/User"
  13542. },
  13543. "milestone": {
  13544. "$ref": "#/definitions/Milestone"
  13545. },
  13546. "number": {
  13547. "type": "integer",
  13548. "format": "int64",
  13549. "x-go-name": "Index"
  13550. },
  13551. "patch_url": {
  13552. "type": "string",
  13553. "x-go-name": "PatchURL"
  13554. },
  13555. "state": {
  13556. "$ref": "#/definitions/StateType"
  13557. },
  13558. "title": {
  13559. "type": "string",
  13560. "x-go-name": "Title"
  13561. },
  13562. "updated_at": {
  13563. "type": "string",
  13564. "format": "date-time",
  13565. "x-go-name": "Updated"
  13566. },
  13567. "url": {
  13568. "type": "string",
  13569. "x-go-name": "URL"
  13570. },
  13571. "user": {
  13572. "$ref": "#/definitions/User"
  13573. }
  13574. },
  13575. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13576. },
  13577. "PullRequestMeta": {
  13578. "description": "PullRequestMeta PR info if an issue is a PR",
  13579. "type": "object",
  13580. "properties": {
  13581. "merged": {
  13582. "type": "boolean",
  13583. "x-go-name": "HasMerged"
  13584. },
  13585. "merged_at": {
  13586. "type": "string",
  13587. "format": "date-time",
  13588. "x-go-name": "Merged"
  13589. }
  13590. },
  13591. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13592. },
  13593. "PullReview": {
  13594. "description": "PullReview represents a pull request review",
  13595. "type": "object",
  13596. "properties": {
  13597. "body": {
  13598. "type": "string",
  13599. "x-go-name": "Body"
  13600. },
  13601. "comments_count": {
  13602. "type": "integer",
  13603. "format": "int64",
  13604. "x-go-name": "CodeCommentsCount"
  13605. },
  13606. "commit_id": {
  13607. "type": "string",
  13608. "x-go-name": "CommitID"
  13609. },
  13610. "html_url": {
  13611. "type": "string",
  13612. "x-go-name": "HTMLURL"
  13613. },
  13614. "id": {
  13615. "type": "integer",
  13616. "format": "int64",
  13617. "x-go-name": "ID"
  13618. },
  13619. "official": {
  13620. "type": "boolean",
  13621. "x-go-name": "Official"
  13622. },
  13623. "pull_request_url": {
  13624. "type": "string",
  13625. "x-go-name": "HTMLPullURL"
  13626. },
  13627. "stale": {
  13628. "type": "boolean",
  13629. "x-go-name": "Stale"
  13630. },
  13631. "state": {
  13632. "$ref": "#/definitions/ReviewStateType"
  13633. },
  13634. "submitted_at": {
  13635. "type": "string",
  13636. "format": "date-time",
  13637. "x-go-name": "Submitted"
  13638. },
  13639. "user": {
  13640. "$ref": "#/definitions/User"
  13641. }
  13642. },
  13643. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13644. },
  13645. "PullReviewComment": {
  13646. "description": "PullReviewComment represents a comment on a pull request review",
  13647. "type": "object",
  13648. "properties": {
  13649. "body": {
  13650. "type": "string",
  13651. "x-go-name": "Body"
  13652. },
  13653. "commit_id": {
  13654. "type": "string",
  13655. "x-go-name": "CommitID"
  13656. },
  13657. "created_at": {
  13658. "type": "string",
  13659. "format": "date-time",
  13660. "x-go-name": "Created"
  13661. },
  13662. "diff_hunk": {
  13663. "type": "string",
  13664. "x-go-name": "DiffHunk"
  13665. },
  13666. "html_url": {
  13667. "type": "string",
  13668. "x-go-name": "HTMLURL"
  13669. },
  13670. "id": {
  13671. "type": "integer",
  13672. "format": "int64",
  13673. "x-go-name": "ID"
  13674. },
  13675. "original_commit_id": {
  13676. "type": "string",
  13677. "x-go-name": "OrigCommitID"
  13678. },
  13679. "original_position": {
  13680. "type": "integer",
  13681. "format": "uint64",
  13682. "x-go-name": "OldLineNum"
  13683. },
  13684. "path": {
  13685. "type": "string",
  13686. "x-go-name": "Path"
  13687. },
  13688. "position": {
  13689. "type": "integer",
  13690. "format": "uint64",
  13691. "x-go-name": "LineNum"
  13692. },
  13693. "pull_request_review_id": {
  13694. "type": "integer",
  13695. "format": "int64",
  13696. "x-go-name": "ReviewID"
  13697. },
  13698. "pull_request_url": {
  13699. "type": "string",
  13700. "x-go-name": "HTMLPullURL"
  13701. },
  13702. "updated_at": {
  13703. "type": "string",
  13704. "format": "date-time",
  13705. "x-go-name": "Updated"
  13706. },
  13707. "user": {
  13708. "$ref": "#/definitions/User"
  13709. }
  13710. },
  13711. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13712. },
  13713. "Reaction": {
  13714. "description": "Reaction contain one reaction",
  13715. "type": "object",
  13716. "properties": {
  13717. "content": {
  13718. "type": "string",
  13719. "x-go-name": "Reaction"
  13720. },
  13721. "created_at": {
  13722. "type": "string",
  13723. "format": "date-time",
  13724. "x-go-name": "Created"
  13725. },
  13726. "user": {
  13727. "$ref": "#/definitions/User"
  13728. }
  13729. },
  13730. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13731. },
  13732. "Reference": {
  13733. "type": "object",
  13734. "title": "Reference represents a Git reference.",
  13735. "properties": {
  13736. "object": {
  13737. "$ref": "#/definitions/GitObject"
  13738. },
  13739. "ref": {
  13740. "type": "string",
  13741. "x-go-name": "Ref"
  13742. },
  13743. "url": {
  13744. "type": "string",
  13745. "x-go-name": "URL"
  13746. }
  13747. },
  13748. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13749. },
  13750. "Release": {
  13751. "description": "Release represents a repository release",
  13752. "type": "object",
  13753. "properties": {
  13754. "assets": {
  13755. "type": "array",
  13756. "items": {
  13757. "$ref": "#/definitions/Attachment"
  13758. },
  13759. "x-go-name": "Attachments"
  13760. },
  13761. "author": {
  13762. "$ref": "#/definitions/User"
  13763. },
  13764. "body": {
  13765. "type": "string",
  13766. "x-go-name": "Note"
  13767. },
  13768. "created_at": {
  13769. "type": "string",
  13770. "format": "date-time",
  13771. "x-go-name": "CreatedAt"
  13772. },
  13773. "draft": {
  13774. "type": "boolean",
  13775. "x-go-name": "IsDraft"
  13776. },
  13777. "html_url": {
  13778. "type": "string",
  13779. "x-go-name": "HTMLURL"
  13780. },
  13781. "id": {
  13782. "type": "integer",
  13783. "format": "int64",
  13784. "x-go-name": "ID"
  13785. },
  13786. "name": {
  13787. "type": "string",
  13788. "x-go-name": "Title"
  13789. },
  13790. "prerelease": {
  13791. "type": "boolean",
  13792. "x-go-name": "IsPrerelease"
  13793. },
  13794. "published_at": {
  13795. "type": "string",
  13796. "format": "date-time",
  13797. "x-go-name": "PublishedAt"
  13798. },
  13799. "tag_name": {
  13800. "type": "string",
  13801. "x-go-name": "TagName"
  13802. },
  13803. "tarball_url": {
  13804. "type": "string",
  13805. "x-go-name": "TarURL"
  13806. },
  13807. "target_commitish": {
  13808. "type": "string",
  13809. "x-go-name": "Target"
  13810. },
  13811. "url": {
  13812. "type": "string",
  13813. "x-go-name": "URL"
  13814. },
  13815. "zipball_url": {
  13816. "type": "string",
  13817. "x-go-name": "ZipURL"
  13818. }
  13819. },
  13820. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13821. },
  13822. "RepoCommit": {
  13823. "type": "object",
  13824. "title": "RepoCommit contains information of a commit in the context of a repository.",
  13825. "properties": {
  13826. "author": {
  13827. "$ref": "#/definitions/CommitUser"
  13828. },
  13829. "committer": {
  13830. "$ref": "#/definitions/CommitUser"
  13831. },
  13832. "message": {
  13833. "type": "string",
  13834. "x-go-name": "Message"
  13835. },
  13836. "tree": {
  13837. "$ref": "#/definitions/CommitMeta"
  13838. },
  13839. "url": {
  13840. "type": "string",
  13841. "x-go-name": "URL"
  13842. }
  13843. },
  13844. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13845. },
  13846. "RepoTopicOptions": {
  13847. "description": "RepoTopicOptions a collection of repo topic names",
  13848. "type": "object",
  13849. "properties": {
  13850. "topics": {
  13851. "description": "list of topic names",
  13852. "type": "array",
  13853. "items": {
  13854. "type": "string"
  13855. },
  13856. "x-go-name": "Topics"
  13857. }
  13858. },
  13859. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13860. },
  13861. "Repository": {
  13862. "description": "Repository represents a repository",
  13863. "type": "object",
  13864. "properties": {
  13865. "allow_merge_commits": {
  13866. "type": "boolean",
  13867. "x-go-name": "AllowMerge"
  13868. },
  13869. "allow_rebase": {
  13870. "type": "boolean",
  13871. "x-go-name": "AllowRebase"
  13872. },
  13873. "allow_rebase_explicit": {
  13874. "type": "boolean",
  13875. "x-go-name": "AllowRebaseMerge"
  13876. },
  13877. "allow_squash_merge": {
  13878. "type": "boolean",
  13879. "x-go-name": "AllowSquash"
  13880. },
  13881. "archived": {
  13882. "type": "boolean",
  13883. "x-go-name": "Archived"
  13884. },
  13885. "avatar_url": {
  13886. "type": "string",
  13887. "x-go-name": "AvatarURL"
  13888. },
  13889. "clone_url": {
  13890. "type": "string",
  13891. "x-go-name": "CloneURL"
  13892. },
  13893. "created_at": {
  13894. "type": "string",
  13895. "format": "date-time",
  13896. "x-go-name": "Created"
  13897. },
  13898. "default_branch": {
  13899. "type": "string",
  13900. "x-go-name": "DefaultBranch"
  13901. },
  13902. "description": {
  13903. "type": "string",
  13904. "x-go-name": "Description"
  13905. },
  13906. "empty": {
  13907. "type": "boolean",
  13908. "x-go-name": "Empty"
  13909. },
  13910. "external_tracker": {
  13911. "$ref": "#/definitions/ExternalTracker"
  13912. },
  13913. "external_wiki": {
  13914. "$ref": "#/definitions/ExternalWiki"
  13915. },
  13916. "fork": {
  13917. "type": "boolean",
  13918. "x-go-name": "Fork"
  13919. },
  13920. "forks_count": {
  13921. "type": "integer",
  13922. "format": "int64",
  13923. "x-go-name": "Forks"
  13924. },
  13925. "full_name": {
  13926. "type": "string",
  13927. "x-go-name": "FullName"
  13928. },
  13929. "has_issues": {
  13930. "type": "boolean",
  13931. "x-go-name": "HasIssues"
  13932. },
  13933. "has_pull_requests": {
  13934. "type": "boolean",
  13935. "x-go-name": "HasPullRequests"
  13936. },
  13937. "has_wiki": {
  13938. "type": "boolean",
  13939. "x-go-name": "HasWiki"
  13940. },
  13941. "html_url": {
  13942. "type": "string",
  13943. "x-go-name": "HTMLURL"
  13944. },
  13945. "id": {
  13946. "type": "integer",
  13947. "format": "int64",
  13948. "x-go-name": "ID"
  13949. },
  13950. "ignore_whitespace_conflicts": {
  13951. "type": "boolean",
  13952. "x-go-name": "IgnoreWhitespaceConflicts"
  13953. },
  13954. "internal_tracker": {
  13955. "$ref": "#/definitions/InternalTracker"
  13956. },
  13957. "mirror": {
  13958. "type": "boolean",
  13959. "x-go-name": "Mirror"
  13960. },
  13961. "name": {
  13962. "type": "string",
  13963. "x-go-name": "Name"
  13964. },
  13965. "open_issues_count": {
  13966. "type": "integer",
  13967. "format": "int64",
  13968. "x-go-name": "OpenIssues"
  13969. },
  13970. "open_pr_counter": {
  13971. "type": "integer",
  13972. "format": "int64",
  13973. "x-go-name": "OpenPulls"
  13974. },
  13975. "original_url": {
  13976. "type": "string",
  13977. "x-go-name": "OriginalURL"
  13978. },
  13979. "owner": {
  13980. "$ref": "#/definitions/User"
  13981. },
  13982. "parent": {
  13983. "$ref": "#/definitions/Repository"
  13984. },
  13985. "permissions": {
  13986. "$ref": "#/definitions/Permission"
  13987. },
  13988. "private": {
  13989. "type": "boolean",
  13990. "x-go-name": "Private"
  13991. },
  13992. "release_counter": {
  13993. "type": "integer",
  13994. "format": "int64",
  13995. "x-go-name": "Releases"
  13996. },
  13997. "size": {
  13998. "type": "integer",
  13999. "format": "int64",
  14000. "x-go-name": "Size"
  14001. },
  14002. "ssh_url": {
  14003. "type": "string",
  14004. "x-go-name": "SSHURL"
  14005. },
  14006. "stars_count": {
  14007. "type": "integer",
  14008. "format": "int64",
  14009. "x-go-name": "Stars"
  14010. },
  14011. "template": {
  14012. "type": "boolean",
  14013. "x-go-name": "Template"
  14014. },
  14015. "updated_at": {
  14016. "type": "string",
  14017. "format": "date-time",
  14018. "x-go-name": "Updated"
  14019. },
  14020. "watchers_count": {
  14021. "type": "integer",
  14022. "format": "int64",
  14023. "x-go-name": "Watchers"
  14024. },
  14025. "website": {
  14026. "type": "string",
  14027. "x-go-name": "Website"
  14028. }
  14029. },
  14030. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14031. },
  14032. "RepositoryMeta": {
  14033. "description": "RepositoryMeta basic repository information",
  14034. "type": "object",
  14035. "properties": {
  14036. "full_name": {
  14037. "type": "string",
  14038. "x-go-name": "FullName"
  14039. },
  14040. "id": {
  14041. "type": "integer",
  14042. "format": "int64",
  14043. "x-go-name": "ID"
  14044. },
  14045. "name": {
  14046. "type": "string",
  14047. "x-go-name": "Name"
  14048. },
  14049. "owner": {
  14050. "type": "string",
  14051. "x-go-name": "Owner"
  14052. }
  14053. },
  14054. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14055. },
  14056. "ReviewStateType": {
  14057. "description": "ReviewStateType review state type",
  14058. "type": "string",
  14059. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14060. },
  14061. "SearchResults": {
  14062. "description": "SearchResults results of a successful search",
  14063. "type": "object",
  14064. "properties": {
  14065. "data": {
  14066. "type": "array",
  14067. "items": {
  14068. "$ref": "#/definitions/Repository"
  14069. },
  14070. "x-go-name": "Data"
  14071. },
  14072. "ok": {
  14073. "type": "boolean",
  14074. "x-go-name": "OK"
  14075. }
  14076. },
  14077. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14078. },
  14079. "ServerVersion": {
  14080. "description": "ServerVersion wraps the version of the server",
  14081. "type": "object",
  14082. "properties": {
  14083. "version": {
  14084. "type": "string",
  14085. "x-go-name": "Version"
  14086. }
  14087. },
  14088. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14089. },
  14090. "StateType": {
  14091. "description": "StateType issue state type",
  14092. "type": "string",
  14093. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14094. },
  14095. "Status": {
  14096. "description": "Status holds a single Status of a single Commit",
  14097. "type": "object",
  14098. "properties": {
  14099. "context": {
  14100. "type": "string",
  14101. "x-go-name": "Context"
  14102. },
  14103. "created_at": {
  14104. "type": "string",
  14105. "format": "date-time",
  14106. "x-go-name": "Created"
  14107. },
  14108. "creator": {
  14109. "$ref": "#/definitions/User"
  14110. },
  14111. "description": {
  14112. "type": "string",
  14113. "x-go-name": "Description"
  14114. },
  14115. "id": {
  14116. "type": "integer",
  14117. "format": "int64",
  14118. "x-go-name": "ID"
  14119. },
  14120. "status": {
  14121. "$ref": "#/definitions/StatusState"
  14122. },
  14123. "target_url": {
  14124. "type": "string",
  14125. "x-go-name": "TargetURL"
  14126. },
  14127. "updated_at": {
  14128. "type": "string",
  14129. "format": "date-time",
  14130. "x-go-name": "Updated"
  14131. },
  14132. "url": {
  14133. "type": "string",
  14134. "x-go-name": "URL"
  14135. }
  14136. },
  14137. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14138. },
  14139. "StatusState": {
  14140. "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"",
  14141. "type": "string",
  14142. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14143. },
  14144. "StopWatch": {
  14145. "description": "StopWatch represent a running stopwatch",
  14146. "type": "object",
  14147. "properties": {
  14148. "created": {
  14149. "type": "string",
  14150. "format": "date-time",
  14151. "x-go-name": "Created"
  14152. },
  14153. "issue_index": {
  14154. "type": "integer",
  14155. "format": "int64",
  14156. "x-go-name": "IssueIndex"
  14157. }
  14158. },
  14159. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14160. },
  14161. "SubmitPullReviewOptions": {
  14162. "description": "SubmitPullReviewOptions are options to submit a pending pull review",
  14163. "type": "object",
  14164. "properties": {
  14165. "body": {
  14166. "type": "string",
  14167. "x-go-name": "Body"
  14168. },
  14169. "event": {
  14170. "$ref": "#/definitions/ReviewStateType"
  14171. }
  14172. },
  14173. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14174. },
  14175. "Tag": {
  14176. "description": "Tag represents a repository tag",
  14177. "type": "object",
  14178. "properties": {
  14179. "commit": {
  14180. "$ref": "#/definitions/CommitMeta"
  14181. },
  14182. "id": {
  14183. "type": "string",
  14184. "x-go-name": "ID"
  14185. },
  14186. "name": {
  14187. "type": "string",
  14188. "x-go-name": "Name"
  14189. },
  14190. "tarball_url": {
  14191. "type": "string",
  14192. "x-go-name": "TarballURL"
  14193. },
  14194. "zipball_url": {
  14195. "type": "string",
  14196. "x-go-name": "ZipballURL"
  14197. }
  14198. },
  14199. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14200. },
  14201. "Team": {
  14202. "description": "Team represents a team in an organization",
  14203. "type": "object",
  14204. "properties": {
  14205. "can_create_org_repo": {
  14206. "type": "boolean",
  14207. "x-go-name": "CanCreateOrgRepo"
  14208. },
  14209. "description": {
  14210. "type": "string",
  14211. "x-go-name": "Description"
  14212. },
  14213. "id": {
  14214. "type": "integer",
  14215. "format": "int64",
  14216. "x-go-name": "ID"
  14217. },
  14218. "includes_all_repositories": {
  14219. "type": "boolean",
  14220. "x-go-name": "IncludesAllRepositories"
  14221. },
  14222. "name": {
  14223. "type": "string",
  14224. "x-go-name": "Name"
  14225. },
  14226. "organization": {
  14227. "$ref": "#/definitions/Organization"
  14228. },
  14229. "permission": {
  14230. "type": "string",
  14231. "enum": [
  14232. "none",
  14233. "read",
  14234. "write",
  14235. "admin",
  14236. "owner"
  14237. ],
  14238. "x-go-name": "Permission"
  14239. },
  14240. "units": {
  14241. "type": "array",
  14242. "items": {
  14243. "type": "string"
  14244. },
  14245. "x-go-name": "Units",
  14246. "example": [
  14247. "repo.code",
  14248. "repo.issues",
  14249. "repo.ext_issues",
  14250. "repo.wiki",
  14251. "repo.pulls",
  14252. "repo.releases",
  14253. "repo.ext_wiki"
  14254. ]
  14255. }
  14256. },
  14257. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14258. },
  14259. "TimeStamp": {
  14260. "description": "TimeStamp defines a timestamp",
  14261. "type": "integer",
  14262. "format": "int64",
  14263. "x-go-package": "code.gitea.io/gitea/modules/timeutil"
  14264. },
  14265. "TopicName": {
  14266. "description": "TopicName a list of repo topic names",
  14267. "type": "object",
  14268. "properties": {
  14269. "topics": {
  14270. "type": "array",
  14271. "items": {
  14272. "type": "string"
  14273. },
  14274. "x-go-name": "TopicNames"
  14275. }
  14276. },
  14277. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14278. },
  14279. "TopicResponse": {
  14280. "description": "TopicResponse for returning topics",
  14281. "type": "object",
  14282. "properties": {
  14283. "created": {
  14284. "type": "string",
  14285. "format": "date-time",
  14286. "x-go-name": "Created"
  14287. },
  14288. "id": {
  14289. "type": "integer",
  14290. "format": "int64",
  14291. "x-go-name": "ID"
  14292. },
  14293. "repo_count": {
  14294. "type": "integer",
  14295. "format": "int64",
  14296. "x-go-name": "RepoCount"
  14297. },
  14298. "topic_name": {
  14299. "type": "string",
  14300. "x-go-name": "Name"
  14301. },
  14302. "updated": {
  14303. "type": "string",
  14304. "format": "date-time",
  14305. "x-go-name": "Updated"
  14306. }
  14307. },
  14308. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14309. },
  14310. "TrackedTime": {
  14311. "description": "TrackedTime worked time for an issue / pr",
  14312. "type": "object",
  14313. "properties": {
  14314. "created": {
  14315. "type": "string",
  14316. "format": "date-time",
  14317. "x-go-name": "Created"
  14318. },
  14319. "id": {
  14320. "type": "integer",
  14321. "format": "int64",
  14322. "x-go-name": "ID"
  14323. },
  14324. "issue": {
  14325. "$ref": "#/definitions/Issue"
  14326. },
  14327. "issue_id": {
  14328. "description": "deprecated (only for backwards compatibility)",
  14329. "type": "integer",
  14330. "format": "int64",
  14331. "x-go-name": "IssueID"
  14332. },
  14333. "time": {
  14334. "description": "Time in seconds",
  14335. "type": "integer",
  14336. "format": "int64",
  14337. "x-go-name": "Time"
  14338. },
  14339. "user_id": {
  14340. "description": "deprecated (only for backwards compatibility)",
  14341. "type": "integer",
  14342. "format": "int64",
  14343. "x-go-name": "UserID"
  14344. },
  14345. "user_name": {
  14346. "type": "string",
  14347. "x-go-name": "UserName"
  14348. }
  14349. },
  14350. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14351. },
  14352. "TransferRepoOption": {
  14353. "description": "TransferRepoOption options when transfer a repository's ownership",
  14354. "type": "object",
  14355. "required": [
  14356. "new_owner"
  14357. ],
  14358. "properties": {
  14359. "new_owner": {
  14360. "type": "string",
  14361. "x-go-name": "NewOwner"
  14362. },
  14363. "team_ids": {
  14364. "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.",
  14365. "type": "array",
  14366. "items": {
  14367. "type": "integer",
  14368. "format": "int64"
  14369. },
  14370. "x-go-name": "TeamIDs"
  14371. }
  14372. },
  14373. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14374. },
  14375. "UpdateFileOptions": {
  14376. "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)",
  14377. "type": "object",
  14378. "required": [
  14379. "sha",
  14380. "content"
  14381. ],
  14382. "properties": {
  14383. "author": {
  14384. "$ref": "#/definitions/Identity"
  14385. },
  14386. "branch": {
  14387. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  14388. "type": "string",
  14389. "x-go-name": "BranchName"
  14390. },
  14391. "committer": {
  14392. "$ref": "#/definitions/Identity"
  14393. },
  14394. "content": {
  14395. "description": "content must be base64 encoded",
  14396. "type": "string",
  14397. "x-go-name": "Content"
  14398. },
  14399. "dates": {
  14400. "$ref": "#/definitions/CommitDateOptions"
  14401. },
  14402. "from_path": {
  14403. "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL",
  14404. "type": "string",
  14405. "x-go-name": "FromPath"
  14406. },
  14407. "message": {
  14408. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  14409. "type": "string",
  14410. "x-go-name": "Message"
  14411. },
  14412. "new_branch": {
  14413. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  14414. "type": "string",
  14415. "x-go-name": "NewBranchName"
  14416. },
  14417. "sha": {
  14418. "description": "sha is the SHA for the file that already exists",
  14419. "type": "string",
  14420. "x-go-name": "SHA"
  14421. }
  14422. },
  14423. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14424. },
  14425. "User": {
  14426. "description": "User represents a user",
  14427. "type": "object",
  14428. "properties": {
  14429. "avatar_url": {
  14430. "description": "URL to the user's avatar",
  14431. "type": "string",
  14432. "x-go-name": "AvatarURL"
  14433. },
  14434. "created": {
  14435. "type": "string",
  14436. "format": "date-time",
  14437. "x-go-name": "Created"
  14438. },
  14439. "email": {
  14440. "type": "string",
  14441. "format": "email",
  14442. "x-go-name": "Email"
  14443. },
  14444. "full_name": {
  14445. "description": "the user's full name",
  14446. "type": "string",
  14447. "x-go-name": "FullName"
  14448. },
  14449. "id": {
  14450. "description": "the user's id",
  14451. "type": "integer",
  14452. "format": "int64",
  14453. "x-go-name": "ID"
  14454. },
  14455. "is_admin": {
  14456. "description": "Is the user an administrator",
  14457. "type": "boolean",
  14458. "x-go-name": "IsAdmin"
  14459. },
  14460. "language": {
  14461. "description": "User locale",
  14462. "type": "string",
  14463. "x-go-name": "Language"
  14464. },
  14465. "last_login": {
  14466. "type": "string",
  14467. "format": "date-time",
  14468. "x-go-name": "LastLogin"
  14469. },
  14470. "login": {
  14471. "description": "the user's username",
  14472. "type": "string",
  14473. "x-go-name": "UserName"
  14474. }
  14475. },
  14476. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14477. },
  14478. "UserHeatmapData": {
  14479. "description": "UserHeatmapData represents the data needed to create a heatmap",
  14480. "type": "object",
  14481. "properties": {
  14482. "contributions": {
  14483. "type": "integer",
  14484. "format": "int64",
  14485. "x-go-name": "Contributions"
  14486. },
  14487. "timestamp": {
  14488. "$ref": "#/definitions/TimeStamp"
  14489. }
  14490. },
  14491. "x-go-package": "code.gitea.io/gitea/models"
  14492. },
  14493. "WatchInfo": {
  14494. "description": "WatchInfo represents an API watch status of one repository",
  14495. "type": "object",
  14496. "properties": {
  14497. "created_at": {
  14498. "type": "string",
  14499. "format": "date-time",
  14500. "x-go-name": "CreatedAt"
  14501. },
  14502. "ignored": {
  14503. "type": "boolean",
  14504. "x-go-name": "Ignored"
  14505. },
  14506. "reason": {
  14507. "type": "object",
  14508. "x-go-name": "Reason"
  14509. },
  14510. "repository_url": {
  14511. "type": "string",
  14512. "x-go-name": "RepositoryURL"
  14513. },
  14514. "subscribed": {
  14515. "type": "boolean",
  14516. "x-go-name": "Subscribed"
  14517. },
  14518. "url": {
  14519. "type": "string",
  14520. "x-go-name": "URL"
  14521. }
  14522. },
  14523. "x-go-package": "code.gitea.io/gitea/modules/structs"
  14524. }
  14525. },
  14526. "responses": {
  14527. "AccessToken": {
  14528. "description": "AccessToken represents an API access token.",
  14529. "headers": {
  14530. "id": {
  14531. "type": "integer",
  14532. "format": "int64"
  14533. },
  14534. "name": {
  14535. "type": "string"
  14536. },
  14537. "sha1": {
  14538. "type": "string"
  14539. },
  14540. "token_last_eight": {
  14541. "type": "string"
  14542. }
  14543. }
  14544. },
  14545. "AccessTokenList": {
  14546. "description": "AccessTokenList represents a list of API access token.",
  14547. "schema": {
  14548. "type": "array",
  14549. "items": {
  14550. "$ref": "#/definitions/AccessToken"
  14551. }
  14552. }
  14553. },
  14554. "AnnotatedTag": {
  14555. "description": "AnnotatedTag",
  14556. "schema": {
  14557. "$ref": "#/definitions/AnnotatedTag"
  14558. }
  14559. },
  14560. "Attachment": {
  14561. "description": "Attachment",
  14562. "schema": {
  14563. "$ref": "#/definitions/Attachment"
  14564. }
  14565. },
  14566. "AttachmentList": {
  14567. "description": "AttachmentList",
  14568. "schema": {
  14569. "type": "array",
  14570. "items": {
  14571. "$ref": "#/definitions/Attachment"
  14572. }
  14573. }
  14574. },
  14575. "Branch": {
  14576. "description": "Branch",
  14577. "schema": {
  14578. "$ref": "#/definitions/Branch"
  14579. }
  14580. },
  14581. "BranchList": {
  14582. "description": "BranchList",
  14583. "schema": {
  14584. "type": "array",
  14585. "items": {
  14586. "$ref": "#/definitions/Branch"
  14587. }
  14588. }
  14589. },
  14590. "BranchProtection": {
  14591. "description": "BranchProtection",
  14592. "schema": {
  14593. "$ref": "#/definitions/BranchProtection"
  14594. }
  14595. },
  14596. "BranchProtectionList": {
  14597. "description": "BranchProtectionList",
  14598. "schema": {
  14599. "type": "array",
  14600. "items": {
  14601. "$ref": "#/definitions/BranchProtection"
  14602. }
  14603. }
  14604. },
  14605. "Comment": {
  14606. "description": "Comment",
  14607. "schema": {
  14608. "$ref": "#/definitions/Comment"
  14609. }
  14610. },
  14611. "CommentList": {
  14612. "description": "CommentList",
  14613. "schema": {
  14614. "type": "array",
  14615. "items": {
  14616. "$ref": "#/definitions/Comment"
  14617. }
  14618. }
  14619. },
  14620. "Commit": {
  14621. "description": "Commit",
  14622. "schema": {
  14623. "$ref": "#/definitions/Commit"
  14624. }
  14625. },
  14626. "CommitList": {
  14627. "description": "CommitList",
  14628. "schema": {
  14629. "type": "array",
  14630. "items": {
  14631. "$ref": "#/definitions/Commit"
  14632. }
  14633. },
  14634. "headers": {
  14635. "X-HasMore": {
  14636. "type": "boolean",
  14637. "description": "True if there is another page"
  14638. },
  14639. "X-Page": {
  14640. "type": "integer",
  14641. "format": "int64",
  14642. "description": "The current page"
  14643. },
  14644. "X-PageCount": {
  14645. "type": "integer",
  14646. "format": "int64",
  14647. "description": "Total number of pages"
  14648. },
  14649. "X-PerPage": {
  14650. "type": "integer",
  14651. "format": "int64",
  14652. "description": "Commits per page"
  14653. },
  14654. "X-Total": {
  14655. "type": "integer",
  14656. "format": "int64",
  14657. "description": "Total commit count"
  14658. }
  14659. }
  14660. },
  14661. "ContentsListResponse": {
  14662. "description": "ContentsListResponse",
  14663. "schema": {
  14664. "type": "array",
  14665. "items": {
  14666. "$ref": "#/definitions/ContentsResponse"
  14667. }
  14668. }
  14669. },
  14670. "ContentsResponse": {
  14671. "description": "ContentsResponse",
  14672. "schema": {
  14673. "$ref": "#/definitions/ContentsResponse"
  14674. }
  14675. },
  14676. "DeployKey": {
  14677. "description": "DeployKey",
  14678. "schema": {
  14679. "$ref": "#/definitions/DeployKey"
  14680. }
  14681. },
  14682. "DeployKeyList": {
  14683. "description": "DeployKeyList",
  14684. "schema": {
  14685. "type": "array",
  14686. "items": {
  14687. "$ref": "#/definitions/DeployKey"
  14688. }
  14689. }
  14690. },
  14691. "EmailList": {
  14692. "description": "EmailList",
  14693. "schema": {
  14694. "type": "array",
  14695. "items": {
  14696. "$ref": "#/definitions/Email"
  14697. }
  14698. }
  14699. },
  14700. "EmptyRepository": {
  14701. "description": "EmptyRepository",
  14702. "schema": {
  14703. "$ref": "#/definitions/APIError"
  14704. }
  14705. },
  14706. "FileDeleteResponse": {
  14707. "description": "FileDeleteResponse",
  14708. "schema": {
  14709. "$ref": "#/definitions/FileDeleteResponse"
  14710. }
  14711. },
  14712. "FileResponse": {
  14713. "description": "FileResponse",
  14714. "schema": {
  14715. "$ref": "#/definitions/FileResponse"
  14716. }
  14717. },
  14718. "GPGKey": {
  14719. "description": "GPGKey",
  14720. "schema": {
  14721. "$ref": "#/definitions/GPGKey"
  14722. }
  14723. },
  14724. "GPGKeyList": {
  14725. "description": "GPGKeyList",
  14726. "schema": {
  14727. "type": "array",
  14728. "items": {
  14729. "$ref": "#/definitions/GPGKey"
  14730. }
  14731. }
  14732. },
  14733. "GitBlobResponse": {
  14734. "description": "GitBlobResponse",
  14735. "schema": {
  14736. "$ref": "#/definitions/GitBlobResponse"
  14737. }
  14738. },
  14739. "GitHook": {
  14740. "description": "GitHook",
  14741. "schema": {
  14742. "$ref": "#/definitions/GitHook"
  14743. }
  14744. },
  14745. "GitHookList": {
  14746. "description": "GitHookList",
  14747. "schema": {
  14748. "type": "array",
  14749. "items": {
  14750. "$ref": "#/definitions/GitHook"
  14751. }
  14752. }
  14753. },
  14754. "GitTreeResponse": {
  14755. "description": "GitTreeResponse",
  14756. "schema": {
  14757. "$ref": "#/definitions/GitTreeResponse"
  14758. }
  14759. },
  14760. "Hook": {
  14761. "description": "Hook",
  14762. "schema": {
  14763. "$ref": "#/definitions/Hook"
  14764. }
  14765. },
  14766. "HookList": {
  14767. "description": "HookList",
  14768. "schema": {
  14769. "type": "array",
  14770. "items": {
  14771. "$ref": "#/definitions/Hook"
  14772. }
  14773. }
  14774. },
  14775. "Issue": {
  14776. "description": "Issue",
  14777. "schema": {
  14778. "$ref": "#/definitions/Issue"
  14779. }
  14780. },
  14781. "IssueDeadline": {
  14782. "description": "IssueDeadline",
  14783. "schema": {
  14784. "$ref": "#/definitions/IssueDeadline"
  14785. }
  14786. },
  14787. "IssueList": {
  14788. "description": "IssueList",
  14789. "schema": {
  14790. "type": "array",
  14791. "items": {
  14792. "$ref": "#/definitions/Issue"
  14793. }
  14794. }
  14795. },
  14796. "Label": {
  14797. "description": "Label",
  14798. "schema": {
  14799. "$ref": "#/definitions/Label"
  14800. }
  14801. },
  14802. "LabelList": {
  14803. "description": "LabelList",
  14804. "schema": {
  14805. "type": "array",
  14806. "items": {
  14807. "$ref": "#/definitions/Label"
  14808. }
  14809. }
  14810. },
  14811. "MarkdownRender": {
  14812. "description": "MarkdownRender is a rendered markdown document",
  14813. "schema": {
  14814. "type": "string"
  14815. }
  14816. },
  14817. "Milestone": {
  14818. "description": "Milestone",
  14819. "schema": {
  14820. "$ref": "#/definitions/Milestone"
  14821. }
  14822. },
  14823. "MilestoneList": {
  14824. "description": "MilestoneList",
  14825. "schema": {
  14826. "type": "array",
  14827. "items": {
  14828. "$ref": "#/definitions/Milestone"
  14829. }
  14830. }
  14831. },
  14832. "NotificationCount": {
  14833. "description": "Number of unread notifications",
  14834. "schema": {
  14835. "$ref": "#/definitions/NotificationCount"
  14836. }
  14837. },
  14838. "NotificationThread": {
  14839. "description": "NotificationThread",
  14840. "schema": {
  14841. "$ref": "#/definitions/NotificationThread"
  14842. }
  14843. },
  14844. "NotificationThreadList": {
  14845. "description": "NotificationThreadList",
  14846. "schema": {
  14847. "type": "array",
  14848. "items": {
  14849. "$ref": "#/definitions/NotificationThread"
  14850. }
  14851. }
  14852. },
  14853. "OAuth2Application": {
  14854. "description": "OAuth2Application",
  14855. "schema": {
  14856. "$ref": "#/definitions/OAuth2Application"
  14857. }
  14858. },
  14859. "OAuth2ApplicationList": {
  14860. "description": "OAuth2ApplicationList represents a list of OAuth2 applications.",
  14861. "schema": {
  14862. "type": "array",
  14863. "items": {
  14864. "$ref": "#/definitions/OAuth2Application"
  14865. }
  14866. }
  14867. },
  14868. "Organization": {
  14869. "description": "Organization",
  14870. "schema": {
  14871. "$ref": "#/definitions/Organization"
  14872. }
  14873. },
  14874. "OrganizationList": {
  14875. "description": "OrganizationList",
  14876. "schema": {
  14877. "type": "array",
  14878. "items": {
  14879. "$ref": "#/definitions/Organization"
  14880. }
  14881. }
  14882. },
  14883. "PublicKey": {
  14884. "description": "PublicKey",
  14885. "schema": {
  14886. "$ref": "#/definitions/PublicKey"
  14887. }
  14888. },
  14889. "PublicKeyList": {
  14890. "description": "PublicKeyList",
  14891. "schema": {
  14892. "type": "array",
  14893. "items": {
  14894. "$ref": "#/definitions/PublicKey"
  14895. }
  14896. }
  14897. },
  14898. "PullRequest": {
  14899. "description": "PullRequest",
  14900. "schema": {
  14901. "$ref": "#/definitions/PullRequest"
  14902. }
  14903. },
  14904. "PullRequestList": {
  14905. "description": "PullRequestList",
  14906. "schema": {
  14907. "type": "array",
  14908. "items": {
  14909. "$ref": "#/definitions/PullRequest"
  14910. }
  14911. }
  14912. },
  14913. "PullReview": {
  14914. "description": "PullReview",
  14915. "schema": {
  14916. "$ref": "#/definitions/PullReview"
  14917. }
  14918. },
  14919. "PullReviewComment": {
  14920. "description": "PullComment",
  14921. "schema": {
  14922. "$ref": "#/definitions/PullReviewComment"
  14923. }
  14924. },
  14925. "PullReviewCommentList": {
  14926. "description": "PullCommentList",
  14927. "schema": {
  14928. "type": "array",
  14929. "items": {
  14930. "$ref": "#/definitions/PullReviewComment"
  14931. }
  14932. }
  14933. },
  14934. "PullReviewList": {
  14935. "description": "PullReviewList",
  14936. "schema": {
  14937. "type": "array",
  14938. "items": {
  14939. "$ref": "#/definitions/PullReview"
  14940. }
  14941. }
  14942. },
  14943. "Reaction": {
  14944. "description": "Reaction",
  14945. "schema": {
  14946. "$ref": "#/definitions/Reaction"
  14947. }
  14948. },
  14949. "ReactionList": {
  14950. "description": "ReactionList",
  14951. "schema": {
  14952. "type": "array",
  14953. "items": {
  14954. "$ref": "#/definitions/Reaction"
  14955. }
  14956. }
  14957. },
  14958. "Reference": {
  14959. "description": "Reference",
  14960. "schema": {
  14961. "$ref": "#/definitions/Reference"
  14962. }
  14963. },
  14964. "ReferenceList": {
  14965. "description": "ReferenceList",
  14966. "schema": {
  14967. "type": "array",
  14968. "items": {
  14969. "$ref": "#/definitions/Reference"
  14970. }
  14971. }
  14972. },
  14973. "Release": {
  14974. "description": "Release",
  14975. "schema": {
  14976. "$ref": "#/definitions/Release"
  14977. }
  14978. },
  14979. "ReleaseList": {
  14980. "description": "ReleaseList",
  14981. "schema": {
  14982. "type": "array",
  14983. "items": {
  14984. "$ref": "#/definitions/Release"
  14985. }
  14986. }
  14987. },
  14988. "Repository": {
  14989. "description": "Repository",
  14990. "schema": {
  14991. "$ref": "#/definitions/Repository"
  14992. }
  14993. },
  14994. "RepositoryList": {
  14995. "description": "RepositoryList",
  14996. "schema": {
  14997. "type": "array",
  14998. "items": {
  14999. "$ref": "#/definitions/Repository"
  15000. }
  15001. }
  15002. },
  15003. "SearchResults": {
  15004. "description": "SearchResults",
  15005. "schema": {
  15006. "$ref": "#/definitions/SearchResults"
  15007. }
  15008. },
  15009. "ServerVersion": {
  15010. "description": "ServerVersion",
  15011. "schema": {
  15012. "$ref": "#/definitions/ServerVersion"
  15013. }
  15014. },
  15015. "Status": {
  15016. "description": "Status",
  15017. "schema": {
  15018. "$ref": "#/definitions/Status"
  15019. }
  15020. },
  15021. "StatusList": {
  15022. "description": "StatusList",
  15023. "schema": {
  15024. "type": "array",
  15025. "items": {
  15026. "$ref": "#/definitions/Status"
  15027. }
  15028. }
  15029. },
  15030. "StopWatch": {
  15031. "description": "StopWatch",
  15032. "schema": {
  15033. "$ref": "#/definitions/StopWatch"
  15034. }
  15035. },
  15036. "StopWatchList": {
  15037. "description": "StopWatchList",
  15038. "schema": {
  15039. "type": "array",
  15040. "items": {
  15041. "$ref": "#/definitions/StopWatch"
  15042. }
  15043. }
  15044. },
  15045. "Tag": {
  15046. "description": "Tag",
  15047. "schema": {
  15048. "$ref": "#/definitions/Tag"
  15049. }
  15050. },
  15051. "TagList": {
  15052. "description": "TagList",
  15053. "schema": {
  15054. "type": "array",
  15055. "items": {
  15056. "$ref": "#/definitions/Tag"
  15057. }
  15058. }
  15059. },
  15060. "Team": {
  15061. "description": "Team",
  15062. "schema": {
  15063. "$ref": "#/definitions/Team"
  15064. }
  15065. },
  15066. "TeamList": {
  15067. "description": "TeamList",
  15068. "schema": {
  15069. "type": "array",
  15070. "items": {
  15071. "$ref": "#/definitions/Team"
  15072. }
  15073. }
  15074. },
  15075. "TopicListResponse": {
  15076. "description": "TopicListResponse",
  15077. "schema": {
  15078. "type": "array",
  15079. "items": {
  15080. "$ref": "#/definitions/TopicResponse"
  15081. }
  15082. }
  15083. },
  15084. "TopicNames": {
  15085. "description": "TopicNames",
  15086. "schema": {
  15087. "$ref": "#/definitions/TopicName"
  15088. }
  15089. },
  15090. "TrackedTime": {
  15091. "description": "TrackedTime",
  15092. "schema": {
  15093. "$ref": "#/definitions/TrackedTime"
  15094. }
  15095. },
  15096. "TrackedTimeList": {
  15097. "description": "TrackedTimeList",
  15098. "schema": {
  15099. "type": "array",
  15100. "items": {
  15101. "$ref": "#/definitions/TrackedTime"
  15102. }
  15103. }
  15104. },
  15105. "User": {
  15106. "description": "User",
  15107. "schema": {
  15108. "$ref": "#/definitions/User"
  15109. }
  15110. },
  15111. "UserHeatmapData": {
  15112. "description": "UserHeatmapData",
  15113. "schema": {
  15114. "type": "array",
  15115. "items": {
  15116. "$ref": "#/definitions/UserHeatmapData"
  15117. }
  15118. }
  15119. },
  15120. "UserList": {
  15121. "description": "UserList",
  15122. "schema": {
  15123. "type": "array",
  15124. "items": {
  15125. "$ref": "#/definitions/User"
  15126. }
  15127. }
  15128. },
  15129. "WatchInfo": {
  15130. "description": "WatchInfo",
  15131. "schema": {
  15132. "$ref": "#/definitions/WatchInfo"
  15133. }
  15134. },
  15135. "empty": {
  15136. "description": "APIEmpty is an empty response"
  15137. },
  15138. "error": {
  15139. "description": "APIError is error format response",
  15140. "headers": {
  15141. "message": {
  15142. "type": "string"
  15143. },
  15144. "url": {
  15145. "type": "string"
  15146. }
  15147. }
  15148. },
  15149. "forbidden": {
  15150. "description": "APIForbiddenError is a forbidden error response",
  15151. "headers": {
  15152. "message": {
  15153. "type": "string"
  15154. },
  15155. "url": {
  15156. "type": "string"
  15157. }
  15158. }
  15159. },
  15160. "invalidTopicsError": {
  15161. "description": "APIInvalidTopicsError is error format response to invalid topics",
  15162. "headers": {
  15163. "invalidTopics": {
  15164. "type": "array",
  15165. "items": {
  15166. "type": "string"
  15167. }
  15168. },
  15169. "message": {
  15170. "type": "string"
  15171. }
  15172. }
  15173. },
  15174. "notFound": {
  15175. "description": "APINotFound is a not found empty response"
  15176. },
  15177. "parameterBodies": {
  15178. "description": "parameterBodies",
  15179. "schema": {
  15180. "$ref": "#/definitions/SubmitPullReviewOptions"
  15181. }
  15182. },
  15183. "redirect": {
  15184. "description": "APIRedirect is a redirect response"
  15185. },
  15186. "validationError": {
  15187. "description": "APIValidationError is error format response related to input validation",
  15188. "headers": {
  15189. "message": {
  15190. "type": "string"
  15191. },
  15192. "url": {
  15193. "type": "string"
  15194. }
  15195. }
  15196. }
  15197. },
  15198. "securityDefinitions": {
  15199. "AccessToken": {
  15200. "type": "apiKey",
  15201. "name": "access_token",
  15202. "in": "query"
  15203. },
  15204. "AuthorizationHeaderToken": {
  15205. "description": "API tokens must be prepended with \"token\" followed by a space.",
  15206. "type": "apiKey",
  15207. "name": "Authorization",
  15208. "in": "header"
  15209. },
  15210. "BasicAuth": {
  15211. "type": "basic"
  15212. },
  15213. "SudoHeader": {
  15214. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  15215. "type": "apiKey",
  15216. "name": "Sudo",
  15217. "in": "header"
  15218. },
  15219. "SudoParam": {
  15220. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  15221. "type": "apiKey",
  15222. "name": "sudo",
  15223. "in": "query"
  15224. },
  15225. "Token": {
  15226. "type": "apiKey",
  15227. "name": "token",
  15228. "in": "query"
  15229. }
  15230. },
  15231. "security": [
  15232. {
  15233. "BasicAuth": []
  15234. },
  15235. {
  15236. "Token": []
  15237. },
  15238. {
  15239. "AccessToken": []
  15240. },
  15241. {
  15242. "AuthorizationHeaderToken": []
  15243. },
  15244. {
  15245. "SudoParam": []
  15246. },
  15247. {
  15248. "SudoHeader": []
  15249. }
  15250. ]
  15251. }