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

v1_json.tmpl 342 kB

API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
5 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 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>
8 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 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>
8 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>
8 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>
8 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
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>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
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>
5 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
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>
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>
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>
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.
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>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
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>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
API add/generalize pagination (#9452) * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
5 years ago
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
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
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
Repository avatars (#6986) * Repository avatars - first variant of code from old work for gogs - add migration 87 - add new option in app.ini - add en-US locale string - add new class in repository.less * Add changed index.css, remove unused template name * Update en-us doc about configuration options * Add comments to new functions, add new option to docker app.ini * Add comment for lint * Remove variable, not needed * Fix formatting * Update swagger api template * Check if avatar exists * Fix avatar link/path checks * Typo * TEXT column can't have a default value * Fixes: - remove old avatar file on upload - use ID in name of avatar file - users may upload same files - add simple tests * Fix fmt check * Generate PNG instead of "static" GIF * More informative comment * Fix error message * Update avatar upload checks: - add file size check - add new option - update config docs - add new string to en-us locale * Fixes: - use FileHEader field for check file size - add new test - upload big image * Fix formatting * Update comments * Update log message * Removed wrong style - not needed * Use Sync2 to migrate * Update repos list view - bigger avatar - fix html blocks alignment * A little adjust avatar size * Use small icons for explore/repo list * Use new cool avatar preparation func by @lafriks * Missing changes for new function * Remove unused import, move imports * Missed new option definition in app.ini Add file size check in user/profile avatar upload * Use smaller field length for Avatar * Use session to update repo DB data, update DeleteAvatar - use session too * Fix err variable definition * As suggested @lafriks - return as soon as possible, code readability
6 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
5 years ago
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>
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
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399
  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 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. "204": {
  535. "description": "No unread notification"
  536. }
  537. }
  538. }
  539. },
  540. "/notifications/threads/{id}": {
  541. "get": {
  542. "consumes": [
  543. "application/json"
  544. ],
  545. "produces": [
  546. "application/json"
  547. ],
  548. "tags": [
  549. "notification"
  550. ],
  551. "summary": "Get notification thread by ID",
  552. "operationId": "notifyGetThread",
  553. "parameters": [
  554. {
  555. "type": "string",
  556. "description": "id of notification thread",
  557. "name": "id",
  558. "in": "path",
  559. "required": true
  560. }
  561. ],
  562. "responses": {
  563. "200": {
  564. "$ref": "#/responses/NotificationThread"
  565. },
  566. "403": {
  567. "$ref": "#/responses/forbidden"
  568. },
  569. "404": {
  570. "$ref": "#/responses/notFound"
  571. }
  572. }
  573. },
  574. "patch": {
  575. "consumes": [
  576. "application/json"
  577. ],
  578. "produces": [
  579. "application/json"
  580. ],
  581. "tags": [
  582. "notification"
  583. ],
  584. "summary": "Mark notification thread as read by ID",
  585. "operationId": "notifyReadThread",
  586. "parameters": [
  587. {
  588. "type": "string",
  589. "description": "id of notification thread",
  590. "name": "id",
  591. "in": "path",
  592. "required": true
  593. }
  594. ],
  595. "responses": {
  596. "205": {
  597. "$ref": "#/responses/empty"
  598. },
  599. "403": {
  600. "$ref": "#/responses/forbidden"
  601. },
  602. "404": {
  603. "$ref": "#/responses/notFound"
  604. }
  605. }
  606. }
  607. },
  608. "/org/{org}/repos": {
  609. "post": {
  610. "consumes": [
  611. "application/json"
  612. ],
  613. "produces": [
  614. "application/json"
  615. ],
  616. "tags": [
  617. "organization"
  618. ],
  619. "summary": "Create a repository in an organization",
  620. "operationId": "createOrgRepoDeprecated",
  621. "deprecated": true,
  622. "parameters": [
  623. {
  624. "type": "string",
  625. "description": "name of organization",
  626. "name": "org",
  627. "in": "path",
  628. "required": true
  629. },
  630. {
  631. "name": "body",
  632. "in": "body",
  633. "schema": {
  634. "$ref": "#/definitions/CreateRepoOption"
  635. }
  636. }
  637. ],
  638. "responses": {
  639. "201": {
  640. "$ref": "#/responses/Repository"
  641. },
  642. "403": {
  643. "$ref": "#/responses/forbidden"
  644. },
  645. "422": {
  646. "$ref": "#/responses/validationError"
  647. }
  648. }
  649. }
  650. },
  651. "/orgs": {
  652. "get": {
  653. "produces": [
  654. "application/json"
  655. ],
  656. "tags": [
  657. "organization"
  658. ],
  659. "summary": "Get list of organizations",
  660. "operationId": "orgGetAll",
  661. "parameters": [
  662. {
  663. "type": "integer",
  664. "description": "page number of results to return (1-based)",
  665. "name": "page",
  666. "in": "query"
  667. },
  668. {
  669. "type": "integer",
  670. "description": "page size of results, maximum page size is 50",
  671. "name": "limit",
  672. "in": "query"
  673. }
  674. ],
  675. "responses": {
  676. "200": {
  677. "$ref": "#/responses/OrganizationList"
  678. }
  679. }
  680. },
  681. "post": {
  682. "consumes": [
  683. "application/json"
  684. ],
  685. "produces": [
  686. "application/json"
  687. ],
  688. "tags": [
  689. "organization"
  690. ],
  691. "summary": "Create an organization",
  692. "operationId": "orgCreate",
  693. "parameters": [
  694. {
  695. "name": "organization",
  696. "in": "body",
  697. "required": true,
  698. "schema": {
  699. "$ref": "#/definitions/CreateOrgOption"
  700. }
  701. }
  702. ],
  703. "responses": {
  704. "201": {
  705. "$ref": "#/responses/Organization"
  706. },
  707. "403": {
  708. "$ref": "#/responses/forbidden"
  709. },
  710. "422": {
  711. "$ref": "#/responses/validationError"
  712. }
  713. }
  714. }
  715. },
  716. "/orgs/{org}": {
  717. "get": {
  718. "produces": [
  719. "application/json"
  720. ],
  721. "tags": [
  722. "organization"
  723. ],
  724. "summary": "Get an organization",
  725. "operationId": "orgGet",
  726. "parameters": [
  727. {
  728. "type": "string",
  729. "description": "name of the organization to get",
  730. "name": "org",
  731. "in": "path",
  732. "required": true
  733. }
  734. ],
  735. "responses": {
  736. "200": {
  737. "$ref": "#/responses/Organization"
  738. }
  739. }
  740. },
  741. "delete": {
  742. "produces": [
  743. "application/json"
  744. ],
  745. "tags": [
  746. "organization"
  747. ],
  748. "summary": "Delete an organization",
  749. "operationId": "orgDelete",
  750. "parameters": [
  751. {
  752. "type": "string",
  753. "description": "organization that is to be deleted",
  754. "name": "org",
  755. "in": "path",
  756. "required": true
  757. }
  758. ],
  759. "responses": {
  760. "204": {
  761. "$ref": "#/responses/empty"
  762. }
  763. }
  764. },
  765. "patch": {
  766. "consumes": [
  767. "application/json"
  768. ],
  769. "produces": [
  770. "application/json"
  771. ],
  772. "tags": [
  773. "organization"
  774. ],
  775. "summary": "Edit an organization",
  776. "operationId": "orgEdit",
  777. "parameters": [
  778. {
  779. "type": "string",
  780. "description": "name of the organization to edit",
  781. "name": "org",
  782. "in": "path",
  783. "required": true
  784. },
  785. {
  786. "name": "body",
  787. "in": "body",
  788. "required": true,
  789. "schema": {
  790. "$ref": "#/definitions/EditOrgOption"
  791. }
  792. }
  793. ],
  794. "responses": {
  795. "200": {
  796. "$ref": "#/responses/Organization"
  797. }
  798. }
  799. }
  800. },
  801. "/orgs/{org}/hooks": {
  802. "get": {
  803. "produces": [
  804. "application/json"
  805. ],
  806. "tags": [
  807. "organization"
  808. ],
  809. "summary": "List an organization's webhooks",
  810. "operationId": "orgListHooks",
  811. "parameters": [
  812. {
  813. "type": "string",
  814. "description": "name of the organization",
  815. "name": "org",
  816. "in": "path",
  817. "required": true
  818. },
  819. {
  820. "type": "integer",
  821. "description": "page number of results to return (1-based)",
  822. "name": "page",
  823. "in": "query"
  824. },
  825. {
  826. "type": "integer",
  827. "description": "page size of results, maximum page size is 50",
  828. "name": "limit",
  829. "in": "query"
  830. }
  831. ],
  832. "responses": {
  833. "200": {
  834. "$ref": "#/responses/HookList"
  835. }
  836. }
  837. }
  838. },
  839. "/orgs/{org}/hooks/": {
  840. "post": {
  841. "consumes": [
  842. "application/json"
  843. ],
  844. "produces": [
  845. "application/json"
  846. ],
  847. "tags": [
  848. "organization"
  849. ],
  850. "summary": "Create a hook",
  851. "operationId": "orgCreateHook",
  852. "parameters": [
  853. {
  854. "type": "string",
  855. "description": "name of the organization",
  856. "name": "org",
  857. "in": "path",
  858. "required": true
  859. },
  860. {
  861. "name": "body",
  862. "in": "body",
  863. "required": true,
  864. "schema": {
  865. "$ref": "#/definitions/CreateHookOption"
  866. }
  867. }
  868. ],
  869. "responses": {
  870. "201": {
  871. "$ref": "#/responses/Hook"
  872. }
  873. }
  874. }
  875. },
  876. "/orgs/{org}/hooks/{id}": {
  877. "get": {
  878. "produces": [
  879. "application/json"
  880. ],
  881. "tags": [
  882. "organization"
  883. ],
  884. "summary": "Get a hook",
  885. "operationId": "orgGetHook",
  886. "parameters": [
  887. {
  888. "type": "string",
  889. "description": "name of the organization",
  890. "name": "org",
  891. "in": "path",
  892. "required": true
  893. },
  894. {
  895. "type": "integer",
  896. "format": "int64",
  897. "description": "id of the hook to get",
  898. "name": "id",
  899. "in": "path",
  900. "required": true
  901. }
  902. ],
  903. "responses": {
  904. "200": {
  905. "$ref": "#/responses/Hook"
  906. }
  907. }
  908. },
  909. "delete": {
  910. "produces": [
  911. "application/json"
  912. ],
  913. "tags": [
  914. "organization"
  915. ],
  916. "summary": "Delete a hook",
  917. "operationId": "orgDeleteHook",
  918. "parameters": [
  919. {
  920. "type": "string",
  921. "description": "name of the organization",
  922. "name": "org",
  923. "in": "path",
  924. "required": true
  925. },
  926. {
  927. "type": "integer",
  928. "format": "int64",
  929. "description": "id of the hook to delete",
  930. "name": "id",
  931. "in": "path",
  932. "required": true
  933. }
  934. ],
  935. "responses": {
  936. "204": {
  937. "$ref": "#/responses/empty"
  938. }
  939. }
  940. },
  941. "patch": {
  942. "consumes": [
  943. "application/json"
  944. ],
  945. "produces": [
  946. "application/json"
  947. ],
  948. "tags": [
  949. "organization"
  950. ],
  951. "summary": "Update a hook",
  952. "operationId": "orgEditHook",
  953. "parameters": [
  954. {
  955. "type": "string",
  956. "description": "name of the organization",
  957. "name": "org",
  958. "in": "path",
  959. "required": true
  960. },
  961. {
  962. "type": "integer",
  963. "format": "int64",
  964. "description": "id of the hook to update",
  965. "name": "id",
  966. "in": "path",
  967. "required": true
  968. },
  969. {
  970. "name": "body",
  971. "in": "body",
  972. "schema": {
  973. "$ref": "#/definitions/EditHookOption"
  974. }
  975. }
  976. ],
  977. "responses": {
  978. "200": {
  979. "$ref": "#/responses/Hook"
  980. }
  981. }
  982. }
  983. },
  984. "/orgs/{org}/members": {
  985. "get": {
  986. "produces": [
  987. "application/json"
  988. ],
  989. "tags": [
  990. "organization"
  991. ],
  992. "summary": "List an organization's members",
  993. "operationId": "orgListMembers",
  994. "parameters": [
  995. {
  996. "type": "string",
  997. "description": "name of the organization",
  998. "name": "org",
  999. "in": "path",
  1000. "required": true
  1001. },
  1002. {
  1003. "type": "integer",
  1004. "description": "page number of results to return (1-based)",
  1005. "name": "page",
  1006. "in": "query"
  1007. },
  1008. {
  1009. "type": "integer",
  1010. "description": "page size of results, maximum page size is 50",
  1011. "name": "limit",
  1012. "in": "query"
  1013. }
  1014. ],
  1015. "responses": {
  1016. "200": {
  1017. "$ref": "#/responses/UserList"
  1018. }
  1019. }
  1020. }
  1021. },
  1022. "/orgs/{org}/members/{username}": {
  1023. "get": {
  1024. "tags": [
  1025. "organization"
  1026. ],
  1027. "summary": "Check if a user is a member of an organization",
  1028. "operationId": "orgIsMember",
  1029. "parameters": [
  1030. {
  1031. "type": "string",
  1032. "description": "name of the organization",
  1033. "name": "org",
  1034. "in": "path",
  1035. "required": true
  1036. },
  1037. {
  1038. "type": "string",
  1039. "description": "username of the user",
  1040. "name": "username",
  1041. "in": "path",
  1042. "required": true
  1043. }
  1044. ],
  1045. "responses": {
  1046. "204": {
  1047. "description": "user is a member"
  1048. },
  1049. "302": {
  1050. "description": "redirection to /orgs/{org}/public_members/{username}"
  1051. },
  1052. "404": {
  1053. "description": "user is not a member"
  1054. }
  1055. }
  1056. },
  1057. "delete": {
  1058. "produces": [
  1059. "application/json"
  1060. ],
  1061. "tags": [
  1062. "organization"
  1063. ],
  1064. "summary": "Remove a member from an organization",
  1065. "operationId": "orgDeleteMember",
  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": "string",
  1076. "description": "username of the user",
  1077. "name": "username",
  1078. "in": "path",
  1079. "required": true
  1080. }
  1081. ],
  1082. "responses": {
  1083. "204": {
  1084. "description": "member removed"
  1085. }
  1086. }
  1087. }
  1088. },
  1089. "/orgs/{org}/public_members": {
  1090. "get": {
  1091. "produces": [
  1092. "application/json"
  1093. ],
  1094. "tags": [
  1095. "organization"
  1096. ],
  1097. "summary": "List an organization's public members",
  1098. "operationId": "orgListPublicMembers",
  1099. "parameters": [
  1100. {
  1101. "type": "string",
  1102. "description": "name of the organization",
  1103. "name": "org",
  1104. "in": "path",
  1105. "required": true
  1106. },
  1107. {
  1108. "type": "integer",
  1109. "description": "page number of results to return (1-based)",
  1110. "name": "page",
  1111. "in": "query"
  1112. },
  1113. {
  1114. "type": "integer",
  1115. "description": "page size of results, maximum page size is 50",
  1116. "name": "limit",
  1117. "in": "query"
  1118. }
  1119. ],
  1120. "responses": {
  1121. "200": {
  1122. "$ref": "#/responses/UserList"
  1123. }
  1124. }
  1125. }
  1126. },
  1127. "/orgs/{org}/public_members/{username}": {
  1128. "get": {
  1129. "tags": [
  1130. "organization"
  1131. ],
  1132. "summary": "Check if a user is a public member of an organization",
  1133. "operationId": "orgIsPublicMember",
  1134. "parameters": [
  1135. {
  1136. "type": "string",
  1137. "description": "name of the organization",
  1138. "name": "org",
  1139. "in": "path",
  1140. "required": true
  1141. },
  1142. {
  1143. "type": "string",
  1144. "description": "username of the user",
  1145. "name": "username",
  1146. "in": "path",
  1147. "required": true
  1148. }
  1149. ],
  1150. "responses": {
  1151. "204": {
  1152. "description": "user is a public member"
  1153. },
  1154. "404": {
  1155. "description": "user is not a public member"
  1156. }
  1157. }
  1158. },
  1159. "put": {
  1160. "produces": [
  1161. "application/json"
  1162. ],
  1163. "tags": [
  1164. "organization"
  1165. ],
  1166. "summary": "Publicize a user's membership",
  1167. "operationId": "orgPublicizeMember",
  1168. "parameters": [
  1169. {
  1170. "type": "string",
  1171. "description": "name of the organization",
  1172. "name": "org",
  1173. "in": "path",
  1174. "required": true
  1175. },
  1176. {
  1177. "type": "string",
  1178. "description": "username of the user",
  1179. "name": "username",
  1180. "in": "path",
  1181. "required": true
  1182. }
  1183. ],
  1184. "responses": {
  1185. "204": {
  1186. "description": "membership publicized"
  1187. },
  1188. "403": {
  1189. "$ref": "#/responses/forbidden"
  1190. }
  1191. }
  1192. },
  1193. "delete": {
  1194. "produces": [
  1195. "application/json"
  1196. ],
  1197. "tags": [
  1198. "organization"
  1199. ],
  1200. "summary": "Conceal a user's membership",
  1201. "operationId": "orgConcealMember",
  1202. "parameters": [
  1203. {
  1204. "type": "string",
  1205. "description": "name of the organization",
  1206. "name": "org",
  1207. "in": "path",
  1208. "required": true
  1209. },
  1210. {
  1211. "type": "string",
  1212. "description": "username of the user",
  1213. "name": "username",
  1214. "in": "path",
  1215. "required": true
  1216. }
  1217. ],
  1218. "responses": {
  1219. "204": {
  1220. "$ref": "#/responses/empty"
  1221. },
  1222. "403": {
  1223. "$ref": "#/responses/forbidden"
  1224. }
  1225. }
  1226. }
  1227. },
  1228. "/orgs/{org}/repos": {
  1229. "get": {
  1230. "produces": [
  1231. "application/json"
  1232. ],
  1233. "tags": [
  1234. "organization"
  1235. ],
  1236. "summary": "List an organization's repos",
  1237. "operationId": "orgListRepos",
  1238. "parameters": [
  1239. {
  1240. "type": "string",
  1241. "description": "name of the organization",
  1242. "name": "org",
  1243. "in": "path",
  1244. "required": true
  1245. },
  1246. {
  1247. "type": "integer",
  1248. "description": "page number of results to return (1-based)",
  1249. "name": "page",
  1250. "in": "query"
  1251. },
  1252. {
  1253. "type": "integer",
  1254. "description": "page size of results, maximum page size is 50",
  1255. "name": "limit",
  1256. "in": "query"
  1257. }
  1258. ],
  1259. "responses": {
  1260. "200": {
  1261. "$ref": "#/responses/RepositoryList"
  1262. }
  1263. }
  1264. },
  1265. "post": {
  1266. "consumes": [
  1267. "application/json"
  1268. ],
  1269. "produces": [
  1270. "application/json"
  1271. ],
  1272. "tags": [
  1273. "organization"
  1274. ],
  1275. "summary": "Create a repository in an organization",
  1276. "operationId": "createOrgRepo",
  1277. "parameters": [
  1278. {
  1279. "type": "string",
  1280. "description": "name of organization",
  1281. "name": "org",
  1282. "in": "path",
  1283. "required": true
  1284. },
  1285. {
  1286. "name": "body",
  1287. "in": "body",
  1288. "schema": {
  1289. "$ref": "#/definitions/CreateRepoOption"
  1290. }
  1291. }
  1292. ],
  1293. "responses": {
  1294. "201": {
  1295. "$ref": "#/responses/Repository"
  1296. },
  1297. "403": {
  1298. "$ref": "#/responses/forbidden"
  1299. },
  1300. "404": {
  1301. "$ref": "#/responses/notFound"
  1302. }
  1303. }
  1304. }
  1305. },
  1306. "/orgs/{org}/teams": {
  1307. "get": {
  1308. "produces": [
  1309. "application/json"
  1310. ],
  1311. "tags": [
  1312. "organization"
  1313. ],
  1314. "summary": "List an organization's teams",
  1315. "operationId": "orgListTeams",
  1316. "parameters": [
  1317. {
  1318. "type": "string",
  1319. "description": "name of the organization",
  1320. "name": "org",
  1321. "in": "path",
  1322. "required": true
  1323. },
  1324. {
  1325. "type": "integer",
  1326. "description": "page number of results to return (1-based)",
  1327. "name": "page",
  1328. "in": "query"
  1329. },
  1330. {
  1331. "type": "integer",
  1332. "description": "page size of results, maximum page size is 50",
  1333. "name": "limit",
  1334. "in": "query"
  1335. }
  1336. ],
  1337. "responses": {
  1338. "200": {
  1339. "$ref": "#/responses/TeamList"
  1340. }
  1341. }
  1342. },
  1343. "post": {
  1344. "consumes": [
  1345. "application/json"
  1346. ],
  1347. "produces": [
  1348. "application/json"
  1349. ],
  1350. "tags": [
  1351. "organization"
  1352. ],
  1353. "summary": "Create a team",
  1354. "operationId": "orgCreateTeam",
  1355. "parameters": [
  1356. {
  1357. "type": "string",
  1358. "description": "name of the organization",
  1359. "name": "org",
  1360. "in": "path",
  1361. "required": true
  1362. },
  1363. {
  1364. "name": "body",
  1365. "in": "body",
  1366. "schema": {
  1367. "$ref": "#/definitions/CreateTeamOption"
  1368. }
  1369. }
  1370. ],
  1371. "responses": {
  1372. "201": {
  1373. "$ref": "#/responses/Team"
  1374. },
  1375. "422": {
  1376. "$ref": "#/responses/validationError"
  1377. }
  1378. }
  1379. }
  1380. },
  1381. "/orgs/{org}/teams/search": {
  1382. "get": {
  1383. "produces": [
  1384. "application/json"
  1385. ],
  1386. "tags": [
  1387. "organization"
  1388. ],
  1389. "summary": "Search for teams within an organization",
  1390. "operationId": "teamSearch",
  1391. "parameters": [
  1392. {
  1393. "type": "string",
  1394. "description": "name of the organization",
  1395. "name": "org",
  1396. "in": "path",
  1397. "required": true
  1398. },
  1399. {
  1400. "type": "string",
  1401. "description": "keywords to search",
  1402. "name": "q",
  1403. "in": "query"
  1404. },
  1405. {
  1406. "type": "boolean",
  1407. "description": "include search within team description (defaults to true)",
  1408. "name": "include_desc",
  1409. "in": "query"
  1410. },
  1411. {
  1412. "type": "integer",
  1413. "description": "page number of results to return (1-based)",
  1414. "name": "page",
  1415. "in": "query"
  1416. },
  1417. {
  1418. "type": "integer",
  1419. "description": "page size of results, maximum page size is 50",
  1420. "name": "limit",
  1421. "in": "query"
  1422. }
  1423. ],
  1424. "responses": {
  1425. "200": {
  1426. "description": "SearchResults of a successful search",
  1427. "schema": {
  1428. "type": "object",
  1429. "properties": {
  1430. "data": {
  1431. "type": "array",
  1432. "items": {
  1433. "$ref": "#/definitions/Team"
  1434. }
  1435. },
  1436. "ok": {
  1437. "type": "boolean"
  1438. }
  1439. }
  1440. }
  1441. }
  1442. }
  1443. }
  1444. },
  1445. "/repos/issues/search": {
  1446. "get": {
  1447. "produces": [
  1448. "application/json"
  1449. ],
  1450. "tags": [
  1451. "issue"
  1452. ],
  1453. "summary": "Search for issues across the repositories that the user has access to",
  1454. "operationId": "issueSearchIssues",
  1455. "parameters": [
  1456. {
  1457. "type": "string",
  1458. "description": "whether issue is open or closed",
  1459. "name": "state",
  1460. "in": "query"
  1461. },
  1462. {
  1463. "type": "string",
  1464. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  1465. "name": "labels",
  1466. "in": "query"
  1467. },
  1468. {
  1469. "type": "string",
  1470. "description": "search string",
  1471. "name": "q",
  1472. "in": "query"
  1473. },
  1474. {
  1475. "type": "integer",
  1476. "format": "int64",
  1477. "description": "repository to prioritize in the results",
  1478. "name": "priority_repo_id",
  1479. "in": "query"
  1480. },
  1481. {
  1482. "type": "string",
  1483. "description": "filter by type (issues / pulls) if set",
  1484. "name": "type",
  1485. "in": "query"
  1486. },
  1487. {
  1488. "type": "integer",
  1489. "description": "page number of requested issues",
  1490. "name": "page",
  1491. "in": "query"
  1492. }
  1493. ],
  1494. "responses": {
  1495. "200": {
  1496. "$ref": "#/responses/IssueList"
  1497. }
  1498. }
  1499. }
  1500. },
  1501. "/repos/migrate": {
  1502. "post": {
  1503. "consumes": [
  1504. "application/json"
  1505. ],
  1506. "produces": [
  1507. "application/json"
  1508. ],
  1509. "tags": [
  1510. "repository"
  1511. ],
  1512. "summary": "Migrate a remote git repository",
  1513. "operationId": "repoMigrate",
  1514. "parameters": [
  1515. {
  1516. "name": "body",
  1517. "in": "body",
  1518. "schema": {
  1519. "$ref": "#/definitions/MigrateRepoForm"
  1520. }
  1521. }
  1522. ],
  1523. "responses": {
  1524. "201": {
  1525. "$ref": "#/responses/Repository"
  1526. },
  1527. "403": {
  1528. "$ref": "#/responses/forbidden"
  1529. },
  1530. "422": {
  1531. "$ref": "#/responses/validationError"
  1532. }
  1533. }
  1534. }
  1535. },
  1536. "/repos/search": {
  1537. "get": {
  1538. "produces": [
  1539. "application/json"
  1540. ],
  1541. "tags": [
  1542. "repository"
  1543. ],
  1544. "summary": "Search for repositories",
  1545. "operationId": "repoSearch",
  1546. "parameters": [
  1547. {
  1548. "type": "string",
  1549. "description": "keyword",
  1550. "name": "q",
  1551. "in": "query"
  1552. },
  1553. {
  1554. "type": "boolean",
  1555. "description": "Limit search to repositories with keyword as topic",
  1556. "name": "topic",
  1557. "in": "query"
  1558. },
  1559. {
  1560. "type": "boolean",
  1561. "description": "include search of keyword within repository description",
  1562. "name": "includeDesc",
  1563. "in": "query"
  1564. },
  1565. {
  1566. "type": "integer",
  1567. "format": "int64",
  1568. "description": "search only for repos that the user with the given id owns or contributes to",
  1569. "name": "uid",
  1570. "in": "query"
  1571. },
  1572. {
  1573. "type": "integer",
  1574. "format": "int64",
  1575. "description": "repo owner to prioritize in the results",
  1576. "name": "priority_owner_id",
  1577. "in": "query"
  1578. },
  1579. {
  1580. "type": "integer",
  1581. "format": "int64",
  1582. "description": "search only for repos that the user with the given id has starred",
  1583. "name": "starredBy",
  1584. "in": "query"
  1585. },
  1586. {
  1587. "type": "boolean",
  1588. "description": "include private repositories this user has access to (defaults to true)",
  1589. "name": "private",
  1590. "in": "query"
  1591. },
  1592. {
  1593. "type": "boolean",
  1594. "description": "include template repositories this user has access to (defaults to true)",
  1595. "name": "template",
  1596. "in": "query"
  1597. },
  1598. {
  1599. "type": "string",
  1600. "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"",
  1601. "name": "mode",
  1602. "in": "query"
  1603. },
  1604. {
  1605. "type": "boolean",
  1606. "description": "if `uid` is given, search only for repos that the user owns",
  1607. "name": "exclusive",
  1608. "in": "query"
  1609. },
  1610. {
  1611. "type": "string",
  1612. "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"",
  1613. "name": "sort",
  1614. "in": "query"
  1615. },
  1616. {
  1617. "type": "string",
  1618. "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.",
  1619. "name": "order",
  1620. "in": "query"
  1621. },
  1622. {
  1623. "type": "integer",
  1624. "description": "page number of results to return (1-based)",
  1625. "name": "page",
  1626. "in": "query"
  1627. },
  1628. {
  1629. "type": "integer",
  1630. "description": "page size of results, maximum page size is 50",
  1631. "name": "limit",
  1632. "in": "query"
  1633. }
  1634. ],
  1635. "responses": {
  1636. "200": {
  1637. "$ref": "#/responses/SearchResults"
  1638. },
  1639. "422": {
  1640. "$ref": "#/responses/validationError"
  1641. }
  1642. }
  1643. }
  1644. },
  1645. "/repos/{owner}/{repo}": {
  1646. "get": {
  1647. "produces": [
  1648. "application/json"
  1649. ],
  1650. "tags": [
  1651. "repository"
  1652. ],
  1653. "summary": "Get a repository",
  1654. "operationId": "repoGet",
  1655. "parameters": [
  1656. {
  1657. "type": "string",
  1658. "description": "owner of the repo",
  1659. "name": "owner",
  1660. "in": "path",
  1661. "required": true
  1662. },
  1663. {
  1664. "type": "string",
  1665. "description": "name of the repo",
  1666. "name": "repo",
  1667. "in": "path",
  1668. "required": true
  1669. }
  1670. ],
  1671. "responses": {
  1672. "200": {
  1673. "$ref": "#/responses/Repository"
  1674. }
  1675. }
  1676. },
  1677. "delete": {
  1678. "produces": [
  1679. "application/json"
  1680. ],
  1681. "tags": [
  1682. "repository"
  1683. ],
  1684. "summary": "Delete a repository",
  1685. "operationId": "repoDelete",
  1686. "parameters": [
  1687. {
  1688. "type": "string",
  1689. "description": "owner of the repo to delete",
  1690. "name": "owner",
  1691. "in": "path",
  1692. "required": true
  1693. },
  1694. {
  1695. "type": "string",
  1696. "description": "name of the repo to delete",
  1697. "name": "repo",
  1698. "in": "path",
  1699. "required": true
  1700. }
  1701. ],
  1702. "responses": {
  1703. "204": {
  1704. "$ref": "#/responses/empty"
  1705. },
  1706. "403": {
  1707. "$ref": "#/responses/forbidden"
  1708. }
  1709. }
  1710. },
  1711. "patch": {
  1712. "produces": [
  1713. "application/json"
  1714. ],
  1715. "tags": [
  1716. "repository"
  1717. ],
  1718. "summary": "Edit a repository's properties. Only fields that are set will be changed.",
  1719. "operationId": "repoEdit",
  1720. "parameters": [
  1721. {
  1722. "type": "string",
  1723. "description": "owner of the repo to edit",
  1724. "name": "owner",
  1725. "in": "path",
  1726. "required": true
  1727. },
  1728. {
  1729. "type": "string",
  1730. "description": "name of the repo to edit",
  1731. "name": "repo",
  1732. "in": "path",
  1733. "required": true
  1734. },
  1735. {
  1736. "description": "Properties of a repo that you can edit",
  1737. "name": "body",
  1738. "in": "body",
  1739. "schema": {
  1740. "$ref": "#/definitions/EditRepoOption"
  1741. }
  1742. }
  1743. ],
  1744. "responses": {
  1745. "200": {
  1746. "$ref": "#/responses/Repository"
  1747. },
  1748. "403": {
  1749. "$ref": "#/responses/forbidden"
  1750. },
  1751. "422": {
  1752. "$ref": "#/responses/validationError"
  1753. }
  1754. }
  1755. }
  1756. },
  1757. "/repos/{owner}/{repo}/archive/{archive}": {
  1758. "get": {
  1759. "produces": [
  1760. "application/json"
  1761. ],
  1762. "tags": [
  1763. "repository"
  1764. ],
  1765. "summary": "Get an archive of a repository",
  1766. "operationId": "repoGetArchive",
  1767. "parameters": [
  1768. {
  1769. "type": "string",
  1770. "description": "owner of the repo",
  1771. "name": "owner",
  1772. "in": "path",
  1773. "required": true
  1774. },
  1775. {
  1776. "type": "string",
  1777. "description": "name of the repo",
  1778. "name": "repo",
  1779. "in": "path",
  1780. "required": true
  1781. },
  1782. {
  1783. "type": "string",
  1784. "description": "archive to download, consisting of a git reference and archive",
  1785. "name": "archive",
  1786. "in": "path",
  1787. "required": true
  1788. }
  1789. ],
  1790. "responses": {
  1791. "200": {
  1792. "description": "success"
  1793. },
  1794. "404": {
  1795. "$ref": "#/responses/notFound"
  1796. }
  1797. }
  1798. }
  1799. },
  1800. "/repos/{owner}/{repo}/branches": {
  1801. "get": {
  1802. "produces": [
  1803. "application/json"
  1804. ],
  1805. "tags": [
  1806. "repository"
  1807. ],
  1808. "summary": "List a repository's branches",
  1809. "operationId": "repoListBranches",
  1810. "parameters": [
  1811. {
  1812. "type": "string",
  1813. "description": "owner of the repo",
  1814. "name": "owner",
  1815. "in": "path",
  1816. "required": true
  1817. },
  1818. {
  1819. "type": "string",
  1820. "description": "name of the repo",
  1821. "name": "repo",
  1822. "in": "path",
  1823. "required": true
  1824. }
  1825. ],
  1826. "responses": {
  1827. "200": {
  1828. "$ref": "#/responses/BranchList"
  1829. }
  1830. }
  1831. }
  1832. },
  1833. "/repos/{owner}/{repo}/branches/{branch}": {
  1834. "get": {
  1835. "produces": [
  1836. "application/json"
  1837. ],
  1838. "tags": [
  1839. "repository"
  1840. ],
  1841. "summary": "Retrieve a specific branch from a repository, including its effective branch protection",
  1842. "operationId": "repoGetBranch",
  1843. "parameters": [
  1844. {
  1845. "type": "string",
  1846. "description": "owner of the repo",
  1847. "name": "owner",
  1848. "in": "path",
  1849. "required": true
  1850. },
  1851. {
  1852. "type": "string",
  1853. "description": "name of the repo",
  1854. "name": "repo",
  1855. "in": "path",
  1856. "required": true
  1857. },
  1858. {
  1859. "type": "string",
  1860. "description": "branch to get",
  1861. "name": "branch",
  1862. "in": "path",
  1863. "required": true
  1864. }
  1865. ],
  1866. "responses": {
  1867. "200": {
  1868. "$ref": "#/responses/Branch"
  1869. }
  1870. }
  1871. }
  1872. },
  1873. "/repos/{owner}/{repo}/collaborators": {
  1874. "get": {
  1875. "produces": [
  1876. "application/json"
  1877. ],
  1878. "tags": [
  1879. "repository"
  1880. ],
  1881. "summary": "List a repository's collaborators",
  1882. "operationId": "repoListCollaborators",
  1883. "parameters": [
  1884. {
  1885. "type": "string",
  1886. "description": "owner of the repo",
  1887. "name": "owner",
  1888. "in": "path",
  1889. "required": true
  1890. },
  1891. {
  1892. "type": "string",
  1893. "description": "name of the repo",
  1894. "name": "repo",
  1895. "in": "path",
  1896. "required": true
  1897. },
  1898. {
  1899. "type": "integer",
  1900. "description": "page number of results to return (1-based)",
  1901. "name": "page",
  1902. "in": "query"
  1903. },
  1904. {
  1905. "type": "integer",
  1906. "description": "page size of results, maximum page size is 50",
  1907. "name": "limit",
  1908. "in": "query"
  1909. }
  1910. ],
  1911. "responses": {
  1912. "200": {
  1913. "$ref": "#/responses/UserList"
  1914. }
  1915. }
  1916. }
  1917. },
  1918. "/repos/{owner}/{repo}/collaborators/{collaborator}": {
  1919. "get": {
  1920. "produces": [
  1921. "application/json"
  1922. ],
  1923. "tags": [
  1924. "repository"
  1925. ],
  1926. "summary": "Check if a user is a collaborator of a repository",
  1927. "operationId": "repoCheckCollaborator",
  1928. "parameters": [
  1929. {
  1930. "type": "string",
  1931. "description": "owner of the repo",
  1932. "name": "owner",
  1933. "in": "path",
  1934. "required": true
  1935. },
  1936. {
  1937. "type": "string",
  1938. "description": "name of the repo",
  1939. "name": "repo",
  1940. "in": "path",
  1941. "required": true
  1942. },
  1943. {
  1944. "type": "string",
  1945. "description": "username of the collaborator",
  1946. "name": "collaborator",
  1947. "in": "path",
  1948. "required": true
  1949. }
  1950. ],
  1951. "responses": {
  1952. "204": {
  1953. "$ref": "#/responses/empty"
  1954. },
  1955. "404": {
  1956. "$ref": "#/responses/notFound"
  1957. },
  1958. "422": {
  1959. "$ref": "#/responses/validationError"
  1960. }
  1961. }
  1962. },
  1963. "put": {
  1964. "produces": [
  1965. "application/json"
  1966. ],
  1967. "tags": [
  1968. "repository"
  1969. ],
  1970. "summary": "Add a collaborator to a repository",
  1971. "operationId": "repoAddCollaborator",
  1972. "parameters": [
  1973. {
  1974. "type": "string",
  1975. "description": "owner of the repo",
  1976. "name": "owner",
  1977. "in": "path",
  1978. "required": true
  1979. },
  1980. {
  1981. "type": "string",
  1982. "description": "name of the repo",
  1983. "name": "repo",
  1984. "in": "path",
  1985. "required": true
  1986. },
  1987. {
  1988. "type": "string",
  1989. "description": "username of the collaborator to add",
  1990. "name": "collaborator",
  1991. "in": "path",
  1992. "required": true
  1993. },
  1994. {
  1995. "name": "body",
  1996. "in": "body",
  1997. "schema": {
  1998. "$ref": "#/definitions/AddCollaboratorOption"
  1999. }
  2000. }
  2001. ],
  2002. "responses": {
  2003. "204": {
  2004. "$ref": "#/responses/empty"
  2005. },
  2006. "422": {
  2007. "$ref": "#/responses/validationError"
  2008. }
  2009. }
  2010. },
  2011. "delete": {
  2012. "produces": [
  2013. "application/json"
  2014. ],
  2015. "tags": [
  2016. "repository"
  2017. ],
  2018. "summary": "Delete a collaborator from a repository",
  2019. "operationId": "repoDeleteCollaborator",
  2020. "parameters": [
  2021. {
  2022. "type": "string",
  2023. "description": "owner of the repo",
  2024. "name": "owner",
  2025. "in": "path",
  2026. "required": true
  2027. },
  2028. {
  2029. "type": "string",
  2030. "description": "name of the repo",
  2031. "name": "repo",
  2032. "in": "path",
  2033. "required": true
  2034. },
  2035. {
  2036. "type": "string",
  2037. "description": "username of the collaborator to delete",
  2038. "name": "collaborator",
  2039. "in": "path",
  2040. "required": true
  2041. }
  2042. ],
  2043. "responses": {
  2044. "204": {
  2045. "$ref": "#/responses/empty"
  2046. },
  2047. "422": {
  2048. "$ref": "#/responses/validationError"
  2049. }
  2050. }
  2051. }
  2052. },
  2053. "/repos/{owner}/{repo}/commits": {
  2054. "get": {
  2055. "produces": [
  2056. "application/json"
  2057. ],
  2058. "tags": [
  2059. "repository"
  2060. ],
  2061. "summary": "Get a list of all commits from a repository",
  2062. "operationId": "repoGetAllCommits",
  2063. "parameters": [
  2064. {
  2065. "type": "string",
  2066. "description": "owner of the repo",
  2067. "name": "owner",
  2068. "in": "path",
  2069. "required": true
  2070. },
  2071. {
  2072. "type": "string",
  2073. "description": "name of the repo",
  2074. "name": "repo",
  2075. "in": "path",
  2076. "required": true
  2077. },
  2078. {
  2079. "type": "string",
  2080. "description": "SHA or branch to start listing commits from (usually 'master')",
  2081. "name": "sha",
  2082. "in": "query"
  2083. },
  2084. {
  2085. "type": "integer",
  2086. "description": "page number of results to return (1-based)",
  2087. "name": "page",
  2088. "in": "query"
  2089. },
  2090. {
  2091. "type": "integer",
  2092. "description": "page size of results, maximum page size is 50",
  2093. "name": "limit",
  2094. "in": "query"
  2095. }
  2096. ],
  2097. "responses": {
  2098. "200": {
  2099. "$ref": "#/responses/CommitList"
  2100. },
  2101. "404": {
  2102. "$ref": "#/responses/notFound"
  2103. },
  2104. "409": {
  2105. "$ref": "#/responses/EmptyRepository"
  2106. }
  2107. }
  2108. }
  2109. },
  2110. "/repos/{owner}/{repo}/commits/{ref}/statuses": {
  2111. "get": {
  2112. "produces": [
  2113. "application/json"
  2114. ],
  2115. "tags": [
  2116. "repository"
  2117. ],
  2118. "summary": "Get a commit's combined status, by branch/tag/commit reference",
  2119. "operationId": "repoGetCombinedStatusByRef",
  2120. "parameters": [
  2121. {
  2122. "type": "string",
  2123. "description": "owner of the repo",
  2124. "name": "owner",
  2125. "in": "path",
  2126. "required": true
  2127. },
  2128. {
  2129. "type": "string",
  2130. "description": "name of the repo",
  2131. "name": "repo",
  2132. "in": "path",
  2133. "required": true
  2134. },
  2135. {
  2136. "type": "string",
  2137. "description": "name of branch/tag/commit",
  2138. "name": "ref",
  2139. "in": "path",
  2140. "required": true
  2141. },
  2142. {
  2143. "type": "integer",
  2144. "description": "page number of results",
  2145. "name": "page",
  2146. "in": "query"
  2147. }
  2148. ],
  2149. "responses": {
  2150. "200": {
  2151. "$ref": "#/responses/Status"
  2152. },
  2153. "400": {
  2154. "$ref": "#/responses/error"
  2155. }
  2156. }
  2157. }
  2158. },
  2159. "/repos/{owner}/{repo}/contents": {
  2160. "get": {
  2161. "produces": [
  2162. "application/json"
  2163. ],
  2164. "tags": [
  2165. "repository"
  2166. ],
  2167. "summary": "Gets the metadata of all the entries of the root dir",
  2168. "operationId": "repoGetContentsList",
  2169. "parameters": [
  2170. {
  2171. "type": "string",
  2172. "description": "owner of the repo",
  2173. "name": "owner",
  2174. "in": "path",
  2175. "required": true
  2176. },
  2177. {
  2178. "type": "string",
  2179. "description": "name of the repo",
  2180. "name": "repo",
  2181. "in": "path",
  2182. "required": true
  2183. },
  2184. {
  2185. "type": "string",
  2186. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  2187. "name": "ref",
  2188. "in": "query"
  2189. }
  2190. ],
  2191. "responses": {
  2192. "200": {
  2193. "$ref": "#/responses/ContentsListResponse"
  2194. }
  2195. }
  2196. }
  2197. },
  2198. "/repos/{owner}/{repo}/contents/{filepath}": {
  2199. "get": {
  2200. "produces": [
  2201. "application/json"
  2202. ],
  2203. "tags": [
  2204. "repository"
  2205. ],
  2206. "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir",
  2207. "operationId": "repoGetContents",
  2208. "parameters": [
  2209. {
  2210. "type": "string",
  2211. "description": "owner of the repo",
  2212. "name": "owner",
  2213. "in": "path",
  2214. "required": true
  2215. },
  2216. {
  2217. "type": "string",
  2218. "description": "name of the repo",
  2219. "name": "repo",
  2220. "in": "path",
  2221. "required": true
  2222. },
  2223. {
  2224. "type": "string",
  2225. "description": "path of the dir, file, symlink or submodule in the repo",
  2226. "name": "filepath",
  2227. "in": "path",
  2228. "required": true
  2229. },
  2230. {
  2231. "type": "string",
  2232. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  2233. "name": "ref",
  2234. "in": "query"
  2235. }
  2236. ],
  2237. "responses": {
  2238. "200": {
  2239. "$ref": "#/responses/ContentsResponse"
  2240. }
  2241. }
  2242. },
  2243. "put": {
  2244. "consumes": [
  2245. "application/json"
  2246. ],
  2247. "produces": [
  2248. "application/json"
  2249. ],
  2250. "tags": [
  2251. "repository"
  2252. ],
  2253. "summary": "Update a file in a repository",
  2254. "operationId": "repoUpdateFile",
  2255. "parameters": [
  2256. {
  2257. "type": "string",
  2258. "description": "owner of the repo",
  2259. "name": "owner",
  2260. "in": "path",
  2261. "required": true
  2262. },
  2263. {
  2264. "type": "string",
  2265. "description": "name of the repo",
  2266. "name": "repo",
  2267. "in": "path",
  2268. "required": true
  2269. },
  2270. {
  2271. "type": "string",
  2272. "description": "path of the file to update",
  2273. "name": "filepath",
  2274. "in": "path",
  2275. "required": true
  2276. },
  2277. {
  2278. "name": "body",
  2279. "in": "body",
  2280. "required": true,
  2281. "schema": {
  2282. "$ref": "#/definitions/UpdateFileOptions"
  2283. }
  2284. }
  2285. ],
  2286. "responses": {
  2287. "200": {
  2288. "$ref": "#/responses/FileResponse"
  2289. }
  2290. }
  2291. },
  2292. "post": {
  2293. "consumes": [
  2294. "application/json"
  2295. ],
  2296. "produces": [
  2297. "application/json"
  2298. ],
  2299. "tags": [
  2300. "repository"
  2301. ],
  2302. "summary": "Create a file in a repository",
  2303. "operationId": "repoCreateFile",
  2304. "parameters": [
  2305. {
  2306. "type": "string",
  2307. "description": "owner of the repo",
  2308. "name": "owner",
  2309. "in": "path",
  2310. "required": true
  2311. },
  2312. {
  2313. "type": "string",
  2314. "description": "name of the repo",
  2315. "name": "repo",
  2316. "in": "path",
  2317. "required": true
  2318. },
  2319. {
  2320. "type": "string",
  2321. "description": "path of the file to create",
  2322. "name": "filepath",
  2323. "in": "path",
  2324. "required": true
  2325. },
  2326. {
  2327. "name": "body",
  2328. "in": "body",
  2329. "required": true,
  2330. "schema": {
  2331. "$ref": "#/definitions/CreateFileOptions"
  2332. }
  2333. }
  2334. ],
  2335. "responses": {
  2336. "201": {
  2337. "$ref": "#/responses/FileResponse"
  2338. }
  2339. }
  2340. },
  2341. "delete": {
  2342. "consumes": [
  2343. "application/json"
  2344. ],
  2345. "produces": [
  2346. "application/json"
  2347. ],
  2348. "tags": [
  2349. "repository"
  2350. ],
  2351. "summary": "Delete a file in a repository",
  2352. "operationId": "repoDeleteFile",
  2353. "parameters": [
  2354. {
  2355. "type": "string",
  2356. "description": "owner of the repo",
  2357. "name": "owner",
  2358. "in": "path",
  2359. "required": true
  2360. },
  2361. {
  2362. "type": "string",
  2363. "description": "name of the repo",
  2364. "name": "repo",
  2365. "in": "path",
  2366. "required": true
  2367. },
  2368. {
  2369. "type": "string",
  2370. "description": "path of the file to delete",
  2371. "name": "filepath",
  2372. "in": "path",
  2373. "required": true
  2374. },
  2375. {
  2376. "name": "body",
  2377. "in": "body",
  2378. "required": true,
  2379. "schema": {
  2380. "$ref": "#/definitions/DeleteFileOptions"
  2381. }
  2382. }
  2383. ],
  2384. "responses": {
  2385. "200": {
  2386. "$ref": "#/responses/FileDeleteResponse"
  2387. }
  2388. }
  2389. }
  2390. },
  2391. "/repos/{owner}/{repo}/editorconfig/{filepath}": {
  2392. "get": {
  2393. "produces": [
  2394. "application/json"
  2395. ],
  2396. "tags": [
  2397. "repository"
  2398. ],
  2399. "summary": "Get the EditorConfig definitions of a file in a repository",
  2400. "operationId": "repoGetEditorConfig",
  2401. "parameters": [
  2402. {
  2403. "type": "string",
  2404. "description": "owner of the repo",
  2405. "name": "owner",
  2406. "in": "path",
  2407. "required": true
  2408. },
  2409. {
  2410. "type": "string",
  2411. "description": "name of the repo",
  2412. "name": "repo",
  2413. "in": "path",
  2414. "required": true
  2415. },
  2416. {
  2417. "type": "string",
  2418. "description": "filepath of file to get",
  2419. "name": "filepath",
  2420. "in": "path",
  2421. "required": true
  2422. }
  2423. ],
  2424. "responses": {
  2425. "200": {
  2426. "description": "success"
  2427. },
  2428. "404": {
  2429. "$ref": "#/responses/notFound"
  2430. }
  2431. }
  2432. }
  2433. },
  2434. "/repos/{owner}/{repo}/forks": {
  2435. "get": {
  2436. "produces": [
  2437. "application/json"
  2438. ],
  2439. "tags": [
  2440. "repository"
  2441. ],
  2442. "summary": "List a repository's forks",
  2443. "operationId": "listForks",
  2444. "parameters": [
  2445. {
  2446. "type": "string",
  2447. "description": "owner of the repo",
  2448. "name": "owner",
  2449. "in": "path",
  2450. "required": true
  2451. },
  2452. {
  2453. "type": "string",
  2454. "description": "name of the repo",
  2455. "name": "repo",
  2456. "in": "path",
  2457. "required": true
  2458. },
  2459. {
  2460. "type": "integer",
  2461. "description": "page number of results to return (1-based)",
  2462. "name": "page",
  2463. "in": "query"
  2464. },
  2465. {
  2466. "type": "integer",
  2467. "description": "page size of results, maximum page size is 50",
  2468. "name": "limit",
  2469. "in": "query"
  2470. }
  2471. ],
  2472. "responses": {
  2473. "200": {
  2474. "$ref": "#/responses/RepositoryList"
  2475. }
  2476. }
  2477. },
  2478. "post": {
  2479. "produces": [
  2480. "application/json"
  2481. ],
  2482. "tags": [
  2483. "repository"
  2484. ],
  2485. "summary": "Fork a repository",
  2486. "operationId": "createFork",
  2487. "parameters": [
  2488. {
  2489. "type": "string",
  2490. "description": "owner of the repo to fork",
  2491. "name": "owner",
  2492. "in": "path",
  2493. "required": true
  2494. },
  2495. {
  2496. "type": "string",
  2497. "description": "name of the repo to fork",
  2498. "name": "repo",
  2499. "in": "path",
  2500. "required": true
  2501. },
  2502. {
  2503. "name": "body",
  2504. "in": "body",
  2505. "schema": {
  2506. "$ref": "#/definitions/CreateForkOption"
  2507. }
  2508. }
  2509. ],
  2510. "responses": {
  2511. "202": {
  2512. "$ref": "#/responses/Repository"
  2513. },
  2514. "403": {
  2515. "$ref": "#/responses/forbidden"
  2516. },
  2517. "422": {
  2518. "$ref": "#/responses/validationError"
  2519. }
  2520. }
  2521. }
  2522. },
  2523. "/repos/{owner}/{repo}/git/blobs/{sha}": {
  2524. "get": {
  2525. "produces": [
  2526. "application/json"
  2527. ],
  2528. "tags": [
  2529. "repository"
  2530. ],
  2531. "summary": "Gets the blob of a repository.",
  2532. "operationId": "GetBlob",
  2533. "parameters": [
  2534. {
  2535. "type": "string",
  2536. "description": "owner of the repo",
  2537. "name": "owner",
  2538. "in": "path",
  2539. "required": true
  2540. },
  2541. {
  2542. "type": "string",
  2543. "description": "name of the repo",
  2544. "name": "repo",
  2545. "in": "path",
  2546. "required": true
  2547. },
  2548. {
  2549. "type": "string",
  2550. "description": "sha of the commit",
  2551. "name": "sha",
  2552. "in": "path",
  2553. "required": true
  2554. }
  2555. ],
  2556. "responses": {
  2557. "200": {
  2558. "$ref": "#/responses/GitBlobResponse"
  2559. },
  2560. "400": {
  2561. "$ref": "#/responses/error"
  2562. }
  2563. }
  2564. }
  2565. },
  2566. "/repos/{owner}/{repo}/git/commits/{sha}": {
  2567. "get": {
  2568. "produces": [
  2569. "application/json"
  2570. ],
  2571. "tags": [
  2572. "repository"
  2573. ],
  2574. "summary": "Get a single commit from a repository",
  2575. "operationId": "repoGetSingleCommit",
  2576. "parameters": [
  2577. {
  2578. "type": "string",
  2579. "description": "owner of the repo",
  2580. "name": "owner",
  2581. "in": "path",
  2582. "required": true
  2583. },
  2584. {
  2585. "type": "string",
  2586. "description": "name of the repo",
  2587. "name": "repo",
  2588. "in": "path",
  2589. "required": true
  2590. },
  2591. {
  2592. "type": "string",
  2593. "description": "the commit hash",
  2594. "name": "sha",
  2595. "in": "path",
  2596. "required": true
  2597. }
  2598. ],
  2599. "responses": {
  2600. "200": {
  2601. "$ref": "#/responses/Commit"
  2602. },
  2603. "404": {
  2604. "$ref": "#/responses/notFound"
  2605. }
  2606. }
  2607. }
  2608. },
  2609. "/repos/{owner}/{repo}/git/refs": {
  2610. "get": {
  2611. "produces": [
  2612. "application/json"
  2613. ],
  2614. "tags": [
  2615. "repository"
  2616. ],
  2617. "summary": "Get specified ref or filtered repository's refs",
  2618. "operationId": "repoListAllGitRefs",
  2619. "parameters": [
  2620. {
  2621. "type": "string",
  2622. "description": "owner of the repo",
  2623. "name": "owner",
  2624. "in": "path",
  2625. "required": true
  2626. },
  2627. {
  2628. "type": "string",
  2629. "description": "name of the repo",
  2630. "name": "repo",
  2631. "in": "path",
  2632. "required": true
  2633. }
  2634. ],
  2635. "responses": {
  2636. "200": {
  2637. "$ref": "#/responses/ReferenceList"
  2638. },
  2639. "404": {
  2640. "$ref": "#/responses/notFound"
  2641. }
  2642. }
  2643. }
  2644. },
  2645. "/repos/{owner}/{repo}/git/refs/{ref}": {
  2646. "get": {
  2647. "produces": [
  2648. "application/json"
  2649. ],
  2650. "tags": [
  2651. "repository"
  2652. ],
  2653. "summary": "Get specified ref or filtered repository's refs",
  2654. "operationId": "repoListGitRefs",
  2655. "parameters": [
  2656. {
  2657. "type": "string",
  2658. "description": "owner of the repo",
  2659. "name": "owner",
  2660. "in": "path",
  2661. "required": true
  2662. },
  2663. {
  2664. "type": "string",
  2665. "description": "name of the repo",
  2666. "name": "repo",
  2667. "in": "path",
  2668. "required": true
  2669. },
  2670. {
  2671. "type": "string",
  2672. "description": "part or full name of the ref",
  2673. "name": "ref",
  2674. "in": "path",
  2675. "required": true
  2676. }
  2677. ],
  2678. "responses": {
  2679. "200": {
  2680. "$ref": "#/responses/ReferenceList"
  2681. },
  2682. "404": {
  2683. "$ref": "#/responses/notFound"
  2684. }
  2685. }
  2686. }
  2687. },
  2688. "/repos/{owner}/{repo}/git/tags/{sha}": {
  2689. "get": {
  2690. "produces": [
  2691. "application/json"
  2692. ],
  2693. "tags": [
  2694. "repository"
  2695. ],
  2696. "summary": "Gets the tag object of an annotated tag (not lightweight tags)",
  2697. "operationId": "GetTag",
  2698. "parameters": [
  2699. {
  2700. "type": "string",
  2701. "description": "owner of the repo",
  2702. "name": "owner",
  2703. "in": "path",
  2704. "required": true
  2705. },
  2706. {
  2707. "type": "string",
  2708. "description": "name of the repo",
  2709. "name": "repo",
  2710. "in": "path",
  2711. "required": true
  2712. },
  2713. {
  2714. "type": "string",
  2715. "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.",
  2716. "name": "sha",
  2717. "in": "path",
  2718. "required": true
  2719. }
  2720. ],
  2721. "responses": {
  2722. "200": {
  2723. "$ref": "#/responses/AnnotatedTag"
  2724. },
  2725. "400": {
  2726. "$ref": "#/responses/error"
  2727. }
  2728. }
  2729. }
  2730. },
  2731. "/repos/{owner}/{repo}/git/trees/{sha}": {
  2732. "get": {
  2733. "produces": [
  2734. "application/json"
  2735. ],
  2736. "tags": [
  2737. "repository"
  2738. ],
  2739. "summary": "Gets the tree of a repository.",
  2740. "operationId": "GetTree",
  2741. "parameters": [
  2742. {
  2743. "type": "string",
  2744. "description": "owner of the repo",
  2745. "name": "owner",
  2746. "in": "path",
  2747. "required": true
  2748. },
  2749. {
  2750. "type": "string",
  2751. "description": "name of the repo",
  2752. "name": "repo",
  2753. "in": "path",
  2754. "required": true
  2755. },
  2756. {
  2757. "type": "string",
  2758. "description": "sha of the commit",
  2759. "name": "sha",
  2760. "in": "path",
  2761. "required": true
  2762. },
  2763. {
  2764. "type": "boolean",
  2765. "description": "show all directories and files",
  2766. "name": "recursive",
  2767. "in": "query"
  2768. },
  2769. {
  2770. "type": "integer",
  2771. "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",
  2772. "name": "page",
  2773. "in": "query"
  2774. },
  2775. {
  2776. "type": "integer",
  2777. "description": "number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE",
  2778. "name": "per_page",
  2779. "in": "query"
  2780. }
  2781. ],
  2782. "responses": {
  2783. "200": {
  2784. "$ref": "#/responses/GitTreeResponse"
  2785. },
  2786. "400": {
  2787. "$ref": "#/responses/error"
  2788. }
  2789. }
  2790. }
  2791. },
  2792. "/repos/{owner}/{repo}/hooks": {
  2793. "get": {
  2794. "produces": [
  2795. "application/json"
  2796. ],
  2797. "tags": [
  2798. "repository"
  2799. ],
  2800. "summary": "List the hooks in a repository",
  2801. "operationId": "repoListHooks",
  2802. "parameters": [
  2803. {
  2804. "type": "string",
  2805. "description": "owner of the repo",
  2806. "name": "owner",
  2807. "in": "path",
  2808. "required": true
  2809. },
  2810. {
  2811. "type": "string",
  2812. "description": "name of the repo",
  2813. "name": "repo",
  2814. "in": "path",
  2815. "required": true
  2816. },
  2817. {
  2818. "type": "integer",
  2819. "description": "page number of results to return (1-based)",
  2820. "name": "page",
  2821. "in": "query"
  2822. },
  2823. {
  2824. "type": "integer",
  2825. "description": "page size of results, maximum page size is 50",
  2826. "name": "limit",
  2827. "in": "query"
  2828. }
  2829. ],
  2830. "responses": {
  2831. "200": {
  2832. "$ref": "#/responses/HookList"
  2833. }
  2834. }
  2835. },
  2836. "post": {
  2837. "consumes": [
  2838. "application/json"
  2839. ],
  2840. "produces": [
  2841. "application/json"
  2842. ],
  2843. "tags": [
  2844. "repository"
  2845. ],
  2846. "summary": "Create a hook",
  2847. "operationId": "repoCreateHook",
  2848. "parameters": [
  2849. {
  2850. "type": "string",
  2851. "description": "owner of the repo",
  2852. "name": "owner",
  2853. "in": "path",
  2854. "required": true
  2855. },
  2856. {
  2857. "type": "string",
  2858. "description": "name of the repo",
  2859. "name": "repo",
  2860. "in": "path",
  2861. "required": true
  2862. },
  2863. {
  2864. "name": "body",
  2865. "in": "body",
  2866. "schema": {
  2867. "$ref": "#/definitions/CreateHookOption"
  2868. }
  2869. }
  2870. ],
  2871. "responses": {
  2872. "201": {
  2873. "$ref": "#/responses/Hook"
  2874. }
  2875. }
  2876. }
  2877. },
  2878. "/repos/{owner}/{repo}/hooks/git": {
  2879. "get": {
  2880. "produces": [
  2881. "application/json"
  2882. ],
  2883. "tags": [
  2884. "repository"
  2885. ],
  2886. "summary": "List the Git hooks in a repository",
  2887. "operationId": "repoListGitHooks",
  2888. "parameters": [
  2889. {
  2890. "type": "string",
  2891. "description": "owner of the repo",
  2892. "name": "owner",
  2893. "in": "path",
  2894. "required": true
  2895. },
  2896. {
  2897. "type": "string",
  2898. "description": "name of the repo",
  2899. "name": "repo",
  2900. "in": "path",
  2901. "required": true
  2902. }
  2903. ],
  2904. "responses": {
  2905. "200": {
  2906. "$ref": "#/responses/GitHookList"
  2907. }
  2908. }
  2909. }
  2910. },
  2911. "/repos/{owner}/{repo}/hooks/git/{id}": {
  2912. "get": {
  2913. "produces": [
  2914. "application/json"
  2915. ],
  2916. "tags": [
  2917. "repository"
  2918. ],
  2919. "summary": "Get a Git hook",
  2920. "operationId": "repoGetGitHook",
  2921. "parameters": [
  2922. {
  2923. "type": "string",
  2924. "description": "owner of the repo",
  2925. "name": "owner",
  2926. "in": "path",
  2927. "required": true
  2928. },
  2929. {
  2930. "type": "string",
  2931. "description": "name of the repo",
  2932. "name": "repo",
  2933. "in": "path",
  2934. "required": true
  2935. },
  2936. {
  2937. "type": "string",
  2938. "description": "id of the hook to get",
  2939. "name": "id",
  2940. "in": "path",
  2941. "required": true
  2942. }
  2943. ],
  2944. "responses": {
  2945. "200": {
  2946. "$ref": "#/responses/GitHook"
  2947. },
  2948. "404": {
  2949. "$ref": "#/responses/notFound"
  2950. }
  2951. }
  2952. },
  2953. "delete": {
  2954. "produces": [
  2955. "application/json"
  2956. ],
  2957. "tags": [
  2958. "repository"
  2959. ],
  2960. "summary": "Delete a Git hook in a repository",
  2961. "operationId": "repoDeleteGitHook",
  2962. "parameters": [
  2963. {
  2964. "type": "string",
  2965. "description": "owner of the repo",
  2966. "name": "owner",
  2967. "in": "path",
  2968. "required": true
  2969. },
  2970. {
  2971. "type": "string",
  2972. "description": "name of the repo",
  2973. "name": "repo",
  2974. "in": "path",
  2975. "required": true
  2976. },
  2977. {
  2978. "type": "string",
  2979. "description": "id of the hook to get",
  2980. "name": "id",
  2981. "in": "path",
  2982. "required": true
  2983. }
  2984. ],
  2985. "responses": {
  2986. "204": {
  2987. "$ref": "#/responses/empty"
  2988. },
  2989. "404": {
  2990. "$ref": "#/responses/notFound"
  2991. }
  2992. }
  2993. },
  2994. "patch": {
  2995. "produces": [
  2996. "application/json"
  2997. ],
  2998. "tags": [
  2999. "repository"
  3000. ],
  3001. "summary": "Edit a Git hook in a repository",
  3002. "operationId": "repoEditGitHook",
  3003. "parameters": [
  3004. {
  3005. "type": "string",
  3006. "description": "owner of the repo",
  3007. "name": "owner",
  3008. "in": "path",
  3009. "required": true
  3010. },
  3011. {
  3012. "type": "string",
  3013. "description": "name of the repo",
  3014. "name": "repo",
  3015. "in": "path",
  3016. "required": true
  3017. },
  3018. {
  3019. "type": "string",
  3020. "description": "id of the hook to get",
  3021. "name": "id",
  3022. "in": "path",
  3023. "required": true
  3024. },
  3025. {
  3026. "name": "body",
  3027. "in": "body",
  3028. "schema": {
  3029. "$ref": "#/definitions/EditGitHookOption"
  3030. }
  3031. }
  3032. ],
  3033. "responses": {
  3034. "200": {
  3035. "$ref": "#/responses/GitHook"
  3036. },
  3037. "404": {
  3038. "$ref": "#/responses/notFound"
  3039. }
  3040. }
  3041. }
  3042. },
  3043. "/repos/{owner}/{repo}/hooks/{id}": {
  3044. "get": {
  3045. "produces": [
  3046. "application/json"
  3047. ],
  3048. "tags": [
  3049. "repository"
  3050. ],
  3051. "summary": "Get a hook",
  3052. "operationId": "repoGetHook",
  3053. "parameters": [
  3054. {
  3055. "type": "string",
  3056. "description": "owner of the repo",
  3057. "name": "owner",
  3058. "in": "path",
  3059. "required": true
  3060. },
  3061. {
  3062. "type": "string",
  3063. "description": "name of the repo",
  3064. "name": "repo",
  3065. "in": "path",
  3066. "required": true
  3067. },
  3068. {
  3069. "type": "integer",
  3070. "format": "int64",
  3071. "description": "id of the hook to get",
  3072. "name": "id",
  3073. "in": "path",
  3074. "required": true
  3075. }
  3076. ],
  3077. "responses": {
  3078. "200": {
  3079. "$ref": "#/responses/Hook"
  3080. },
  3081. "404": {
  3082. "$ref": "#/responses/notFound"
  3083. }
  3084. }
  3085. },
  3086. "delete": {
  3087. "produces": [
  3088. "application/json"
  3089. ],
  3090. "tags": [
  3091. "repository"
  3092. ],
  3093. "summary": "Delete a hook in a repository",
  3094. "operationId": "repoDeleteHook",
  3095. "parameters": [
  3096. {
  3097. "type": "string",
  3098. "description": "owner of the repo",
  3099. "name": "owner",
  3100. "in": "path",
  3101. "required": true
  3102. },
  3103. {
  3104. "type": "string",
  3105. "description": "name of the repo",
  3106. "name": "repo",
  3107. "in": "path",
  3108. "required": true
  3109. },
  3110. {
  3111. "type": "integer",
  3112. "format": "int64",
  3113. "description": "id of the hook to delete",
  3114. "name": "id",
  3115. "in": "path",
  3116. "required": true
  3117. }
  3118. ],
  3119. "responses": {
  3120. "204": {
  3121. "$ref": "#/responses/empty"
  3122. },
  3123. "404": {
  3124. "$ref": "#/responses/notFound"
  3125. }
  3126. }
  3127. },
  3128. "patch": {
  3129. "produces": [
  3130. "application/json"
  3131. ],
  3132. "tags": [
  3133. "repository"
  3134. ],
  3135. "summary": "Edit a hook in a repository",
  3136. "operationId": "repoEditHook",
  3137. "parameters": [
  3138. {
  3139. "type": "string",
  3140. "description": "owner of the repo",
  3141. "name": "owner",
  3142. "in": "path",
  3143. "required": true
  3144. },
  3145. {
  3146. "type": "string",
  3147. "description": "name of the repo",
  3148. "name": "repo",
  3149. "in": "path",
  3150. "required": true
  3151. },
  3152. {
  3153. "type": "integer",
  3154. "format": "int64",
  3155. "description": "index of the hook",
  3156. "name": "id",
  3157. "in": "path",
  3158. "required": true
  3159. },
  3160. {
  3161. "name": "body",
  3162. "in": "body",
  3163. "schema": {
  3164. "$ref": "#/definitions/EditHookOption"
  3165. }
  3166. }
  3167. ],
  3168. "responses": {
  3169. "200": {
  3170. "$ref": "#/responses/Hook"
  3171. }
  3172. }
  3173. }
  3174. },
  3175. "/repos/{owner}/{repo}/hooks/{id}/tests": {
  3176. "post": {
  3177. "produces": [
  3178. "application/json"
  3179. ],
  3180. "tags": [
  3181. "repository"
  3182. ],
  3183. "summary": "Test a push webhook",
  3184. "operationId": "repoTestHook",
  3185. "parameters": [
  3186. {
  3187. "type": "string",
  3188. "description": "owner of the repo",
  3189. "name": "owner",
  3190. "in": "path",
  3191. "required": true
  3192. },
  3193. {
  3194. "type": "string",
  3195. "description": "name of the repo",
  3196. "name": "repo",
  3197. "in": "path",
  3198. "required": true
  3199. },
  3200. {
  3201. "type": "integer",
  3202. "format": "int64",
  3203. "description": "id of the hook to test",
  3204. "name": "id",
  3205. "in": "path",
  3206. "required": true
  3207. }
  3208. ],
  3209. "responses": {
  3210. "204": {
  3211. "$ref": "#/responses/empty"
  3212. }
  3213. }
  3214. }
  3215. },
  3216. "/repos/{owner}/{repo}/issues": {
  3217. "get": {
  3218. "produces": [
  3219. "application/json"
  3220. ],
  3221. "tags": [
  3222. "issue"
  3223. ],
  3224. "summary": "List a repository's issues",
  3225. "operationId": "issueListIssues",
  3226. "parameters": [
  3227. {
  3228. "type": "string",
  3229. "description": "owner of the repo",
  3230. "name": "owner",
  3231. "in": "path",
  3232. "required": true
  3233. },
  3234. {
  3235. "type": "string",
  3236. "description": "name of the repo",
  3237. "name": "repo",
  3238. "in": "path",
  3239. "required": true
  3240. },
  3241. {
  3242. "type": "string",
  3243. "description": "whether issue is open or closed",
  3244. "name": "state",
  3245. "in": "query"
  3246. },
  3247. {
  3248. "type": "string",
  3249. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  3250. "name": "labels",
  3251. "in": "query"
  3252. },
  3253. {
  3254. "type": "string",
  3255. "description": "search string",
  3256. "name": "q",
  3257. "in": "query"
  3258. },
  3259. {
  3260. "type": "string",
  3261. "description": "filter by type (issues / pulls) if set",
  3262. "name": "type",
  3263. "in": "query"
  3264. },
  3265. {
  3266. "type": "integer",
  3267. "description": "page number of results to return (1-based)",
  3268. "name": "page",
  3269. "in": "query"
  3270. },
  3271. {
  3272. "type": "integer",
  3273. "description": "page size of results, maximum page size is 50",
  3274. "name": "limit",
  3275. "in": "query"
  3276. }
  3277. ],
  3278. "responses": {
  3279. "200": {
  3280. "$ref": "#/responses/IssueList"
  3281. }
  3282. }
  3283. },
  3284. "post": {
  3285. "consumes": [
  3286. "application/json"
  3287. ],
  3288. "produces": [
  3289. "application/json"
  3290. ],
  3291. "tags": [
  3292. "issue"
  3293. ],
  3294. "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  3295. "operationId": "issueCreateIssue",
  3296. "parameters": [
  3297. {
  3298. "type": "string",
  3299. "description": "owner of the repo",
  3300. "name": "owner",
  3301. "in": "path",
  3302. "required": true
  3303. },
  3304. {
  3305. "type": "string",
  3306. "description": "name of the repo",
  3307. "name": "repo",
  3308. "in": "path",
  3309. "required": true
  3310. },
  3311. {
  3312. "name": "body",
  3313. "in": "body",
  3314. "schema": {
  3315. "$ref": "#/definitions/CreateIssueOption"
  3316. }
  3317. }
  3318. ],
  3319. "responses": {
  3320. "201": {
  3321. "$ref": "#/responses/Issue"
  3322. },
  3323. "403": {
  3324. "$ref": "#/responses/forbidden"
  3325. },
  3326. "412": {
  3327. "$ref": "#/responses/error"
  3328. },
  3329. "422": {
  3330. "$ref": "#/responses/validationError"
  3331. }
  3332. }
  3333. }
  3334. },
  3335. "/repos/{owner}/{repo}/issues/comments": {
  3336. "get": {
  3337. "produces": [
  3338. "application/json"
  3339. ],
  3340. "tags": [
  3341. "issue"
  3342. ],
  3343. "summary": "List all comments in a repository",
  3344. "operationId": "issueGetRepoComments",
  3345. "parameters": [
  3346. {
  3347. "type": "string",
  3348. "description": "owner of the repo",
  3349. "name": "owner",
  3350. "in": "path",
  3351. "required": true
  3352. },
  3353. {
  3354. "type": "string",
  3355. "description": "name of the repo",
  3356. "name": "repo",
  3357. "in": "path",
  3358. "required": true
  3359. },
  3360. {
  3361. "type": "string",
  3362. "format": "date-time",
  3363. "description": "if provided, only comments updated since the provided time are returned.",
  3364. "name": "since",
  3365. "in": "query"
  3366. },
  3367. {
  3368. "type": "string",
  3369. "format": "date-time",
  3370. "description": "if provided, only comments updated before the provided time are returned.",
  3371. "name": "before",
  3372. "in": "query"
  3373. },
  3374. {
  3375. "type": "integer",
  3376. "description": "page number of results to return (1-based)",
  3377. "name": "page",
  3378. "in": "query"
  3379. },
  3380. {
  3381. "type": "integer",
  3382. "description": "page size of results, maximum page size is 50",
  3383. "name": "limit",
  3384. "in": "query"
  3385. }
  3386. ],
  3387. "responses": {
  3388. "200": {
  3389. "$ref": "#/responses/CommentList"
  3390. }
  3391. }
  3392. }
  3393. },
  3394. "/repos/{owner}/{repo}/issues/comments/{id}": {
  3395. "get": {
  3396. "consumes": [
  3397. "application/json"
  3398. ],
  3399. "produces": [
  3400. "application/json"
  3401. ],
  3402. "tags": [
  3403. "issue"
  3404. ],
  3405. "summary": "Get a comment",
  3406. "operationId": "issueGetComment",
  3407. "parameters": [
  3408. {
  3409. "type": "string",
  3410. "description": "owner of the repo",
  3411. "name": "owner",
  3412. "in": "path",
  3413. "required": true
  3414. },
  3415. {
  3416. "type": "string",
  3417. "description": "name of the repo",
  3418. "name": "repo",
  3419. "in": "path",
  3420. "required": true
  3421. },
  3422. {
  3423. "type": "integer",
  3424. "format": "int64",
  3425. "description": "id of the comment",
  3426. "name": "id",
  3427. "in": "path",
  3428. "required": true
  3429. }
  3430. ],
  3431. "responses": {
  3432. "200": {
  3433. "$ref": "#/responses/Comment"
  3434. },
  3435. "204": {
  3436. "$ref": "#/responses/empty"
  3437. },
  3438. "403": {
  3439. "$ref": "#/responses/forbidden"
  3440. },
  3441. "404": {
  3442. "$ref": "#/responses/notFound"
  3443. }
  3444. }
  3445. },
  3446. "delete": {
  3447. "tags": [
  3448. "issue"
  3449. ],
  3450. "summary": "Delete a comment",
  3451. "operationId": "issueDeleteComment",
  3452. "parameters": [
  3453. {
  3454. "type": "string",
  3455. "description": "owner of the repo",
  3456. "name": "owner",
  3457. "in": "path",
  3458. "required": true
  3459. },
  3460. {
  3461. "type": "string",
  3462. "description": "name of the repo",
  3463. "name": "repo",
  3464. "in": "path",
  3465. "required": true
  3466. },
  3467. {
  3468. "type": "integer",
  3469. "format": "int64",
  3470. "description": "id of comment to delete",
  3471. "name": "id",
  3472. "in": "path",
  3473. "required": true
  3474. }
  3475. ],
  3476. "responses": {
  3477. "204": {
  3478. "$ref": "#/responses/empty"
  3479. },
  3480. "403": {
  3481. "$ref": "#/responses/forbidden"
  3482. },
  3483. "404": {
  3484. "$ref": "#/responses/notFound"
  3485. }
  3486. }
  3487. },
  3488. "patch": {
  3489. "consumes": [
  3490. "application/json"
  3491. ],
  3492. "produces": [
  3493. "application/json"
  3494. ],
  3495. "tags": [
  3496. "issue"
  3497. ],
  3498. "summary": "Edit a comment",
  3499. "operationId": "issueEditComment",
  3500. "parameters": [
  3501. {
  3502. "type": "string",
  3503. "description": "owner of the repo",
  3504. "name": "owner",
  3505. "in": "path",
  3506. "required": true
  3507. },
  3508. {
  3509. "type": "string",
  3510. "description": "name of the repo",
  3511. "name": "repo",
  3512. "in": "path",
  3513. "required": true
  3514. },
  3515. {
  3516. "type": "integer",
  3517. "format": "int64",
  3518. "description": "id of the comment to edit",
  3519. "name": "id",
  3520. "in": "path",
  3521. "required": true
  3522. },
  3523. {
  3524. "name": "body",
  3525. "in": "body",
  3526. "schema": {
  3527. "$ref": "#/definitions/EditIssueCommentOption"
  3528. }
  3529. }
  3530. ],
  3531. "responses": {
  3532. "200": {
  3533. "$ref": "#/responses/Comment"
  3534. },
  3535. "204": {
  3536. "$ref": "#/responses/empty"
  3537. },
  3538. "403": {
  3539. "$ref": "#/responses/forbidden"
  3540. },
  3541. "404": {
  3542. "$ref": "#/responses/notFound"
  3543. }
  3544. }
  3545. }
  3546. },
  3547. "/repos/{owner}/{repo}/issues/comments/{id}/reactions": {
  3548. "get": {
  3549. "consumes": [
  3550. "application/json"
  3551. ],
  3552. "produces": [
  3553. "application/json"
  3554. ],
  3555. "tags": [
  3556. "issue"
  3557. ],
  3558. "summary": "Get a list of reactions from a comment of an issue",
  3559. "operationId": "issueGetCommentReactions",
  3560. "parameters": [
  3561. {
  3562. "type": "string",
  3563. "description": "owner of the repo",
  3564. "name": "owner",
  3565. "in": "path",
  3566. "required": true
  3567. },
  3568. {
  3569. "type": "string",
  3570. "description": "name of the repo",
  3571. "name": "repo",
  3572. "in": "path",
  3573. "required": true
  3574. },
  3575. {
  3576. "type": "integer",
  3577. "format": "int64",
  3578. "description": "id of the comment to edit",
  3579. "name": "id",
  3580. "in": "path",
  3581. "required": true
  3582. }
  3583. ],
  3584. "responses": {
  3585. "200": {
  3586. "$ref": "#/responses/ReactionList"
  3587. },
  3588. "403": {
  3589. "$ref": "#/responses/forbidden"
  3590. }
  3591. }
  3592. },
  3593. "post": {
  3594. "consumes": [
  3595. "application/json"
  3596. ],
  3597. "produces": [
  3598. "application/json"
  3599. ],
  3600. "tags": [
  3601. "issue"
  3602. ],
  3603. "summary": "Add a reaction to a comment of an issue",
  3604. "operationId": "issuePostCommentReaction",
  3605. "parameters": [
  3606. {
  3607. "type": "string",
  3608. "description": "owner of the repo",
  3609. "name": "owner",
  3610. "in": "path",
  3611. "required": true
  3612. },
  3613. {
  3614. "type": "string",
  3615. "description": "name of the repo",
  3616. "name": "repo",
  3617. "in": "path",
  3618. "required": true
  3619. },
  3620. {
  3621. "type": "integer",
  3622. "format": "int64",
  3623. "description": "id of the comment to edit",
  3624. "name": "id",
  3625. "in": "path",
  3626. "required": true
  3627. },
  3628. {
  3629. "name": "content",
  3630. "in": "body",
  3631. "schema": {
  3632. "$ref": "#/definitions/EditReactionOption"
  3633. }
  3634. }
  3635. ],
  3636. "responses": {
  3637. "200": {
  3638. "$ref": "#/responses/Reaction"
  3639. },
  3640. "201": {
  3641. "$ref": "#/responses/Reaction"
  3642. },
  3643. "403": {
  3644. "$ref": "#/responses/forbidden"
  3645. }
  3646. }
  3647. },
  3648. "delete": {
  3649. "consumes": [
  3650. "application/json"
  3651. ],
  3652. "produces": [
  3653. "application/json"
  3654. ],
  3655. "tags": [
  3656. "issue"
  3657. ],
  3658. "summary": "Remove a reaction from a comment of an issue",
  3659. "operationId": "issueDeleteCommentReaction",
  3660. "parameters": [
  3661. {
  3662. "type": "string",
  3663. "description": "owner of the repo",
  3664. "name": "owner",
  3665. "in": "path",
  3666. "required": true
  3667. },
  3668. {
  3669. "type": "string",
  3670. "description": "name of the repo",
  3671. "name": "repo",
  3672. "in": "path",
  3673. "required": true
  3674. },
  3675. {
  3676. "type": "integer",
  3677. "format": "int64",
  3678. "description": "id of the comment to edit",
  3679. "name": "id",
  3680. "in": "path",
  3681. "required": true
  3682. },
  3683. {
  3684. "name": "content",
  3685. "in": "body",
  3686. "schema": {
  3687. "$ref": "#/definitions/EditReactionOption"
  3688. }
  3689. }
  3690. ],
  3691. "responses": {
  3692. "200": {
  3693. "$ref": "#/responses/empty"
  3694. },
  3695. "403": {
  3696. "$ref": "#/responses/forbidden"
  3697. }
  3698. }
  3699. }
  3700. },
  3701. "/repos/{owner}/{repo}/issues/{index}": {
  3702. "get": {
  3703. "produces": [
  3704. "application/json"
  3705. ],
  3706. "tags": [
  3707. "issue"
  3708. ],
  3709. "summary": "Get an issue",
  3710. "operationId": "issueGetIssue",
  3711. "parameters": [
  3712. {
  3713. "type": "string",
  3714. "description": "owner of the repo",
  3715. "name": "owner",
  3716. "in": "path",
  3717. "required": true
  3718. },
  3719. {
  3720. "type": "string",
  3721. "description": "name of the repo",
  3722. "name": "repo",
  3723. "in": "path",
  3724. "required": true
  3725. },
  3726. {
  3727. "type": "integer",
  3728. "format": "int64",
  3729. "description": "index of the issue to get",
  3730. "name": "index",
  3731. "in": "path",
  3732. "required": true
  3733. }
  3734. ],
  3735. "responses": {
  3736. "200": {
  3737. "$ref": "#/responses/Issue"
  3738. },
  3739. "404": {
  3740. "$ref": "#/responses/notFound"
  3741. }
  3742. }
  3743. },
  3744. "patch": {
  3745. "consumes": [
  3746. "application/json"
  3747. ],
  3748. "produces": [
  3749. "application/json"
  3750. ],
  3751. "tags": [
  3752. "issue"
  3753. ],
  3754. "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  3755. "operationId": "issueEditIssue",
  3756. "parameters": [
  3757. {
  3758. "type": "string",
  3759. "description": "owner of the repo",
  3760. "name": "owner",
  3761. "in": "path",
  3762. "required": true
  3763. },
  3764. {
  3765. "type": "string",
  3766. "description": "name of the repo",
  3767. "name": "repo",
  3768. "in": "path",
  3769. "required": true
  3770. },
  3771. {
  3772. "type": "integer",
  3773. "format": "int64",
  3774. "description": "index of the issue to edit",
  3775. "name": "index",
  3776. "in": "path",
  3777. "required": true
  3778. },
  3779. {
  3780. "name": "body",
  3781. "in": "body",
  3782. "schema": {
  3783. "$ref": "#/definitions/EditIssueOption"
  3784. }
  3785. }
  3786. ],
  3787. "responses": {
  3788. "201": {
  3789. "$ref": "#/responses/Issue"
  3790. },
  3791. "403": {
  3792. "$ref": "#/responses/forbidden"
  3793. },
  3794. "404": {
  3795. "$ref": "#/responses/notFound"
  3796. },
  3797. "412": {
  3798. "$ref": "#/responses/error"
  3799. }
  3800. }
  3801. }
  3802. },
  3803. "/repos/{owner}/{repo}/issues/{index}/comments": {
  3804. "get": {
  3805. "produces": [
  3806. "application/json"
  3807. ],
  3808. "tags": [
  3809. "issue"
  3810. ],
  3811. "summary": "List all comments on an issue",
  3812. "operationId": "issueGetComments",
  3813. "parameters": [
  3814. {
  3815. "type": "string",
  3816. "description": "owner of the repo",
  3817. "name": "owner",
  3818. "in": "path",
  3819. "required": true
  3820. },
  3821. {
  3822. "type": "string",
  3823. "description": "name of the repo",
  3824. "name": "repo",
  3825. "in": "path",
  3826. "required": true
  3827. },
  3828. {
  3829. "type": "integer",
  3830. "format": "int64",
  3831. "description": "index of the issue",
  3832. "name": "index",
  3833. "in": "path",
  3834. "required": true
  3835. },
  3836. {
  3837. "type": "string",
  3838. "format": "date-time",
  3839. "description": "if provided, only comments updated since the specified time are returned.",
  3840. "name": "since",
  3841. "in": "query"
  3842. },
  3843. {
  3844. "type": "string",
  3845. "format": "date-time",
  3846. "description": "if provided, only comments updated before the provided time are returned.",
  3847. "name": "before",
  3848. "in": "query"
  3849. }
  3850. ],
  3851. "responses": {
  3852. "200": {
  3853. "$ref": "#/responses/CommentList"
  3854. }
  3855. }
  3856. },
  3857. "post": {
  3858. "consumes": [
  3859. "application/json"
  3860. ],
  3861. "produces": [
  3862. "application/json"
  3863. ],
  3864. "tags": [
  3865. "issue"
  3866. ],
  3867. "summary": "Add a comment to an issue",
  3868. "operationId": "issueCreateComment",
  3869. "parameters": [
  3870. {
  3871. "type": "string",
  3872. "description": "owner of the repo",
  3873. "name": "owner",
  3874. "in": "path",
  3875. "required": true
  3876. },
  3877. {
  3878. "type": "string",
  3879. "description": "name of the repo",
  3880. "name": "repo",
  3881. "in": "path",
  3882. "required": true
  3883. },
  3884. {
  3885. "type": "integer",
  3886. "format": "int64",
  3887. "description": "index of the issue",
  3888. "name": "index",
  3889. "in": "path",
  3890. "required": true
  3891. },
  3892. {
  3893. "name": "body",
  3894. "in": "body",
  3895. "schema": {
  3896. "$ref": "#/definitions/CreateIssueCommentOption"
  3897. }
  3898. }
  3899. ],
  3900. "responses": {
  3901. "201": {
  3902. "$ref": "#/responses/Comment"
  3903. },
  3904. "403": {
  3905. "$ref": "#/responses/forbidden"
  3906. }
  3907. }
  3908. }
  3909. },
  3910. "/repos/{owner}/{repo}/issues/{index}/comments/{id}": {
  3911. "delete": {
  3912. "tags": [
  3913. "issue"
  3914. ],
  3915. "summary": "Delete a comment",
  3916. "operationId": "issueDeleteCommentDeprecated",
  3917. "deprecated": true,
  3918. "parameters": [
  3919. {
  3920. "type": "string",
  3921. "description": "owner of the repo",
  3922. "name": "owner",
  3923. "in": "path",
  3924. "required": true
  3925. },
  3926. {
  3927. "type": "string",
  3928. "description": "name of the repo",
  3929. "name": "repo",
  3930. "in": "path",
  3931. "required": true
  3932. },
  3933. {
  3934. "type": "integer",
  3935. "description": "this parameter is ignored",
  3936. "name": "index",
  3937. "in": "path",
  3938. "required": true
  3939. },
  3940. {
  3941. "type": "integer",
  3942. "format": "int64",
  3943. "description": "id of comment to delete",
  3944. "name": "id",
  3945. "in": "path",
  3946. "required": true
  3947. }
  3948. ],
  3949. "responses": {
  3950. "204": {
  3951. "$ref": "#/responses/empty"
  3952. },
  3953. "403": {
  3954. "$ref": "#/responses/forbidden"
  3955. },
  3956. "404": {
  3957. "$ref": "#/responses/notFound"
  3958. }
  3959. }
  3960. },
  3961. "patch": {
  3962. "consumes": [
  3963. "application/json"
  3964. ],
  3965. "produces": [
  3966. "application/json"
  3967. ],
  3968. "tags": [
  3969. "issue"
  3970. ],
  3971. "summary": "Edit a comment",
  3972. "operationId": "issueEditCommentDeprecated",
  3973. "deprecated": true,
  3974. "parameters": [
  3975. {
  3976. "type": "string",
  3977. "description": "owner of the repo",
  3978. "name": "owner",
  3979. "in": "path",
  3980. "required": true
  3981. },
  3982. {
  3983. "type": "string",
  3984. "description": "name of the repo",
  3985. "name": "repo",
  3986. "in": "path",
  3987. "required": true
  3988. },
  3989. {
  3990. "type": "integer",
  3991. "description": "this parameter is ignored",
  3992. "name": "index",
  3993. "in": "path",
  3994. "required": true
  3995. },
  3996. {
  3997. "type": "integer",
  3998. "format": "int64",
  3999. "description": "id of the comment to edit",
  4000. "name": "id",
  4001. "in": "path",
  4002. "required": true
  4003. },
  4004. {
  4005. "name": "body",
  4006. "in": "body",
  4007. "schema": {
  4008. "$ref": "#/definitions/EditIssueCommentOption"
  4009. }
  4010. }
  4011. ],
  4012. "responses": {
  4013. "200": {
  4014. "$ref": "#/responses/Comment"
  4015. },
  4016. "204": {
  4017. "$ref": "#/responses/empty"
  4018. },
  4019. "403": {
  4020. "$ref": "#/responses/forbidden"
  4021. },
  4022. "404": {
  4023. "$ref": "#/responses/notFound"
  4024. }
  4025. }
  4026. }
  4027. },
  4028. "/repos/{owner}/{repo}/issues/{index}/deadline": {
  4029. "post": {
  4030. "consumes": [
  4031. "application/json"
  4032. ],
  4033. "produces": [
  4034. "application/json"
  4035. ],
  4036. "tags": [
  4037. "issue"
  4038. ],
  4039. "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.",
  4040. "operationId": "issueEditIssueDeadline",
  4041. "parameters": [
  4042. {
  4043. "type": "string",
  4044. "description": "owner of the repo",
  4045. "name": "owner",
  4046. "in": "path",
  4047. "required": true
  4048. },
  4049. {
  4050. "type": "string",
  4051. "description": "name of the repo",
  4052. "name": "repo",
  4053. "in": "path",
  4054. "required": true
  4055. },
  4056. {
  4057. "type": "integer",
  4058. "format": "int64",
  4059. "description": "index of the issue to create or update a deadline on",
  4060. "name": "index",
  4061. "in": "path",
  4062. "required": true
  4063. },
  4064. {
  4065. "name": "body",
  4066. "in": "body",
  4067. "schema": {
  4068. "$ref": "#/definitions/EditDeadlineOption"
  4069. }
  4070. }
  4071. ],
  4072. "responses": {
  4073. "201": {
  4074. "$ref": "#/responses/IssueDeadline"
  4075. },
  4076. "403": {
  4077. "$ref": "#/responses/forbidden"
  4078. },
  4079. "404": {
  4080. "$ref": "#/responses/notFound"
  4081. }
  4082. }
  4083. }
  4084. },
  4085. "/repos/{owner}/{repo}/issues/{index}/labels": {
  4086. "get": {
  4087. "produces": [
  4088. "application/json"
  4089. ],
  4090. "tags": [
  4091. "issue"
  4092. ],
  4093. "summary": "Get an issue's labels",
  4094. "operationId": "issueGetLabels",
  4095. "parameters": [
  4096. {
  4097. "type": "string",
  4098. "description": "owner of the repo",
  4099. "name": "owner",
  4100. "in": "path",
  4101. "required": true
  4102. },
  4103. {
  4104. "type": "string",
  4105. "description": "name of the repo",
  4106. "name": "repo",
  4107. "in": "path",
  4108. "required": true
  4109. },
  4110. {
  4111. "type": "integer",
  4112. "format": "int64",
  4113. "description": "index of the issue",
  4114. "name": "index",
  4115. "in": "path",
  4116. "required": true
  4117. }
  4118. ],
  4119. "responses": {
  4120. "200": {
  4121. "$ref": "#/responses/LabelList"
  4122. },
  4123. "404": {
  4124. "$ref": "#/responses/notFound"
  4125. }
  4126. }
  4127. },
  4128. "put": {
  4129. "consumes": [
  4130. "application/json"
  4131. ],
  4132. "produces": [
  4133. "application/json"
  4134. ],
  4135. "tags": [
  4136. "issue"
  4137. ],
  4138. "summary": "Replace an issue's labels",
  4139. "operationId": "issueReplaceLabels",
  4140. "parameters": [
  4141. {
  4142. "type": "string",
  4143. "description": "owner of the repo",
  4144. "name": "owner",
  4145. "in": "path",
  4146. "required": true
  4147. },
  4148. {
  4149. "type": "string",
  4150. "description": "name of the repo",
  4151. "name": "repo",
  4152. "in": "path",
  4153. "required": true
  4154. },
  4155. {
  4156. "type": "integer",
  4157. "format": "int64",
  4158. "description": "index of the issue",
  4159. "name": "index",
  4160. "in": "path",
  4161. "required": true
  4162. },
  4163. {
  4164. "name": "body",
  4165. "in": "body",
  4166. "schema": {
  4167. "$ref": "#/definitions/IssueLabelsOption"
  4168. }
  4169. }
  4170. ],
  4171. "responses": {
  4172. "200": {
  4173. "$ref": "#/responses/LabelList"
  4174. },
  4175. "403": {
  4176. "$ref": "#/responses/forbidden"
  4177. }
  4178. }
  4179. },
  4180. "post": {
  4181. "consumes": [
  4182. "application/json"
  4183. ],
  4184. "produces": [
  4185. "application/json"
  4186. ],
  4187. "tags": [
  4188. "issue"
  4189. ],
  4190. "summary": "Add a label to an issue",
  4191. "operationId": "issueAddLabel",
  4192. "parameters": [
  4193. {
  4194. "type": "string",
  4195. "description": "owner of the repo",
  4196. "name": "owner",
  4197. "in": "path",
  4198. "required": true
  4199. },
  4200. {
  4201. "type": "string",
  4202. "description": "name of the repo",
  4203. "name": "repo",
  4204. "in": "path",
  4205. "required": true
  4206. },
  4207. {
  4208. "type": "integer",
  4209. "format": "int64",
  4210. "description": "index of the issue",
  4211. "name": "index",
  4212. "in": "path",
  4213. "required": true
  4214. },
  4215. {
  4216. "name": "body",
  4217. "in": "body",
  4218. "schema": {
  4219. "$ref": "#/definitions/IssueLabelsOption"
  4220. }
  4221. }
  4222. ],
  4223. "responses": {
  4224. "200": {
  4225. "$ref": "#/responses/LabelList"
  4226. },
  4227. "403": {
  4228. "$ref": "#/responses/forbidden"
  4229. }
  4230. }
  4231. },
  4232. "delete": {
  4233. "produces": [
  4234. "application/json"
  4235. ],
  4236. "tags": [
  4237. "issue"
  4238. ],
  4239. "summary": "Remove all labels from an issue",
  4240. "operationId": "issueClearLabels",
  4241. "parameters": [
  4242. {
  4243. "type": "string",
  4244. "description": "owner of the repo",
  4245. "name": "owner",
  4246. "in": "path",
  4247. "required": true
  4248. },
  4249. {
  4250. "type": "string",
  4251. "description": "name of the repo",
  4252. "name": "repo",
  4253. "in": "path",
  4254. "required": true
  4255. },
  4256. {
  4257. "type": "integer",
  4258. "format": "int64",
  4259. "description": "index of the issue",
  4260. "name": "index",
  4261. "in": "path",
  4262. "required": true
  4263. }
  4264. ],
  4265. "responses": {
  4266. "204": {
  4267. "$ref": "#/responses/empty"
  4268. },
  4269. "403": {
  4270. "$ref": "#/responses/forbidden"
  4271. }
  4272. }
  4273. }
  4274. },
  4275. "/repos/{owner}/{repo}/issues/{index}/labels/{id}": {
  4276. "delete": {
  4277. "produces": [
  4278. "application/json"
  4279. ],
  4280. "tags": [
  4281. "issue"
  4282. ],
  4283. "summary": "Remove a label from an issue",
  4284. "operationId": "issueRemoveLabel",
  4285. "parameters": [
  4286. {
  4287. "type": "string",
  4288. "description": "owner of the repo",
  4289. "name": "owner",
  4290. "in": "path",
  4291. "required": true
  4292. },
  4293. {
  4294. "type": "string",
  4295. "description": "name of the repo",
  4296. "name": "repo",
  4297. "in": "path",
  4298. "required": true
  4299. },
  4300. {
  4301. "type": "integer",
  4302. "format": "int64",
  4303. "description": "index of the issue",
  4304. "name": "index",
  4305. "in": "path",
  4306. "required": true
  4307. },
  4308. {
  4309. "type": "integer",
  4310. "format": "int64",
  4311. "description": "id of the label to remove",
  4312. "name": "id",
  4313. "in": "path",
  4314. "required": true
  4315. }
  4316. ],
  4317. "responses": {
  4318. "204": {
  4319. "$ref": "#/responses/empty"
  4320. },
  4321. "403": {
  4322. "$ref": "#/responses/forbidden"
  4323. },
  4324. "422": {
  4325. "$ref": "#/responses/validationError"
  4326. }
  4327. }
  4328. }
  4329. },
  4330. "/repos/{owner}/{repo}/issues/{index}/reactions": {
  4331. "get": {
  4332. "consumes": [
  4333. "application/json"
  4334. ],
  4335. "produces": [
  4336. "application/json"
  4337. ],
  4338. "tags": [
  4339. "issue"
  4340. ],
  4341. "summary": "Get a list reactions of an issue",
  4342. "operationId": "issueGetIssueReactions",
  4343. "parameters": [
  4344. {
  4345. "type": "string",
  4346. "description": "owner of the repo",
  4347. "name": "owner",
  4348. "in": "path",
  4349. "required": true
  4350. },
  4351. {
  4352. "type": "string",
  4353. "description": "name of the repo",
  4354. "name": "repo",
  4355. "in": "path",
  4356. "required": true
  4357. },
  4358. {
  4359. "type": "integer",
  4360. "format": "int64",
  4361. "description": "index of the issue",
  4362. "name": "index",
  4363. "in": "path",
  4364. "required": true
  4365. },
  4366. {
  4367. "type": "integer",
  4368. "description": "page number of results to return (1-based)",
  4369. "name": "page",
  4370. "in": "query"
  4371. },
  4372. {
  4373. "type": "integer",
  4374. "description": "page size of results, maximum page size is 50",
  4375. "name": "limit",
  4376. "in": "query"
  4377. }
  4378. ],
  4379. "responses": {
  4380. "200": {
  4381. "$ref": "#/responses/ReactionList"
  4382. },
  4383. "403": {
  4384. "$ref": "#/responses/forbidden"
  4385. }
  4386. }
  4387. },
  4388. "post": {
  4389. "consumes": [
  4390. "application/json"
  4391. ],
  4392. "produces": [
  4393. "application/json"
  4394. ],
  4395. "tags": [
  4396. "issue"
  4397. ],
  4398. "summary": "Add a reaction to an issue",
  4399. "operationId": "issuePostIssueReaction",
  4400. "parameters": [
  4401. {
  4402. "type": "string",
  4403. "description": "owner of the repo",
  4404. "name": "owner",
  4405. "in": "path",
  4406. "required": true
  4407. },
  4408. {
  4409. "type": "string",
  4410. "description": "name of the repo",
  4411. "name": "repo",
  4412. "in": "path",
  4413. "required": true
  4414. },
  4415. {
  4416. "type": "integer",
  4417. "format": "int64",
  4418. "description": "index of the issue",
  4419. "name": "index",
  4420. "in": "path",
  4421. "required": true
  4422. },
  4423. {
  4424. "name": "content",
  4425. "in": "body",
  4426. "schema": {
  4427. "$ref": "#/definitions/EditReactionOption"
  4428. }
  4429. }
  4430. ],
  4431. "responses": {
  4432. "200": {
  4433. "$ref": "#/responses/Reaction"
  4434. },
  4435. "201": {
  4436. "$ref": "#/responses/Reaction"
  4437. },
  4438. "403": {
  4439. "$ref": "#/responses/forbidden"
  4440. }
  4441. }
  4442. },
  4443. "delete": {
  4444. "consumes": [
  4445. "application/json"
  4446. ],
  4447. "produces": [
  4448. "application/json"
  4449. ],
  4450. "tags": [
  4451. "issue"
  4452. ],
  4453. "summary": "Remove a reaction from an issue",
  4454. "operationId": "issueDeleteIssueReaction",
  4455. "parameters": [
  4456. {
  4457. "type": "string",
  4458. "description": "owner of the repo",
  4459. "name": "owner",
  4460. "in": "path",
  4461. "required": true
  4462. },
  4463. {
  4464. "type": "string",
  4465. "description": "name of the repo",
  4466. "name": "repo",
  4467. "in": "path",
  4468. "required": true
  4469. },
  4470. {
  4471. "type": "integer",
  4472. "format": "int64",
  4473. "description": "index of the issue",
  4474. "name": "index",
  4475. "in": "path",
  4476. "required": true
  4477. },
  4478. {
  4479. "name": "content",
  4480. "in": "body",
  4481. "schema": {
  4482. "$ref": "#/definitions/EditReactionOption"
  4483. }
  4484. }
  4485. ],
  4486. "responses": {
  4487. "200": {
  4488. "$ref": "#/responses/empty"
  4489. },
  4490. "403": {
  4491. "$ref": "#/responses/forbidden"
  4492. }
  4493. }
  4494. }
  4495. },
  4496. "/repos/{owner}/{repo}/issues/{index}/stopwatch/delete": {
  4497. "delete": {
  4498. "consumes": [
  4499. "application/json"
  4500. ],
  4501. "produces": [
  4502. "application/json"
  4503. ],
  4504. "tags": [
  4505. "issue"
  4506. ],
  4507. "summary": "Delete an issue's existing stopwatch.",
  4508. "operationId": "issueDeleteStopWatch",
  4509. "parameters": [
  4510. {
  4511. "type": "string",
  4512. "description": "owner of the repo",
  4513. "name": "owner",
  4514. "in": "path",
  4515. "required": true
  4516. },
  4517. {
  4518. "type": "string",
  4519. "description": "name of the repo",
  4520. "name": "repo",
  4521. "in": "path",
  4522. "required": true
  4523. },
  4524. {
  4525. "type": "integer",
  4526. "format": "int64",
  4527. "description": "index of the issue to stop the stopwatch on",
  4528. "name": "index",
  4529. "in": "path",
  4530. "required": true
  4531. }
  4532. ],
  4533. "responses": {
  4534. "204": {
  4535. "$ref": "#/responses/empty"
  4536. },
  4537. "403": {
  4538. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  4539. },
  4540. "404": {
  4541. "$ref": "#/responses/notFound"
  4542. },
  4543. "409": {
  4544. "description": "Cannot cancel a non existent stopwatch"
  4545. }
  4546. }
  4547. }
  4548. },
  4549. "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": {
  4550. "post": {
  4551. "consumes": [
  4552. "application/json"
  4553. ],
  4554. "produces": [
  4555. "application/json"
  4556. ],
  4557. "tags": [
  4558. "issue"
  4559. ],
  4560. "summary": "Start stopwatch on an issue.",
  4561. "operationId": "issueStartStopWatch",
  4562. "parameters": [
  4563. {
  4564. "type": "string",
  4565. "description": "owner of the repo",
  4566. "name": "owner",
  4567. "in": "path",
  4568. "required": true
  4569. },
  4570. {
  4571. "type": "string",
  4572. "description": "name of the repo",
  4573. "name": "repo",
  4574. "in": "path",
  4575. "required": true
  4576. },
  4577. {
  4578. "type": "integer",
  4579. "format": "int64",
  4580. "description": "index of the issue to create the stopwatch on",
  4581. "name": "index",
  4582. "in": "path",
  4583. "required": true
  4584. }
  4585. ],
  4586. "responses": {
  4587. "201": {
  4588. "$ref": "#/responses/empty"
  4589. },
  4590. "403": {
  4591. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  4592. },
  4593. "404": {
  4594. "$ref": "#/responses/notFound"
  4595. },
  4596. "409": {
  4597. "description": "Cannot start a stopwatch again if it already exists"
  4598. }
  4599. }
  4600. }
  4601. },
  4602. "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": {
  4603. "post": {
  4604. "consumes": [
  4605. "application/json"
  4606. ],
  4607. "produces": [
  4608. "application/json"
  4609. ],
  4610. "tags": [
  4611. "issue"
  4612. ],
  4613. "summary": "Stop an issue's existing stopwatch.",
  4614. "operationId": "issueStopStopWatch",
  4615. "parameters": [
  4616. {
  4617. "type": "string",
  4618. "description": "owner of the repo",
  4619. "name": "owner",
  4620. "in": "path",
  4621. "required": true
  4622. },
  4623. {
  4624. "type": "string",
  4625. "description": "name of the repo",
  4626. "name": "repo",
  4627. "in": "path",
  4628. "required": true
  4629. },
  4630. {
  4631. "type": "integer",
  4632. "format": "int64",
  4633. "description": "index of the issue to stop the stopwatch on",
  4634. "name": "index",
  4635. "in": "path",
  4636. "required": true
  4637. }
  4638. ],
  4639. "responses": {
  4640. "201": {
  4641. "$ref": "#/responses/empty"
  4642. },
  4643. "403": {
  4644. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  4645. },
  4646. "404": {
  4647. "$ref": "#/responses/notFound"
  4648. },
  4649. "409": {
  4650. "description": "Cannot stop a non existent stopwatch"
  4651. }
  4652. }
  4653. }
  4654. },
  4655. "/repos/{owner}/{repo}/issues/{index}/subscriptions": {
  4656. "get": {
  4657. "consumes": [
  4658. "application/json"
  4659. ],
  4660. "produces": [
  4661. "application/json"
  4662. ],
  4663. "tags": [
  4664. "issue"
  4665. ],
  4666. "summary": "Get users who subscribed on an issue.",
  4667. "operationId": "issueSubscriptions",
  4668. "parameters": [
  4669. {
  4670. "type": "string",
  4671. "description": "owner of the repo",
  4672. "name": "owner",
  4673. "in": "path",
  4674. "required": true
  4675. },
  4676. {
  4677. "type": "string",
  4678. "description": "name of the repo",
  4679. "name": "repo",
  4680. "in": "path",
  4681. "required": true
  4682. },
  4683. {
  4684. "type": "integer",
  4685. "format": "int64",
  4686. "description": "index of the issue",
  4687. "name": "index",
  4688. "in": "path",
  4689. "required": true
  4690. },
  4691. {
  4692. "type": "integer",
  4693. "description": "page number of results to return (1-based)",
  4694. "name": "page",
  4695. "in": "query"
  4696. },
  4697. {
  4698. "type": "integer",
  4699. "description": "page size of results, maximum page size is 50",
  4700. "name": "limit",
  4701. "in": "query"
  4702. }
  4703. ],
  4704. "responses": {
  4705. "200": {
  4706. "$ref": "#/responses/UserList"
  4707. },
  4708. "404": {
  4709. "$ref": "#/responses/notFound"
  4710. }
  4711. }
  4712. }
  4713. },
  4714. "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}": {
  4715. "put": {
  4716. "consumes": [
  4717. "application/json"
  4718. ],
  4719. "produces": [
  4720. "application/json"
  4721. ],
  4722. "tags": [
  4723. "issue"
  4724. ],
  4725. "summary": "Subscribe user to issue",
  4726. "operationId": "issueAddSubscription",
  4727. "parameters": [
  4728. {
  4729. "type": "string",
  4730. "description": "owner of the repo",
  4731. "name": "owner",
  4732. "in": "path",
  4733. "required": true
  4734. },
  4735. {
  4736. "type": "string",
  4737. "description": "name of the repo",
  4738. "name": "repo",
  4739. "in": "path",
  4740. "required": true
  4741. },
  4742. {
  4743. "type": "integer",
  4744. "format": "int64",
  4745. "description": "index of the issue",
  4746. "name": "index",
  4747. "in": "path",
  4748. "required": true
  4749. },
  4750. {
  4751. "type": "string",
  4752. "description": "user to subscribe",
  4753. "name": "user",
  4754. "in": "path",
  4755. "required": true
  4756. }
  4757. ],
  4758. "responses": {
  4759. "201": {
  4760. "$ref": "#/responses/empty"
  4761. },
  4762. "304": {
  4763. "description": "User can only subscribe itself if he is no admin"
  4764. },
  4765. "404": {
  4766. "$ref": "#/responses/notFound"
  4767. }
  4768. }
  4769. },
  4770. "delete": {
  4771. "consumes": [
  4772. "application/json"
  4773. ],
  4774. "produces": [
  4775. "application/json"
  4776. ],
  4777. "tags": [
  4778. "issue"
  4779. ],
  4780. "summary": "Unsubscribe user from issue",
  4781. "operationId": "issueDeleteSubscription",
  4782. "parameters": [
  4783. {
  4784. "type": "string",
  4785. "description": "owner of the repo",
  4786. "name": "owner",
  4787. "in": "path",
  4788. "required": true
  4789. },
  4790. {
  4791. "type": "string",
  4792. "description": "name of the repo",
  4793. "name": "repo",
  4794. "in": "path",
  4795. "required": true
  4796. },
  4797. {
  4798. "type": "integer",
  4799. "format": "int64",
  4800. "description": "index of the issue",
  4801. "name": "index",
  4802. "in": "path",
  4803. "required": true
  4804. },
  4805. {
  4806. "type": "string",
  4807. "description": "user witch unsubscribe",
  4808. "name": "user",
  4809. "in": "path",
  4810. "required": true
  4811. }
  4812. ],
  4813. "responses": {
  4814. "201": {
  4815. "$ref": "#/responses/empty"
  4816. },
  4817. "304": {
  4818. "description": "User can only subscribe itself if he is no admin"
  4819. },
  4820. "404": {
  4821. "$ref": "#/responses/notFound"
  4822. }
  4823. }
  4824. }
  4825. },
  4826. "/repos/{owner}/{repo}/issues/{index}/times": {
  4827. "get": {
  4828. "produces": [
  4829. "application/json"
  4830. ],
  4831. "tags": [
  4832. "issue"
  4833. ],
  4834. "summary": "List an issue's tracked times",
  4835. "operationId": "issueTrackedTimes",
  4836. "parameters": [
  4837. {
  4838. "type": "string",
  4839. "description": "owner of the repo",
  4840. "name": "owner",
  4841. "in": "path",
  4842. "required": true
  4843. },
  4844. {
  4845. "type": "string",
  4846. "description": "name of the repo",
  4847. "name": "repo",
  4848. "in": "path",
  4849. "required": true
  4850. },
  4851. {
  4852. "type": "integer",
  4853. "format": "int64",
  4854. "description": "index of the issue",
  4855. "name": "index",
  4856. "in": "path",
  4857. "required": true
  4858. },
  4859. {
  4860. "type": "string",
  4861. "format": "date-time",
  4862. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  4863. "name": "since",
  4864. "in": "query"
  4865. },
  4866. {
  4867. "type": "string",
  4868. "format": "date-time",
  4869. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  4870. "name": "before",
  4871. "in": "query"
  4872. },
  4873. {
  4874. "type": "integer",
  4875. "description": "page number of results to return (1-based)",
  4876. "name": "page",
  4877. "in": "query"
  4878. },
  4879. {
  4880. "type": "integer",
  4881. "description": "page size of results, maximum page size is 50",
  4882. "name": "limit",
  4883. "in": "query"
  4884. }
  4885. ],
  4886. "responses": {
  4887. "200": {
  4888. "$ref": "#/responses/TrackedTimeList"
  4889. },
  4890. "404": {
  4891. "$ref": "#/responses/notFound"
  4892. }
  4893. }
  4894. },
  4895. "post": {
  4896. "consumes": [
  4897. "application/json"
  4898. ],
  4899. "produces": [
  4900. "application/json"
  4901. ],
  4902. "tags": [
  4903. "issue"
  4904. ],
  4905. "summary": "Add tracked time to a issue",
  4906. "operationId": "issueAddTime",
  4907. "parameters": [
  4908. {
  4909. "type": "string",
  4910. "description": "owner of the repo",
  4911. "name": "owner",
  4912. "in": "path",
  4913. "required": true
  4914. },
  4915. {
  4916. "type": "string",
  4917. "description": "name of the repo",
  4918. "name": "repo",
  4919. "in": "path",
  4920. "required": true
  4921. },
  4922. {
  4923. "type": "integer",
  4924. "format": "int64",
  4925. "description": "index of the issue",
  4926. "name": "index",
  4927. "in": "path",
  4928. "required": true
  4929. },
  4930. {
  4931. "name": "body",
  4932. "in": "body",
  4933. "schema": {
  4934. "$ref": "#/definitions/AddTimeOption"
  4935. }
  4936. }
  4937. ],
  4938. "responses": {
  4939. "200": {
  4940. "$ref": "#/responses/TrackedTime"
  4941. },
  4942. "400": {
  4943. "$ref": "#/responses/error"
  4944. },
  4945. "403": {
  4946. "$ref": "#/responses/forbidden"
  4947. }
  4948. }
  4949. },
  4950. "delete": {
  4951. "consumes": [
  4952. "application/json"
  4953. ],
  4954. "produces": [
  4955. "application/json"
  4956. ],
  4957. "tags": [
  4958. "issue"
  4959. ],
  4960. "summary": "Reset a tracked time of an issue",
  4961. "operationId": "issueResetTime",
  4962. "parameters": [
  4963. {
  4964. "type": "string",
  4965. "description": "owner of the repo",
  4966. "name": "owner",
  4967. "in": "path",
  4968. "required": true
  4969. },
  4970. {
  4971. "type": "string",
  4972. "description": "name of the repo",
  4973. "name": "repo",
  4974. "in": "path",
  4975. "required": true
  4976. },
  4977. {
  4978. "type": "integer",
  4979. "format": "int64",
  4980. "description": "index of the issue to add tracked time to",
  4981. "name": "index",
  4982. "in": "path",
  4983. "required": true
  4984. }
  4985. ],
  4986. "responses": {
  4987. "204": {
  4988. "$ref": "#/responses/empty"
  4989. },
  4990. "400": {
  4991. "$ref": "#/responses/error"
  4992. },
  4993. "403": {
  4994. "$ref": "#/responses/forbidden"
  4995. }
  4996. }
  4997. }
  4998. },
  4999. "/repos/{owner}/{repo}/issues/{index}/times/{id}": {
  5000. "delete": {
  5001. "consumes": [
  5002. "application/json"
  5003. ],
  5004. "produces": [
  5005. "application/json"
  5006. ],
  5007. "tags": [
  5008. "issue"
  5009. ],
  5010. "summary": "Delete specific tracked time",
  5011. "operationId": "issueDeleteTime",
  5012. "parameters": [
  5013. {
  5014. "type": "string",
  5015. "description": "owner of the repo",
  5016. "name": "owner",
  5017. "in": "path",
  5018. "required": true
  5019. },
  5020. {
  5021. "type": "string",
  5022. "description": "name of the repo",
  5023. "name": "repo",
  5024. "in": "path",
  5025. "required": true
  5026. },
  5027. {
  5028. "type": "integer",
  5029. "format": "int64",
  5030. "description": "index of the issue",
  5031. "name": "index",
  5032. "in": "path",
  5033. "required": true
  5034. },
  5035. {
  5036. "type": "integer",
  5037. "format": "int64",
  5038. "description": "id of time to delete",
  5039. "name": "id",
  5040. "in": "path",
  5041. "required": true
  5042. }
  5043. ],
  5044. "responses": {
  5045. "204": {
  5046. "$ref": "#/responses/empty"
  5047. },
  5048. "400": {
  5049. "$ref": "#/responses/error"
  5050. },
  5051. "403": {
  5052. "$ref": "#/responses/forbidden"
  5053. }
  5054. }
  5055. }
  5056. },
  5057. "/repos/{owner}/{repo}/keys": {
  5058. "get": {
  5059. "produces": [
  5060. "application/json"
  5061. ],
  5062. "tags": [
  5063. "repository"
  5064. ],
  5065. "summary": "List a repository's keys",
  5066. "operationId": "repoListKeys",
  5067. "parameters": [
  5068. {
  5069. "type": "string",
  5070. "description": "owner of the repo",
  5071. "name": "owner",
  5072. "in": "path",
  5073. "required": true
  5074. },
  5075. {
  5076. "type": "string",
  5077. "description": "name of the repo",
  5078. "name": "repo",
  5079. "in": "path",
  5080. "required": true
  5081. },
  5082. {
  5083. "type": "integer",
  5084. "description": "the key_id to search for",
  5085. "name": "key_id",
  5086. "in": "query"
  5087. },
  5088. {
  5089. "type": "string",
  5090. "description": "fingerprint of the key",
  5091. "name": "fingerprint",
  5092. "in": "query"
  5093. },
  5094. {
  5095. "type": "integer",
  5096. "description": "page number of results to return (1-based)",
  5097. "name": "page",
  5098. "in": "query"
  5099. },
  5100. {
  5101. "type": "integer",
  5102. "description": "page size of results, maximum page size is 50",
  5103. "name": "limit",
  5104. "in": "query"
  5105. }
  5106. ],
  5107. "responses": {
  5108. "200": {
  5109. "$ref": "#/responses/DeployKeyList"
  5110. }
  5111. }
  5112. },
  5113. "post": {
  5114. "consumes": [
  5115. "application/json"
  5116. ],
  5117. "produces": [
  5118. "application/json"
  5119. ],
  5120. "tags": [
  5121. "repository"
  5122. ],
  5123. "summary": "Add a key to a repository",
  5124. "operationId": "repoCreateKey",
  5125. "parameters": [
  5126. {
  5127. "type": "string",
  5128. "description": "owner of the repo",
  5129. "name": "owner",
  5130. "in": "path",
  5131. "required": true
  5132. },
  5133. {
  5134. "type": "string",
  5135. "description": "name of the repo",
  5136. "name": "repo",
  5137. "in": "path",
  5138. "required": true
  5139. },
  5140. {
  5141. "name": "body",
  5142. "in": "body",
  5143. "schema": {
  5144. "$ref": "#/definitions/CreateKeyOption"
  5145. }
  5146. }
  5147. ],
  5148. "responses": {
  5149. "201": {
  5150. "$ref": "#/responses/DeployKey"
  5151. },
  5152. "422": {
  5153. "$ref": "#/responses/validationError"
  5154. }
  5155. }
  5156. }
  5157. },
  5158. "/repos/{owner}/{repo}/keys/{id}": {
  5159. "get": {
  5160. "produces": [
  5161. "application/json"
  5162. ],
  5163. "tags": [
  5164. "repository"
  5165. ],
  5166. "summary": "Get a repository's key by id",
  5167. "operationId": "repoGetKey",
  5168. "parameters": [
  5169. {
  5170. "type": "string",
  5171. "description": "owner of the repo",
  5172. "name": "owner",
  5173. "in": "path",
  5174. "required": true
  5175. },
  5176. {
  5177. "type": "string",
  5178. "description": "name of the repo",
  5179. "name": "repo",
  5180. "in": "path",
  5181. "required": true
  5182. },
  5183. {
  5184. "type": "integer",
  5185. "format": "int64",
  5186. "description": "id of the key to get",
  5187. "name": "id",
  5188. "in": "path",
  5189. "required": true
  5190. }
  5191. ],
  5192. "responses": {
  5193. "200": {
  5194. "$ref": "#/responses/DeployKey"
  5195. }
  5196. }
  5197. },
  5198. "delete": {
  5199. "tags": [
  5200. "repository"
  5201. ],
  5202. "summary": "Delete a key from a repository",
  5203. "operationId": "repoDeleteKey",
  5204. "parameters": [
  5205. {
  5206. "type": "string",
  5207. "description": "owner of the repo",
  5208. "name": "owner",
  5209. "in": "path",
  5210. "required": true
  5211. },
  5212. {
  5213. "type": "string",
  5214. "description": "name of the repo",
  5215. "name": "repo",
  5216. "in": "path",
  5217. "required": true
  5218. },
  5219. {
  5220. "type": "integer",
  5221. "format": "int64",
  5222. "description": "id of the key to delete",
  5223. "name": "id",
  5224. "in": "path",
  5225. "required": true
  5226. }
  5227. ],
  5228. "responses": {
  5229. "204": {
  5230. "$ref": "#/responses/empty"
  5231. },
  5232. "403": {
  5233. "$ref": "#/responses/forbidden"
  5234. }
  5235. }
  5236. }
  5237. },
  5238. "/repos/{owner}/{repo}/labels": {
  5239. "get": {
  5240. "produces": [
  5241. "application/json"
  5242. ],
  5243. "tags": [
  5244. "issue"
  5245. ],
  5246. "summary": "Get all of a repository's labels",
  5247. "operationId": "issueListLabels",
  5248. "parameters": [
  5249. {
  5250. "type": "string",
  5251. "description": "owner of the repo",
  5252. "name": "owner",
  5253. "in": "path",
  5254. "required": true
  5255. },
  5256. {
  5257. "type": "string",
  5258. "description": "name of the repo",
  5259. "name": "repo",
  5260. "in": "path",
  5261. "required": true
  5262. },
  5263. {
  5264. "type": "integer",
  5265. "description": "page number of results to return (1-based)",
  5266. "name": "page",
  5267. "in": "query"
  5268. },
  5269. {
  5270. "type": "integer",
  5271. "description": "page size of results, maximum page size is 50",
  5272. "name": "limit",
  5273. "in": "query"
  5274. }
  5275. ],
  5276. "responses": {
  5277. "200": {
  5278. "$ref": "#/responses/LabelList"
  5279. }
  5280. }
  5281. },
  5282. "post": {
  5283. "consumes": [
  5284. "application/json"
  5285. ],
  5286. "produces": [
  5287. "application/json"
  5288. ],
  5289. "tags": [
  5290. "issue"
  5291. ],
  5292. "summary": "Create a label",
  5293. "operationId": "issueCreateLabel",
  5294. "parameters": [
  5295. {
  5296. "type": "string",
  5297. "description": "owner of the repo",
  5298. "name": "owner",
  5299. "in": "path",
  5300. "required": true
  5301. },
  5302. {
  5303. "type": "string",
  5304. "description": "name of the repo",
  5305. "name": "repo",
  5306. "in": "path",
  5307. "required": true
  5308. },
  5309. {
  5310. "name": "body",
  5311. "in": "body",
  5312. "schema": {
  5313. "$ref": "#/definitions/CreateLabelOption"
  5314. }
  5315. }
  5316. ],
  5317. "responses": {
  5318. "201": {
  5319. "$ref": "#/responses/Label"
  5320. }
  5321. }
  5322. }
  5323. },
  5324. "/repos/{owner}/{repo}/labels/{id}": {
  5325. "get": {
  5326. "produces": [
  5327. "application/json"
  5328. ],
  5329. "tags": [
  5330. "issue"
  5331. ],
  5332. "summary": "Get a single label",
  5333. "operationId": "issueGetLabel",
  5334. "parameters": [
  5335. {
  5336. "type": "string",
  5337. "description": "owner of the repo",
  5338. "name": "owner",
  5339. "in": "path",
  5340. "required": true
  5341. },
  5342. {
  5343. "type": "string",
  5344. "description": "name of the repo",
  5345. "name": "repo",
  5346. "in": "path",
  5347. "required": true
  5348. },
  5349. {
  5350. "type": "integer",
  5351. "format": "int64",
  5352. "description": "id of the label to get",
  5353. "name": "id",
  5354. "in": "path",
  5355. "required": true
  5356. }
  5357. ],
  5358. "responses": {
  5359. "200": {
  5360. "$ref": "#/responses/Label"
  5361. }
  5362. }
  5363. },
  5364. "delete": {
  5365. "tags": [
  5366. "issue"
  5367. ],
  5368. "summary": "Delete a label",
  5369. "operationId": "issueDeleteLabel",
  5370. "parameters": [
  5371. {
  5372. "type": "string",
  5373. "description": "owner of the repo",
  5374. "name": "owner",
  5375. "in": "path",
  5376. "required": true
  5377. },
  5378. {
  5379. "type": "string",
  5380. "description": "name of the repo",
  5381. "name": "repo",
  5382. "in": "path",
  5383. "required": true
  5384. },
  5385. {
  5386. "type": "integer",
  5387. "format": "int64",
  5388. "description": "id of the label to delete",
  5389. "name": "id",
  5390. "in": "path",
  5391. "required": true
  5392. }
  5393. ],
  5394. "responses": {
  5395. "204": {
  5396. "$ref": "#/responses/empty"
  5397. }
  5398. }
  5399. },
  5400. "patch": {
  5401. "consumes": [
  5402. "application/json"
  5403. ],
  5404. "produces": [
  5405. "application/json"
  5406. ],
  5407. "tags": [
  5408. "issue"
  5409. ],
  5410. "summary": "Update a label",
  5411. "operationId": "issueEditLabel",
  5412. "parameters": [
  5413. {
  5414. "type": "string",
  5415. "description": "owner of the repo",
  5416. "name": "owner",
  5417. "in": "path",
  5418. "required": true
  5419. },
  5420. {
  5421. "type": "string",
  5422. "description": "name of the repo",
  5423. "name": "repo",
  5424. "in": "path",
  5425. "required": true
  5426. },
  5427. {
  5428. "type": "integer",
  5429. "format": "int64",
  5430. "description": "id of the label to edit",
  5431. "name": "id",
  5432. "in": "path",
  5433. "required": true
  5434. },
  5435. {
  5436. "name": "body",
  5437. "in": "body",
  5438. "schema": {
  5439. "$ref": "#/definitions/EditLabelOption"
  5440. }
  5441. }
  5442. ],
  5443. "responses": {
  5444. "200": {
  5445. "$ref": "#/responses/Label"
  5446. }
  5447. }
  5448. }
  5449. },
  5450. "/repos/{owner}/{repo}/milestones": {
  5451. "get": {
  5452. "produces": [
  5453. "application/json"
  5454. ],
  5455. "tags": [
  5456. "issue"
  5457. ],
  5458. "summary": "Get all of a repository's opened milestones",
  5459. "operationId": "issueGetMilestonesList",
  5460. "parameters": [
  5461. {
  5462. "type": "string",
  5463. "description": "owner of the repo",
  5464. "name": "owner",
  5465. "in": "path",
  5466. "required": true
  5467. },
  5468. {
  5469. "type": "string",
  5470. "description": "name of the repo",
  5471. "name": "repo",
  5472. "in": "path",
  5473. "required": true
  5474. },
  5475. {
  5476. "type": "string",
  5477. "description": "Milestone state, Recognised values are open, closed and all. Defaults to \"open\"",
  5478. "name": "state",
  5479. "in": "query"
  5480. },
  5481. {
  5482. "type": "integer",
  5483. "description": "page number of results to return (1-based)",
  5484. "name": "page",
  5485. "in": "query"
  5486. },
  5487. {
  5488. "type": "integer",
  5489. "description": "page size of results, maximum page size is 50",
  5490. "name": "limit",
  5491. "in": "query"
  5492. }
  5493. ],
  5494. "responses": {
  5495. "200": {
  5496. "$ref": "#/responses/MilestoneList"
  5497. }
  5498. }
  5499. },
  5500. "post": {
  5501. "consumes": [
  5502. "application/json"
  5503. ],
  5504. "produces": [
  5505. "application/json"
  5506. ],
  5507. "tags": [
  5508. "issue"
  5509. ],
  5510. "summary": "Create a milestone",
  5511. "operationId": "issueCreateMilestone",
  5512. "parameters": [
  5513. {
  5514. "type": "string",
  5515. "description": "owner of the repo",
  5516. "name": "owner",
  5517. "in": "path",
  5518. "required": true
  5519. },
  5520. {
  5521. "type": "string",
  5522. "description": "name of the repo",
  5523. "name": "repo",
  5524. "in": "path",
  5525. "required": true
  5526. },
  5527. {
  5528. "name": "body",
  5529. "in": "body",
  5530. "schema": {
  5531. "$ref": "#/definitions/CreateMilestoneOption"
  5532. }
  5533. }
  5534. ],
  5535. "responses": {
  5536. "201": {
  5537. "$ref": "#/responses/Milestone"
  5538. }
  5539. }
  5540. }
  5541. },
  5542. "/repos/{owner}/{repo}/milestones/{id}": {
  5543. "get": {
  5544. "produces": [
  5545. "application/json"
  5546. ],
  5547. "tags": [
  5548. "issue"
  5549. ],
  5550. "summary": "Get a milestone",
  5551. "operationId": "issueGetMilestone",
  5552. "parameters": [
  5553. {
  5554. "type": "string",
  5555. "description": "owner of the repo",
  5556. "name": "owner",
  5557. "in": "path",
  5558. "required": true
  5559. },
  5560. {
  5561. "type": "string",
  5562. "description": "name of the repo",
  5563. "name": "repo",
  5564. "in": "path",
  5565. "required": true
  5566. },
  5567. {
  5568. "type": "integer",
  5569. "format": "int64",
  5570. "description": "id of the milestone",
  5571. "name": "id",
  5572. "in": "path",
  5573. "required": true
  5574. }
  5575. ],
  5576. "responses": {
  5577. "200": {
  5578. "$ref": "#/responses/Milestone"
  5579. }
  5580. }
  5581. },
  5582. "delete": {
  5583. "tags": [
  5584. "issue"
  5585. ],
  5586. "summary": "Delete a milestone",
  5587. "operationId": "issueDeleteMilestone",
  5588. "parameters": [
  5589. {
  5590. "type": "string",
  5591. "description": "owner of the repo",
  5592. "name": "owner",
  5593. "in": "path",
  5594. "required": true
  5595. },
  5596. {
  5597. "type": "string",
  5598. "description": "name of the repo",
  5599. "name": "repo",
  5600. "in": "path",
  5601. "required": true
  5602. },
  5603. {
  5604. "type": "integer",
  5605. "format": "int64",
  5606. "description": "id of the milestone to delete",
  5607. "name": "id",
  5608. "in": "path",
  5609. "required": true
  5610. }
  5611. ],
  5612. "responses": {
  5613. "204": {
  5614. "$ref": "#/responses/empty"
  5615. }
  5616. }
  5617. },
  5618. "patch": {
  5619. "consumes": [
  5620. "application/json"
  5621. ],
  5622. "produces": [
  5623. "application/json"
  5624. ],
  5625. "tags": [
  5626. "issue"
  5627. ],
  5628. "summary": "Update a milestone",
  5629. "operationId": "issueEditMilestone",
  5630. "parameters": [
  5631. {
  5632. "type": "string",
  5633. "description": "owner of the repo",
  5634. "name": "owner",
  5635. "in": "path",
  5636. "required": true
  5637. },
  5638. {
  5639. "type": "string",
  5640. "description": "name of the repo",
  5641. "name": "repo",
  5642. "in": "path",
  5643. "required": true
  5644. },
  5645. {
  5646. "type": "integer",
  5647. "format": "int64",
  5648. "description": "id of the milestone",
  5649. "name": "id",
  5650. "in": "path",
  5651. "required": true
  5652. },
  5653. {
  5654. "name": "body",
  5655. "in": "body",
  5656. "schema": {
  5657. "$ref": "#/definitions/EditMilestoneOption"
  5658. }
  5659. }
  5660. ],
  5661. "responses": {
  5662. "200": {
  5663. "$ref": "#/responses/Milestone"
  5664. }
  5665. }
  5666. }
  5667. },
  5668. "/repos/{owner}/{repo}/mirror-sync": {
  5669. "post": {
  5670. "produces": [
  5671. "application/json"
  5672. ],
  5673. "tags": [
  5674. "repository"
  5675. ],
  5676. "summary": "Sync a mirrored repository",
  5677. "operationId": "repoMirrorSync",
  5678. "parameters": [
  5679. {
  5680. "type": "string",
  5681. "description": "owner of the repo to sync",
  5682. "name": "owner",
  5683. "in": "path",
  5684. "required": true
  5685. },
  5686. {
  5687. "type": "string",
  5688. "description": "name of the repo to sync",
  5689. "name": "repo",
  5690. "in": "path",
  5691. "required": true
  5692. }
  5693. ],
  5694. "responses": {
  5695. "200": {
  5696. "$ref": "#/responses/empty"
  5697. },
  5698. "403": {
  5699. "$ref": "#/responses/forbidden"
  5700. }
  5701. }
  5702. }
  5703. },
  5704. "/repos/{owner}/{repo}/notifications": {
  5705. "get": {
  5706. "consumes": [
  5707. "application/json"
  5708. ],
  5709. "produces": [
  5710. "application/json"
  5711. ],
  5712. "tags": [
  5713. "notification"
  5714. ],
  5715. "summary": "List users's notification threads on a specific repo",
  5716. "operationId": "notifyGetRepoList",
  5717. "parameters": [
  5718. {
  5719. "type": "string",
  5720. "description": "owner of the repo",
  5721. "name": "owner",
  5722. "in": "path",
  5723. "required": true
  5724. },
  5725. {
  5726. "type": "string",
  5727. "description": "name of the repo",
  5728. "name": "repo",
  5729. "in": "path",
  5730. "required": true
  5731. },
  5732. {
  5733. "type": "string",
  5734. "description": "If true, show notifications marked as read. Default value is false",
  5735. "name": "all",
  5736. "in": "query"
  5737. },
  5738. {
  5739. "type": "string",
  5740. "format": "date-time",
  5741. "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
  5742. "name": "since",
  5743. "in": "query"
  5744. },
  5745. {
  5746. "type": "string",
  5747. "format": "date-time",
  5748. "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
  5749. "name": "before",
  5750. "in": "query"
  5751. },
  5752. {
  5753. "type": "integer",
  5754. "description": "page number of results to return (1-based)",
  5755. "name": "page",
  5756. "in": "query"
  5757. },
  5758. {
  5759. "type": "integer",
  5760. "description": "page size of results, maximum page size is 50",
  5761. "name": "limit",
  5762. "in": "query"
  5763. }
  5764. ],
  5765. "responses": {
  5766. "200": {
  5767. "$ref": "#/responses/NotificationThreadList"
  5768. }
  5769. }
  5770. },
  5771. "put": {
  5772. "consumes": [
  5773. "application/json"
  5774. ],
  5775. "produces": [
  5776. "application/json"
  5777. ],
  5778. "tags": [
  5779. "notification"
  5780. ],
  5781. "summary": "Mark notification threads as read on a specific repo",
  5782. "operationId": "notifyReadRepoList",
  5783. "parameters": [
  5784. {
  5785. "type": "string",
  5786. "description": "owner of the repo",
  5787. "name": "owner",
  5788. "in": "path",
  5789. "required": true
  5790. },
  5791. {
  5792. "type": "string",
  5793. "description": "name of the repo",
  5794. "name": "repo",
  5795. "in": "path",
  5796. "required": true
  5797. },
  5798. {
  5799. "type": "string",
  5800. "format": "date-time",
  5801. "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
  5802. "name": "last_read_at",
  5803. "in": "query"
  5804. }
  5805. ],
  5806. "responses": {
  5807. "205": {
  5808. "$ref": "#/responses/empty"
  5809. }
  5810. }
  5811. }
  5812. },
  5813. "/repos/{owner}/{repo}/pulls": {
  5814. "get": {
  5815. "produces": [
  5816. "application/json"
  5817. ],
  5818. "tags": [
  5819. "repository"
  5820. ],
  5821. "summary": "List a repo's pull requests",
  5822. "operationId": "repoListPullRequests",
  5823. "parameters": [
  5824. {
  5825. "type": "string",
  5826. "description": "owner of the repo",
  5827. "name": "owner",
  5828. "in": "path",
  5829. "required": true
  5830. },
  5831. {
  5832. "type": "string",
  5833. "description": "name of the repo",
  5834. "name": "repo",
  5835. "in": "path",
  5836. "required": true
  5837. },
  5838. {
  5839. "enum": [
  5840. "closed",
  5841. "open",
  5842. "all"
  5843. ],
  5844. "type": "string",
  5845. "description": "State of pull request: open or closed (optional)",
  5846. "name": "state",
  5847. "in": "query"
  5848. },
  5849. {
  5850. "enum": [
  5851. "oldest",
  5852. "recentupdate",
  5853. "leastupdate",
  5854. "mostcomment",
  5855. "leastcomment",
  5856. "priority"
  5857. ],
  5858. "type": "string",
  5859. "description": "Type of sort",
  5860. "name": "sort",
  5861. "in": "query"
  5862. },
  5863. {
  5864. "type": "integer",
  5865. "format": "int64",
  5866. "description": "ID of the milestone",
  5867. "name": "milestone",
  5868. "in": "query"
  5869. },
  5870. {
  5871. "type": "array",
  5872. "items": {
  5873. "type": "integer",
  5874. "format": "int64"
  5875. },
  5876. "collectionFormat": "multi",
  5877. "description": "Label IDs",
  5878. "name": "labels",
  5879. "in": "query"
  5880. },
  5881. {
  5882. "type": "integer",
  5883. "description": "page number of results to return (1-based)",
  5884. "name": "page",
  5885. "in": "query"
  5886. },
  5887. {
  5888. "type": "integer",
  5889. "description": "page size of results, maximum page size is 50",
  5890. "name": "limit",
  5891. "in": "query"
  5892. }
  5893. ],
  5894. "responses": {
  5895. "200": {
  5896. "$ref": "#/responses/PullRequestList"
  5897. }
  5898. }
  5899. },
  5900. "post": {
  5901. "consumes": [
  5902. "application/json"
  5903. ],
  5904. "produces": [
  5905. "application/json"
  5906. ],
  5907. "tags": [
  5908. "repository"
  5909. ],
  5910. "summary": "Create a pull request",
  5911. "operationId": "repoCreatePullRequest",
  5912. "parameters": [
  5913. {
  5914. "type": "string",
  5915. "description": "owner of the repo",
  5916. "name": "owner",
  5917. "in": "path",
  5918. "required": true
  5919. },
  5920. {
  5921. "type": "string",
  5922. "description": "name of the repo",
  5923. "name": "repo",
  5924. "in": "path",
  5925. "required": true
  5926. },
  5927. {
  5928. "name": "body",
  5929. "in": "body",
  5930. "schema": {
  5931. "$ref": "#/definitions/CreatePullRequestOption"
  5932. }
  5933. }
  5934. ],
  5935. "responses": {
  5936. "201": {
  5937. "$ref": "#/responses/PullRequest"
  5938. },
  5939. "409": {
  5940. "$ref": "#/responses/error"
  5941. },
  5942. "422": {
  5943. "$ref": "#/responses/validationError"
  5944. }
  5945. }
  5946. }
  5947. },
  5948. "/repos/{owner}/{repo}/pulls/{index}": {
  5949. "get": {
  5950. "produces": [
  5951. "application/json"
  5952. ],
  5953. "tags": [
  5954. "repository"
  5955. ],
  5956. "summary": "Get a pull request",
  5957. "operationId": "repoGetPullRequest",
  5958. "parameters": [
  5959. {
  5960. "type": "string",
  5961. "description": "owner of the repo",
  5962. "name": "owner",
  5963. "in": "path",
  5964. "required": true
  5965. },
  5966. {
  5967. "type": "string",
  5968. "description": "name of the repo",
  5969. "name": "repo",
  5970. "in": "path",
  5971. "required": true
  5972. },
  5973. {
  5974. "type": "integer",
  5975. "format": "int64",
  5976. "description": "index of the pull request to get",
  5977. "name": "index",
  5978. "in": "path",
  5979. "required": true
  5980. }
  5981. ],
  5982. "responses": {
  5983. "200": {
  5984. "$ref": "#/responses/PullRequest"
  5985. },
  5986. "404": {
  5987. "$ref": "#/responses/notFound"
  5988. }
  5989. }
  5990. },
  5991. "patch": {
  5992. "consumes": [
  5993. "application/json"
  5994. ],
  5995. "produces": [
  5996. "application/json"
  5997. ],
  5998. "tags": [
  5999. "repository"
  6000. ],
  6001. "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.",
  6002. "operationId": "repoEditPullRequest",
  6003. "parameters": [
  6004. {
  6005. "type": "string",
  6006. "description": "owner of the repo",
  6007. "name": "owner",
  6008. "in": "path",
  6009. "required": true
  6010. },
  6011. {
  6012. "type": "string",
  6013. "description": "name of the repo",
  6014. "name": "repo",
  6015. "in": "path",
  6016. "required": true
  6017. },
  6018. {
  6019. "type": "integer",
  6020. "format": "int64",
  6021. "description": "index of the pull request to edit",
  6022. "name": "index",
  6023. "in": "path",
  6024. "required": true
  6025. },
  6026. {
  6027. "name": "body",
  6028. "in": "body",
  6029. "schema": {
  6030. "$ref": "#/definitions/EditPullRequestOption"
  6031. }
  6032. }
  6033. ],
  6034. "responses": {
  6035. "201": {
  6036. "$ref": "#/responses/PullRequest"
  6037. },
  6038. "403": {
  6039. "$ref": "#/responses/forbidden"
  6040. },
  6041. "412": {
  6042. "$ref": "#/responses/error"
  6043. },
  6044. "422": {
  6045. "$ref": "#/responses/validationError"
  6046. }
  6047. }
  6048. }
  6049. },
  6050. "/repos/{owner}/{repo}/pulls/{index}/merge": {
  6051. "get": {
  6052. "produces": [
  6053. "application/json"
  6054. ],
  6055. "tags": [
  6056. "repository"
  6057. ],
  6058. "summary": "Check if a pull request has been merged",
  6059. "operationId": "repoPullRequestIsMerged",
  6060. "parameters": [
  6061. {
  6062. "type": "string",
  6063. "description": "owner of the repo",
  6064. "name": "owner",
  6065. "in": "path",
  6066. "required": true
  6067. },
  6068. {
  6069. "type": "string",
  6070. "description": "name of the repo",
  6071. "name": "repo",
  6072. "in": "path",
  6073. "required": true
  6074. },
  6075. {
  6076. "type": "integer",
  6077. "format": "int64",
  6078. "description": "index of the pull request",
  6079. "name": "index",
  6080. "in": "path",
  6081. "required": true
  6082. }
  6083. ],
  6084. "responses": {
  6085. "204": {
  6086. "description": "pull request has been merged"
  6087. },
  6088. "404": {
  6089. "description": "pull request has not been merged"
  6090. }
  6091. }
  6092. },
  6093. "post": {
  6094. "produces": [
  6095. "application/json"
  6096. ],
  6097. "tags": [
  6098. "repository"
  6099. ],
  6100. "summary": "Merge a pull request",
  6101. "operationId": "repoMergePullRequest",
  6102. "parameters": [
  6103. {
  6104. "type": "string",
  6105. "description": "owner of the repo",
  6106. "name": "owner",
  6107. "in": "path",
  6108. "required": true
  6109. },
  6110. {
  6111. "type": "string",
  6112. "description": "name of the repo",
  6113. "name": "repo",
  6114. "in": "path",
  6115. "required": true
  6116. },
  6117. {
  6118. "type": "integer",
  6119. "format": "int64",
  6120. "description": "index of the pull request to merge",
  6121. "name": "index",
  6122. "in": "path",
  6123. "required": true
  6124. },
  6125. {
  6126. "name": "body",
  6127. "in": "body",
  6128. "schema": {
  6129. "$ref": "#/definitions/MergePullRequestOption"
  6130. }
  6131. }
  6132. ],
  6133. "responses": {
  6134. "200": {
  6135. "$ref": "#/responses/empty"
  6136. },
  6137. "405": {
  6138. "$ref": "#/responses/empty"
  6139. },
  6140. "409": {
  6141. "$ref": "#/responses/error"
  6142. }
  6143. }
  6144. }
  6145. },
  6146. "/repos/{owner}/{repo}/raw/{filepath}": {
  6147. "get": {
  6148. "produces": [
  6149. "application/json"
  6150. ],
  6151. "tags": [
  6152. "repository"
  6153. ],
  6154. "summary": "Get a file from a repository",
  6155. "operationId": "repoGetRawFile",
  6156. "parameters": [
  6157. {
  6158. "type": "string",
  6159. "description": "owner of the repo",
  6160. "name": "owner",
  6161. "in": "path",
  6162. "required": true
  6163. },
  6164. {
  6165. "type": "string",
  6166. "description": "name of the repo",
  6167. "name": "repo",
  6168. "in": "path",
  6169. "required": true
  6170. },
  6171. {
  6172. "type": "string",
  6173. "description": "filepath of the file to get",
  6174. "name": "filepath",
  6175. "in": "path",
  6176. "required": true
  6177. }
  6178. ],
  6179. "responses": {
  6180. "200": {
  6181. "description": "success"
  6182. },
  6183. "404": {
  6184. "$ref": "#/responses/notFound"
  6185. }
  6186. }
  6187. }
  6188. },
  6189. "/repos/{owner}/{repo}/releases": {
  6190. "get": {
  6191. "produces": [
  6192. "application/json"
  6193. ],
  6194. "tags": [
  6195. "repository"
  6196. ],
  6197. "summary": "List a repo's releases",
  6198. "operationId": "repoListReleases",
  6199. "parameters": [
  6200. {
  6201. "type": "string",
  6202. "description": "owner of the repo",
  6203. "name": "owner",
  6204. "in": "path",
  6205. "required": true
  6206. },
  6207. {
  6208. "type": "string",
  6209. "description": "name of the repo",
  6210. "name": "repo",
  6211. "in": "path",
  6212. "required": true
  6213. },
  6214. {
  6215. "type": "integer",
  6216. "description": "items count every page wants to load",
  6217. "name": "per_page",
  6218. "in": "query"
  6219. },
  6220. {
  6221. "type": "integer",
  6222. "description": "page number of results to return (1-based)",
  6223. "name": "page",
  6224. "in": "query"
  6225. },
  6226. {
  6227. "type": "integer",
  6228. "description": "page size of results, maximum page size is 50",
  6229. "name": "limit",
  6230. "in": "query"
  6231. }
  6232. ],
  6233. "responses": {
  6234. "200": {
  6235. "$ref": "#/responses/ReleaseList"
  6236. }
  6237. }
  6238. },
  6239. "post": {
  6240. "consumes": [
  6241. "application/json"
  6242. ],
  6243. "produces": [
  6244. "application/json"
  6245. ],
  6246. "tags": [
  6247. "repository"
  6248. ],
  6249. "summary": "Create a release",
  6250. "operationId": "repoCreateRelease",
  6251. "parameters": [
  6252. {
  6253. "type": "string",
  6254. "description": "owner of the repo",
  6255. "name": "owner",
  6256. "in": "path",
  6257. "required": true
  6258. },
  6259. {
  6260. "type": "string",
  6261. "description": "name of the repo",
  6262. "name": "repo",
  6263. "in": "path",
  6264. "required": true
  6265. },
  6266. {
  6267. "name": "body",
  6268. "in": "body",
  6269. "schema": {
  6270. "$ref": "#/definitions/CreateReleaseOption"
  6271. }
  6272. }
  6273. ],
  6274. "responses": {
  6275. "201": {
  6276. "$ref": "#/responses/Release"
  6277. },
  6278. "409": {
  6279. "$ref": "#/responses/error"
  6280. }
  6281. }
  6282. }
  6283. },
  6284. "/repos/{owner}/{repo}/releases/{id}": {
  6285. "get": {
  6286. "produces": [
  6287. "application/json"
  6288. ],
  6289. "tags": [
  6290. "repository"
  6291. ],
  6292. "summary": "Get a release",
  6293. "operationId": "repoGetRelease",
  6294. "parameters": [
  6295. {
  6296. "type": "string",
  6297. "description": "owner of the repo",
  6298. "name": "owner",
  6299. "in": "path",
  6300. "required": true
  6301. },
  6302. {
  6303. "type": "string",
  6304. "description": "name of the repo",
  6305. "name": "repo",
  6306. "in": "path",
  6307. "required": true
  6308. },
  6309. {
  6310. "type": "integer",
  6311. "format": "int64",
  6312. "description": "id of the release to get",
  6313. "name": "id",
  6314. "in": "path",
  6315. "required": true
  6316. }
  6317. ],
  6318. "responses": {
  6319. "200": {
  6320. "$ref": "#/responses/Release"
  6321. }
  6322. }
  6323. },
  6324. "delete": {
  6325. "tags": [
  6326. "repository"
  6327. ],
  6328. "summary": "Delete a release",
  6329. "operationId": "repoDeleteRelease",
  6330. "parameters": [
  6331. {
  6332. "type": "string",
  6333. "description": "owner of the repo",
  6334. "name": "owner",
  6335. "in": "path",
  6336. "required": true
  6337. },
  6338. {
  6339. "type": "string",
  6340. "description": "name of the repo",
  6341. "name": "repo",
  6342. "in": "path",
  6343. "required": true
  6344. },
  6345. {
  6346. "type": "integer",
  6347. "format": "int64",
  6348. "description": "id of the release to delete",
  6349. "name": "id",
  6350. "in": "path",
  6351. "required": true
  6352. }
  6353. ],
  6354. "responses": {
  6355. "204": {
  6356. "$ref": "#/responses/empty"
  6357. }
  6358. }
  6359. },
  6360. "patch": {
  6361. "consumes": [
  6362. "application/json"
  6363. ],
  6364. "produces": [
  6365. "application/json"
  6366. ],
  6367. "tags": [
  6368. "repository"
  6369. ],
  6370. "summary": "Update a release",
  6371. "operationId": "repoEditRelease",
  6372. "parameters": [
  6373. {
  6374. "type": "string",
  6375. "description": "owner of the repo",
  6376. "name": "owner",
  6377. "in": "path",
  6378. "required": true
  6379. },
  6380. {
  6381. "type": "string",
  6382. "description": "name of the repo",
  6383. "name": "repo",
  6384. "in": "path",
  6385. "required": true
  6386. },
  6387. {
  6388. "type": "integer",
  6389. "format": "int64",
  6390. "description": "id of the release to edit",
  6391. "name": "id",
  6392. "in": "path",
  6393. "required": true
  6394. },
  6395. {
  6396. "name": "body",
  6397. "in": "body",
  6398. "schema": {
  6399. "$ref": "#/definitions/EditReleaseOption"
  6400. }
  6401. }
  6402. ],
  6403. "responses": {
  6404. "200": {
  6405. "$ref": "#/responses/Release"
  6406. }
  6407. }
  6408. }
  6409. },
  6410. "/repos/{owner}/{repo}/releases/{id}/assets": {
  6411. "get": {
  6412. "produces": [
  6413. "application/json"
  6414. ],
  6415. "tags": [
  6416. "repository"
  6417. ],
  6418. "summary": "List release's attachments",
  6419. "operationId": "repoListReleaseAttachments",
  6420. "parameters": [
  6421. {
  6422. "type": "string",
  6423. "description": "owner of the repo",
  6424. "name": "owner",
  6425. "in": "path",
  6426. "required": true
  6427. },
  6428. {
  6429. "type": "string",
  6430. "description": "name of the repo",
  6431. "name": "repo",
  6432. "in": "path",
  6433. "required": true
  6434. },
  6435. {
  6436. "type": "integer",
  6437. "format": "int64",
  6438. "description": "id of the release",
  6439. "name": "id",
  6440. "in": "path",
  6441. "required": true
  6442. }
  6443. ],
  6444. "responses": {
  6445. "200": {
  6446. "$ref": "#/responses/AttachmentList"
  6447. }
  6448. }
  6449. },
  6450. "post": {
  6451. "consumes": [
  6452. "multipart/form-data"
  6453. ],
  6454. "produces": [
  6455. "application/json"
  6456. ],
  6457. "tags": [
  6458. "repository"
  6459. ],
  6460. "summary": "Create a release attachment",
  6461. "operationId": "repoCreateReleaseAttachment",
  6462. "parameters": [
  6463. {
  6464. "type": "string",
  6465. "description": "owner of the repo",
  6466. "name": "owner",
  6467. "in": "path",
  6468. "required": true
  6469. },
  6470. {
  6471. "type": "string",
  6472. "description": "name of the repo",
  6473. "name": "repo",
  6474. "in": "path",
  6475. "required": true
  6476. },
  6477. {
  6478. "type": "integer",
  6479. "format": "int64",
  6480. "description": "id of the release",
  6481. "name": "id",
  6482. "in": "path",
  6483. "required": true
  6484. },
  6485. {
  6486. "type": "string",
  6487. "description": "name of the attachment",
  6488. "name": "name",
  6489. "in": "query"
  6490. },
  6491. {
  6492. "type": "file",
  6493. "description": "attachment to upload",
  6494. "name": "attachment",
  6495. "in": "formData",
  6496. "required": true
  6497. }
  6498. ],
  6499. "responses": {
  6500. "201": {
  6501. "$ref": "#/responses/Attachment"
  6502. },
  6503. "400": {
  6504. "$ref": "#/responses/error"
  6505. }
  6506. }
  6507. }
  6508. },
  6509. "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": {
  6510. "get": {
  6511. "produces": [
  6512. "application/json"
  6513. ],
  6514. "tags": [
  6515. "repository"
  6516. ],
  6517. "summary": "Get a release attachment",
  6518. "operationId": "repoGetReleaseAttachment",
  6519. "parameters": [
  6520. {
  6521. "type": "string",
  6522. "description": "owner of the repo",
  6523. "name": "owner",
  6524. "in": "path",
  6525. "required": true
  6526. },
  6527. {
  6528. "type": "string",
  6529. "description": "name of the repo",
  6530. "name": "repo",
  6531. "in": "path",
  6532. "required": true
  6533. },
  6534. {
  6535. "type": "integer",
  6536. "format": "int64",
  6537. "description": "id of the release",
  6538. "name": "id",
  6539. "in": "path",
  6540. "required": true
  6541. },
  6542. {
  6543. "type": "integer",
  6544. "format": "int64",
  6545. "description": "id of the attachment to get",
  6546. "name": "attachment_id",
  6547. "in": "path",
  6548. "required": true
  6549. }
  6550. ],
  6551. "responses": {
  6552. "200": {
  6553. "$ref": "#/responses/Attachment"
  6554. }
  6555. }
  6556. },
  6557. "delete": {
  6558. "produces": [
  6559. "application/json"
  6560. ],
  6561. "tags": [
  6562. "repository"
  6563. ],
  6564. "summary": "Delete a release attachment",
  6565. "operationId": "repoDeleteReleaseAttachment",
  6566. "parameters": [
  6567. {
  6568. "type": "string",
  6569. "description": "owner of the repo",
  6570. "name": "owner",
  6571. "in": "path",
  6572. "required": true
  6573. },
  6574. {
  6575. "type": "string",
  6576. "description": "name of the repo",
  6577. "name": "repo",
  6578. "in": "path",
  6579. "required": true
  6580. },
  6581. {
  6582. "type": "integer",
  6583. "format": "int64",
  6584. "description": "id of the release",
  6585. "name": "id",
  6586. "in": "path",
  6587. "required": true
  6588. },
  6589. {
  6590. "type": "integer",
  6591. "format": "int64",
  6592. "description": "id of the attachment to delete",
  6593. "name": "attachment_id",
  6594. "in": "path",
  6595. "required": true
  6596. }
  6597. ],
  6598. "responses": {
  6599. "204": {
  6600. "$ref": "#/responses/empty"
  6601. }
  6602. }
  6603. },
  6604. "patch": {
  6605. "consumes": [
  6606. "application/json"
  6607. ],
  6608. "produces": [
  6609. "application/json"
  6610. ],
  6611. "tags": [
  6612. "repository"
  6613. ],
  6614. "summary": "Edit a release attachment",
  6615. "operationId": "repoEditReleaseAttachment",
  6616. "parameters": [
  6617. {
  6618. "type": "string",
  6619. "description": "owner of the repo",
  6620. "name": "owner",
  6621. "in": "path",
  6622. "required": true
  6623. },
  6624. {
  6625. "type": "string",
  6626. "description": "name of the repo",
  6627. "name": "repo",
  6628. "in": "path",
  6629. "required": true
  6630. },
  6631. {
  6632. "type": "integer",
  6633. "format": "int64",
  6634. "description": "id of the release",
  6635. "name": "id",
  6636. "in": "path",
  6637. "required": true
  6638. },
  6639. {
  6640. "type": "integer",
  6641. "format": "int64",
  6642. "description": "id of the attachment to edit",
  6643. "name": "attachment_id",
  6644. "in": "path",
  6645. "required": true
  6646. },
  6647. {
  6648. "name": "body",
  6649. "in": "body",
  6650. "schema": {
  6651. "$ref": "#/definitions/EditAttachmentOptions"
  6652. }
  6653. }
  6654. ],
  6655. "responses": {
  6656. "201": {
  6657. "$ref": "#/responses/Attachment"
  6658. }
  6659. }
  6660. }
  6661. },
  6662. "/repos/{owner}/{repo}/signing-key.gpg": {
  6663. "get": {
  6664. "produces": [
  6665. "text/plain"
  6666. ],
  6667. "tags": [
  6668. "repository"
  6669. ],
  6670. "summary": "Get signing-key.gpg for given repository",
  6671. "operationId": "repoSigningKey",
  6672. "parameters": [
  6673. {
  6674. "type": "string",
  6675. "description": "owner of the repo",
  6676. "name": "owner",
  6677. "in": "path",
  6678. "required": true
  6679. },
  6680. {
  6681. "type": "string",
  6682. "description": "name of the repo",
  6683. "name": "repo",
  6684. "in": "path",
  6685. "required": true
  6686. }
  6687. ],
  6688. "responses": {
  6689. "200": {
  6690. "description": "GPG armored public key",
  6691. "schema": {
  6692. "type": "string"
  6693. }
  6694. }
  6695. }
  6696. }
  6697. },
  6698. "/repos/{owner}/{repo}/stargazers": {
  6699. "get": {
  6700. "produces": [
  6701. "application/json"
  6702. ],
  6703. "tags": [
  6704. "repository"
  6705. ],
  6706. "summary": "List a repo's stargazers",
  6707. "operationId": "repoListStargazers",
  6708. "parameters": [
  6709. {
  6710. "type": "string",
  6711. "description": "owner of the repo",
  6712. "name": "owner",
  6713. "in": "path",
  6714. "required": true
  6715. },
  6716. {
  6717. "type": "string",
  6718. "description": "name of the repo",
  6719. "name": "repo",
  6720. "in": "path",
  6721. "required": true
  6722. },
  6723. {
  6724. "type": "integer",
  6725. "description": "page number of results to return (1-based)",
  6726. "name": "page",
  6727. "in": "query"
  6728. },
  6729. {
  6730. "type": "integer",
  6731. "description": "page size of results, maximum page size is 50",
  6732. "name": "limit",
  6733. "in": "query"
  6734. }
  6735. ],
  6736. "responses": {
  6737. "200": {
  6738. "$ref": "#/responses/UserList"
  6739. }
  6740. }
  6741. }
  6742. },
  6743. "/repos/{owner}/{repo}/statuses/{sha}": {
  6744. "get": {
  6745. "produces": [
  6746. "application/json"
  6747. ],
  6748. "tags": [
  6749. "repository"
  6750. ],
  6751. "summary": "Get a commit's statuses",
  6752. "operationId": "repoListStatuses",
  6753. "parameters": [
  6754. {
  6755. "type": "string",
  6756. "description": "owner of the repo",
  6757. "name": "owner",
  6758. "in": "path",
  6759. "required": true
  6760. },
  6761. {
  6762. "type": "string",
  6763. "description": "name of the repo",
  6764. "name": "repo",
  6765. "in": "path",
  6766. "required": true
  6767. },
  6768. {
  6769. "type": "string",
  6770. "description": "sha of the commit",
  6771. "name": "sha",
  6772. "in": "path",
  6773. "required": true
  6774. },
  6775. {
  6776. "enum": [
  6777. "oldest",
  6778. "recentupdate",
  6779. "leastupdate",
  6780. "leastindex",
  6781. "highestindex"
  6782. ],
  6783. "type": "string",
  6784. "description": "type of sort",
  6785. "name": "sort",
  6786. "in": "query"
  6787. },
  6788. {
  6789. "enum": [
  6790. "pending",
  6791. "success",
  6792. "error",
  6793. "failure",
  6794. "warning"
  6795. ],
  6796. "type": "string",
  6797. "description": "type of state",
  6798. "name": "state",
  6799. "in": "query"
  6800. },
  6801. {
  6802. "type": "integer",
  6803. "description": "page number of results to return (1-based)",
  6804. "name": "page",
  6805. "in": "query"
  6806. },
  6807. {
  6808. "type": "integer",
  6809. "description": "page size of results, maximum page size is 50",
  6810. "name": "limit",
  6811. "in": "query"
  6812. }
  6813. ],
  6814. "responses": {
  6815. "200": {
  6816. "$ref": "#/responses/StatusList"
  6817. },
  6818. "400": {
  6819. "$ref": "#/responses/error"
  6820. }
  6821. }
  6822. },
  6823. "post": {
  6824. "produces": [
  6825. "application/json"
  6826. ],
  6827. "tags": [
  6828. "repository"
  6829. ],
  6830. "summary": "Create a commit status",
  6831. "operationId": "repoCreateStatus",
  6832. "parameters": [
  6833. {
  6834. "type": "string",
  6835. "description": "owner of the repo",
  6836. "name": "owner",
  6837. "in": "path",
  6838. "required": true
  6839. },
  6840. {
  6841. "type": "string",
  6842. "description": "name of the repo",
  6843. "name": "repo",
  6844. "in": "path",
  6845. "required": true
  6846. },
  6847. {
  6848. "type": "string",
  6849. "description": "sha of the commit",
  6850. "name": "sha",
  6851. "in": "path",
  6852. "required": true
  6853. },
  6854. {
  6855. "name": "body",
  6856. "in": "body",
  6857. "schema": {
  6858. "$ref": "#/definitions/CreateStatusOption"
  6859. }
  6860. }
  6861. ],
  6862. "responses": {
  6863. "201": {
  6864. "$ref": "#/responses/Status"
  6865. },
  6866. "400": {
  6867. "$ref": "#/responses/error"
  6868. }
  6869. }
  6870. }
  6871. },
  6872. "/repos/{owner}/{repo}/subscribers": {
  6873. "get": {
  6874. "produces": [
  6875. "application/json"
  6876. ],
  6877. "tags": [
  6878. "repository"
  6879. ],
  6880. "summary": "List a repo's watchers",
  6881. "operationId": "repoListSubscribers",
  6882. "parameters": [
  6883. {
  6884. "type": "string",
  6885. "description": "owner of the repo",
  6886. "name": "owner",
  6887. "in": "path",
  6888. "required": true
  6889. },
  6890. {
  6891. "type": "string",
  6892. "description": "name of the repo",
  6893. "name": "repo",
  6894. "in": "path",
  6895. "required": true
  6896. },
  6897. {
  6898. "type": "integer",
  6899. "description": "page number of results to return (1-based)",
  6900. "name": "page",
  6901. "in": "query"
  6902. },
  6903. {
  6904. "type": "integer",
  6905. "description": "page size of results, maximum page size is 50",
  6906. "name": "limit",
  6907. "in": "query"
  6908. }
  6909. ],
  6910. "responses": {
  6911. "200": {
  6912. "$ref": "#/responses/UserList"
  6913. }
  6914. }
  6915. }
  6916. },
  6917. "/repos/{owner}/{repo}/subscription": {
  6918. "get": {
  6919. "tags": [
  6920. "repository"
  6921. ],
  6922. "summary": "Check if the current user is watching a repo",
  6923. "operationId": "userCurrentCheckSubscription",
  6924. "parameters": [
  6925. {
  6926. "type": "string",
  6927. "description": "owner of the repo",
  6928. "name": "owner",
  6929. "in": "path",
  6930. "required": true
  6931. },
  6932. {
  6933. "type": "string",
  6934. "description": "name of the repo",
  6935. "name": "repo",
  6936. "in": "path",
  6937. "required": true
  6938. }
  6939. ],
  6940. "responses": {
  6941. "200": {
  6942. "$ref": "#/responses/WatchInfo"
  6943. }
  6944. }
  6945. },
  6946. "put": {
  6947. "tags": [
  6948. "repository"
  6949. ],
  6950. "summary": "Watch a repo",
  6951. "operationId": "userCurrentPutSubscription",
  6952. "parameters": [
  6953. {
  6954. "type": "string",
  6955. "description": "owner of the repo",
  6956. "name": "owner",
  6957. "in": "path",
  6958. "required": true
  6959. },
  6960. {
  6961. "type": "string",
  6962. "description": "name of the repo",
  6963. "name": "repo",
  6964. "in": "path",
  6965. "required": true
  6966. }
  6967. ],
  6968. "responses": {
  6969. "200": {
  6970. "$ref": "#/responses/WatchInfo"
  6971. }
  6972. }
  6973. },
  6974. "delete": {
  6975. "tags": [
  6976. "repository"
  6977. ],
  6978. "summary": "Unwatch a repo",
  6979. "operationId": "userCurrentDeleteSubscription",
  6980. "parameters": [
  6981. {
  6982. "type": "string",
  6983. "description": "owner of the repo",
  6984. "name": "owner",
  6985. "in": "path",
  6986. "required": true
  6987. },
  6988. {
  6989. "type": "string",
  6990. "description": "name of the repo",
  6991. "name": "repo",
  6992. "in": "path",
  6993. "required": true
  6994. }
  6995. ],
  6996. "responses": {
  6997. "204": {
  6998. "$ref": "#/responses/empty"
  6999. }
  7000. }
  7001. }
  7002. },
  7003. "/repos/{owner}/{repo}/tags": {
  7004. "get": {
  7005. "produces": [
  7006. "application/json"
  7007. ],
  7008. "tags": [
  7009. "repository"
  7010. ],
  7011. "summary": "List a repository's tags",
  7012. "operationId": "repoListTags",
  7013. "parameters": [
  7014. {
  7015. "type": "string",
  7016. "description": "owner of the repo",
  7017. "name": "owner",
  7018. "in": "path",
  7019. "required": true
  7020. },
  7021. {
  7022. "type": "string",
  7023. "description": "name of the repo",
  7024. "name": "repo",
  7025. "in": "path",
  7026. "required": true
  7027. }
  7028. ],
  7029. "responses": {
  7030. "200": {
  7031. "$ref": "#/responses/TagList"
  7032. }
  7033. }
  7034. }
  7035. },
  7036. "/repos/{owner}/{repo}/times": {
  7037. "get": {
  7038. "produces": [
  7039. "application/json"
  7040. ],
  7041. "tags": [
  7042. "repository"
  7043. ],
  7044. "summary": "List a repo's tracked times",
  7045. "operationId": "repoTrackedTimes",
  7046. "parameters": [
  7047. {
  7048. "type": "string",
  7049. "description": "owner of the repo",
  7050. "name": "owner",
  7051. "in": "path",
  7052. "required": true
  7053. },
  7054. {
  7055. "type": "string",
  7056. "description": "name of the repo",
  7057. "name": "repo",
  7058. "in": "path",
  7059. "required": true
  7060. },
  7061. {
  7062. "type": "string",
  7063. "description": "optional filter by user",
  7064. "name": "user",
  7065. "in": "query"
  7066. },
  7067. {
  7068. "type": "string",
  7069. "format": "date-time",
  7070. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  7071. "name": "since",
  7072. "in": "query"
  7073. },
  7074. {
  7075. "type": "string",
  7076. "format": "date-time",
  7077. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  7078. "name": "before",
  7079. "in": "query"
  7080. },
  7081. {
  7082. "type": "integer",
  7083. "description": "page number of results to return (1-based)",
  7084. "name": "page",
  7085. "in": "query"
  7086. },
  7087. {
  7088. "type": "integer",
  7089. "description": "page size of results, maximum page size is 50",
  7090. "name": "limit",
  7091. "in": "query"
  7092. }
  7093. ],
  7094. "responses": {
  7095. "200": {
  7096. "$ref": "#/responses/TrackedTimeList"
  7097. },
  7098. "400": {
  7099. "$ref": "#/responses/error"
  7100. },
  7101. "403": {
  7102. "$ref": "#/responses/forbidden"
  7103. }
  7104. }
  7105. }
  7106. },
  7107. "/repos/{owner}/{repo}/times/{user}": {
  7108. "get": {
  7109. "produces": [
  7110. "application/json"
  7111. ],
  7112. "tags": [
  7113. "repository"
  7114. ],
  7115. "summary": "List a user's tracked times in a repo",
  7116. "operationId": "userTrackedTimes",
  7117. "deprecated": true,
  7118. "parameters": [
  7119. {
  7120. "type": "string",
  7121. "description": "owner of the repo",
  7122. "name": "owner",
  7123. "in": "path",
  7124. "required": true
  7125. },
  7126. {
  7127. "type": "string",
  7128. "description": "name of the repo",
  7129. "name": "repo",
  7130. "in": "path",
  7131. "required": true
  7132. },
  7133. {
  7134. "type": "string",
  7135. "description": "username of user",
  7136. "name": "user",
  7137. "in": "path",
  7138. "required": true
  7139. }
  7140. ],
  7141. "responses": {
  7142. "200": {
  7143. "$ref": "#/responses/TrackedTimeList"
  7144. },
  7145. "400": {
  7146. "$ref": "#/responses/error"
  7147. },
  7148. "403": {
  7149. "$ref": "#/responses/forbidden"
  7150. }
  7151. }
  7152. }
  7153. },
  7154. "/repos/{owner}/{repo}/topics": {
  7155. "get": {
  7156. "produces": [
  7157. "application/json"
  7158. ],
  7159. "tags": [
  7160. "repository"
  7161. ],
  7162. "summary": "Get list of topics that a repository has",
  7163. "operationId": "repoListTopics",
  7164. "parameters": [
  7165. {
  7166. "type": "string",
  7167. "description": "owner of the repo",
  7168. "name": "owner",
  7169. "in": "path",
  7170. "required": true
  7171. },
  7172. {
  7173. "type": "string",
  7174. "description": "name of the repo",
  7175. "name": "repo",
  7176. "in": "path",
  7177. "required": true
  7178. },
  7179. {
  7180. "type": "integer",
  7181. "description": "page number of results to return (1-based)",
  7182. "name": "page",
  7183. "in": "query"
  7184. },
  7185. {
  7186. "type": "integer",
  7187. "description": "page size of results, maximum page size is 50",
  7188. "name": "limit",
  7189. "in": "query"
  7190. }
  7191. ],
  7192. "responses": {
  7193. "200": {
  7194. "$ref": "#/responses/TopicNames"
  7195. }
  7196. }
  7197. },
  7198. "put": {
  7199. "produces": [
  7200. "application/json"
  7201. ],
  7202. "tags": [
  7203. "repository"
  7204. ],
  7205. "summary": "Replace list of topics for a repository",
  7206. "operationId": "repoUpdateTopics",
  7207. "parameters": [
  7208. {
  7209. "type": "string",
  7210. "description": "owner of the repo",
  7211. "name": "owner",
  7212. "in": "path",
  7213. "required": true
  7214. },
  7215. {
  7216. "type": "string",
  7217. "description": "name of the repo",
  7218. "name": "repo",
  7219. "in": "path",
  7220. "required": true
  7221. },
  7222. {
  7223. "name": "body",
  7224. "in": "body",
  7225. "schema": {
  7226. "$ref": "#/definitions/RepoTopicOptions"
  7227. }
  7228. }
  7229. ],
  7230. "responses": {
  7231. "204": {
  7232. "$ref": "#/responses/empty"
  7233. },
  7234. "422": {
  7235. "$ref": "#/responses/invalidTopicsError"
  7236. }
  7237. }
  7238. }
  7239. },
  7240. "/repos/{owner}/{repo}/topics/{topic}": {
  7241. "put": {
  7242. "produces": [
  7243. "application/json"
  7244. ],
  7245. "tags": [
  7246. "repository"
  7247. ],
  7248. "summary": "Add a topic to a repository",
  7249. "operationId": "repoAddTopíc",
  7250. "parameters": [
  7251. {
  7252. "type": "string",
  7253. "description": "owner of the repo",
  7254. "name": "owner",
  7255. "in": "path",
  7256. "required": true
  7257. },
  7258. {
  7259. "type": "string",
  7260. "description": "name of the repo",
  7261. "name": "repo",
  7262. "in": "path",
  7263. "required": true
  7264. },
  7265. {
  7266. "type": "string",
  7267. "description": "name of the topic to add",
  7268. "name": "topic",
  7269. "in": "path",
  7270. "required": true
  7271. }
  7272. ],
  7273. "responses": {
  7274. "204": {
  7275. "$ref": "#/responses/empty"
  7276. },
  7277. "422": {
  7278. "$ref": "#/responses/invalidTopicsError"
  7279. }
  7280. }
  7281. },
  7282. "delete": {
  7283. "produces": [
  7284. "application/json"
  7285. ],
  7286. "tags": [
  7287. "repository"
  7288. ],
  7289. "summary": "Delete a topic from a repository",
  7290. "operationId": "repoDeleteTopic",
  7291. "parameters": [
  7292. {
  7293. "type": "string",
  7294. "description": "owner of the repo",
  7295. "name": "owner",
  7296. "in": "path",
  7297. "required": true
  7298. },
  7299. {
  7300. "type": "string",
  7301. "description": "name of the repo",
  7302. "name": "repo",
  7303. "in": "path",
  7304. "required": true
  7305. },
  7306. {
  7307. "type": "string",
  7308. "description": "name of the topic to delete",
  7309. "name": "topic",
  7310. "in": "path",
  7311. "required": true
  7312. }
  7313. ],
  7314. "responses": {
  7315. "204": {
  7316. "$ref": "#/responses/empty"
  7317. },
  7318. "422": {
  7319. "$ref": "#/responses/invalidTopicsError"
  7320. }
  7321. }
  7322. }
  7323. },
  7324. "/repositories/{id}": {
  7325. "get": {
  7326. "produces": [
  7327. "application/json"
  7328. ],
  7329. "tags": [
  7330. "repository"
  7331. ],
  7332. "summary": "Get a repository by id",
  7333. "operationId": "repoGetByID",
  7334. "parameters": [
  7335. {
  7336. "type": "integer",
  7337. "format": "int64",
  7338. "description": "id of the repo to get",
  7339. "name": "id",
  7340. "in": "path",
  7341. "required": true
  7342. }
  7343. ],
  7344. "responses": {
  7345. "200": {
  7346. "$ref": "#/responses/Repository"
  7347. }
  7348. }
  7349. }
  7350. },
  7351. "/signing-key.gpg": {
  7352. "get": {
  7353. "produces": [
  7354. "text/plain"
  7355. ],
  7356. "tags": [
  7357. "miscellaneous"
  7358. ],
  7359. "summary": "Get default signing-key.gpg",
  7360. "operationId": "getSigningKey",
  7361. "responses": {
  7362. "200": {
  7363. "description": "GPG armored public key",
  7364. "schema": {
  7365. "type": "string"
  7366. }
  7367. }
  7368. }
  7369. }
  7370. },
  7371. "/teams/{id}": {
  7372. "get": {
  7373. "produces": [
  7374. "application/json"
  7375. ],
  7376. "tags": [
  7377. "organization"
  7378. ],
  7379. "summary": "Get a team",
  7380. "operationId": "orgGetTeam",
  7381. "parameters": [
  7382. {
  7383. "type": "integer",
  7384. "format": "int64",
  7385. "description": "id of the team to get",
  7386. "name": "id",
  7387. "in": "path",
  7388. "required": true
  7389. }
  7390. ],
  7391. "responses": {
  7392. "200": {
  7393. "$ref": "#/responses/Team"
  7394. }
  7395. }
  7396. },
  7397. "delete": {
  7398. "tags": [
  7399. "organization"
  7400. ],
  7401. "summary": "Delete a team",
  7402. "operationId": "orgDeleteTeam",
  7403. "parameters": [
  7404. {
  7405. "type": "integer",
  7406. "format": "int64",
  7407. "description": "id of the team to delete",
  7408. "name": "id",
  7409. "in": "path",
  7410. "required": true
  7411. }
  7412. ],
  7413. "responses": {
  7414. "204": {
  7415. "description": "team deleted"
  7416. }
  7417. }
  7418. },
  7419. "patch": {
  7420. "consumes": [
  7421. "application/json"
  7422. ],
  7423. "produces": [
  7424. "application/json"
  7425. ],
  7426. "tags": [
  7427. "organization"
  7428. ],
  7429. "summary": "Edit a team",
  7430. "operationId": "orgEditTeam",
  7431. "parameters": [
  7432. {
  7433. "type": "integer",
  7434. "description": "id of the team to edit",
  7435. "name": "id",
  7436. "in": "path",
  7437. "required": true
  7438. },
  7439. {
  7440. "name": "body",
  7441. "in": "body",
  7442. "schema": {
  7443. "$ref": "#/definitions/EditTeamOption"
  7444. }
  7445. }
  7446. ],
  7447. "responses": {
  7448. "200": {
  7449. "$ref": "#/responses/Team"
  7450. }
  7451. }
  7452. }
  7453. },
  7454. "/teams/{id}/members": {
  7455. "get": {
  7456. "produces": [
  7457. "application/json"
  7458. ],
  7459. "tags": [
  7460. "organization"
  7461. ],
  7462. "summary": "List a team's members",
  7463. "operationId": "orgListTeamMembers",
  7464. "parameters": [
  7465. {
  7466. "type": "integer",
  7467. "format": "int64",
  7468. "description": "id of the team",
  7469. "name": "id",
  7470. "in": "path",
  7471. "required": true
  7472. },
  7473. {
  7474. "type": "integer",
  7475. "description": "page number of results to return (1-based)",
  7476. "name": "page",
  7477. "in": "query"
  7478. },
  7479. {
  7480. "type": "integer",
  7481. "description": "page size of results, maximum page size is 50",
  7482. "name": "limit",
  7483. "in": "query"
  7484. }
  7485. ],
  7486. "responses": {
  7487. "200": {
  7488. "$ref": "#/responses/UserList"
  7489. }
  7490. }
  7491. }
  7492. },
  7493. "/teams/{id}/members/{username}": {
  7494. "get": {
  7495. "produces": [
  7496. "application/json"
  7497. ],
  7498. "tags": [
  7499. "organization"
  7500. ],
  7501. "summary": "List a particular member of team",
  7502. "operationId": "orgListTeamMember",
  7503. "parameters": [
  7504. {
  7505. "type": "integer",
  7506. "format": "int64",
  7507. "description": "id of the team",
  7508. "name": "id",
  7509. "in": "path",
  7510. "required": true
  7511. },
  7512. {
  7513. "type": "string",
  7514. "description": "username of the member to list",
  7515. "name": "username",
  7516. "in": "path",
  7517. "required": true
  7518. }
  7519. ],
  7520. "responses": {
  7521. "200": {
  7522. "$ref": "#/responses/User"
  7523. },
  7524. "404": {
  7525. "$ref": "#/responses/notFound"
  7526. }
  7527. }
  7528. },
  7529. "put": {
  7530. "produces": [
  7531. "application/json"
  7532. ],
  7533. "tags": [
  7534. "organization"
  7535. ],
  7536. "summary": "Add a team member",
  7537. "operationId": "orgAddTeamMember",
  7538. "parameters": [
  7539. {
  7540. "type": "integer",
  7541. "format": "int64",
  7542. "description": "id of the team",
  7543. "name": "id",
  7544. "in": "path",
  7545. "required": true
  7546. },
  7547. {
  7548. "type": "string",
  7549. "description": "username of the user to add",
  7550. "name": "username",
  7551. "in": "path",
  7552. "required": true
  7553. }
  7554. ],
  7555. "responses": {
  7556. "204": {
  7557. "$ref": "#/responses/empty"
  7558. },
  7559. "404": {
  7560. "$ref": "#/responses/notFound"
  7561. }
  7562. }
  7563. },
  7564. "delete": {
  7565. "produces": [
  7566. "application/json"
  7567. ],
  7568. "tags": [
  7569. "organization"
  7570. ],
  7571. "summary": "Remove a team member",
  7572. "operationId": "orgRemoveTeamMember",
  7573. "parameters": [
  7574. {
  7575. "type": "integer",
  7576. "format": "int64",
  7577. "description": "id of the team",
  7578. "name": "id",
  7579. "in": "path",
  7580. "required": true
  7581. },
  7582. {
  7583. "type": "string",
  7584. "description": "username of the user to remove",
  7585. "name": "username",
  7586. "in": "path",
  7587. "required": true
  7588. }
  7589. ],
  7590. "responses": {
  7591. "204": {
  7592. "$ref": "#/responses/empty"
  7593. },
  7594. "404": {
  7595. "$ref": "#/responses/notFound"
  7596. }
  7597. }
  7598. }
  7599. },
  7600. "/teams/{id}/repos": {
  7601. "get": {
  7602. "produces": [
  7603. "application/json"
  7604. ],
  7605. "tags": [
  7606. "organization"
  7607. ],
  7608. "summary": "List a team's repos",
  7609. "operationId": "orgListTeamRepos",
  7610. "parameters": [
  7611. {
  7612. "type": "integer",
  7613. "format": "int64",
  7614. "description": "id of the team",
  7615. "name": "id",
  7616. "in": "path",
  7617. "required": true
  7618. },
  7619. {
  7620. "type": "integer",
  7621. "description": "page number of results to return (1-based)",
  7622. "name": "page",
  7623. "in": "query"
  7624. },
  7625. {
  7626. "type": "integer",
  7627. "description": "page size of results, maximum page size is 50",
  7628. "name": "limit",
  7629. "in": "query"
  7630. }
  7631. ],
  7632. "responses": {
  7633. "200": {
  7634. "$ref": "#/responses/RepositoryList"
  7635. }
  7636. }
  7637. }
  7638. },
  7639. "/teams/{id}/repos/{org}/{repo}": {
  7640. "put": {
  7641. "produces": [
  7642. "application/json"
  7643. ],
  7644. "tags": [
  7645. "organization"
  7646. ],
  7647. "summary": "Add a repository to a team",
  7648. "operationId": "orgAddTeamRepository",
  7649. "parameters": [
  7650. {
  7651. "type": "integer",
  7652. "format": "int64",
  7653. "description": "id of the team",
  7654. "name": "id",
  7655. "in": "path",
  7656. "required": true
  7657. },
  7658. {
  7659. "type": "string",
  7660. "description": "organization that owns the repo to add",
  7661. "name": "org",
  7662. "in": "path",
  7663. "required": true
  7664. },
  7665. {
  7666. "type": "string",
  7667. "description": "name of the repo to add",
  7668. "name": "repo",
  7669. "in": "path",
  7670. "required": true
  7671. }
  7672. ],
  7673. "responses": {
  7674. "204": {
  7675. "$ref": "#/responses/empty"
  7676. },
  7677. "403": {
  7678. "$ref": "#/responses/forbidden"
  7679. }
  7680. }
  7681. },
  7682. "delete": {
  7683. "description": "This does not delete the repository, it only removes the repository from the team.",
  7684. "produces": [
  7685. "application/json"
  7686. ],
  7687. "tags": [
  7688. "organization"
  7689. ],
  7690. "summary": "Remove a repository from a team",
  7691. "operationId": "orgRemoveTeamRepository",
  7692. "parameters": [
  7693. {
  7694. "type": "integer",
  7695. "format": "int64",
  7696. "description": "id of the team",
  7697. "name": "id",
  7698. "in": "path",
  7699. "required": true
  7700. },
  7701. {
  7702. "type": "string",
  7703. "description": "organization that owns the repo to remove",
  7704. "name": "org",
  7705. "in": "path",
  7706. "required": true
  7707. },
  7708. {
  7709. "type": "string",
  7710. "description": "name of the repo to remove",
  7711. "name": "repo",
  7712. "in": "path",
  7713. "required": true
  7714. }
  7715. ],
  7716. "responses": {
  7717. "204": {
  7718. "$ref": "#/responses/empty"
  7719. },
  7720. "403": {
  7721. "$ref": "#/responses/forbidden"
  7722. }
  7723. }
  7724. }
  7725. },
  7726. "/topics/search": {
  7727. "get": {
  7728. "produces": [
  7729. "application/json"
  7730. ],
  7731. "tags": [
  7732. "repository"
  7733. ],
  7734. "summary": "search topics via keyword",
  7735. "operationId": "topicSearch",
  7736. "parameters": [
  7737. {
  7738. "type": "string",
  7739. "description": "keywords to search",
  7740. "name": "q",
  7741. "in": "query",
  7742. "required": true
  7743. },
  7744. {
  7745. "type": "integer",
  7746. "description": "page number of results to return (1-based)",
  7747. "name": "page",
  7748. "in": "query"
  7749. },
  7750. {
  7751. "type": "integer",
  7752. "description": "page size of results, maximum page size is 50",
  7753. "name": "limit",
  7754. "in": "query"
  7755. }
  7756. ],
  7757. "responses": {
  7758. "200": {
  7759. "$ref": "#/responses/TopicListResponse"
  7760. },
  7761. "403": {
  7762. "$ref": "#/responses/forbidden"
  7763. }
  7764. }
  7765. }
  7766. },
  7767. "/user": {
  7768. "get": {
  7769. "produces": [
  7770. "application/json"
  7771. ],
  7772. "tags": [
  7773. "user"
  7774. ],
  7775. "summary": "Get the authenticated user",
  7776. "operationId": "userGetCurrent",
  7777. "responses": {
  7778. "200": {
  7779. "$ref": "#/responses/User"
  7780. }
  7781. }
  7782. }
  7783. },
  7784. "/user/emails": {
  7785. "get": {
  7786. "produces": [
  7787. "application/json"
  7788. ],
  7789. "tags": [
  7790. "user"
  7791. ],
  7792. "summary": "List the authenticated user's email addresses",
  7793. "operationId": "userListEmails",
  7794. "responses": {
  7795. "200": {
  7796. "$ref": "#/responses/EmailList"
  7797. }
  7798. }
  7799. },
  7800. "post": {
  7801. "produces": [
  7802. "application/json"
  7803. ],
  7804. "tags": [
  7805. "user"
  7806. ],
  7807. "summary": "Add email addresses",
  7808. "operationId": "userAddEmail",
  7809. "parameters": [
  7810. {
  7811. "name": "body",
  7812. "in": "body",
  7813. "schema": {
  7814. "$ref": "#/definitions/CreateEmailOption"
  7815. }
  7816. }
  7817. ],
  7818. "responses": {
  7819. "201": {
  7820. "$ref": "#/responses/EmailList"
  7821. },
  7822. "422": {
  7823. "$ref": "#/responses/validationError"
  7824. }
  7825. }
  7826. },
  7827. "delete": {
  7828. "produces": [
  7829. "application/json"
  7830. ],
  7831. "tags": [
  7832. "user"
  7833. ],
  7834. "summary": "Delete email addresses",
  7835. "operationId": "userDeleteEmail",
  7836. "parameters": [
  7837. {
  7838. "name": "body",
  7839. "in": "body",
  7840. "schema": {
  7841. "$ref": "#/definitions/DeleteEmailOption"
  7842. }
  7843. }
  7844. ],
  7845. "responses": {
  7846. "204": {
  7847. "$ref": "#/responses/empty"
  7848. }
  7849. }
  7850. }
  7851. },
  7852. "/user/followers": {
  7853. "get": {
  7854. "produces": [
  7855. "application/json"
  7856. ],
  7857. "tags": [
  7858. "user"
  7859. ],
  7860. "summary": "List the authenticated user's followers",
  7861. "operationId": "userCurrentListFollowers",
  7862. "parameters": [
  7863. {
  7864. "type": "integer",
  7865. "description": "page number of results to return (1-based)",
  7866. "name": "page",
  7867. "in": "query"
  7868. },
  7869. {
  7870. "type": "integer",
  7871. "description": "page size of results, maximum page size is 50",
  7872. "name": "limit",
  7873. "in": "query"
  7874. }
  7875. ],
  7876. "responses": {
  7877. "200": {
  7878. "$ref": "#/responses/UserList"
  7879. }
  7880. }
  7881. }
  7882. },
  7883. "/user/following": {
  7884. "get": {
  7885. "produces": [
  7886. "application/json"
  7887. ],
  7888. "tags": [
  7889. "user"
  7890. ],
  7891. "summary": "List the users that the authenticated user is following",
  7892. "operationId": "userCurrentListFollowing",
  7893. "parameters": [
  7894. {
  7895. "type": "integer",
  7896. "description": "page number of results to return (1-based)",
  7897. "name": "page",
  7898. "in": "query"
  7899. },
  7900. {
  7901. "type": "integer",
  7902. "description": "page size of results, maximum page size is 50",
  7903. "name": "limit",
  7904. "in": "query"
  7905. }
  7906. ],
  7907. "responses": {
  7908. "200": {
  7909. "$ref": "#/responses/UserList"
  7910. }
  7911. }
  7912. }
  7913. },
  7914. "/user/following/{username}": {
  7915. "get": {
  7916. "tags": [
  7917. "user"
  7918. ],
  7919. "summary": "Check whether a user is followed by the authenticated user",
  7920. "operationId": "userCurrentCheckFollowing",
  7921. "parameters": [
  7922. {
  7923. "type": "string",
  7924. "description": "username of followed user",
  7925. "name": "username",
  7926. "in": "path",
  7927. "required": true
  7928. }
  7929. ],
  7930. "responses": {
  7931. "204": {
  7932. "$ref": "#/responses/empty"
  7933. },
  7934. "404": {
  7935. "$ref": "#/responses/notFound"
  7936. }
  7937. }
  7938. },
  7939. "put": {
  7940. "tags": [
  7941. "user"
  7942. ],
  7943. "summary": "Follow a user",
  7944. "operationId": "userCurrentPutFollow",
  7945. "parameters": [
  7946. {
  7947. "type": "string",
  7948. "description": "username of user to follow",
  7949. "name": "username",
  7950. "in": "path",
  7951. "required": true
  7952. }
  7953. ],
  7954. "responses": {
  7955. "204": {
  7956. "$ref": "#/responses/empty"
  7957. }
  7958. }
  7959. },
  7960. "delete": {
  7961. "tags": [
  7962. "user"
  7963. ],
  7964. "summary": "Unfollow a user",
  7965. "operationId": "userCurrentDeleteFollow",
  7966. "parameters": [
  7967. {
  7968. "type": "string",
  7969. "description": "username of user to unfollow",
  7970. "name": "username",
  7971. "in": "path",
  7972. "required": true
  7973. }
  7974. ],
  7975. "responses": {
  7976. "204": {
  7977. "$ref": "#/responses/empty"
  7978. }
  7979. }
  7980. }
  7981. },
  7982. "/user/gpg_keys": {
  7983. "get": {
  7984. "produces": [
  7985. "application/json"
  7986. ],
  7987. "tags": [
  7988. "user"
  7989. ],
  7990. "summary": "List the authenticated user's GPG keys",
  7991. "operationId": "userCurrentListGPGKeys",
  7992. "parameters": [
  7993. {
  7994. "type": "integer",
  7995. "description": "page number of results to return (1-based)",
  7996. "name": "page",
  7997. "in": "query"
  7998. },
  7999. {
  8000. "type": "integer",
  8001. "description": "page size of results, maximum page size is 50",
  8002. "name": "limit",
  8003. "in": "query"
  8004. }
  8005. ],
  8006. "responses": {
  8007. "200": {
  8008. "$ref": "#/responses/GPGKeyList"
  8009. }
  8010. }
  8011. },
  8012. "post": {
  8013. "consumes": [
  8014. "application/json"
  8015. ],
  8016. "produces": [
  8017. "application/json"
  8018. ],
  8019. "tags": [
  8020. "user"
  8021. ],
  8022. "summary": "Create a GPG key",
  8023. "operationId": "userCurrentPostGPGKey",
  8024. "parameters": [
  8025. {
  8026. "name": "Form",
  8027. "in": "body",
  8028. "schema": {
  8029. "$ref": "#/definitions/CreateGPGKeyOption"
  8030. }
  8031. }
  8032. ],
  8033. "responses": {
  8034. "201": {
  8035. "$ref": "#/responses/GPGKey"
  8036. },
  8037. "422": {
  8038. "$ref": "#/responses/validationError"
  8039. }
  8040. }
  8041. }
  8042. },
  8043. "/user/gpg_keys/{id}": {
  8044. "get": {
  8045. "produces": [
  8046. "application/json"
  8047. ],
  8048. "tags": [
  8049. "user"
  8050. ],
  8051. "summary": "Get a GPG key",
  8052. "operationId": "userCurrentGetGPGKey",
  8053. "parameters": [
  8054. {
  8055. "type": "integer",
  8056. "format": "int64",
  8057. "description": "id of key to get",
  8058. "name": "id",
  8059. "in": "path",
  8060. "required": true
  8061. }
  8062. ],
  8063. "responses": {
  8064. "200": {
  8065. "$ref": "#/responses/GPGKey"
  8066. },
  8067. "404": {
  8068. "$ref": "#/responses/notFound"
  8069. }
  8070. }
  8071. },
  8072. "delete": {
  8073. "produces": [
  8074. "application/json"
  8075. ],
  8076. "tags": [
  8077. "user"
  8078. ],
  8079. "summary": "Remove a GPG key",
  8080. "operationId": "userCurrentDeleteGPGKey",
  8081. "parameters": [
  8082. {
  8083. "type": "integer",
  8084. "format": "int64",
  8085. "description": "id of key to delete",
  8086. "name": "id",
  8087. "in": "path",
  8088. "required": true
  8089. }
  8090. ],
  8091. "responses": {
  8092. "204": {
  8093. "$ref": "#/responses/empty"
  8094. },
  8095. "403": {
  8096. "$ref": "#/responses/forbidden"
  8097. }
  8098. }
  8099. }
  8100. },
  8101. "/user/keys": {
  8102. "get": {
  8103. "produces": [
  8104. "application/json"
  8105. ],
  8106. "tags": [
  8107. "user"
  8108. ],
  8109. "summary": "List the authenticated user's public keys",
  8110. "operationId": "userCurrentListKeys",
  8111. "parameters": [
  8112. {
  8113. "type": "string",
  8114. "description": "fingerprint of the key",
  8115. "name": "fingerprint",
  8116. "in": "query"
  8117. },
  8118. {
  8119. "type": "integer",
  8120. "description": "page number of results to return (1-based)",
  8121. "name": "page",
  8122. "in": "query"
  8123. },
  8124. {
  8125. "type": "integer",
  8126. "description": "page size of results, maximum page size is 50",
  8127. "name": "limit",
  8128. "in": "query"
  8129. }
  8130. ],
  8131. "responses": {
  8132. "200": {
  8133. "$ref": "#/responses/PublicKeyList"
  8134. }
  8135. }
  8136. },
  8137. "post": {
  8138. "consumes": [
  8139. "application/json"
  8140. ],
  8141. "produces": [
  8142. "application/json"
  8143. ],
  8144. "tags": [
  8145. "user"
  8146. ],
  8147. "summary": "Create a public key",
  8148. "operationId": "userCurrentPostKey",
  8149. "parameters": [
  8150. {
  8151. "name": "body",
  8152. "in": "body",
  8153. "schema": {
  8154. "$ref": "#/definitions/CreateKeyOption"
  8155. }
  8156. }
  8157. ],
  8158. "responses": {
  8159. "201": {
  8160. "$ref": "#/responses/PublicKey"
  8161. },
  8162. "422": {
  8163. "$ref": "#/responses/validationError"
  8164. }
  8165. }
  8166. }
  8167. },
  8168. "/user/keys/{id}": {
  8169. "get": {
  8170. "produces": [
  8171. "application/json"
  8172. ],
  8173. "tags": [
  8174. "user"
  8175. ],
  8176. "summary": "Get a public key",
  8177. "operationId": "userCurrentGetKey",
  8178. "parameters": [
  8179. {
  8180. "type": "integer",
  8181. "format": "int64",
  8182. "description": "id of key to get",
  8183. "name": "id",
  8184. "in": "path",
  8185. "required": true
  8186. }
  8187. ],
  8188. "responses": {
  8189. "200": {
  8190. "$ref": "#/responses/PublicKey"
  8191. },
  8192. "404": {
  8193. "$ref": "#/responses/notFound"
  8194. }
  8195. }
  8196. },
  8197. "delete": {
  8198. "produces": [
  8199. "application/json"
  8200. ],
  8201. "tags": [
  8202. "user"
  8203. ],
  8204. "summary": "Delete a public key",
  8205. "operationId": "userCurrentDeleteKey",
  8206. "parameters": [
  8207. {
  8208. "type": "integer",
  8209. "format": "int64",
  8210. "description": "id of key to delete",
  8211. "name": "id",
  8212. "in": "path",
  8213. "required": true
  8214. }
  8215. ],
  8216. "responses": {
  8217. "204": {
  8218. "$ref": "#/responses/empty"
  8219. },
  8220. "403": {
  8221. "$ref": "#/responses/forbidden"
  8222. },
  8223. "404": {
  8224. "$ref": "#/responses/notFound"
  8225. }
  8226. }
  8227. }
  8228. },
  8229. "/user/orgs": {
  8230. "get": {
  8231. "produces": [
  8232. "application/json"
  8233. ],
  8234. "tags": [
  8235. "organization"
  8236. ],
  8237. "summary": "List the current user's organizations",
  8238. "operationId": "orgListCurrentUserOrgs",
  8239. "parameters": [
  8240. {
  8241. "type": "integer",
  8242. "description": "page number of results to return (1-based)",
  8243. "name": "page",
  8244. "in": "query"
  8245. },
  8246. {
  8247. "type": "integer",
  8248. "description": "page size of results, maximum page size is 50",
  8249. "name": "limit",
  8250. "in": "query"
  8251. }
  8252. ],
  8253. "responses": {
  8254. "200": {
  8255. "$ref": "#/responses/OrganizationList"
  8256. }
  8257. }
  8258. }
  8259. },
  8260. "/user/repos": {
  8261. "get": {
  8262. "produces": [
  8263. "application/json"
  8264. ],
  8265. "tags": [
  8266. "user"
  8267. ],
  8268. "summary": "List the repos that the authenticated user owns or has access to",
  8269. "operationId": "userCurrentListRepos",
  8270. "parameters": [
  8271. {
  8272. "type": "integer",
  8273. "description": "page number of results to return (1-based)",
  8274. "name": "page",
  8275. "in": "query"
  8276. },
  8277. {
  8278. "type": "integer",
  8279. "description": "page size of results, maximum page size is 50",
  8280. "name": "limit",
  8281. "in": "query"
  8282. }
  8283. ],
  8284. "responses": {
  8285. "200": {
  8286. "$ref": "#/responses/RepositoryList"
  8287. }
  8288. }
  8289. },
  8290. "post": {
  8291. "consumes": [
  8292. "application/json"
  8293. ],
  8294. "produces": [
  8295. "application/json"
  8296. ],
  8297. "tags": [
  8298. "repository",
  8299. "user"
  8300. ],
  8301. "summary": "Create a repository",
  8302. "operationId": "createCurrentUserRepo",
  8303. "parameters": [
  8304. {
  8305. "name": "body",
  8306. "in": "body",
  8307. "schema": {
  8308. "$ref": "#/definitions/CreateRepoOption"
  8309. }
  8310. }
  8311. ],
  8312. "responses": {
  8313. "201": {
  8314. "$ref": "#/responses/Repository"
  8315. },
  8316. "409": {
  8317. "description": "The repository with the same name already exists."
  8318. },
  8319. "422": {
  8320. "$ref": "#/responses/validationError"
  8321. }
  8322. }
  8323. }
  8324. },
  8325. "/user/starred": {
  8326. "get": {
  8327. "produces": [
  8328. "application/json"
  8329. ],
  8330. "tags": [
  8331. "user"
  8332. ],
  8333. "summary": "The repos that the authenticated user has starred",
  8334. "operationId": "userCurrentListStarred",
  8335. "parameters": [
  8336. {
  8337. "type": "integer",
  8338. "description": "page number of results to return (1-based)",
  8339. "name": "page",
  8340. "in": "query"
  8341. },
  8342. {
  8343. "type": "integer",
  8344. "description": "page size of results, maximum page size is 50",
  8345. "name": "limit",
  8346. "in": "query"
  8347. }
  8348. ],
  8349. "responses": {
  8350. "200": {
  8351. "$ref": "#/responses/RepositoryList"
  8352. }
  8353. }
  8354. }
  8355. },
  8356. "/user/starred/{owner}/{repo}": {
  8357. "get": {
  8358. "tags": [
  8359. "user"
  8360. ],
  8361. "summary": "Whether the authenticated is starring the repo",
  8362. "operationId": "userCurrentCheckStarring",
  8363. "parameters": [
  8364. {
  8365. "type": "string",
  8366. "description": "owner of the repo",
  8367. "name": "owner",
  8368. "in": "path",
  8369. "required": true
  8370. },
  8371. {
  8372. "type": "string",
  8373. "description": "name of the repo",
  8374. "name": "repo",
  8375. "in": "path",
  8376. "required": true
  8377. }
  8378. ],
  8379. "responses": {
  8380. "204": {
  8381. "$ref": "#/responses/empty"
  8382. },
  8383. "404": {
  8384. "$ref": "#/responses/notFound"
  8385. }
  8386. }
  8387. },
  8388. "put": {
  8389. "tags": [
  8390. "user"
  8391. ],
  8392. "summary": "Star the given repo",
  8393. "operationId": "userCurrentPutStar",
  8394. "parameters": [
  8395. {
  8396. "type": "string",
  8397. "description": "owner of the repo to star",
  8398. "name": "owner",
  8399. "in": "path",
  8400. "required": true
  8401. },
  8402. {
  8403. "type": "string",
  8404. "description": "name of the repo to star",
  8405. "name": "repo",
  8406. "in": "path",
  8407. "required": true
  8408. }
  8409. ],
  8410. "responses": {
  8411. "204": {
  8412. "$ref": "#/responses/empty"
  8413. }
  8414. }
  8415. },
  8416. "delete": {
  8417. "tags": [
  8418. "user"
  8419. ],
  8420. "summary": "Unstar the given repo",
  8421. "operationId": "userCurrentDeleteStar",
  8422. "parameters": [
  8423. {
  8424. "type": "string",
  8425. "description": "owner of the repo to unstar",
  8426. "name": "owner",
  8427. "in": "path",
  8428. "required": true
  8429. },
  8430. {
  8431. "type": "string",
  8432. "description": "name of the repo to unstar",
  8433. "name": "repo",
  8434. "in": "path",
  8435. "required": true
  8436. }
  8437. ],
  8438. "responses": {
  8439. "204": {
  8440. "$ref": "#/responses/empty"
  8441. }
  8442. }
  8443. }
  8444. },
  8445. "/user/stopwatches": {
  8446. "get": {
  8447. "consumes": [
  8448. "application/json"
  8449. ],
  8450. "produces": [
  8451. "application/json"
  8452. ],
  8453. "tags": [
  8454. "user"
  8455. ],
  8456. "summary": "Get list of all existing stopwatches",
  8457. "operationId": "userGetStopWatches",
  8458. "parameters": [
  8459. {
  8460. "type": "integer",
  8461. "description": "page number of results to return (1-based)",
  8462. "name": "page",
  8463. "in": "query"
  8464. },
  8465. {
  8466. "type": "integer",
  8467. "description": "page size of results, maximum page size is 50",
  8468. "name": "limit",
  8469. "in": "query"
  8470. }
  8471. ],
  8472. "responses": {
  8473. "200": {
  8474. "$ref": "#/responses/StopWatchList"
  8475. }
  8476. }
  8477. }
  8478. },
  8479. "/user/subscriptions": {
  8480. "get": {
  8481. "produces": [
  8482. "application/json"
  8483. ],
  8484. "tags": [
  8485. "user"
  8486. ],
  8487. "summary": "List repositories watched by the authenticated user",
  8488. "operationId": "userCurrentListSubscriptions",
  8489. "parameters": [
  8490. {
  8491. "type": "integer",
  8492. "description": "page number of results to return (1-based)",
  8493. "name": "page",
  8494. "in": "query"
  8495. },
  8496. {
  8497. "type": "integer",
  8498. "description": "page size of results, maximum page size is 50",
  8499. "name": "limit",
  8500. "in": "query"
  8501. }
  8502. ],
  8503. "responses": {
  8504. "200": {
  8505. "$ref": "#/responses/RepositoryList"
  8506. }
  8507. }
  8508. }
  8509. },
  8510. "/user/teams": {
  8511. "get": {
  8512. "produces": [
  8513. "application/json"
  8514. ],
  8515. "tags": [
  8516. "user"
  8517. ],
  8518. "summary": "List all the teams a user belongs to",
  8519. "operationId": "userListTeams",
  8520. "parameters": [
  8521. {
  8522. "type": "integer",
  8523. "description": "page number of results to return (1-based)",
  8524. "name": "page",
  8525. "in": "query"
  8526. },
  8527. {
  8528. "type": "integer",
  8529. "description": "page size of results, maximum page size is 50",
  8530. "name": "limit",
  8531. "in": "query"
  8532. }
  8533. ],
  8534. "responses": {
  8535. "200": {
  8536. "$ref": "#/responses/TeamList"
  8537. }
  8538. }
  8539. }
  8540. },
  8541. "/user/times": {
  8542. "get": {
  8543. "produces": [
  8544. "application/json"
  8545. ],
  8546. "tags": [
  8547. "user"
  8548. ],
  8549. "summary": "List the current user's tracked times",
  8550. "operationId": "userCurrentTrackedTimes",
  8551. "parameters": [
  8552. {
  8553. "type": "string",
  8554. "format": "date-time",
  8555. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  8556. "name": "since",
  8557. "in": "query"
  8558. },
  8559. {
  8560. "type": "string",
  8561. "format": "date-time",
  8562. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  8563. "name": "before",
  8564. "in": "query"
  8565. }
  8566. ],
  8567. "responses": {
  8568. "200": {
  8569. "$ref": "#/responses/TrackedTimeList"
  8570. }
  8571. }
  8572. }
  8573. },
  8574. "/users/search": {
  8575. "get": {
  8576. "produces": [
  8577. "application/json"
  8578. ],
  8579. "tags": [
  8580. "user"
  8581. ],
  8582. "summary": "Search for users",
  8583. "operationId": "userSearch",
  8584. "parameters": [
  8585. {
  8586. "type": "string",
  8587. "description": "keyword",
  8588. "name": "q",
  8589. "in": "query"
  8590. },
  8591. {
  8592. "type": "integer",
  8593. "format": "int64",
  8594. "description": "ID of the user to search for",
  8595. "name": "uid",
  8596. "in": "query"
  8597. },
  8598. {
  8599. "type": "integer",
  8600. "description": "page number of results to return (1-based)",
  8601. "name": "page",
  8602. "in": "query"
  8603. },
  8604. {
  8605. "type": "integer",
  8606. "description": "page size of results, maximum page size is 50",
  8607. "name": "limit",
  8608. "in": "query"
  8609. }
  8610. ],
  8611. "responses": {
  8612. "200": {
  8613. "description": "SearchResults of a successful search",
  8614. "schema": {
  8615. "type": "object",
  8616. "properties": {
  8617. "data": {
  8618. "type": "array",
  8619. "items": {
  8620. "$ref": "#/definitions/User"
  8621. }
  8622. },
  8623. "ok": {
  8624. "type": "boolean"
  8625. }
  8626. }
  8627. }
  8628. }
  8629. }
  8630. }
  8631. },
  8632. "/users/{follower}/following/{followee}": {
  8633. "get": {
  8634. "tags": [
  8635. "user"
  8636. ],
  8637. "summary": "Check if one user is following another user",
  8638. "operationId": "userCheckFollowing",
  8639. "parameters": [
  8640. {
  8641. "type": "string",
  8642. "description": "username of following user",
  8643. "name": "follower",
  8644. "in": "path",
  8645. "required": true
  8646. },
  8647. {
  8648. "type": "string",
  8649. "description": "username of followed user",
  8650. "name": "followee",
  8651. "in": "path",
  8652. "required": true
  8653. }
  8654. ],
  8655. "responses": {
  8656. "204": {
  8657. "$ref": "#/responses/empty"
  8658. },
  8659. "404": {
  8660. "$ref": "#/responses/notFound"
  8661. }
  8662. }
  8663. }
  8664. },
  8665. "/users/{username}": {
  8666. "get": {
  8667. "produces": [
  8668. "application/json"
  8669. ],
  8670. "tags": [
  8671. "user"
  8672. ],
  8673. "summary": "Get a user",
  8674. "operationId": "userGet",
  8675. "parameters": [
  8676. {
  8677. "type": "string",
  8678. "description": "username of user to get",
  8679. "name": "username",
  8680. "in": "path",
  8681. "required": true
  8682. }
  8683. ],
  8684. "responses": {
  8685. "200": {
  8686. "$ref": "#/responses/User"
  8687. },
  8688. "404": {
  8689. "$ref": "#/responses/notFound"
  8690. }
  8691. }
  8692. }
  8693. },
  8694. "/users/{username}/followers": {
  8695. "get": {
  8696. "produces": [
  8697. "application/json"
  8698. ],
  8699. "tags": [
  8700. "user"
  8701. ],
  8702. "summary": "List the given user's followers",
  8703. "operationId": "userListFollowers",
  8704. "parameters": [
  8705. {
  8706. "type": "string",
  8707. "description": "username of user",
  8708. "name": "username",
  8709. "in": "path",
  8710. "required": true
  8711. },
  8712. {
  8713. "type": "integer",
  8714. "description": "page number of results to return (1-based)",
  8715. "name": "page",
  8716. "in": "query"
  8717. },
  8718. {
  8719. "type": "integer",
  8720. "description": "page size of results, maximum page size is 50",
  8721. "name": "limit",
  8722. "in": "query"
  8723. }
  8724. ],
  8725. "responses": {
  8726. "200": {
  8727. "$ref": "#/responses/UserList"
  8728. }
  8729. }
  8730. }
  8731. },
  8732. "/users/{username}/following": {
  8733. "get": {
  8734. "produces": [
  8735. "application/json"
  8736. ],
  8737. "tags": [
  8738. "user"
  8739. ],
  8740. "summary": "List the users that the given user is following",
  8741. "operationId": "userListFollowing",
  8742. "parameters": [
  8743. {
  8744. "type": "string",
  8745. "description": "username of user",
  8746. "name": "username",
  8747. "in": "path",
  8748. "required": true
  8749. },
  8750. {
  8751. "type": "integer",
  8752. "description": "page number of results to return (1-based)",
  8753. "name": "page",
  8754. "in": "query"
  8755. },
  8756. {
  8757. "type": "integer",
  8758. "description": "page size of results, maximum page size is 50",
  8759. "name": "limit",
  8760. "in": "query"
  8761. }
  8762. ],
  8763. "responses": {
  8764. "200": {
  8765. "$ref": "#/responses/UserList"
  8766. }
  8767. }
  8768. }
  8769. },
  8770. "/users/{username}/gpg_keys": {
  8771. "get": {
  8772. "produces": [
  8773. "application/json"
  8774. ],
  8775. "tags": [
  8776. "user"
  8777. ],
  8778. "summary": "List the given user's GPG keys",
  8779. "operationId": "userListGPGKeys",
  8780. "parameters": [
  8781. {
  8782. "type": "string",
  8783. "description": "username of user",
  8784. "name": "username",
  8785. "in": "path",
  8786. "required": true
  8787. },
  8788. {
  8789. "type": "integer",
  8790. "description": "page number of results to return (1-based)",
  8791. "name": "page",
  8792. "in": "query"
  8793. },
  8794. {
  8795. "type": "integer",
  8796. "description": "page size of results, maximum page size is 50",
  8797. "name": "limit",
  8798. "in": "query"
  8799. }
  8800. ],
  8801. "responses": {
  8802. "200": {
  8803. "$ref": "#/responses/GPGKeyList"
  8804. }
  8805. }
  8806. }
  8807. },
  8808. "/users/{username}/heatmap": {
  8809. "get": {
  8810. "produces": [
  8811. "application/json"
  8812. ],
  8813. "tags": [
  8814. "user"
  8815. ],
  8816. "summary": "Get a user's heatmap",
  8817. "operationId": "userGetHeatmapData",
  8818. "parameters": [
  8819. {
  8820. "type": "string",
  8821. "description": "username of user to get",
  8822. "name": "username",
  8823. "in": "path",
  8824. "required": true
  8825. }
  8826. ],
  8827. "responses": {
  8828. "200": {
  8829. "$ref": "#/responses/UserHeatmapData"
  8830. },
  8831. "404": {
  8832. "$ref": "#/responses/notFound"
  8833. }
  8834. }
  8835. }
  8836. },
  8837. "/users/{username}/keys": {
  8838. "get": {
  8839. "produces": [
  8840. "application/json"
  8841. ],
  8842. "tags": [
  8843. "user"
  8844. ],
  8845. "summary": "List the given user's public keys",
  8846. "operationId": "userListKeys",
  8847. "parameters": [
  8848. {
  8849. "type": "string",
  8850. "description": "username of user",
  8851. "name": "username",
  8852. "in": "path",
  8853. "required": true
  8854. },
  8855. {
  8856. "type": "string",
  8857. "description": "fingerprint of the key",
  8858. "name": "fingerprint",
  8859. "in": "query"
  8860. },
  8861. {
  8862. "type": "integer",
  8863. "description": "page number of results to return (1-based)",
  8864. "name": "page",
  8865. "in": "query"
  8866. },
  8867. {
  8868. "type": "integer",
  8869. "description": "page size of results, maximum page size is 50",
  8870. "name": "limit",
  8871. "in": "query"
  8872. }
  8873. ],
  8874. "responses": {
  8875. "200": {
  8876. "$ref": "#/responses/PublicKeyList"
  8877. }
  8878. }
  8879. }
  8880. },
  8881. "/users/{username}/orgs": {
  8882. "get": {
  8883. "produces": [
  8884. "application/json"
  8885. ],
  8886. "tags": [
  8887. "organization"
  8888. ],
  8889. "summary": "List a user's organizations",
  8890. "operationId": "orgListUserOrgs",
  8891. "parameters": [
  8892. {
  8893. "type": "string",
  8894. "description": "username of user",
  8895. "name": "username",
  8896. "in": "path",
  8897. "required": true
  8898. },
  8899. {
  8900. "type": "integer",
  8901. "description": "page number of results to return (1-based)",
  8902. "name": "page",
  8903. "in": "query"
  8904. },
  8905. {
  8906. "type": "integer",
  8907. "description": "page size of results, maximum page size is 50",
  8908. "name": "limit",
  8909. "in": "query"
  8910. }
  8911. ],
  8912. "responses": {
  8913. "200": {
  8914. "$ref": "#/responses/OrganizationList"
  8915. }
  8916. }
  8917. }
  8918. },
  8919. "/users/{username}/repos": {
  8920. "get": {
  8921. "produces": [
  8922. "application/json"
  8923. ],
  8924. "tags": [
  8925. "user"
  8926. ],
  8927. "summary": "List the repos owned by the given user",
  8928. "operationId": "userListRepos",
  8929. "parameters": [
  8930. {
  8931. "type": "string",
  8932. "description": "username of user",
  8933. "name": "username",
  8934. "in": "path",
  8935. "required": true
  8936. },
  8937. {
  8938. "type": "integer",
  8939. "description": "page number of results to return (1-based)",
  8940. "name": "page",
  8941. "in": "query"
  8942. },
  8943. {
  8944. "type": "integer",
  8945. "description": "page size of results, maximum page size is 50",
  8946. "name": "limit",
  8947. "in": "query"
  8948. }
  8949. ],
  8950. "responses": {
  8951. "200": {
  8952. "$ref": "#/responses/RepositoryList"
  8953. }
  8954. }
  8955. }
  8956. },
  8957. "/users/{username}/starred": {
  8958. "get": {
  8959. "produces": [
  8960. "application/json"
  8961. ],
  8962. "tags": [
  8963. "user"
  8964. ],
  8965. "summary": "The repos that the given user has starred",
  8966. "operationId": "userListStarred",
  8967. "parameters": [
  8968. {
  8969. "type": "string",
  8970. "description": "username of user",
  8971. "name": "username",
  8972. "in": "path",
  8973. "required": true
  8974. },
  8975. {
  8976. "type": "integer",
  8977. "description": "page number of results to return (1-based)",
  8978. "name": "page",
  8979. "in": "query"
  8980. },
  8981. {
  8982. "type": "integer",
  8983. "description": "page size of results, maximum page size is 50",
  8984. "name": "limit",
  8985. "in": "query"
  8986. }
  8987. ],
  8988. "responses": {
  8989. "200": {
  8990. "$ref": "#/responses/RepositoryList"
  8991. }
  8992. }
  8993. }
  8994. },
  8995. "/users/{username}/subscriptions": {
  8996. "get": {
  8997. "produces": [
  8998. "application/json"
  8999. ],
  9000. "tags": [
  9001. "user"
  9002. ],
  9003. "summary": "List the repositories watched by a user",
  9004. "operationId": "userListSubscriptions",
  9005. "parameters": [
  9006. {
  9007. "type": "string",
  9008. "description": "username of the user",
  9009. "name": "username",
  9010. "in": "path",
  9011. "required": true
  9012. },
  9013. {
  9014. "type": "integer",
  9015. "description": "page number of results to return (1-based)",
  9016. "name": "page",
  9017. "in": "query"
  9018. },
  9019. {
  9020. "type": "integer",
  9021. "description": "page size of results, maximum page size is 50",
  9022. "name": "limit",
  9023. "in": "query"
  9024. }
  9025. ],
  9026. "responses": {
  9027. "200": {
  9028. "$ref": "#/responses/RepositoryList"
  9029. }
  9030. }
  9031. }
  9032. },
  9033. "/users/{username}/tokens": {
  9034. "get": {
  9035. "produces": [
  9036. "application/json"
  9037. ],
  9038. "tags": [
  9039. "user"
  9040. ],
  9041. "summary": "List the authenticated user's access tokens",
  9042. "operationId": "userGetTokens",
  9043. "parameters": [
  9044. {
  9045. "type": "string",
  9046. "description": "username of user",
  9047. "name": "username",
  9048. "in": "path",
  9049. "required": true
  9050. },
  9051. {
  9052. "type": "integer",
  9053. "description": "page number of results to return (1-based)",
  9054. "name": "page",
  9055. "in": "query"
  9056. },
  9057. {
  9058. "type": "integer",
  9059. "description": "page size of results, maximum page size is 50",
  9060. "name": "limit",
  9061. "in": "query"
  9062. }
  9063. ],
  9064. "responses": {
  9065. "200": {
  9066. "$ref": "#/responses/AccessTokenList"
  9067. }
  9068. }
  9069. },
  9070. "post": {
  9071. "consumes": [
  9072. "application/json"
  9073. ],
  9074. "produces": [
  9075. "application/json"
  9076. ],
  9077. "tags": [
  9078. "user"
  9079. ],
  9080. "summary": "Create an access token",
  9081. "operationId": "userCreateToken",
  9082. "parameters": [
  9083. {
  9084. "type": "string",
  9085. "x-go-name": "Name",
  9086. "description": "username of user",
  9087. "name": "username",
  9088. "in": "path",
  9089. "required": true
  9090. },
  9091. {
  9092. "name": "accessToken",
  9093. "in": "body",
  9094. "schema": {
  9095. "type": "object",
  9096. "required": [
  9097. "name"
  9098. ],
  9099. "properties": {
  9100. "name": {
  9101. "type": "string"
  9102. }
  9103. }
  9104. }
  9105. }
  9106. ],
  9107. "responses": {
  9108. "200": {
  9109. "$ref": "#/responses/AccessToken"
  9110. }
  9111. }
  9112. }
  9113. },
  9114. "/users/{username}/tokens/{token}": {
  9115. "delete": {
  9116. "produces": [
  9117. "application/json"
  9118. ],
  9119. "tags": [
  9120. "user"
  9121. ],
  9122. "summary": "delete an access token",
  9123. "operationId": "userDeleteAccessToken",
  9124. "parameters": [
  9125. {
  9126. "type": "string",
  9127. "description": "username of user",
  9128. "name": "username",
  9129. "in": "path",
  9130. "required": true
  9131. },
  9132. {
  9133. "type": "integer",
  9134. "format": "int64",
  9135. "description": "token to be deleted",
  9136. "name": "token",
  9137. "in": "path",
  9138. "required": true
  9139. }
  9140. ],
  9141. "responses": {
  9142. "204": {
  9143. "$ref": "#/responses/empty"
  9144. }
  9145. }
  9146. }
  9147. },
  9148. "/version": {
  9149. "get": {
  9150. "produces": [
  9151. "application/json"
  9152. ],
  9153. "tags": [
  9154. "miscellaneous"
  9155. ],
  9156. "summary": "Returns the version of the Gitea application",
  9157. "operationId": "getVersion",
  9158. "responses": {
  9159. "200": {
  9160. "$ref": "#/responses/ServerVersion"
  9161. }
  9162. }
  9163. }
  9164. }
  9165. },
  9166. "definitions": {
  9167. "APIError": {
  9168. "description": "APIError is an api error with a message",
  9169. "type": "object",
  9170. "properties": {
  9171. "message": {
  9172. "type": "string",
  9173. "x-go-name": "Message"
  9174. },
  9175. "url": {
  9176. "type": "string",
  9177. "x-go-name": "URL"
  9178. }
  9179. },
  9180. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9181. },
  9182. "AccessToken": {
  9183. "type": "object",
  9184. "title": "AccessToken represents an API access token.",
  9185. "properties": {
  9186. "id": {
  9187. "type": "integer",
  9188. "format": "int64",
  9189. "x-go-name": "ID"
  9190. },
  9191. "name": {
  9192. "type": "string",
  9193. "x-go-name": "Name"
  9194. },
  9195. "sha1": {
  9196. "type": "string",
  9197. "x-go-name": "Token"
  9198. },
  9199. "token_last_eight": {
  9200. "type": "string",
  9201. "x-go-name": "TokenLastEight"
  9202. }
  9203. },
  9204. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9205. },
  9206. "AddCollaboratorOption": {
  9207. "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository",
  9208. "type": "object",
  9209. "properties": {
  9210. "permission": {
  9211. "type": "string",
  9212. "x-go-name": "Permission"
  9213. }
  9214. },
  9215. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9216. },
  9217. "AddTimeOption": {
  9218. "description": "AddTimeOption options for adding time to an issue",
  9219. "type": "object",
  9220. "required": [
  9221. "time"
  9222. ],
  9223. "properties": {
  9224. "created": {
  9225. "type": "string",
  9226. "format": "date-time",
  9227. "x-go-name": "Created"
  9228. },
  9229. "time": {
  9230. "description": "time in seconds",
  9231. "type": "integer",
  9232. "format": "int64",
  9233. "x-go-name": "Time"
  9234. },
  9235. "user_name": {
  9236. "description": "User who spent the time (optional)",
  9237. "type": "string",
  9238. "x-go-name": "User"
  9239. }
  9240. },
  9241. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9242. },
  9243. "AnnotatedTag": {
  9244. "description": "AnnotatedTag represents an annotated tag",
  9245. "type": "object",
  9246. "properties": {
  9247. "message": {
  9248. "type": "string",
  9249. "x-go-name": "Message"
  9250. },
  9251. "object": {
  9252. "$ref": "#/definitions/AnnotatedTagObject"
  9253. },
  9254. "sha": {
  9255. "type": "string",
  9256. "x-go-name": "SHA"
  9257. },
  9258. "tag": {
  9259. "type": "string",
  9260. "x-go-name": "Tag"
  9261. },
  9262. "tagger": {
  9263. "$ref": "#/definitions/CommitUser"
  9264. },
  9265. "url": {
  9266. "type": "string",
  9267. "x-go-name": "URL"
  9268. },
  9269. "verification": {
  9270. "$ref": "#/definitions/PayloadCommitVerification"
  9271. }
  9272. },
  9273. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9274. },
  9275. "AnnotatedTagObject": {
  9276. "description": "AnnotatedTagObject contains meta information of the tag object",
  9277. "type": "object",
  9278. "properties": {
  9279. "sha": {
  9280. "type": "string",
  9281. "x-go-name": "SHA"
  9282. },
  9283. "type": {
  9284. "type": "string",
  9285. "x-go-name": "Type"
  9286. },
  9287. "url": {
  9288. "type": "string",
  9289. "x-go-name": "URL"
  9290. }
  9291. },
  9292. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9293. },
  9294. "Attachment": {
  9295. "description": "Attachment a generic attachment",
  9296. "type": "object",
  9297. "properties": {
  9298. "browser_download_url": {
  9299. "type": "string",
  9300. "x-go-name": "DownloadURL"
  9301. },
  9302. "created_at": {
  9303. "type": "string",
  9304. "format": "date-time",
  9305. "x-go-name": "Created"
  9306. },
  9307. "download_count": {
  9308. "type": "integer",
  9309. "format": "int64",
  9310. "x-go-name": "DownloadCount"
  9311. },
  9312. "id": {
  9313. "type": "integer",
  9314. "format": "int64",
  9315. "x-go-name": "ID"
  9316. },
  9317. "name": {
  9318. "type": "string",
  9319. "x-go-name": "Name"
  9320. },
  9321. "size": {
  9322. "type": "integer",
  9323. "format": "int64",
  9324. "x-go-name": "Size"
  9325. },
  9326. "uuid": {
  9327. "type": "string",
  9328. "x-go-name": "UUID"
  9329. }
  9330. },
  9331. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9332. },
  9333. "Branch": {
  9334. "description": "Branch represents a repository branch",
  9335. "type": "object",
  9336. "properties": {
  9337. "commit": {
  9338. "$ref": "#/definitions/PayloadCommit"
  9339. },
  9340. "enable_status_check": {
  9341. "type": "boolean",
  9342. "x-go-name": "EnableStatusCheck"
  9343. },
  9344. "name": {
  9345. "type": "string",
  9346. "x-go-name": "Name"
  9347. },
  9348. "protected": {
  9349. "type": "boolean",
  9350. "x-go-name": "Protected"
  9351. },
  9352. "required_approvals": {
  9353. "type": "integer",
  9354. "format": "int64",
  9355. "x-go-name": "RequiredApprovals"
  9356. },
  9357. "status_check_contexts": {
  9358. "type": "array",
  9359. "items": {
  9360. "type": "string"
  9361. },
  9362. "x-go-name": "StatusCheckContexts"
  9363. },
  9364. "user_can_merge": {
  9365. "type": "boolean",
  9366. "x-go-name": "UserCanMerge"
  9367. },
  9368. "user_can_push": {
  9369. "type": "boolean",
  9370. "x-go-name": "UserCanPush"
  9371. }
  9372. },
  9373. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9374. },
  9375. "Comment": {
  9376. "description": "Comment represents a comment on a commit or issue",
  9377. "type": "object",
  9378. "properties": {
  9379. "body": {
  9380. "type": "string",
  9381. "x-go-name": "Body"
  9382. },
  9383. "created_at": {
  9384. "type": "string",
  9385. "format": "date-time",
  9386. "x-go-name": "Created"
  9387. },
  9388. "html_url": {
  9389. "type": "string",
  9390. "x-go-name": "HTMLURL"
  9391. },
  9392. "id": {
  9393. "type": "integer",
  9394. "format": "int64",
  9395. "x-go-name": "ID"
  9396. },
  9397. "issue_url": {
  9398. "type": "string",
  9399. "x-go-name": "IssueURL"
  9400. },
  9401. "original_author": {
  9402. "type": "string",
  9403. "x-go-name": "OriginalAuthor"
  9404. },
  9405. "original_author_id": {
  9406. "type": "integer",
  9407. "format": "int64",
  9408. "x-go-name": "OriginalAuthorID"
  9409. },
  9410. "pull_request_url": {
  9411. "type": "string",
  9412. "x-go-name": "PRURL"
  9413. },
  9414. "updated_at": {
  9415. "type": "string",
  9416. "format": "date-time",
  9417. "x-go-name": "Updated"
  9418. },
  9419. "user": {
  9420. "$ref": "#/definitions/User"
  9421. }
  9422. },
  9423. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9424. },
  9425. "Commit": {
  9426. "type": "object",
  9427. "title": "Commit contains information generated from a Git commit.",
  9428. "properties": {
  9429. "author": {
  9430. "$ref": "#/definitions/User"
  9431. },
  9432. "commit": {
  9433. "$ref": "#/definitions/RepoCommit"
  9434. },
  9435. "committer": {
  9436. "$ref": "#/definitions/User"
  9437. },
  9438. "html_url": {
  9439. "type": "string",
  9440. "x-go-name": "HTMLURL"
  9441. },
  9442. "parents": {
  9443. "type": "array",
  9444. "items": {
  9445. "$ref": "#/definitions/CommitMeta"
  9446. },
  9447. "x-go-name": "Parents"
  9448. },
  9449. "sha": {
  9450. "type": "string",
  9451. "x-go-name": "SHA"
  9452. },
  9453. "url": {
  9454. "type": "string",
  9455. "x-go-name": "URL"
  9456. }
  9457. },
  9458. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9459. },
  9460. "CommitDateOptions": {
  9461. "description": "CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE",
  9462. "type": "object",
  9463. "properties": {
  9464. "author": {
  9465. "type": "string",
  9466. "format": "date-time",
  9467. "x-go-name": "Author"
  9468. },
  9469. "committer": {
  9470. "type": "string",
  9471. "format": "date-time",
  9472. "x-go-name": "Committer"
  9473. }
  9474. },
  9475. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9476. },
  9477. "CommitMeta": {
  9478. "type": "object",
  9479. "title": "CommitMeta contains meta information of a commit in terms of API.",
  9480. "properties": {
  9481. "sha": {
  9482. "type": "string",
  9483. "x-go-name": "SHA"
  9484. },
  9485. "url": {
  9486. "type": "string",
  9487. "x-go-name": "URL"
  9488. }
  9489. },
  9490. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9491. },
  9492. "CommitUser": {
  9493. "type": "object",
  9494. "title": "CommitUser contains information of a user in the context of a commit.",
  9495. "properties": {
  9496. "date": {
  9497. "type": "string",
  9498. "x-go-name": "Date"
  9499. },
  9500. "email": {
  9501. "type": "string",
  9502. "format": "email",
  9503. "x-go-name": "Email"
  9504. },
  9505. "name": {
  9506. "type": "string",
  9507. "x-go-name": "Name"
  9508. }
  9509. },
  9510. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9511. },
  9512. "ContentsResponse": {
  9513. "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content",
  9514. "type": "object",
  9515. "properties": {
  9516. "_links": {
  9517. "$ref": "#/definitions/FileLinksResponse"
  9518. },
  9519. "content": {
  9520. "description": "`content` is populated when `type` is `file`, otherwise null",
  9521. "type": "string",
  9522. "x-go-name": "Content"
  9523. },
  9524. "download_url": {
  9525. "type": "string",
  9526. "x-go-name": "DownloadURL"
  9527. },
  9528. "encoding": {
  9529. "description": "`encoding` is populated when `type` is `file`, otherwise null",
  9530. "type": "string",
  9531. "x-go-name": "Encoding"
  9532. },
  9533. "git_url": {
  9534. "type": "string",
  9535. "x-go-name": "GitURL"
  9536. },
  9537. "html_url": {
  9538. "type": "string",
  9539. "x-go-name": "HTMLURL"
  9540. },
  9541. "name": {
  9542. "type": "string",
  9543. "x-go-name": "Name"
  9544. },
  9545. "path": {
  9546. "type": "string",
  9547. "x-go-name": "Path"
  9548. },
  9549. "sha": {
  9550. "type": "string",
  9551. "x-go-name": "SHA"
  9552. },
  9553. "size": {
  9554. "type": "integer",
  9555. "format": "int64",
  9556. "x-go-name": "Size"
  9557. },
  9558. "submodule_git_url": {
  9559. "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null",
  9560. "type": "string",
  9561. "x-go-name": "SubmoduleGitURL"
  9562. },
  9563. "target": {
  9564. "description": "`target` is populated when `type` is `symlink`, otherwise null",
  9565. "type": "string",
  9566. "x-go-name": "Target"
  9567. },
  9568. "type": {
  9569. "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`",
  9570. "type": "string",
  9571. "x-go-name": "Type"
  9572. },
  9573. "url": {
  9574. "type": "string",
  9575. "x-go-name": "URL"
  9576. }
  9577. },
  9578. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9579. },
  9580. "CreateEmailOption": {
  9581. "description": "CreateEmailOption options when creating email addresses",
  9582. "type": "object",
  9583. "properties": {
  9584. "emails": {
  9585. "description": "email addresses to add",
  9586. "type": "array",
  9587. "items": {
  9588. "type": "string"
  9589. },
  9590. "x-go-name": "Emails"
  9591. }
  9592. },
  9593. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9594. },
  9595. "CreateFileOptions": {
  9596. "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)",
  9597. "type": "object",
  9598. "required": [
  9599. "content"
  9600. ],
  9601. "properties": {
  9602. "author": {
  9603. "$ref": "#/definitions/Identity"
  9604. },
  9605. "branch": {
  9606. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  9607. "type": "string",
  9608. "x-go-name": "BranchName"
  9609. },
  9610. "committer": {
  9611. "$ref": "#/definitions/Identity"
  9612. },
  9613. "content": {
  9614. "description": "content must be base64 encoded",
  9615. "type": "string",
  9616. "x-go-name": "Content"
  9617. },
  9618. "dates": {
  9619. "$ref": "#/definitions/CommitDateOptions"
  9620. },
  9621. "message": {
  9622. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  9623. "type": "string",
  9624. "x-go-name": "Message"
  9625. },
  9626. "new_branch": {
  9627. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  9628. "type": "string",
  9629. "x-go-name": "NewBranchName"
  9630. }
  9631. },
  9632. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9633. },
  9634. "CreateForkOption": {
  9635. "description": "CreateForkOption options for creating a fork",
  9636. "type": "object",
  9637. "properties": {
  9638. "organization": {
  9639. "description": "organization name, if forking into an organization",
  9640. "type": "string",
  9641. "x-go-name": "Organization"
  9642. }
  9643. },
  9644. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9645. },
  9646. "CreateGPGKeyOption": {
  9647. "description": "CreateGPGKeyOption options create user GPG key",
  9648. "type": "object",
  9649. "required": [
  9650. "armored_public_key"
  9651. ],
  9652. "properties": {
  9653. "armored_public_key": {
  9654. "description": "An armored GPG key to add",
  9655. "type": "string",
  9656. "uniqueItems": true,
  9657. "x-go-name": "ArmoredKey"
  9658. }
  9659. },
  9660. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9661. },
  9662. "CreateHookOption": {
  9663. "description": "CreateHookOption options when create a hook",
  9664. "type": "object",
  9665. "required": [
  9666. "type",
  9667. "config"
  9668. ],
  9669. "properties": {
  9670. "active": {
  9671. "type": "boolean",
  9672. "default": false,
  9673. "x-go-name": "Active"
  9674. },
  9675. "branch_filter": {
  9676. "type": "string",
  9677. "x-go-name": "BranchFilter"
  9678. },
  9679. "config": {
  9680. "$ref": "#/definitions/CreateHookOptionConfig"
  9681. },
  9682. "events": {
  9683. "type": "array",
  9684. "items": {
  9685. "type": "string"
  9686. },
  9687. "x-go-name": "Events"
  9688. },
  9689. "type": {
  9690. "type": "string",
  9691. "enum": [
  9692. "dingtalk",
  9693. "discord",
  9694. "gitea",
  9695. "gogs",
  9696. "msteams",
  9697. "slack",
  9698. "telegram"
  9699. ],
  9700. "x-go-name": "Type"
  9701. }
  9702. },
  9703. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9704. },
  9705. "CreateHookOptionConfig": {
  9706. "description": "CreateHookOptionConfig has all config options in it\nrequired are \"content_type\" and \"url\" Required",
  9707. "type": "object",
  9708. "additionalProperties": {
  9709. "type": "string"
  9710. },
  9711. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9712. },
  9713. "CreateIssueCommentOption": {
  9714. "description": "CreateIssueCommentOption options for creating a comment on an issue",
  9715. "type": "object",
  9716. "required": [
  9717. "body"
  9718. ],
  9719. "properties": {
  9720. "body": {
  9721. "type": "string",
  9722. "x-go-name": "Body"
  9723. }
  9724. },
  9725. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9726. },
  9727. "CreateIssueOption": {
  9728. "description": "CreateIssueOption options to create one issue",
  9729. "type": "object",
  9730. "required": [
  9731. "title"
  9732. ],
  9733. "properties": {
  9734. "assignee": {
  9735. "description": "username of assignee",
  9736. "type": "string",
  9737. "x-go-name": "Assignee"
  9738. },
  9739. "assignees": {
  9740. "type": "array",
  9741. "items": {
  9742. "type": "string"
  9743. },
  9744. "x-go-name": "Assignees"
  9745. },
  9746. "body": {
  9747. "type": "string",
  9748. "x-go-name": "Body"
  9749. },
  9750. "closed": {
  9751. "type": "boolean",
  9752. "x-go-name": "Closed"
  9753. },
  9754. "due_date": {
  9755. "type": "string",
  9756. "format": "date-time",
  9757. "x-go-name": "Deadline"
  9758. },
  9759. "labels": {
  9760. "description": "list of label ids",
  9761. "type": "array",
  9762. "items": {
  9763. "type": "integer",
  9764. "format": "int64"
  9765. },
  9766. "x-go-name": "Labels"
  9767. },
  9768. "milestone": {
  9769. "description": "milestone id",
  9770. "type": "integer",
  9771. "format": "int64",
  9772. "x-go-name": "Milestone"
  9773. },
  9774. "title": {
  9775. "type": "string",
  9776. "x-go-name": "Title"
  9777. }
  9778. },
  9779. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9780. },
  9781. "CreateKeyOption": {
  9782. "description": "CreateKeyOption options when creating a key",
  9783. "type": "object",
  9784. "required": [
  9785. "title",
  9786. "key"
  9787. ],
  9788. "properties": {
  9789. "key": {
  9790. "description": "An armored SSH key to add",
  9791. "type": "string",
  9792. "uniqueItems": true,
  9793. "x-go-name": "Key"
  9794. },
  9795. "read_only": {
  9796. "description": "Describe if the key has only read access or read/write",
  9797. "type": "boolean",
  9798. "x-go-name": "ReadOnly"
  9799. },
  9800. "title": {
  9801. "description": "Title of the key to add",
  9802. "type": "string",
  9803. "uniqueItems": true,
  9804. "x-go-name": "Title"
  9805. }
  9806. },
  9807. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9808. },
  9809. "CreateLabelOption": {
  9810. "description": "CreateLabelOption options for creating a label",
  9811. "type": "object",
  9812. "required": [
  9813. "name",
  9814. "color"
  9815. ],
  9816. "properties": {
  9817. "color": {
  9818. "type": "string",
  9819. "x-go-name": "Color",
  9820. "example": "#00aabb"
  9821. },
  9822. "description": {
  9823. "type": "string",
  9824. "x-go-name": "Description"
  9825. },
  9826. "name": {
  9827. "type": "string",
  9828. "x-go-name": "Name"
  9829. }
  9830. },
  9831. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9832. },
  9833. "CreateMilestoneOption": {
  9834. "description": "CreateMilestoneOption options for creating a milestone",
  9835. "type": "object",
  9836. "properties": {
  9837. "description": {
  9838. "type": "string",
  9839. "x-go-name": "Description"
  9840. },
  9841. "due_on": {
  9842. "type": "string",
  9843. "format": "date-time",
  9844. "x-go-name": "Deadline"
  9845. },
  9846. "title": {
  9847. "type": "string",
  9848. "x-go-name": "Title"
  9849. }
  9850. },
  9851. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9852. },
  9853. "CreateOrgOption": {
  9854. "description": "CreateOrgOption options for creating an organization",
  9855. "type": "object",
  9856. "required": [
  9857. "username"
  9858. ],
  9859. "properties": {
  9860. "description": {
  9861. "type": "string",
  9862. "x-go-name": "Description"
  9863. },
  9864. "full_name": {
  9865. "type": "string",
  9866. "x-go-name": "FullName"
  9867. },
  9868. "location": {
  9869. "type": "string",
  9870. "x-go-name": "Location"
  9871. },
  9872. "repo_admin_change_team_access": {
  9873. "type": "boolean",
  9874. "x-go-name": "RepoAdminChangeTeamAccess"
  9875. },
  9876. "username": {
  9877. "type": "string",
  9878. "x-go-name": "UserName"
  9879. },
  9880. "visibility": {
  9881. "description": "possible values are `public` (default), `limited` or `private`",
  9882. "type": "string",
  9883. "enum": [
  9884. "public",
  9885. "limited",
  9886. "private"
  9887. ],
  9888. "x-go-name": "Visibility"
  9889. },
  9890. "website": {
  9891. "type": "string",
  9892. "x-go-name": "Website"
  9893. }
  9894. },
  9895. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9896. },
  9897. "CreatePullRequestOption": {
  9898. "description": "CreatePullRequestOption options when creating a pull request",
  9899. "type": "object",
  9900. "properties": {
  9901. "assignee": {
  9902. "type": "string",
  9903. "x-go-name": "Assignee"
  9904. },
  9905. "assignees": {
  9906. "type": "array",
  9907. "items": {
  9908. "type": "string"
  9909. },
  9910. "x-go-name": "Assignees"
  9911. },
  9912. "base": {
  9913. "type": "string",
  9914. "x-go-name": "Base"
  9915. },
  9916. "body": {
  9917. "type": "string",
  9918. "x-go-name": "Body"
  9919. },
  9920. "due_date": {
  9921. "type": "string",
  9922. "format": "date-time",
  9923. "x-go-name": "Deadline"
  9924. },
  9925. "head": {
  9926. "type": "string",
  9927. "x-go-name": "Head"
  9928. },
  9929. "labels": {
  9930. "type": "array",
  9931. "items": {
  9932. "type": "integer",
  9933. "format": "int64"
  9934. },
  9935. "x-go-name": "Labels"
  9936. },
  9937. "milestone": {
  9938. "type": "integer",
  9939. "format": "int64",
  9940. "x-go-name": "Milestone"
  9941. },
  9942. "title": {
  9943. "type": "string",
  9944. "x-go-name": "Title"
  9945. }
  9946. },
  9947. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9948. },
  9949. "CreateReleaseOption": {
  9950. "description": "CreateReleaseOption options when creating a release",
  9951. "type": "object",
  9952. "required": [
  9953. "tag_name"
  9954. ],
  9955. "properties": {
  9956. "body": {
  9957. "type": "string",
  9958. "x-go-name": "Note"
  9959. },
  9960. "draft": {
  9961. "type": "boolean",
  9962. "x-go-name": "IsDraft"
  9963. },
  9964. "name": {
  9965. "type": "string",
  9966. "x-go-name": "Title"
  9967. },
  9968. "prerelease": {
  9969. "type": "boolean",
  9970. "x-go-name": "IsPrerelease"
  9971. },
  9972. "tag_name": {
  9973. "type": "string",
  9974. "x-go-name": "TagName"
  9975. },
  9976. "target_commitish": {
  9977. "type": "string",
  9978. "x-go-name": "Target"
  9979. }
  9980. },
  9981. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9982. },
  9983. "CreateRepoOption": {
  9984. "description": "CreateRepoOption options when creating repository",
  9985. "type": "object",
  9986. "required": [
  9987. "name"
  9988. ],
  9989. "properties": {
  9990. "auto_init": {
  9991. "description": "Whether the repository should be auto-intialized?",
  9992. "type": "boolean",
  9993. "x-go-name": "AutoInit"
  9994. },
  9995. "description": {
  9996. "description": "Description of the repository to create",
  9997. "type": "string",
  9998. "x-go-name": "Description"
  9999. },
  10000. "gitignores": {
  10001. "description": "Gitignores to use",
  10002. "type": "string",
  10003. "x-go-name": "Gitignores"
  10004. },
  10005. "issue_labels": {
  10006. "description": "Issue Label set to use",
  10007. "type": "string",
  10008. "x-go-name": "IssueLabels"
  10009. },
  10010. "license": {
  10011. "description": "License to use",
  10012. "type": "string",
  10013. "x-go-name": "License"
  10014. },
  10015. "name": {
  10016. "description": "Name of the repository to create",
  10017. "type": "string",
  10018. "uniqueItems": true,
  10019. "x-go-name": "Name"
  10020. },
  10021. "private": {
  10022. "description": "Whether the repository is private",
  10023. "type": "boolean",
  10024. "x-go-name": "Private"
  10025. },
  10026. "readme": {
  10027. "description": "Readme of the repository to create",
  10028. "type": "string",
  10029. "x-go-name": "Readme"
  10030. }
  10031. },
  10032. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10033. },
  10034. "CreateStatusOption": {
  10035. "description": "CreateStatusOption holds the information needed to create a new Status for a Commit",
  10036. "type": "object",
  10037. "properties": {
  10038. "context": {
  10039. "type": "string",
  10040. "x-go-name": "Context"
  10041. },
  10042. "description": {
  10043. "type": "string",
  10044. "x-go-name": "Description"
  10045. },
  10046. "state": {
  10047. "$ref": "#/definitions/StatusState"
  10048. },
  10049. "target_url": {
  10050. "type": "string",
  10051. "x-go-name": "TargetURL"
  10052. }
  10053. },
  10054. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10055. },
  10056. "CreateTeamOption": {
  10057. "description": "CreateTeamOption options for creating a team",
  10058. "type": "object",
  10059. "required": [
  10060. "name"
  10061. ],
  10062. "properties": {
  10063. "can_create_org_repo": {
  10064. "type": "boolean",
  10065. "x-go-name": "CanCreateOrgRepo"
  10066. },
  10067. "description": {
  10068. "type": "string",
  10069. "x-go-name": "Description"
  10070. },
  10071. "includes_all_repositories": {
  10072. "type": "boolean",
  10073. "x-go-name": "IncludesAllRepositories"
  10074. },
  10075. "name": {
  10076. "type": "string",
  10077. "x-go-name": "Name"
  10078. },
  10079. "permission": {
  10080. "type": "string",
  10081. "enum": [
  10082. "read",
  10083. "write",
  10084. "admin"
  10085. ],
  10086. "x-go-name": "Permission"
  10087. },
  10088. "units": {
  10089. "type": "array",
  10090. "items": {
  10091. "type": "string"
  10092. },
  10093. "x-go-name": "Units",
  10094. "example": [
  10095. "repo.code",
  10096. "repo.issues",
  10097. "repo.ext_issues",
  10098. "repo.wiki",
  10099. "repo.pulls",
  10100. "repo.releases",
  10101. "repo.ext_wiki"
  10102. ]
  10103. }
  10104. },
  10105. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10106. },
  10107. "CreateUserOption": {
  10108. "description": "CreateUserOption create user options",
  10109. "type": "object",
  10110. "required": [
  10111. "username",
  10112. "email",
  10113. "password"
  10114. ],
  10115. "properties": {
  10116. "email": {
  10117. "type": "string",
  10118. "format": "email",
  10119. "x-go-name": "Email"
  10120. },
  10121. "full_name": {
  10122. "type": "string",
  10123. "x-go-name": "FullName"
  10124. },
  10125. "login_name": {
  10126. "type": "string",
  10127. "x-go-name": "LoginName"
  10128. },
  10129. "must_change_password": {
  10130. "type": "boolean",
  10131. "x-go-name": "MustChangePassword"
  10132. },
  10133. "password": {
  10134. "type": "string",
  10135. "x-go-name": "Password"
  10136. },
  10137. "send_notify": {
  10138. "type": "boolean",
  10139. "x-go-name": "SendNotify"
  10140. },
  10141. "source_id": {
  10142. "type": "integer",
  10143. "format": "int64",
  10144. "x-go-name": "SourceID"
  10145. },
  10146. "username": {
  10147. "type": "string",
  10148. "x-go-name": "Username"
  10149. }
  10150. },
  10151. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10152. },
  10153. "DeleteEmailOption": {
  10154. "description": "DeleteEmailOption options when deleting email addresses",
  10155. "type": "object",
  10156. "properties": {
  10157. "emails": {
  10158. "description": "email addresses to delete",
  10159. "type": "array",
  10160. "items": {
  10161. "type": "string"
  10162. },
  10163. "x-go-name": "Emails"
  10164. }
  10165. },
  10166. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10167. },
  10168. "DeleteFileOptions": {
  10169. "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)",
  10170. "type": "object",
  10171. "required": [
  10172. "sha"
  10173. ],
  10174. "properties": {
  10175. "author": {
  10176. "$ref": "#/definitions/Identity"
  10177. },
  10178. "branch": {
  10179. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  10180. "type": "string",
  10181. "x-go-name": "BranchName"
  10182. },
  10183. "committer": {
  10184. "$ref": "#/definitions/Identity"
  10185. },
  10186. "dates": {
  10187. "$ref": "#/definitions/CommitDateOptions"
  10188. },
  10189. "message": {
  10190. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  10191. "type": "string",
  10192. "x-go-name": "Message"
  10193. },
  10194. "new_branch": {
  10195. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  10196. "type": "string",
  10197. "x-go-name": "NewBranchName"
  10198. },
  10199. "sha": {
  10200. "description": "sha is the SHA for the file that already exists",
  10201. "type": "string",
  10202. "x-go-name": "SHA"
  10203. }
  10204. },
  10205. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10206. },
  10207. "DeployKey": {
  10208. "description": "DeployKey a deploy key",
  10209. "type": "object",
  10210. "properties": {
  10211. "created_at": {
  10212. "type": "string",
  10213. "format": "date-time",
  10214. "x-go-name": "Created"
  10215. },
  10216. "fingerprint": {
  10217. "type": "string",
  10218. "x-go-name": "Fingerprint"
  10219. },
  10220. "id": {
  10221. "type": "integer",
  10222. "format": "int64",
  10223. "x-go-name": "ID"
  10224. },
  10225. "key": {
  10226. "type": "string",
  10227. "x-go-name": "Key"
  10228. },
  10229. "key_id": {
  10230. "type": "integer",
  10231. "format": "int64",
  10232. "x-go-name": "KeyID"
  10233. },
  10234. "read_only": {
  10235. "type": "boolean",
  10236. "x-go-name": "ReadOnly"
  10237. },
  10238. "repository": {
  10239. "$ref": "#/definitions/Repository"
  10240. },
  10241. "title": {
  10242. "type": "string",
  10243. "x-go-name": "Title"
  10244. },
  10245. "url": {
  10246. "type": "string",
  10247. "x-go-name": "URL"
  10248. }
  10249. },
  10250. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10251. },
  10252. "EditAttachmentOptions": {
  10253. "description": "EditAttachmentOptions options for editing attachments",
  10254. "type": "object",
  10255. "properties": {
  10256. "name": {
  10257. "type": "string",
  10258. "x-go-name": "Name"
  10259. }
  10260. },
  10261. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10262. },
  10263. "EditDeadlineOption": {
  10264. "description": "EditDeadlineOption options for creating a deadline",
  10265. "type": "object",
  10266. "required": [
  10267. "due_date"
  10268. ],
  10269. "properties": {
  10270. "due_date": {
  10271. "type": "string",
  10272. "format": "date-time",
  10273. "x-go-name": "Deadline"
  10274. }
  10275. },
  10276. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10277. },
  10278. "EditGitHookOption": {
  10279. "description": "EditGitHookOption options when modifying one Git hook",
  10280. "type": "object",
  10281. "properties": {
  10282. "content": {
  10283. "type": "string",
  10284. "x-go-name": "Content"
  10285. }
  10286. },
  10287. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10288. },
  10289. "EditHookOption": {
  10290. "description": "EditHookOption options when modify one hook",
  10291. "type": "object",
  10292. "properties": {
  10293. "active": {
  10294. "type": "boolean",
  10295. "x-go-name": "Active"
  10296. },
  10297. "branch_filter": {
  10298. "type": "string",
  10299. "x-go-name": "BranchFilter"
  10300. },
  10301. "config": {
  10302. "type": "object",
  10303. "additionalProperties": {
  10304. "type": "string"
  10305. },
  10306. "x-go-name": "Config"
  10307. },
  10308. "events": {
  10309. "type": "array",
  10310. "items": {
  10311. "type": "string"
  10312. },
  10313. "x-go-name": "Events"
  10314. }
  10315. },
  10316. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10317. },
  10318. "EditIssueCommentOption": {
  10319. "description": "EditIssueCommentOption options for editing a comment",
  10320. "type": "object",
  10321. "required": [
  10322. "body"
  10323. ],
  10324. "properties": {
  10325. "body": {
  10326. "type": "string",
  10327. "x-go-name": "Body"
  10328. }
  10329. },
  10330. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10331. },
  10332. "EditIssueOption": {
  10333. "description": "EditIssueOption options for editing an issue",
  10334. "type": "object",
  10335. "properties": {
  10336. "assignee": {
  10337. "type": "string",
  10338. "x-go-name": "Assignee"
  10339. },
  10340. "assignees": {
  10341. "type": "array",
  10342. "items": {
  10343. "type": "string"
  10344. },
  10345. "x-go-name": "Assignees"
  10346. },
  10347. "body": {
  10348. "type": "string",
  10349. "x-go-name": "Body"
  10350. },
  10351. "due_date": {
  10352. "type": "string",
  10353. "format": "date-time",
  10354. "x-go-name": "Deadline"
  10355. },
  10356. "milestone": {
  10357. "type": "integer",
  10358. "format": "int64",
  10359. "x-go-name": "Milestone"
  10360. },
  10361. "state": {
  10362. "type": "string",
  10363. "x-go-name": "State"
  10364. },
  10365. "title": {
  10366. "type": "string",
  10367. "x-go-name": "Title"
  10368. },
  10369. "unset_due_date": {
  10370. "type": "boolean",
  10371. "x-go-name": "RemoveDeadline"
  10372. }
  10373. },
  10374. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10375. },
  10376. "EditLabelOption": {
  10377. "description": "EditLabelOption options for editing a label",
  10378. "type": "object",
  10379. "properties": {
  10380. "color": {
  10381. "type": "string",
  10382. "x-go-name": "Color"
  10383. },
  10384. "description": {
  10385. "type": "string",
  10386. "x-go-name": "Description"
  10387. },
  10388. "name": {
  10389. "type": "string",
  10390. "x-go-name": "Name"
  10391. }
  10392. },
  10393. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10394. },
  10395. "EditMilestoneOption": {
  10396. "description": "EditMilestoneOption options for editing a milestone",
  10397. "type": "object",
  10398. "properties": {
  10399. "description": {
  10400. "type": "string",
  10401. "x-go-name": "Description"
  10402. },
  10403. "due_on": {
  10404. "type": "string",
  10405. "format": "date-time",
  10406. "x-go-name": "Deadline"
  10407. },
  10408. "state": {
  10409. "type": "string",
  10410. "x-go-name": "State"
  10411. },
  10412. "title": {
  10413. "type": "string",
  10414. "x-go-name": "Title"
  10415. }
  10416. },
  10417. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10418. },
  10419. "EditOrgOption": {
  10420. "description": "EditOrgOption options for editing an organization",
  10421. "type": "object",
  10422. "properties": {
  10423. "description": {
  10424. "type": "string",
  10425. "x-go-name": "Description"
  10426. },
  10427. "full_name": {
  10428. "type": "string",
  10429. "x-go-name": "FullName"
  10430. },
  10431. "location": {
  10432. "type": "string",
  10433. "x-go-name": "Location"
  10434. },
  10435. "repo_admin_change_team_access": {
  10436. "type": "boolean",
  10437. "x-go-name": "RepoAdminChangeTeamAccess"
  10438. },
  10439. "visibility": {
  10440. "description": "possible values are `public`, `limited` or `private`",
  10441. "type": "string",
  10442. "enum": [
  10443. "public",
  10444. "limited",
  10445. "private"
  10446. ],
  10447. "x-go-name": "Visibility"
  10448. },
  10449. "website": {
  10450. "type": "string",
  10451. "x-go-name": "Website"
  10452. }
  10453. },
  10454. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10455. },
  10456. "EditPullRequestOption": {
  10457. "description": "EditPullRequestOption options when modify pull request",
  10458. "type": "object",
  10459. "properties": {
  10460. "assignee": {
  10461. "type": "string",
  10462. "x-go-name": "Assignee"
  10463. },
  10464. "assignees": {
  10465. "type": "array",
  10466. "items": {
  10467. "type": "string"
  10468. },
  10469. "x-go-name": "Assignees"
  10470. },
  10471. "body": {
  10472. "type": "string",
  10473. "x-go-name": "Body"
  10474. },
  10475. "due_date": {
  10476. "type": "string",
  10477. "format": "date-time",
  10478. "x-go-name": "Deadline"
  10479. },
  10480. "labels": {
  10481. "type": "array",
  10482. "items": {
  10483. "type": "integer",
  10484. "format": "int64"
  10485. },
  10486. "x-go-name": "Labels"
  10487. },
  10488. "milestone": {
  10489. "type": "integer",
  10490. "format": "int64",
  10491. "x-go-name": "Milestone"
  10492. },
  10493. "state": {
  10494. "type": "string",
  10495. "x-go-name": "State"
  10496. },
  10497. "title": {
  10498. "type": "string",
  10499. "x-go-name": "Title"
  10500. },
  10501. "unset_due_date": {
  10502. "type": "boolean",
  10503. "x-go-name": "RemoveDeadline"
  10504. }
  10505. },
  10506. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10507. },
  10508. "EditReactionOption": {
  10509. "description": "EditReactionOption contain the reaction type",
  10510. "type": "object",
  10511. "properties": {
  10512. "content": {
  10513. "type": "string",
  10514. "x-go-name": "Reaction"
  10515. }
  10516. },
  10517. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10518. },
  10519. "EditReleaseOption": {
  10520. "description": "EditReleaseOption options when editing a release",
  10521. "type": "object",
  10522. "properties": {
  10523. "body": {
  10524. "type": "string",
  10525. "x-go-name": "Note"
  10526. },
  10527. "draft": {
  10528. "type": "boolean",
  10529. "x-go-name": "IsDraft"
  10530. },
  10531. "name": {
  10532. "type": "string",
  10533. "x-go-name": "Title"
  10534. },
  10535. "prerelease": {
  10536. "type": "boolean",
  10537. "x-go-name": "IsPrerelease"
  10538. },
  10539. "tag_name": {
  10540. "type": "string",
  10541. "x-go-name": "TagName"
  10542. },
  10543. "target_commitish": {
  10544. "type": "string",
  10545. "x-go-name": "Target"
  10546. }
  10547. },
  10548. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10549. },
  10550. "EditRepoOption": {
  10551. "description": "EditRepoOption options when editing a repository's properties",
  10552. "type": "object",
  10553. "properties": {
  10554. "allow_merge_commits": {
  10555. "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`.",
  10556. "type": "boolean",
  10557. "x-go-name": "AllowMerge"
  10558. },
  10559. "allow_rebase": {
  10560. "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.",
  10561. "type": "boolean",
  10562. "x-go-name": "AllowRebase"
  10563. },
  10564. "allow_rebase_explicit": {
  10565. "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`.",
  10566. "type": "boolean",
  10567. "x-go-name": "AllowRebaseMerge"
  10568. },
  10569. "allow_squash_merge": {
  10570. "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.",
  10571. "type": "boolean",
  10572. "x-go-name": "AllowSquash"
  10573. },
  10574. "archived": {
  10575. "description": "set to `true` to archive this repository.",
  10576. "type": "boolean",
  10577. "x-go-name": "Archived"
  10578. },
  10579. "default_branch": {
  10580. "description": "sets the default branch for this repository.",
  10581. "type": "string",
  10582. "x-go-name": "DefaultBranch"
  10583. },
  10584. "description": {
  10585. "description": "a short description of the repository.",
  10586. "type": "string",
  10587. "x-go-name": "Description"
  10588. },
  10589. "external_tracker": {
  10590. "$ref": "#/definitions/ExternalTracker"
  10591. },
  10592. "external_wiki": {
  10593. "$ref": "#/definitions/ExternalWiki"
  10594. },
  10595. "has_issues": {
  10596. "description": "either `true` to enable issues for this repository or `false` to disable them.",
  10597. "type": "boolean",
  10598. "x-go-name": "HasIssues"
  10599. },
  10600. "has_pull_requests": {
  10601. "description": "either `true` to allow pull requests, or `false` to prevent pull request.",
  10602. "type": "boolean",
  10603. "x-go-name": "HasPullRequests"
  10604. },
  10605. "has_wiki": {
  10606. "description": "either `true` to enable the wiki for this repository or `false` to disable it.",
  10607. "type": "boolean",
  10608. "x-go-name": "HasWiki"
  10609. },
  10610. "ignore_whitespace_conflicts": {
  10611. "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.",
  10612. "type": "boolean",
  10613. "x-go-name": "IgnoreWhitespaceConflicts"
  10614. },
  10615. "internal_tracker": {
  10616. "$ref": "#/definitions/InternalTracker"
  10617. },
  10618. "name": {
  10619. "description": "name of the repository",
  10620. "type": "string",
  10621. "uniqueItems": true,
  10622. "x-go-name": "Name"
  10623. },
  10624. "private": {
  10625. "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.",
  10626. "type": "boolean",
  10627. "x-go-name": "Private"
  10628. },
  10629. "template": {
  10630. "description": "either `true` to make this repository a template or `false` to make it a normal repository",
  10631. "type": "boolean",
  10632. "x-go-name": "Template"
  10633. },
  10634. "website": {
  10635. "description": "a URL with more information about the repository.",
  10636. "type": "string",
  10637. "x-go-name": "Website"
  10638. }
  10639. },
  10640. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10641. },
  10642. "EditTeamOption": {
  10643. "description": "EditTeamOption options for editing a team",
  10644. "type": "object",
  10645. "required": [
  10646. "name"
  10647. ],
  10648. "properties": {
  10649. "can_create_org_repo": {
  10650. "type": "boolean",
  10651. "x-go-name": "CanCreateOrgRepo"
  10652. },
  10653. "description": {
  10654. "type": "string",
  10655. "x-go-name": "Description"
  10656. },
  10657. "includes_all_repositories": {
  10658. "type": "boolean",
  10659. "x-go-name": "IncludesAllRepositories"
  10660. },
  10661. "name": {
  10662. "type": "string",
  10663. "x-go-name": "Name"
  10664. },
  10665. "permission": {
  10666. "type": "string",
  10667. "enum": [
  10668. "read",
  10669. "write",
  10670. "admin"
  10671. ],
  10672. "x-go-name": "Permission"
  10673. },
  10674. "units": {
  10675. "type": "array",
  10676. "items": {
  10677. "type": "string"
  10678. },
  10679. "x-go-name": "Units",
  10680. "example": [
  10681. "repo.code",
  10682. "repo.issues",
  10683. "repo.ext_issues",
  10684. "repo.wiki",
  10685. "repo.pulls",
  10686. "repo.releases",
  10687. "repo.ext_wiki"
  10688. ]
  10689. }
  10690. },
  10691. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10692. },
  10693. "EditUserOption": {
  10694. "description": "EditUserOption edit user options",
  10695. "type": "object",
  10696. "required": [
  10697. "email"
  10698. ],
  10699. "properties": {
  10700. "active": {
  10701. "type": "boolean",
  10702. "x-go-name": "Active"
  10703. },
  10704. "admin": {
  10705. "type": "boolean",
  10706. "x-go-name": "Admin"
  10707. },
  10708. "allow_create_organization": {
  10709. "type": "boolean",
  10710. "x-go-name": "AllowCreateOrganization"
  10711. },
  10712. "allow_git_hook": {
  10713. "type": "boolean",
  10714. "x-go-name": "AllowGitHook"
  10715. },
  10716. "allow_import_local": {
  10717. "type": "boolean",
  10718. "x-go-name": "AllowImportLocal"
  10719. },
  10720. "email": {
  10721. "type": "string",
  10722. "format": "email",
  10723. "x-go-name": "Email"
  10724. },
  10725. "full_name": {
  10726. "type": "string",
  10727. "x-go-name": "FullName"
  10728. },
  10729. "location": {
  10730. "type": "string",
  10731. "x-go-name": "Location"
  10732. },
  10733. "login_name": {
  10734. "type": "string",
  10735. "x-go-name": "LoginName"
  10736. },
  10737. "max_repo_creation": {
  10738. "type": "integer",
  10739. "format": "int64",
  10740. "x-go-name": "MaxRepoCreation"
  10741. },
  10742. "must_change_password": {
  10743. "type": "boolean",
  10744. "x-go-name": "MustChangePassword"
  10745. },
  10746. "password": {
  10747. "type": "string",
  10748. "x-go-name": "Password"
  10749. },
  10750. "prohibit_login": {
  10751. "type": "boolean",
  10752. "x-go-name": "ProhibitLogin"
  10753. },
  10754. "source_id": {
  10755. "type": "integer",
  10756. "format": "int64",
  10757. "x-go-name": "SourceID"
  10758. },
  10759. "website": {
  10760. "type": "string",
  10761. "x-go-name": "Website"
  10762. }
  10763. },
  10764. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10765. },
  10766. "Email": {
  10767. "description": "Email an email address belonging to a user",
  10768. "type": "object",
  10769. "properties": {
  10770. "email": {
  10771. "type": "string",
  10772. "format": "email",
  10773. "x-go-name": "Email"
  10774. },
  10775. "primary": {
  10776. "type": "boolean",
  10777. "x-go-name": "Primary"
  10778. },
  10779. "verified": {
  10780. "type": "boolean",
  10781. "x-go-name": "Verified"
  10782. }
  10783. },
  10784. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10785. },
  10786. "ExternalTracker": {
  10787. "description": "ExternalTracker represents settings for external tracker",
  10788. "type": "object",
  10789. "properties": {
  10790. "external_tracker_format": {
  10791. "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.",
  10792. "type": "string",
  10793. "x-go-name": "ExternalTrackerFormat"
  10794. },
  10795. "external_tracker_style": {
  10796. "description": "External Issue Tracker Number Format, either `numeric` or `alphanumeric`",
  10797. "type": "string",
  10798. "x-go-name": "ExternalTrackerStyle"
  10799. },
  10800. "external_tracker_url": {
  10801. "description": "URL of external issue tracker.",
  10802. "type": "string",
  10803. "x-go-name": "ExternalTrackerURL"
  10804. }
  10805. },
  10806. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10807. },
  10808. "ExternalWiki": {
  10809. "description": "ExternalWiki represents setting for external wiki",
  10810. "type": "object",
  10811. "properties": {
  10812. "external_wiki_url": {
  10813. "description": "URL of external wiki.",
  10814. "type": "string",
  10815. "x-go-name": "ExternalWikiURL"
  10816. }
  10817. },
  10818. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10819. },
  10820. "FileCommitResponse": {
  10821. "type": "object",
  10822. "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.",
  10823. "properties": {
  10824. "author": {
  10825. "$ref": "#/definitions/CommitUser"
  10826. },
  10827. "committer": {
  10828. "$ref": "#/definitions/CommitUser"
  10829. },
  10830. "html_url": {
  10831. "type": "string",
  10832. "x-go-name": "HTMLURL"
  10833. },
  10834. "message": {
  10835. "type": "string",
  10836. "x-go-name": "Message"
  10837. },
  10838. "parents": {
  10839. "type": "array",
  10840. "items": {
  10841. "$ref": "#/definitions/CommitMeta"
  10842. },
  10843. "x-go-name": "Parents"
  10844. },
  10845. "sha": {
  10846. "type": "string",
  10847. "x-go-name": "SHA"
  10848. },
  10849. "tree": {
  10850. "$ref": "#/definitions/CommitMeta"
  10851. },
  10852. "url": {
  10853. "type": "string",
  10854. "x-go-name": "URL"
  10855. }
  10856. },
  10857. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10858. },
  10859. "FileDeleteResponse": {
  10860. "description": "FileDeleteResponse contains information about a repo's file that was deleted",
  10861. "type": "object",
  10862. "properties": {
  10863. "commit": {
  10864. "$ref": "#/definitions/FileCommitResponse"
  10865. },
  10866. "content": {
  10867. "type": "object",
  10868. "x-go-name": "Content"
  10869. },
  10870. "verification": {
  10871. "$ref": "#/definitions/PayloadCommitVerification"
  10872. }
  10873. },
  10874. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10875. },
  10876. "FileLinksResponse": {
  10877. "description": "FileLinksResponse contains the links for a repo's file",
  10878. "type": "object",
  10879. "properties": {
  10880. "git": {
  10881. "type": "string",
  10882. "x-go-name": "GitURL"
  10883. },
  10884. "html": {
  10885. "type": "string",
  10886. "x-go-name": "HTMLURL"
  10887. },
  10888. "self": {
  10889. "type": "string",
  10890. "x-go-name": "Self"
  10891. }
  10892. },
  10893. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10894. },
  10895. "FileResponse": {
  10896. "description": "FileResponse contains information about a repo's file",
  10897. "type": "object",
  10898. "properties": {
  10899. "commit": {
  10900. "$ref": "#/definitions/FileCommitResponse"
  10901. },
  10902. "content": {
  10903. "$ref": "#/definitions/ContentsResponse"
  10904. },
  10905. "verification": {
  10906. "$ref": "#/definitions/PayloadCommitVerification"
  10907. }
  10908. },
  10909. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10910. },
  10911. "GPGKey": {
  10912. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  10913. "type": "object",
  10914. "properties": {
  10915. "can_certify": {
  10916. "type": "boolean",
  10917. "x-go-name": "CanCertify"
  10918. },
  10919. "can_encrypt_comms": {
  10920. "type": "boolean",
  10921. "x-go-name": "CanEncryptComms"
  10922. },
  10923. "can_encrypt_storage": {
  10924. "type": "boolean",
  10925. "x-go-name": "CanEncryptStorage"
  10926. },
  10927. "can_sign": {
  10928. "type": "boolean",
  10929. "x-go-name": "CanSign"
  10930. },
  10931. "created_at": {
  10932. "type": "string",
  10933. "format": "date-time",
  10934. "x-go-name": "Created"
  10935. },
  10936. "emails": {
  10937. "type": "array",
  10938. "items": {
  10939. "$ref": "#/definitions/GPGKeyEmail"
  10940. },
  10941. "x-go-name": "Emails"
  10942. },
  10943. "expires_at": {
  10944. "type": "string",
  10945. "format": "date-time",
  10946. "x-go-name": "Expires"
  10947. },
  10948. "id": {
  10949. "type": "integer",
  10950. "format": "int64",
  10951. "x-go-name": "ID"
  10952. },
  10953. "key_id": {
  10954. "type": "string",
  10955. "x-go-name": "KeyID"
  10956. },
  10957. "primary_key_id": {
  10958. "type": "string",
  10959. "x-go-name": "PrimaryKeyID"
  10960. },
  10961. "public_key": {
  10962. "type": "string",
  10963. "x-go-name": "PublicKey"
  10964. },
  10965. "subkeys": {
  10966. "type": "array",
  10967. "items": {
  10968. "$ref": "#/definitions/GPGKey"
  10969. },
  10970. "x-go-name": "SubsKey"
  10971. }
  10972. },
  10973. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10974. },
  10975. "GPGKeyEmail": {
  10976. "description": "GPGKeyEmail an email attached to a GPGKey",
  10977. "type": "object",
  10978. "properties": {
  10979. "email": {
  10980. "type": "string",
  10981. "x-go-name": "Email"
  10982. },
  10983. "verified": {
  10984. "type": "boolean",
  10985. "x-go-name": "Verified"
  10986. }
  10987. },
  10988. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10989. },
  10990. "GitBlobResponse": {
  10991. "description": "GitBlobResponse represents a git blob",
  10992. "type": "object",
  10993. "properties": {
  10994. "content": {
  10995. "type": "string",
  10996. "x-go-name": "Content"
  10997. },
  10998. "encoding": {
  10999. "type": "string",
  11000. "x-go-name": "Encoding"
  11001. },
  11002. "sha": {
  11003. "type": "string",
  11004. "x-go-name": "SHA"
  11005. },
  11006. "size": {
  11007. "type": "integer",
  11008. "format": "int64",
  11009. "x-go-name": "Size"
  11010. },
  11011. "url": {
  11012. "type": "string",
  11013. "x-go-name": "URL"
  11014. }
  11015. },
  11016. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11017. },
  11018. "GitEntry": {
  11019. "description": "GitEntry represents a git tree",
  11020. "type": "object",
  11021. "properties": {
  11022. "mode": {
  11023. "type": "string",
  11024. "x-go-name": "Mode"
  11025. },
  11026. "path": {
  11027. "type": "string",
  11028. "x-go-name": "Path"
  11029. },
  11030. "sha": {
  11031. "type": "string",
  11032. "x-go-name": "SHA"
  11033. },
  11034. "size": {
  11035. "type": "integer",
  11036. "format": "int64",
  11037. "x-go-name": "Size"
  11038. },
  11039. "type": {
  11040. "type": "string",
  11041. "x-go-name": "Type"
  11042. },
  11043. "url": {
  11044. "type": "string",
  11045. "x-go-name": "URL"
  11046. }
  11047. },
  11048. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11049. },
  11050. "GitHook": {
  11051. "description": "GitHook represents a Git repository hook",
  11052. "type": "object",
  11053. "properties": {
  11054. "content": {
  11055. "type": "string",
  11056. "x-go-name": "Content"
  11057. },
  11058. "is_active": {
  11059. "type": "boolean",
  11060. "x-go-name": "IsActive"
  11061. },
  11062. "name": {
  11063. "type": "string",
  11064. "x-go-name": "Name"
  11065. }
  11066. },
  11067. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11068. },
  11069. "GitObject": {
  11070. "type": "object",
  11071. "title": "GitObject represents a Git object.",
  11072. "properties": {
  11073. "sha": {
  11074. "type": "string",
  11075. "x-go-name": "SHA"
  11076. },
  11077. "type": {
  11078. "type": "string",
  11079. "x-go-name": "Type"
  11080. },
  11081. "url": {
  11082. "type": "string",
  11083. "x-go-name": "URL"
  11084. }
  11085. },
  11086. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11087. },
  11088. "GitTreeResponse": {
  11089. "description": "GitTreeResponse returns a git tree",
  11090. "type": "object",
  11091. "properties": {
  11092. "page": {
  11093. "type": "integer",
  11094. "format": "int64",
  11095. "x-go-name": "Page"
  11096. },
  11097. "sha": {
  11098. "type": "string",
  11099. "x-go-name": "SHA"
  11100. },
  11101. "total_count": {
  11102. "type": "integer",
  11103. "format": "int64",
  11104. "x-go-name": "TotalCount"
  11105. },
  11106. "tree": {
  11107. "type": "array",
  11108. "items": {
  11109. "$ref": "#/definitions/GitEntry"
  11110. },
  11111. "x-go-name": "Entries"
  11112. },
  11113. "truncated": {
  11114. "type": "boolean",
  11115. "x-go-name": "Truncated"
  11116. },
  11117. "url": {
  11118. "type": "string",
  11119. "x-go-name": "URL"
  11120. }
  11121. },
  11122. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11123. },
  11124. "Hook": {
  11125. "description": "Hook a hook is a web hook when one repository changed",
  11126. "type": "object",
  11127. "properties": {
  11128. "active": {
  11129. "type": "boolean",
  11130. "x-go-name": "Active"
  11131. },
  11132. "config": {
  11133. "type": "object",
  11134. "additionalProperties": {
  11135. "type": "string"
  11136. },
  11137. "x-go-name": "Config"
  11138. },
  11139. "created_at": {
  11140. "type": "string",
  11141. "format": "date-time",
  11142. "x-go-name": "Created"
  11143. },
  11144. "events": {
  11145. "type": "array",
  11146. "items": {
  11147. "type": "string"
  11148. },
  11149. "x-go-name": "Events"
  11150. },
  11151. "id": {
  11152. "type": "integer",
  11153. "format": "int64",
  11154. "x-go-name": "ID"
  11155. },
  11156. "type": {
  11157. "type": "string",
  11158. "x-go-name": "Type"
  11159. },
  11160. "updated_at": {
  11161. "type": "string",
  11162. "format": "date-time",
  11163. "x-go-name": "Updated"
  11164. }
  11165. },
  11166. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11167. },
  11168. "Identity": {
  11169. "description": "Identity for a person's identity like an author or committer",
  11170. "type": "object",
  11171. "properties": {
  11172. "email": {
  11173. "type": "string",
  11174. "format": "email",
  11175. "x-go-name": "Email"
  11176. },
  11177. "name": {
  11178. "type": "string",
  11179. "x-go-name": "Name"
  11180. }
  11181. },
  11182. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11183. },
  11184. "InternalTracker": {
  11185. "description": "InternalTracker represents settings for internal tracker",
  11186. "type": "object",
  11187. "properties": {
  11188. "allow_only_contributors_to_track_time": {
  11189. "description": "Let only contributors track time (Built-in issue tracker)",
  11190. "type": "boolean",
  11191. "x-go-name": "AllowOnlyContributorsToTrackTime"
  11192. },
  11193. "enable_issue_dependencies": {
  11194. "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)",
  11195. "type": "boolean",
  11196. "x-go-name": "EnableIssueDependencies"
  11197. },
  11198. "enable_time_tracker": {
  11199. "description": "Enable time tracking (Built-in issue tracker)",
  11200. "type": "boolean",
  11201. "x-go-name": "EnableTimeTracker"
  11202. }
  11203. },
  11204. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11205. },
  11206. "Issue": {
  11207. "description": "Issue represents an issue in a repository",
  11208. "type": "object",
  11209. "properties": {
  11210. "assignee": {
  11211. "$ref": "#/definitions/User"
  11212. },
  11213. "assignees": {
  11214. "type": "array",
  11215. "items": {
  11216. "$ref": "#/definitions/User"
  11217. },
  11218. "x-go-name": "Assignees"
  11219. },
  11220. "body": {
  11221. "type": "string",
  11222. "x-go-name": "Body"
  11223. },
  11224. "closed_at": {
  11225. "type": "string",
  11226. "format": "date-time",
  11227. "x-go-name": "Closed"
  11228. },
  11229. "comments": {
  11230. "type": "integer",
  11231. "format": "int64",
  11232. "x-go-name": "Comments"
  11233. },
  11234. "created_at": {
  11235. "type": "string",
  11236. "format": "date-time",
  11237. "x-go-name": "Created"
  11238. },
  11239. "due_date": {
  11240. "type": "string",
  11241. "format": "date-time",
  11242. "x-go-name": "Deadline"
  11243. },
  11244. "html_url": {
  11245. "type": "string",
  11246. "x-go-name": "HTMLURL"
  11247. },
  11248. "id": {
  11249. "type": "integer",
  11250. "format": "int64",
  11251. "x-go-name": "ID"
  11252. },
  11253. "labels": {
  11254. "type": "array",
  11255. "items": {
  11256. "$ref": "#/definitions/Label"
  11257. },
  11258. "x-go-name": "Labels"
  11259. },
  11260. "milestone": {
  11261. "$ref": "#/definitions/Milestone"
  11262. },
  11263. "number": {
  11264. "type": "integer",
  11265. "format": "int64",
  11266. "x-go-name": "Index"
  11267. },
  11268. "original_author": {
  11269. "type": "string",
  11270. "x-go-name": "OriginalAuthor"
  11271. },
  11272. "original_author_id": {
  11273. "type": "integer",
  11274. "format": "int64",
  11275. "x-go-name": "OriginalAuthorID"
  11276. },
  11277. "pull_request": {
  11278. "$ref": "#/definitions/PullRequestMeta"
  11279. },
  11280. "repository": {
  11281. "$ref": "#/definitions/RepositoryMeta"
  11282. },
  11283. "state": {
  11284. "$ref": "#/definitions/StateType"
  11285. },
  11286. "title": {
  11287. "type": "string",
  11288. "x-go-name": "Title"
  11289. },
  11290. "updated_at": {
  11291. "type": "string",
  11292. "format": "date-time",
  11293. "x-go-name": "Updated"
  11294. },
  11295. "url": {
  11296. "type": "string",
  11297. "x-go-name": "URL"
  11298. },
  11299. "user": {
  11300. "$ref": "#/definitions/User"
  11301. }
  11302. },
  11303. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11304. },
  11305. "IssueDeadline": {
  11306. "description": "IssueDeadline represents an issue deadline",
  11307. "type": "object",
  11308. "properties": {
  11309. "due_date": {
  11310. "type": "string",
  11311. "format": "date-time",
  11312. "x-go-name": "Deadline"
  11313. }
  11314. },
  11315. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11316. },
  11317. "IssueLabelsOption": {
  11318. "description": "IssueLabelsOption a collection of labels",
  11319. "type": "object",
  11320. "properties": {
  11321. "labels": {
  11322. "description": "list of label IDs",
  11323. "type": "array",
  11324. "items": {
  11325. "type": "integer",
  11326. "format": "int64"
  11327. },
  11328. "x-go-name": "Labels"
  11329. }
  11330. },
  11331. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11332. },
  11333. "Label": {
  11334. "description": "Label a label to an issue or a pr",
  11335. "type": "object",
  11336. "properties": {
  11337. "color": {
  11338. "type": "string",
  11339. "x-go-name": "Color",
  11340. "example": "00aabb"
  11341. },
  11342. "description": {
  11343. "type": "string",
  11344. "x-go-name": "Description"
  11345. },
  11346. "id": {
  11347. "type": "integer",
  11348. "format": "int64",
  11349. "x-go-name": "ID"
  11350. },
  11351. "name": {
  11352. "type": "string",
  11353. "x-go-name": "Name"
  11354. },
  11355. "url": {
  11356. "type": "string",
  11357. "x-go-name": "URL"
  11358. }
  11359. },
  11360. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11361. },
  11362. "MarkdownOption": {
  11363. "description": "MarkdownOption markdown options",
  11364. "type": "object",
  11365. "properties": {
  11366. "Context": {
  11367. "description": "Context to render\n\nin: body",
  11368. "type": "string"
  11369. },
  11370. "Mode": {
  11371. "description": "Mode to render\n\nin: body",
  11372. "type": "string"
  11373. },
  11374. "Text": {
  11375. "description": "Text markdown to render\n\nin: body",
  11376. "type": "string"
  11377. },
  11378. "Wiki": {
  11379. "description": "Is it a wiki page ?\n\nin: body",
  11380. "type": "boolean"
  11381. }
  11382. },
  11383. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11384. },
  11385. "MergePullRequestOption": {
  11386. "description": "MergePullRequestForm form for merging Pull Request",
  11387. "type": "object",
  11388. "required": [
  11389. "Do"
  11390. ],
  11391. "properties": {
  11392. "Do": {
  11393. "type": "string",
  11394. "enum": [
  11395. "merge",
  11396. "rebase",
  11397. "rebase-merge",
  11398. "squash"
  11399. ]
  11400. },
  11401. "MergeMessageField": {
  11402. "type": "string"
  11403. },
  11404. "MergeTitleField": {
  11405. "type": "string"
  11406. },
  11407. "force_merge": {
  11408. "type": "boolean",
  11409. "x-go-name": "ForceMerge"
  11410. }
  11411. },
  11412. "x-go-name": "MergePullRequestForm",
  11413. "x-go-package": "code.gitea.io/gitea/modules/auth"
  11414. },
  11415. "MigrateRepoForm": {
  11416. "description": "MigrateRepoForm form for migrating repository",
  11417. "type": "object",
  11418. "required": [
  11419. "clone_addr",
  11420. "uid",
  11421. "repo_name"
  11422. ],
  11423. "properties": {
  11424. "auth_password": {
  11425. "type": "string",
  11426. "x-go-name": "AuthPassword"
  11427. },
  11428. "auth_username": {
  11429. "type": "string",
  11430. "x-go-name": "AuthUsername"
  11431. },
  11432. "clone_addr": {
  11433. "type": "string",
  11434. "x-go-name": "CloneAddr"
  11435. },
  11436. "description": {
  11437. "type": "string",
  11438. "x-go-name": "Description"
  11439. },
  11440. "issues": {
  11441. "type": "boolean",
  11442. "x-go-name": "Issues"
  11443. },
  11444. "labels": {
  11445. "type": "boolean",
  11446. "x-go-name": "Labels"
  11447. },
  11448. "milestones": {
  11449. "type": "boolean",
  11450. "x-go-name": "Milestones"
  11451. },
  11452. "mirror": {
  11453. "type": "boolean",
  11454. "x-go-name": "Mirror"
  11455. },
  11456. "private": {
  11457. "type": "boolean",
  11458. "x-go-name": "Private"
  11459. },
  11460. "pull_requests": {
  11461. "type": "boolean",
  11462. "x-go-name": "PullRequests"
  11463. },
  11464. "releases": {
  11465. "type": "boolean",
  11466. "x-go-name": "Releases"
  11467. },
  11468. "repo_name": {
  11469. "type": "string",
  11470. "x-go-name": "RepoName"
  11471. },
  11472. "uid": {
  11473. "type": "integer",
  11474. "format": "int64",
  11475. "x-go-name": "UID"
  11476. },
  11477. "wiki": {
  11478. "type": "boolean",
  11479. "x-go-name": "Wiki"
  11480. }
  11481. },
  11482. "x-go-package": "code.gitea.io/gitea/modules/auth"
  11483. },
  11484. "Milestone": {
  11485. "description": "Milestone milestone is a collection of issues on one repository",
  11486. "type": "object",
  11487. "properties": {
  11488. "closed_at": {
  11489. "type": "string",
  11490. "format": "date-time",
  11491. "x-go-name": "Closed"
  11492. },
  11493. "closed_issues": {
  11494. "type": "integer",
  11495. "format": "int64",
  11496. "x-go-name": "ClosedIssues"
  11497. },
  11498. "description": {
  11499. "type": "string",
  11500. "x-go-name": "Description"
  11501. },
  11502. "due_on": {
  11503. "type": "string",
  11504. "format": "date-time",
  11505. "x-go-name": "Deadline"
  11506. },
  11507. "id": {
  11508. "type": "integer",
  11509. "format": "int64",
  11510. "x-go-name": "ID"
  11511. },
  11512. "open_issues": {
  11513. "type": "integer",
  11514. "format": "int64",
  11515. "x-go-name": "OpenIssues"
  11516. },
  11517. "state": {
  11518. "$ref": "#/definitions/StateType"
  11519. },
  11520. "title": {
  11521. "type": "string",
  11522. "x-go-name": "Title"
  11523. }
  11524. },
  11525. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11526. },
  11527. "NotificationCount": {
  11528. "description": "NotificationCount number of unread notifications",
  11529. "type": "object",
  11530. "properties": {
  11531. "new": {
  11532. "type": "integer",
  11533. "format": "int64",
  11534. "x-go-name": "New"
  11535. }
  11536. },
  11537. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11538. },
  11539. "NotificationSubject": {
  11540. "description": "NotificationSubject contains the notification subject (Issue/Pull/Commit)",
  11541. "type": "object",
  11542. "properties": {
  11543. "latest_comment_url": {
  11544. "type": "string",
  11545. "x-go-name": "LatestCommentURL"
  11546. },
  11547. "title": {
  11548. "type": "string",
  11549. "x-go-name": "Title"
  11550. },
  11551. "type": {
  11552. "type": "string",
  11553. "x-go-name": "Type"
  11554. },
  11555. "url": {
  11556. "type": "string",
  11557. "x-go-name": "URL"
  11558. }
  11559. },
  11560. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11561. },
  11562. "NotificationThread": {
  11563. "description": "NotificationThread expose Notification on API",
  11564. "type": "object",
  11565. "properties": {
  11566. "id": {
  11567. "type": "integer",
  11568. "format": "int64",
  11569. "x-go-name": "ID"
  11570. },
  11571. "pinned": {
  11572. "type": "boolean",
  11573. "x-go-name": "Pinned"
  11574. },
  11575. "repository": {
  11576. "$ref": "#/definitions/Repository"
  11577. },
  11578. "subject": {
  11579. "$ref": "#/definitions/NotificationSubject"
  11580. },
  11581. "unread": {
  11582. "type": "boolean",
  11583. "x-go-name": "Unread"
  11584. },
  11585. "updated_at": {
  11586. "type": "string",
  11587. "format": "date-time",
  11588. "x-go-name": "UpdatedAt"
  11589. },
  11590. "url": {
  11591. "type": "string",
  11592. "x-go-name": "URL"
  11593. }
  11594. },
  11595. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11596. },
  11597. "Organization": {
  11598. "description": "Organization represents an organization",
  11599. "type": "object",
  11600. "properties": {
  11601. "avatar_url": {
  11602. "type": "string",
  11603. "x-go-name": "AvatarURL"
  11604. },
  11605. "description": {
  11606. "type": "string",
  11607. "x-go-name": "Description"
  11608. },
  11609. "full_name": {
  11610. "type": "string",
  11611. "x-go-name": "FullName"
  11612. },
  11613. "id": {
  11614. "type": "integer",
  11615. "format": "int64",
  11616. "x-go-name": "ID"
  11617. },
  11618. "location": {
  11619. "type": "string",
  11620. "x-go-name": "Location"
  11621. },
  11622. "repo_admin_change_team_access": {
  11623. "type": "boolean",
  11624. "x-go-name": "RepoAdminChangeTeamAccess"
  11625. },
  11626. "username": {
  11627. "type": "string",
  11628. "x-go-name": "UserName"
  11629. },
  11630. "visibility": {
  11631. "type": "string",
  11632. "x-go-name": "Visibility"
  11633. },
  11634. "website": {
  11635. "type": "string",
  11636. "x-go-name": "Website"
  11637. }
  11638. },
  11639. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11640. },
  11641. "PRBranchInfo": {
  11642. "description": "PRBranchInfo information about a branch",
  11643. "type": "object",
  11644. "properties": {
  11645. "label": {
  11646. "type": "string",
  11647. "x-go-name": "Name"
  11648. },
  11649. "ref": {
  11650. "type": "string",
  11651. "x-go-name": "Ref"
  11652. },
  11653. "repo": {
  11654. "$ref": "#/definitions/Repository"
  11655. },
  11656. "repo_id": {
  11657. "type": "integer",
  11658. "format": "int64",
  11659. "x-go-name": "RepoID"
  11660. },
  11661. "sha": {
  11662. "type": "string",
  11663. "x-go-name": "Sha"
  11664. }
  11665. },
  11666. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11667. },
  11668. "PayloadCommit": {
  11669. "description": "PayloadCommit represents a commit",
  11670. "type": "object",
  11671. "properties": {
  11672. "added": {
  11673. "type": "array",
  11674. "items": {
  11675. "type": "string"
  11676. },
  11677. "x-go-name": "Added"
  11678. },
  11679. "author": {
  11680. "$ref": "#/definitions/PayloadUser"
  11681. },
  11682. "committer": {
  11683. "$ref": "#/definitions/PayloadUser"
  11684. },
  11685. "id": {
  11686. "description": "sha1 hash of the commit",
  11687. "type": "string",
  11688. "x-go-name": "ID"
  11689. },
  11690. "message": {
  11691. "type": "string",
  11692. "x-go-name": "Message"
  11693. },
  11694. "modified": {
  11695. "type": "array",
  11696. "items": {
  11697. "type": "string"
  11698. },
  11699. "x-go-name": "Modified"
  11700. },
  11701. "removed": {
  11702. "type": "array",
  11703. "items": {
  11704. "type": "string"
  11705. },
  11706. "x-go-name": "Removed"
  11707. },
  11708. "timestamp": {
  11709. "type": "string",
  11710. "format": "date-time",
  11711. "x-go-name": "Timestamp"
  11712. },
  11713. "url": {
  11714. "type": "string",
  11715. "x-go-name": "URL"
  11716. },
  11717. "verification": {
  11718. "$ref": "#/definitions/PayloadCommitVerification"
  11719. }
  11720. },
  11721. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11722. },
  11723. "PayloadCommitVerification": {
  11724. "description": "PayloadCommitVerification represents the GPG verification of a commit",
  11725. "type": "object",
  11726. "properties": {
  11727. "payload": {
  11728. "type": "string",
  11729. "x-go-name": "Payload"
  11730. },
  11731. "reason": {
  11732. "type": "string",
  11733. "x-go-name": "Reason"
  11734. },
  11735. "signature": {
  11736. "type": "string",
  11737. "x-go-name": "Signature"
  11738. },
  11739. "signer": {
  11740. "$ref": "#/definitions/PayloadUser"
  11741. },
  11742. "verified": {
  11743. "type": "boolean",
  11744. "x-go-name": "Verified"
  11745. }
  11746. },
  11747. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11748. },
  11749. "PayloadUser": {
  11750. "description": "PayloadUser represents the author or committer of a commit",
  11751. "type": "object",
  11752. "properties": {
  11753. "email": {
  11754. "type": "string",
  11755. "format": "email",
  11756. "x-go-name": "Email"
  11757. },
  11758. "name": {
  11759. "description": "Full name of the commit author",
  11760. "type": "string",
  11761. "x-go-name": "Name"
  11762. },
  11763. "username": {
  11764. "type": "string",
  11765. "x-go-name": "UserName"
  11766. }
  11767. },
  11768. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11769. },
  11770. "Permission": {
  11771. "description": "Permission represents a set of permissions",
  11772. "type": "object",
  11773. "properties": {
  11774. "admin": {
  11775. "type": "boolean",
  11776. "x-go-name": "Admin"
  11777. },
  11778. "pull": {
  11779. "type": "boolean",
  11780. "x-go-name": "Pull"
  11781. },
  11782. "push": {
  11783. "type": "boolean",
  11784. "x-go-name": "Push"
  11785. }
  11786. },
  11787. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11788. },
  11789. "PublicKey": {
  11790. "description": "PublicKey publickey is a user key to push code to repository",
  11791. "type": "object",
  11792. "properties": {
  11793. "created_at": {
  11794. "type": "string",
  11795. "format": "date-time",
  11796. "x-go-name": "Created"
  11797. },
  11798. "fingerprint": {
  11799. "type": "string",
  11800. "x-go-name": "Fingerprint"
  11801. },
  11802. "id": {
  11803. "type": "integer",
  11804. "format": "int64",
  11805. "x-go-name": "ID"
  11806. },
  11807. "key": {
  11808. "type": "string",
  11809. "x-go-name": "Key"
  11810. },
  11811. "key_type": {
  11812. "type": "string",
  11813. "x-go-name": "KeyType"
  11814. },
  11815. "read_only": {
  11816. "type": "boolean",
  11817. "x-go-name": "ReadOnly"
  11818. },
  11819. "title": {
  11820. "type": "string",
  11821. "x-go-name": "Title"
  11822. },
  11823. "url": {
  11824. "type": "string",
  11825. "x-go-name": "URL"
  11826. },
  11827. "user": {
  11828. "$ref": "#/definitions/User"
  11829. }
  11830. },
  11831. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11832. },
  11833. "PullRequest": {
  11834. "description": "PullRequest represents a pull request",
  11835. "type": "object",
  11836. "properties": {
  11837. "assignee": {
  11838. "$ref": "#/definitions/User"
  11839. },
  11840. "assignees": {
  11841. "type": "array",
  11842. "items": {
  11843. "$ref": "#/definitions/User"
  11844. },
  11845. "x-go-name": "Assignees"
  11846. },
  11847. "base": {
  11848. "$ref": "#/definitions/PRBranchInfo"
  11849. },
  11850. "body": {
  11851. "type": "string",
  11852. "x-go-name": "Body"
  11853. },
  11854. "closed_at": {
  11855. "type": "string",
  11856. "format": "date-time",
  11857. "x-go-name": "Closed"
  11858. },
  11859. "comments": {
  11860. "type": "integer",
  11861. "format": "int64",
  11862. "x-go-name": "Comments"
  11863. },
  11864. "created_at": {
  11865. "type": "string",
  11866. "format": "date-time",
  11867. "x-go-name": "Created"
  11868. },
  11869. "diff_url": {
  11870. "type": "string",
  11871. "x-go-name": "DiffURL"
  11872. },
  11873. "due_date": {
  11874. "type": "string",
  11875. "format": "date-time",
  11876. "x-go-name": "Deadline"
  11877. },
  11878. "head": {
  11879. "$ref": "#/definitions/PRBranchInfo"
  11880. },
  11881. "html_url": {
  11882. "type": "string",
  11883. "x-go-name": "HTMLURL"
  11884. },
  11885. "id": {
  11886. "type": "integer",
  11887. "format": "int64",
  11888. "x-go-name": "ID"
  11889. },
  11890. "labels": {
  11891. "type": "array",
  11892. "items": {
  11893. "$ref": "#/definitions/Label"
  11894. },
  11895. "x-go-name": "Labels"
  11896. },
  11897. "merge_base": {
  11898. "type": "string",
  11899. "x-go-name": "MergeBase"
  11900. },
  11901. "merge_commit_sha": {
  11902. "type": "string",
  11903. "x-go-name": "MergedCommitID"
  11904. },
  11905. "mergeable": {
  11906. "type": "boolean",
  11907. "x-go-name": "Mergeable"
  11908. },
  11909. "merged": {
  11910. "type": "boolean",
  11911. "x-go-name": "HasMerged"
  11912. },
  11913. "merged_at": {
  11914. "type": "string",
  11915. "format": "date-time",
  11916. "x-go-name": "Merged"
  11917. },
  11918. "merged_by": {
  11919. "$ref": "#/definitions/User"
  11920. },
  11921. "milestone": {
  11922. "$ref": "#/definitions/Milestone"
  11923. },
  11924. "number": {
  11925. "type": "integer",
  11926. "format": "int64",
  11927. "x-go-name": "Index"
  11928. },
  11929. "patch_url": {
  11930. "type": "string",
  11931. "x-go-name": "PatchURL"
  11932. },
  11933. "state": {
  11934. "$ref": "#/definitions/StateType"
  11935. },
  11936. "title": {
  11937. "type": "string",
  11938. "x-go-name": "Title"
  11939. },
  11940. "updated_at": {
  11941. "type": "string",
  11942. "format": "date-time",
  11943. "x-go-name": "Updated"
  11944. },
  11945. "url": {
  11946. "type": "string",
  11947. "x-go-name": "URL"
  11948. },
  11949. "user": {
  11950. "$ref": "#/definitions/User"
  11951. }
  11952. },
  11953. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11954. },
  11955. "PullRequestMeta": {
  11956. "description": "PullRequestMeta PR info if an issue is a PR",
  11957. "type": "object",
  11958. "properties": {
  11959. "merged": {
  11960. "type": "boolean",
  11961. "x-go-name": "HasMerged"
  11962. },
  11963. "merged_at": {
  11964. "type": "string",
  11965. "format": "date-time",
  11966. "x-go-name": "Merged"
  11967. }
  11968. },
  11969. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11970. },
  11971. "Reaction": {
  11972. "description": "Reaction contain one reaction",
  11973. "type": "object",
  11974. "properties": {
  11975. "content": {
  11976. "type": "string",
  11977. "x-go-name": "Reaction"
  11978. },
  11979. "created_at": {
  11980. "type": "string",
  11981. "format": "date-time",
  11982. "x-go-name": "Created"
  11983. },
  11984. "user": {
  11985. "$ref": "#/definitions/User"
  11986. }
  11987. },
  11988. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11989. },
  11990. "Reference": {
  11991. "type": "object",
  11992. "title": "Reference represents a Git reference.",
  11993. "properties": {
  11994. "object": {
  11995. "$ref": "#/definitions/GitObject"
  11996. },
  11997. "ref": {
  11998. "type": "string",
  11999. "x-go-name": "Ref"
  12000. },
  12001. "url": {
  12002. "type": "string",
  12003. "x-go-name": "URL"
  12004. }
  12005. },
  12006. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12007. },
  12008. "Release": {
  12009. "description": "Release represents a repository release",
  12010. "type": "object",
  12011. "properties": {
  12012. "assets": {
  12013. "type": "array",
  12014. "items": {
  12015. "$ref": "#/definitions/Attachment"
  12016. },
  12017. "x-go-name": "Attachments"
  12018. },
  12019. "author": {
  12020. "$ref": "#/definitions/User"
  12021. },
  12022. "body": {
  12023. "type": "string",
  12024. "x-go-name": "Note"
  12025. },
  12026. "created_at": {
  12027. "type": "string",
  12028. "format": "date-time",
  12029. "x-go-name": "CreatedAt"
  12030. },
  12031. "draft": {
  12032. "type": "boolean",
  12033. "x-go-name": "IsDraft"
  12034. },
  12035. "id": {
  12036. "type": "integer",
  12037. "format": "int64",
  12038. "x-go-name": "ID"
  12039. },
  12040. "name": {
  12041. "type": "string",
  12042. "x-go-name": "Title"
  12043. },
  12044. "prerelease": {
  12045. "type": "boolean",
  12046. "x-go-name": "IsPrerelease"
  12047. },
  12048. "published_at": {
  12049. "type": "string",
  12050. "format": "date-time",
  12051. "x-go-name": "PublishedAt"
  12052. },
  12053. "tag_name": {
  12054. "type": "string",
  12055. "x-go-name": "TagName"
  12056. },
  12057. "tarball_url": {
  12058. "type": "string",
  12059. "x-go-name": "TarURL"
  12060. },
  12061. "target_commitish": {
  12062. "type": "string",
  12063. "x-go-name": "Target"
  12064. },
  12065. "url": {
  12066. "type": "string",
  12067. "x-go-name": "URL"
  12068. },
  12069. "zipball_url": {
  12070. "type": "string",
  12071. "x-go-name": "ZipURL"
  12072. }
  12073. },
  12074. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12075. },
  12076. "RepoCommit": {
  12077. "type": "object",
  12078. "title": "RepoCommit contains information of a commit in the context of a repository.",
  12079. "properties": {
  12080. "author": {
  12081. "$ref": "#/definitions/CommitUser"
  12082. },
  12083. "committer": {
  12084. "$ref": "#/definitions/CommitUser"
  12085. },
  12086. "message": {
  12087. "type": "string",
  12088. "x-go-name": "Message"
  12089. },
  12090. "tree": {
  12091. "$ref": "#/definitions/CommitMeta"
  12092. },
  12093. "url": {
  12094. "type": "string",
  12095. "x-go-name": "URL"
  12096. }
  12097. },
  12098. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12099. },
  12100. "RepoTopicOptions": {
  12101. "description": "RepoTopicOptions a collection of repo topic names",
  12102. "type": "object",
  12103. "properties": {
  12104. "topics": {
  12105. "description": "list of topic names",
  12106. "type": "array",
  12107. "items": {
  12108. "type": "string"
  12109. },
  12110. "x-go-name": "Topics"
  12111. }
  12112. },
  12113. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12114. },
  12115. "Repository": {
  12116. "description": "Repository represents a repository",
  12117. "type": "object",
  12118. "properties": {
  12119. "allow_merge_commits": {
  12120. "type": "boolean",
  12121. "x-go-name": "AllowMerge"
  12122. },
  12123. "allow_rebase": {
  12124. "type": "boolean",
  12125. "x-go-name": "AllowRebase"
  12126. },
  12127. "allow_rebase_explicit": {
  12128. "type": "boolean",
  12129. "x-go-name": "AllowRebaseMerge"
  12130. },
  12131. "allow_squash_merge": {
  12132. "type": "boolean",
  12133. "x-go-name": "AllowSquash"
  12134. },
  12135. "archived": {
  12136. "type": "boolean",
  12137. "x-go-name": "Archived"
  12138. },
  12139. "avatar_url": {
  12140. "type": "string",
  12141. "x-go-name": "AvatarURL"
  12142. },
  12143. "clone_url": {
  12144. "type": "string",
  12145. "x-go-name": "CloneURL"
  12146. },
  12147. "created_at": {
  12148. "type": "string",
  12149. "format": "date-time",
  12150. "x-go-name": "Created"
  12151. },
  12152. "default_branch": {
  12153. "type": "string",
  12154. "x-go-name": "DefaultBranch"
  12155. },
  12156. "description": {
  12157. "type": "string",
  12158. "x-go-name": "Description"
  12159. },
  12160. "empty": {
  12161. "type": "boolean",
  12162. "x-go-name": "Empty"
  12163. },
  12164. "external_tracker": {
  12165. "$ref": "#/definitions/ExternalTracker"
  12166. },
  12167. "external_wiki": {
  12168. "$ref": "#/definitions/ExternalWiki"
  12169. },
  12170. "fork": {
  12171. "type": "boolean",
  12172. "x-go-name": "Fork"
  12173. },
  12174. "forks_count": {
  12175. "type": "integer",
  12176. "format": "int64",
  12177. "x-go-name": "Forks"
  12178. },
  12179. "full_name": {
  12180. "type": "string",
  12181. "x-go-name": "FullName"
  12182. },
  12183. "has_issues": {
  12184. "type": "boolean",
  12185. "x-go-name": "HasIssues"
  12186. },
  12187. "has_pull_requests": {
  12188. "type": "boolean",
  12189. "x-go-name": "HasPullRequests"
  12190. },
  12191. "has_wiki": {
  12192. "type": "boolean",
  12193. "x-go-name": "HasWiki"
  12194. },
  12195. "html_url": {
  12196. "type": "string",
  12197. "x-go-name": "HTMLURL"
  12198. },
  12199. "id": {
  12200. "type": "integer",
  12201. "format": "int64",
  12202. "x-go-name": "ID"
  12203. },
  12204. "ignore_whitespace_conflicts": {
  12205. "type": "boolean",
  12206. "x-go-name": "IgnoreWhitespaceConflicts"
  12207. },
  12208. "internal_tracker": {
  12209. "$ref": "#/definitions/InternalTracker"
  12210. },
  12211. "mirror": {
  12212. "type": "boolean",
  12213. "x-go-name": "Mirror"
  12214. },
  12215. "name": {
  12216. "type": "string",
  12217. "x-go-name": "Name"
  12218. },
  12219. "open_issues_count": {
  12220. "type": "integer",
  12221. "format": "int64",
  12222. "x-go-name": "OpenIssues"
  12223. },
  12224. "open_pr_counter": {
  12225. "type": "integer",
  12226. "format": "int64",
  12227. "x-go-name": "OpenPulls"
  12228. },
  12229. "original_url": {
  12230. "type": "string",
  12231. "x-go-name": "OriginalURL"
  12232. },
  12233. "owner": {
  12234. "$ref": "#/definitions/User"
  12235. },
  12236. "parent": {
  12237. "$ref": "#/definitions/Repository"
  12238. },
  12239. "permissions": {
  12240. "$ref": "#/definitions/Permission"
  12241. },
  12242. "private": {
  12243. "type": "boolean",
  12244. "x-go-name": "Private"
  12245. },
  12246. "release_counter": {
  12247. "type": "integer",
  12248. "format": "int64",
  12249. "x-go-name": "Releases"
  12250. },
  12251. "size": {
  12252. "type": "integer",
  12253. "format": "int64",
  12254. "x-go-name": "Size"
  12255. },
  12256. "ssh_url": {
  12257. "type": "string",
  12258. "x-go-name": "SSHURL"
  12259. },
  12260. "stars_count": {
  12261. "type": "integer",
  12262. "format": "int64",
  12263. "x-go-name": "Stars"
  12264. },
  12265. "template": {
  12266. "type": "boolean",
  12267. "x-go-name": "Template"
  12268. },
  12269. "updated_at": {
  12270. "type": "string",
  12271. "format": "date-time",
  12272. "x-go-name": "Updated"
  12273. },
  12274. "watchers_count": {
  12275. "type": "integer",
  12276. "format": "int64",
  12277. "x-go-name": "Watchers"
  12278. },
  12279. "website": {
  12280. "type": "string",
  12281. "x-go-name": "Website"
  12282. }
  12283. },
  12284. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12285. },
  12286. "RepositoryMeta": {
  12287. "description": "RepositoryMeta basic repository information",
  12288. "type": "object",
  12289. "properties": {
  12290. "full_name": {
  12291. "type": "string",
  12292. "x-go-name": "FullName"
  12293. },
  12294. "id": {
  12295. "type": "integer",
  12296. "format": "int64",
  12297. "x-go-name": "ID"
  12298. },
  12299. "name": {
  12300. "type": "string",
  12301. "x-go-name": "Name"
  12302. }
  12303. },
  12304. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12305. },
  12306. "SearchResults": {
  12307. "description": "SearchResults results of a successful search",
  12308. "type": "object",
  12309. "properties": {
  12310. "data": {
  12311. "type": "array",
  12312. "items": {
  12313. "$ref": "#/definitions/Repository"
  12314. },
  12315. "x-go-name": "Data"
  12316. },
  12317. "ok": {
  12318. "type": "boolean",
  12319. "x-go-name": "OK"
  12320. }
  12321. },
  12322. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12323. },
  12324. "ServerVersion": {
  12325. "description": "ServerVersion wraps the version of the server",
  12326. "type": "object",
  12327. "properties": {
  12328. "version": {
  12329. "type": "string",
  12330. "x-go-name": "Version"
  12331. }
  12332. },
  12333. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12334. },
  12335. "StateType": {
  12336. "description": "StateType issue state type",
  12337. "type": "string",
  12338. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12339. },
  12340. "Status": {
  12341. "description": "Status holds a single Status of a single Commit",
  12342. "type": "object",
  12343. "properties": {
  12344. "context": {
  12345. "type": "string",
  12346. "x-go-name": "Context"
  12347. },
  12348. "created_at": {
  12349. "type": "string",
  12350. "format": "date-time",
  12351. "x-go-name": "Created"
  12352. },
  12353. "creator": {
  12354. "$ref": "#/definitions/User"
  12355. },
  12356. "description": {
  12357. "type": "string",
  12358. "x-go-name": "Description"
  12359. },
  12360. "id": {
  12361. "type": "integer",
  12362. "format": "int64",
  12363. "x-go-name": "ID"
  12364. },
  12365. "status": {
  12366. "$ref": "#/definitions/StatusState"
  12367. },
  12368. "target_url": {
  12369. "type": "string",
  12370. "x-go-name": "TargetURL"
  12371. },
  12372. "updated_at": {
  12373. "type": "string",
  12374. "format": "date-time",
  12375. "x-go-name": "Updated"
  12376. },
  12377. "url": {
  12378. "type": "string",
  12379. "x-go-name": "URL"
  12380. }
  12381. },
  12382. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12383. },
  12384. "StatusState": {
  12385. "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"",
  12386. "type": "string",
  12387. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12388. },
  12389. "StopWatch": {
  12390. "description": "StopWatch represent a running stopwatch",
  12391. "type": "object",
  12392. "properties": {
  12393. "created": {
  12394. "type": "string",
  12395. "format": "date-time",
  12396. "x-go-name": "Created"
  12397. },
  12398. "issue_index": {
  12399. "type": "integer",
  12400. "format": "int64",
  12401. "x-go-name": "IssueIndex"
  12402. }
  12403. },
  12404. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12405. },
  12406. "Tag": {
  12407. "description": "Tag represents a repository tag",
  12408. "type": "object",
  12409. "properties": {
  12410. "commit": {
  12411. "$ref": "#/definitions/CommitMeta"
  12412. },
  12413. "id": {
  12414. "type": "string",
  12415. "x-go-name": "ID"
  12416. },
  12417. "name": {
  12418. "type": "string",
  12419. "x-go-name": "Name"
  12420. },
  12421. "tarball_url": {
  12422. "type": "string",
  12423. "x-go-name": "TarballURL"
  12424. },
  12425. "zipball_url": {
  12426. "type": "string",
  12427. "x-go-name": "ZipballURL"
  12428. }
  12429. },
  12430. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12431. },
  12432. "Team": {
  12433. "description": "Team represents a team in an organization",
  12434. "type": "object",
  12435. "properties": {
  12436. "can_create_org_repo": {
  12437. "type": "boolean",
  12438. "x-go-name": "CanCreateOrgRepo"
  12439. },
  12440. "description": {
  12441. "type": "string",
  12442. "x-go-name": "Description"
  12443. },
  12444. "id": {
  12445. "type": "integer",
  12446. "format": "int64",
  12447. "x-go-name": "ID"
  12448. },
  12449. "includes_all_repositories": {
  12450. "type": "boolean",
  12451. "x-go-name": "IncludesAllRepositories"
  12452. },
  12453. "name": {
  12454. "type": "string",
  12455. "x-go-name": "Name"
  12456. },
  12457. "organization": {
  12458. "$ref": "#/definitions/Organization"
  12459. },
  12460. "permission": {
  12461. "type": "string",
  12462. "enum": [
  12463. "none",
  12464. "read",
  12465. "write",
  12466. "admin",
  12467. "owner"
  12468. ],
  12469. "x-go-name": "Permission"
  12470. },
  12471. "units": {
  12472. "type": "array",
  12473. "items": {
  12474. "type": "string"
  12475. },
  12476. "x-go-name": "Units",
  12477. "example": [
  12478. "repo.code",
  12479. "repo.issues",
  12480. "repo.ext_issues",
  12481. "repo.wiki",
  12482. "repo.pulls",
  12483. "repo.releases",
  12484. "repo.ext_wiki"
  12485. ]
  12486. }
  12487. },
  12488. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12489. },
  12490. "TimeStamp": {
  12491. "description": "TimeStamp defines a timestamp",
  12492. "type": "integer",
  12493. "format": "int64",
  12494. "x-go-package": "code.gitea.io/gitea/modules/timeutil"
  12495. },
  12496. "TopicName": {
  12497. "description": "TopicName a list of repo topic names",
  12498. "type": "object",
  12499. "properties": {
  12500. "topics": {
  12501. "type": "array",
  12502. "items": {
  12503. "type": "string"
  12504. },
  12505. "x-go-name": "TopicNames"
  12506. }
  12507. },
  12508. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12509. },
  12510. "TopicResponse": {
  12511. "description": "TopicResponse for returning topics",
  12512. "type": "object",
  12513. "properties": {
  12514. "created": {
  12515. "type": "string",
  12516. "format": "date-time",
  12517. "x-go-name": "Created"
  12518. },
  12519. "id": {
  12520. "type": "integer",
  12521. "format": "int64",
  12522. "x-go-name": "ID"
  12523. },
  12524. "repo_count": {
  12525. "type": "integer",
  12526. "format": "int64",
  12527. "x-go-name": "RepoCount"
  12528. },
  12529. "topic_name": {
  12530. "type": "string",
  12531. "x-go-name": "Name"
  12532. },
  12533. "updated": {
  12534. "type": "string",
  12535. "format": "date-time",
  12536. "x-go-name": "Updated"
  12537. }
  12538. },
  12539. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12540. },
  12541. "TrackedTime": {
  12542. "description": "TrackedTime worked time for an issue / pr",
  12543. "type": "object",
  12544. "properties": {
  12545. "created": {
  12546. "type": "string",
  12547. "format": "date-time",
  12548. "x-go-name": "Created"
  12549. },
  12550. "id": {
  12551. "type": "integer",
  12552. "format": "int64",
  12553. "x-go-name": "ID"
  12554. },
  12555. "issue": {
  12556. "$ref": "#/definitions/Issue"
  12557. },
  12558. "issue_id": {
  12559. "description": "deprecated (only for backwards compatibility)",
  12560. "type": "integer",
  12561. "format": "int64",
  12562. "x-go-name": "IssueID"
  12563. },
  12564. "time": {
  12565. "description": "Time in seconds",
  12566. "type": "integer",
  12567. "format": "int64",
  12568. "x-go-name": "Time"
  12569. },
  12570. "user_id": {
  12571. "description": "deprecated (only for backwards compatibility)",
  12572. "type": "integer",
  12573. "format": "int64",
  12574. "x-go-name": "UserID"
  12575. },
  12576. "user_name": {
  12577. "type": "string",
  12578. "x-go-name": "UserName"
  12579. }
  12580. },
  12581. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12582. },
  12583. "UpdateFileOptions": {
  12584. "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)",
  12585. "type": "object",
  12586. "required": [
  12587. "sha",
  12588. "content"
  12589. ],
  12590. "properties": {
  12591. "author": {
  12592. "$ref": "#/definitions/Identity"
  12593. },
  12594. "branch": {
  12595. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  12596. "type": "string",
  12597. "x-go-name": "BranchName"
  12598. },
  12599. "committer": {
  12600. "$ref": "#/definitions/Identity"
  12601. },
  12602. "content": {
  12603. "description": "content must be base64 encoded",
  12604. "type": "string",
  12605. "x-go-name": "Content"
  12606. },
  12607. "dates": {
  12608. "$ref": "#/definitions/CommitDateOptions"
  12609. },
  12610. "from_path": {
  12611. "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL",
  12612. "type": "string",
  12613. "x-go-name": "FromPath"
  12614. },
  12615. "message": {
  12616. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  12617. "type": "string",
  12618. "x-go-name": "Message"
  12619. },
  12620. "new_branch": {
  12621. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  12622. "type": "string",
  12623. "x-go-name": "NewBranchName"
  12624. },
  12625. "sha": {
  12626. "description": "sha is the SHA for the file that already exists",
  12627. "type": "string",
  12628. "x-go-name": "SHA"
  12629. }
  12630. },
  12631. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12632. },
  12633. "User": {
  12634. "description": "User represents a user",
  12635. "type": "object",
  12636. "properties": {
  12637. "avatar_url": {
  12638. "description": "URL to the user's avatar",
  12639. "type": "string",
  12640. "x-go-name": "AvatarURL"
  12641. },
  12642. "created": {
  12643. "type": "string",
  12644. "format": "date-time",
  12645. "x-go-name": "Created"
  12646. },
  12647. "email": {
  12648. "type": "string",
  12649. "format": "email",
  12650. "x-go-name": "Email"
  12651. },
  12652. "full_name": {
  12653. "description": "the user's full name",
  12654. "type": "string",
  12655. "x-go-name": "FullName"
  12656. },
  12657. "id": {
  12658. "description": "the user's id",
  12659. "type": "integer",
  12660. "format": "int64",
  12661. "x-go-name": "ID"
  12662. },
  12663. "is_admin": {
  12664. "description": "Is the user an administrator",
  12665. "type": "boolean",
  12666. "x-go-name": "IsAdmin"
  12667. },
  12668. "language": {
  12669. "description": "User locale",
  12670. "type": "string",
  12671. "x-go-name": "Language"
  12672. },
  12673. "last_login": {
  12674. "type": "string",
  12675. "format": "date-time",
  12676. "x-go-name": "LastLogin"
  12677. },
  12678. "login": {
  12679. "description": "the user's username",
  12680. "type": "string",
  12681. "x-go-name": "UserName"
  12682. }
  12683. },
  12684. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12685. },
  12686. "UserHeatmapData": {
  12687. "description": "UserHeatmapData represents the data needed to create a heatmap",
  12688. "type": "object",
  12689. "properties": {
  12690. "contributions": {
  12691. "type": "integer",
  12692. "format": "int64",
  12693. "x-go-name": "Contributions"
  12694. },
  12695. "timestamp": {
  12696. "$ref": "#/definitions/TimeStamp"
  12697. }
  12698. },
  12699. "x-go-package": "code.gitea.io/gitea/models"
  12700. },
  12701. "WatchInfo": {
  12702. "description": "WatchInfo represents an API watch status of one repository",
  12703. "type": "object",
  12704. "properties": {
  12705. "created_at": {
  12706. "type": "string",
  12707. "format": "date-time",
  12708. "x-go-name": "CreatedAt"
  12709. },
  12710. "ignored": {
  12711. "type": "boolean",
  12712. "x-go-name": "Ignored"
  12713. },
  12714. "reason": {
  12715. "type": "object",
  12716. "x-go-name": "Reason"
  12717. },
  12718. "repository_url": {
  12719. "type": "string",
  12720. "x-go-name": "RepositoryURL"
  12721. },
  12722. "subscribed": {
  12723. "type": "boolean",
  12724. "x-go-name": "Subscribed"
  12725. },
  12726. "url": {
  12727. "type": "string",
  12728. "x-go-name": "URL"
  12729. }
  12730. },
  12731. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12732. }
  12733. },
  12734. "responses": {
  12735. "AccessToken": {
  12736. "description": "AccessToken represents an API access token.",
  12737. "headers": {
  12738. "id": {
  12739. "type": "integer",
  12740. "format": "int64"
  12741. },
  12742. "name": {
  12743. "type": "string"
  12744. },
  12745. "sha1": {
  12746. "type": "string"
  12747. },
  12748. "token_last_eight": {
  12749. "type": "string"
  12750. }
  12751. }
  12752. },
  12753. "AccessTokenList": {
  12754. "description": "AccessTokenList represents a list of API access token.",
  12755. "schema": {
  12756. "type": "array",
  12757. "items": {
  12758. "$ref": "#/definitions/AccessToken"
  12759. }
  12760. }
  12761. },
  12762. "AnnotatedTag": {
  12763. "description": "AnnotatedTag",
  12764. "schema": {
  12765. "$ref": "#/definitions/AnnotatedTag"
  12766. }
  12767. },
  12768. "Attachment": {
  12769. "description": "Attachment",
  12770. "schema": {
  12771. "$ref": "#/definitions/Attachment"
  12772. }
  12773. },
  12774. "AttachmentList": {
  12775. "description": "AttachmentList",
  12776. "schema": {
  12777. "type": "array",
  12778. "items": {
  12779. "$ref": "#/definitions/Attachment"
  12780. }
  12781. }
  12782. },
  12783. "Branch": {
  12784. "description": "Branch",
  12785. "schema": {
  12786. "$ref": "#/definitions/Branch"
  12787. }
  12788. },
  12789. "BranchList": {
  12790. "description": "BranchList",
  12791. "schema": {
  12792. "type": "array",
  12793. "items": {
  12794. "$ref": "#/definitions/Branch"
  12795. }
  12796. }
  12797. },
  12798. "Comment": {
  12799. "description": "Comment",
  12800. "schema": {
  12801. "$ref": "#/definitions/Comment"
  12802. }
  12803. },
  12804. "CommentList": {
  12805. "description": "CommentList",
  12806. "schema": {
  12807. "type": "array",
  12808. "items": {
  12809. "$ref": "#/definitions/Comment"
  12810. }
  12811. }
  12812. },
  12813. "Commit": {
  12814. "description": "Commit",
  12815. "schema": {
  12816. "$ref": "#/definitions/Commit"
  12817. }
  12818. },
  12819. "CommitList": {
  12820. "description": "CommitList",
  12821. "schema": {
  12822. "type": "array",
  12823. "items": {
  12824. "$ref": "#/definitions/Commit"
  12825. }
  12826. },
  12827. "headers": {
  12828. "X-HasMore": {
  12829. "type": "boolean",
  12830. "description": "True if there is another page"
  12831. },
  12832. "X-Page": {
  12833. "type": "integer",
  12834. "format": "int64",
  12835. "description": "The current page"
  12836. },
  12837. "X-PageCount": {
  12838. "type": "integer",
  12839. "format": "int64",
  12840. "description": "Total number of pages"
  12841. },
  12842. "X-PerPage": {
  12843. "type": "integer",
  12844. "format": "int64",
  12845. "description": "Commits per page"
  12846. },
  12847. "X-Total": {
  12848. "type": "integer",
  12849. "format": "int64",
  12850. "description": "Total commit count"
  12851. }
  12852. }
  12853. },
  12854. "ContentsListResponse": {
  12855. "description": "ContentsListResponse",
  12856. "schema": {
  12857. "type": "array",
  12858. "items": {
  12859. "$ref": "#/definitions/ContentsResponse"
  12860. }
  12861. }
  12862. },
  12863. "ContentsResponse": {
  12864. "description": "ContentsResponse",
  12865. "schema": {
  12866. "$ref": "#/definitions/ContentsResponse"
  12867. }
  12868. },
  12869. "DeployKey": {
  12870. "description": "DeployKey",
  12871. "schema": {
  12872. "$ref": "#/definitions/DeployKey"
  12873. }
  12874. },
  12875. "DeployKeyList": {
  12876. "description": "DeployKeyList",
  12877. "schema": {
  12878. "type": "array",
  12879. "items": {
  12880. "$ref": "#/definitions/DeployKey"
  12881. }
  12882. }
  12883. },
  12884. "EmailList": {
  12885. "description": "EmailList",
  12886. "schema": {
  12887. "type": "array",
  12888. "items": {
  12889. "$ref": "#/definitions/Email"
  12890. }
  12891. }
  12892. },
  12893. "EmptyRepository": {
  12894. "description": "EmptyRepository",
  12895. "schema": {
  12896. "$ref": "#/definitions/APIError"
  12897. }
  12898. },
  12899. "FileDeleteResponse": {
  12900. "description": "FileDeleteResponse",
  12901. "schema": {
  12902. "$ref": "#/definitions/FileDeleteResponse"
  12903. }
  12904. },
  12905. "FileResponse": {
  12906. "description": "FileResponse",
  12907. "schema": {
  12908. "$ref": "#/definitions/FileResponse"
  12909. }
  12910. },
  12911. "GPGKey": {
  12912. "description": "GPGKey",
  12913. "schema": {
  12914. "$ref": "#/definitions/GPGKey"
  12915. }
  12916. },
  12917. "GPGKeyList": {
  12918. "description": "GPGKeyList",
  12919. "schema": {
  12920. "type": "array",
  12921. "items": {
  12922. "$ref": "#/definitions/GPGKey"
  12923. }
  12924. }
  12925. },
  12926. "GitBlobResponse": {
  12927. "description": "GitBlobResponse",
  12928. "schema": {
  12929. "$ref": "#/definitions/GitBlobResponse"
  12930. }
  12931. },
  12932. "GitHook": {
  12933. "description": "GitHook",
  12934. "schema": {
  12935. "$ref": "#/definitions/GitHook"
  12936. }
  12937. },
  12938. "GitHookList": {
  12939. "description": "GitHookList",
  12940. "schema": {
  12941. "type": "array",
  12942. "items": {
  12943. "$ref": "#/definitions/GitHook"
  12944. }
  12945. }
  12946. },
  12947. "GitTreeResponse": {
  12948. "description": "GitTreeResponse",
  12949. "schema": {
  12950. "$ref": "#/definitions/GitTreeResponse"
  12951. }
  12952. },
  12953. "Hook": {
  12954. "description": "Hook",
  12955. "schema": {
  12956. "$ref": "#/definitions/Hook"
  12957. }
  12958. },
  12959. "HookList": {
  12960. "description": "HookList",
  12961. "schema": {
  12962. "type": "array",
  12963. "items": {
  12964. "$ref": "#/definitions/Hook"
  12965. }
  12966. }
  12967. },
  12968. "Issue": {
  12969. "description": "Issue",
  12970. "schema": {
  12971. "$ref": "#/definitions/Issue"
  12972. }
  12973. },
  12974. "IssueDeadline": {
  12975. "description": "IssueDeadline",
  12976. "schema": {
  12977. "$ref": "#/definitions/IssueDeadline"
  12978. }
  12979. },
  12980. "IssueList": {
  12981. "description": "IssueList",
  12982. "schema": {
  12983. "type": "array",
  12984. "items": {
  12985. "$ref": "#/definitions/Issue"
  12986. }
  12987. }
  12988. },
  12989. "Label": {
  12990. "description": "Label",
  12991. "schema": {
  12992. "$ref": "#/definitions/Label"
  12993. }
  12994. },
  12995. "LabelList": {
  12996. "description": "LabelList",
  12997. "schema": {
  12998. "type": "array",
  12999. "items": {
  13000. "$ref": "#/definitions/Label"
  13001. }
  13002. }
  13003. },
  13004. "MarkdownRender": {
  13005. "description": "MarkdownRender is a rendered markdown document",
  13006. "schema": {
  13007. "type": "string"
  13008. }
  13009. },
  13010. "Milestone": {
  13011. "description": "Milestone",
  13012. "schema": {
  13013. "$ref": "#/definitions/Milestone"
  13014. }
  13015. },
  13016. "MilestoneList": {
  13017. "description": "MilestoneList",
  13018. "schema": {
  13019. "type": "array",
  13020. "items": {
  13021. "$ref": "#/definitions/Milestone"
  13022. }
  13023. }
  13024. },
  13025. "NotificationCount": {
  13026. "description": "Number of unread notifications",
  13027. "schema": {
  13028. "$ref": "#/definitions/NotificationCount"
  13029. }
  13030. },
  13031. "NotificationThread": {
  13032. "description": "NotificationThread",
  13033. "schema": {
  13034. "$ref": "#/definitions/NotificationThread"
  13035. }
  13036. },
  13037. "NotificationThreadList": {
  13038. "description": "NotificationThreadList",
  13039. "schema": {
  13040. "type": "array",
  13041. "items": {
  13042. "$ref": "#/definitions/NotificationThread"
  13043. }
  13044. }
  13045. },
  13046. "Organization": {
  13047. "description": "Organization",
  13048. "schema": {
  13049. "$ref": "#/definitions/Organization"
  13050. }
  13051. },
  13052. "OrganizationList": {
  13053. "description": "OrganizationList",
  13054. "schema": {
  13055. "type": "array",
  13056. "items": {
  13057. "$ref": "#/definitions/Organization"
  13058. }
  13059. }
  13060. },
  13061. "PublicKey": {
  13062. "description": "PublicKey",
  13063. "schema": {
  13064. "$ref": "#/definitions/PublicKey"
  13065. }
  13066. },
  13067. "PublicKeyList": {
  13068. "description": "PublicKeyList",
  13069. "schema": {
  13070. "type": "array",
  13071. "items": {
  13072. "$ref": "#/definitions/PublicKey"
  13073. }
  13074. }
  13075. },
  13076. "PullRequest": {
  13077. "description": "PullRequest",
  13078. "schema": {
  13079. "$ref": "#/definitions/PullRequest"
  13080. }
  13081. },
  13082. "PullRequestList": {
  13083. "description": "PullRequestList",
  13084. "schema": {
  13085. "type": "array",
  13086. "items": {
  13087. "$ref": "#/definitions/PullRequest"
  13088. }
  13089. }
  13090. },
  13091. "Reaction": {
  13092. "description": "Reaction",
  13093. "schema": {
  13094. "$ref": "#/definitions/Reaction"
  13095. }
  13096. },
  13097. "ReactionList": {
  13098. "description": "ReactionList",
  13099. "schema": {
  13100. "type": "array",
  13101. "items": {
  13102. "$ref": "#/definitions/Reaction"
  13103. }
  13104. }
  13105. },
  13106. "Reference": {
  13107. "description": "Reference",
  13108. "schema": {
  13109. "$ref": "#/definitions/Reference"
  13110. }
  13111. },
  13112. "ReferenceList": {
  13113. "description": "ReferenceList",
  13114. "schema": {
  13115. "type": "array",
  13116. "items": {
  13117. "$ref": "#/definitions/Reference"
  13118. }
  13119. }
  13120. },
  13121. "Release": {
  13122. "description": "Release",
  13123. "schema": {
  13124. "$ref": "#/definitions/Release"
  13125. }
  13126. },
  13127. "ReleaseList": {
  13128. "description": "ReleaseList",
  13129. "schema": {
  13130. "type": "array",
  13131. "items": {
  13132. "$ref": "#/definitions/Release"
  13133. }
  13134. }
  13135. },
  13136. "Repository": {
  13137. "description": "Repository",
  13138. "schema": {
  13139. "$ref": "#/definitions/Repository"
  13140. }
  13141. },
  13142. "RepositoryList": {
  13143. "description": "RepositoryList",
  13144. "schema": {
  13145. "type": "array",
  13146. "items": {
  13147. "$ref": "#/definitions/Repository"
  13148. }
  13149. }
  13150. },
  13151. "SearchResults": {
  13152. "description": "SearchResults",
  13153. "schema": {
  13154. "$ref": "#/definitions/SearchResults"
  13155. }
  13156. },
  13157. "ServerVersion": {
  13158. "description": "ServerVersion",
  13159. "schema": {
  13160. "$ref": "#/definitions/ServerVersion"
  13161. }
  13162. },
  13163. "Status": {
  13164. "description": "Status",
  13165. "schema": {
  13166. "$ref": "#/definitions/Status"
  13167. }
  13168. },
  13169. "StatusList": {
  13170. "description": "StatusList",
  13171. "schema": {
  13172. "type": "array",
  13173. "items": {
  13174. "$ref": "#/definitions/Status"
  13175. }
  13176. }
  13177. },
  13178. "StopWatch": {
  13179. "description": "StopWatch",
  13180. "schema": {
  13181. "$ref": "#/definitions/StopWatch"
  13182. }
  13183. },
  13184. "StopWatchList": {
  13185. "description": "StopWatchList",
  13186. "schema": {
  13187. "type": "array",
  13188. "items": {
  13189. "$ref": "#/definitions/StopWatch"
  13190. }
  13191. }
  13192. },
  13193. "Tag": {
  13194. "description": "Tag",
  13195. "schema": {
  13196. "$ref": "#/definitions/Tag"
  13197. }
  13198. },
  13199. "TagList": {
  13200. "description": "TagList",
  13201. "schema": {
  13202. "type": "array",
  13203. "items": {
  13204. "$ref": "#/definitions/Tag"
  13205. }
  13206. }
  13207. },
  13208. "Team": {
  13209. "description": "Team",
  13210. "schema": {
  13211. "$ref": "#/definitions/Team"
  13212. }
  13213. },
  13214. "TeamList": {
  13215. "description": "TeamList",
  13216. "schema": {
  13217. "type": "array",
  13218. "items": {
  13219. "$ref": "#/definitions/Team"
  13220. }
  13221. }
  13222. },
  13223. "TopicListResponse": {
  13224. "description": "TopicListResponse",
  13225. "schema": {
  13226. "type": "array",
  13227. "items": {
  13228. "$ref": "#/definitions/TopicResponse"
  13229. }
  13230. }
  13231. },
  13232. "TopicNames": {
  13233. "description": "TopicNames",
  13234. "schema": {
  13235. "$ref": "#/definitions/TopicName"
  13236. }
  13237. },
  13238. "TrackedTime": {
  13239. "description": "TrackedTime",
  13240. "schema": {
  13241. "$ref": "#/definitions/TrackedTime"
  13242. }
  13243. },
  13244. "TrackedTimeList": {
  13245. "description": "TrackedTimeList",
  13246. "schema": {
  13247. "type": "array",
  13248. "items": {
  13249. "$ref": "#/definitions/TrackedTime"
  13250. }
  13251. }
  13252. },
  13253. "User": {
  13254. "description": "User",
  13255. "schema": {
  13256. "$ref": "#/definitions/User"
  13257. }
  13258. },
  13259. "UserHeatmapData": {
  13260. "description": "UserHeatmapData",
  13261. "schema": {
  13262. "type": "array",
  13263. "items": {
  13264. "$ref": "#/definitions/UserHeatmapData"
  13265. }
  13266. }
  13267. },
  13268. "UserList": {
  13269. "description": "UserList",
  13270. "schema": {
  13271. "type": "array",
  13272. "items": {
  13273. "$ref": "#/definitions/User"
  13274. }
  13275. }
  13276. },
  13277. "WatchInfo": {
  13278. "description": "WatchInfo",
  13279. "schema": {
  13280. "$ref": "#/definitions/WatchInfo"
  13281. }
  13282. },
  13283. "empty": {
  13284. "description": "APIEmpty is an empty response"
  13285. },
  13286. "error": {
  13287. "description": "APIError is error format response",
  13288. "headers": {
  13289. "message": {
  13290. "type": "string"
  13291. },
  13292. "url": {
  13293. "type": "string"
  13294. }
  13295. }
  13296. },
  13297. "forbidden": {
  13298. "description": "APIForbiddenError is a forbidden error response",
  13299. "headers": {
  13300. "message": {
  13301. "type": "string"
  13302. },
  13303. "url": {
  13304. "type": "string"
  13305. }
  13306. }
  13307. },
  13308. "invalidTopicsError": {
  13309. "description": "APIInvalidTopicsError is error format response to invalid topics",
  13310. "headers": {
  13311. "invalidTopics": {
  13312. "type": "array",
  13313. "items": {
  13314. "type": "string"
  13315. }
  13316. },
  13317. "message": {
  13318. "type": "string"
  13319. }
  13320. }
  13321. },
  13322. "notFound": {
  13323. "description": "APINotFound is a not found empty response"
  13324. },
  13325. "parameterBodies": {
  13326. "description": "parameterBodies",
  13327. "schema": {
  13328. "$ref": "#/definitions/EditReactionOption"
  13329. }
  13330. },
  13331. "redirect": {
  13332. "description": "APIRedirect is a redirect response"
  13333. },
  13334. "validationError": {
  13335. "description": "APIValidationError is error format response related to input validation",
  13336. "headers": {
  13337. "message": {
  13338. "type": "string"
  13339. },
  13340. "url": {
  13341. "type": "string"
  13342. }
  13343. }
  13344. }
  13345. },
  13346. "securityDefinitions": {
  13347. "AccessToken": {
  13348. "type": "apiKey",
  13349. "name": "access_token",
  13350. "in": "query"
  13351. },
  13352. "AuthorizationHeaderToken": {
  13353. "description": "API tokens must be prepended with \"token\" followed by a space.",
  13354. "type": "apiKey",
  13355. "name": "Authorization",
  13356. "in": "header"
  13357. },
  13358. "BasicAuth": {
  13359. "type": "basic"
  13360. },
  13361. "SudoHeader": {
  13362. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  13363. "type": "apiKey",
  13364. "name": "Sudo",
  13365. "in": "header"
  13366. },
  13367. "SudoParam": {
  13368. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  13369. "type": "apiKey",
  13370. "name": "sudo",
  13371. "in": "query"
  13372. },
  13373. "Token": {
  13374. "type": "apiKey",
  13375. "name": "token",
  13376. "in": "query"
  13377. }
  13378. },
  13379. "security": [
  13380. {
  13381. "BasicAuth": []
  13382. },
  13383. {
  13384. "Token": []
  13385. },
  13386. {
  13387. "AccessToken": []
  13388. },
  13389. {
  13390. "AuthorizationHeaderToken": []
  13391. },
  13392. {
  13393. "SudoParam": []
  13394. },
  13395. {
  13396. "SudoHeader": []
  13397. }
  13398. ]
  13399. }