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

v1_json.tmpl 298KB

Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
4 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
4 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
4 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
4 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
4 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
4 years ago
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
4 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
4 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
4 years ago
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
4 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
4 years ago
Repository avatars (#6986) * Repository avatars - first variant of code from old work for gogs - add migration 87 - add new option in app.ini - add en-US locale string - add new class in repository.less * Add changed index.css, remove unused template name * Update en-us doc about configuration options * Add comments to new functions, add new option to docker app.ini * Add comment for lint * Remove variable, not needed * Fix formatting * Update swagger api template * Check if avatar exists * Fix avatar link/path checks * Typo * TEXT column can't have a default value * Fixes: - remove old avatar file on upload - use ID in name of avatar file - users may upload same files - add simple tests * Fix fmt check * Generate PNG instead of "static" GIF * More informative comment * Fix error message * Update avatar upload checks: - add file size check - add new option - update config docs - add new string to en-us locale * Fixes: - use FileHEader field for check file size - add new test - upload big image * Fix formatting * Update comments * Update log message * Removed wrong style - not needed * Use Sync2 to migrate * Update repos list view - bigger avatar - fix html blocks alignment * A little adjust avatar size * Use small icons for explore/repo list * Use new cool avatar preparation func by @lafriks * Missing changes for new function * Remove unused import, move imports * Missed new option definition in app.ini Add file size check in user/profile avatar upload * Use smaller field length for Avatar * Use session to update repo DB data, update DeleteAvatar - use session too * Fix err variable definition * As suggested @lafriks - return as soon as possible, code readability
5 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
4 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
4 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
6 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
4 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
4 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106
  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. "responses": {
  71. "200": {
  72. "$ref": "#/responses/UserList"
  73. },
  74. "403": {
  75. "$ref": "#/responses/forbidden"
  76. }
  77. }
  78. },
  79. "post": {
  80. "consumes": [
  81. "application/json"
  82. ],
  83. "produces": [
  84. "application/json"
  85. ],
  86. "tags": [
  87. "admin"
  88. ],
  89. "summary": "Create a user",
  90. "operationId": "adminCreateUser",
  91. "parameters": [
  92. {
  93. "name": "body",
  94. "in": "body",
  95. "schema": {
  96. "$ref": "#/definitions/CreateUserOption"
  97. }
  98. }
  99. ],
  100. "responses": {
  101. "201": {
  102. "$ref": "#/responses/User"
  103. },
  104. "400": {
  105. "$ref": "#/responses/error"
  106. },
  107. "403": {
  108. "$ref": "#/responses/forbidden"
  109. },
  110. "422": {
  111. "$ref": "#/responses/validationError"
  112. }
  113. }
  114. }
  115. },
  116. "/admin/users/{username}": {
  117. "delete": {
  118. "produces": [
  119. "application/json"
  120. ],
  121. "tags": [
  122. "admin"
  123. ],
  124. "summary": "Delete a user",
  125. "operationId": "adminDeleteUser",
  126. "parameters": [
  127. {
  128. "type": "string",
  129. "description": "username of user to delete",
  130. "name": "username",
  131. "in": "path",
  132. "required": true
  133. }
  134. ],
  135. "responses": {
  136. "204": {
  137. "$ref": "#/responses/empty"
  138. },
  139. "403": {
  140. "$ref": "#/responses/forbidden"
  141. },
  142. "422": {
  143. "$ref": "#/responses/validationError"
  144. }
  145. }
  146. },
  147. "patch": {
  148. "consumes": [
  149. "application/json"
  150. ],
  151. "produces": [
  152. "application/json"
  153. ],
  154. "tags": [
  155. "admin"
  156. ],
  157. "summary": "Edit an existing user",
  158. "operationId": "adminEditUser",
  159. "parameters": [
  160. {
  161. "type": "string",
  162. "description": "username of user to edit",
  163. "name": "username",
  164. "in": "path",
  165. "required": true
  166. },
  167. {
  168. "name": "body",
  169. "in": "body",
  170. "schema": {
  171. "$ref": "#/definitions/EditUserOption"
  172. }
  173. }
  174. ],
  175. "responses": {
  176. "200": {
  177. "$ref": "#/responses/User"
  178. },
  179. "403": {
  180. "$ref": "#/responses/forbidden"
  181. },
  182. "422": {
  183. "$ref": "#/responses/validationError"
  184. }
  185. }
  186. }
  187. },
  188. "/admin/users/{username}/keys": {
  189. "post": {
  190. "consumes": [
  191. "application/json"
  192. ],
  193. "produces": [
  194. "application/json"
  195. ],
  196. "tags": [
  197. "admin"
  198. ],
  199. "summary": "Add a public key on behalf of a user",
  200. "operationId": "adminCreatePublicKey",
  201. "parameters": [
  202. {
  203. "type": "string",
  204. "description": "username of the user",
  205. "name": "username",
  206. "in": "path",
  207. "required": true
  208. },
  209. {
  210. "name": "key",
  211. "in": "body",
  212. "schema": {
  213. "$ref": "#/definitions/CreateKeyOption"
  214. }
  215. }
  216. ],
  217. "responses": {
  218. "201": {
  219. "$ref": "#/responses/PublicKey"
  220. },
  221. "403": {
  222. "$ref": "#/responses/forbidden"
  223. },
  224. "422": {
  225. "$ref": "#/responses/validationError"
  226. }
  227. }
  228. }
  229. },
  230. "/admin/users/{username}/keys/{id}": {
  231. "delete": {
  232. "produces": [
  233. "application/json"
  234. ],
  235. "tags": [
  236. "admin"
  237. ],
  238. "summary": "Delete a user's public key",
  239. "operationId": "adminDeleteUserPublicKey",
  240. "parameters": [
  241. {
  242. "type": "string",
  243. "description": "username of user",
  244. "name": "username",
  245. "in": "path",
  246. "required": true
  247. },
  248. {
  249. "type": "integer",
  250. "format": "int64",
  251. "description": "id of the key to delete",
  252. "name": "id",
  253. "in": "path",
  254. "required": true
  255. }
  256. ],
  257. "responses": {
  258. "204": {
  259. "$ref": "#/responses/empty"
  260. },
  261. "403": {
  262. "$ref": "#/responses/forbidden"
  263. },
  264. "404": {
  265. "$ref": "#/responses/notFound"
  266. }
  267. }
  268. }
  269. },
  270. "/admin/users/{username}/orgs": {
  271. "post": {
  272. "consumes": [
  273. "application/json"
  274. ],
  275. "produces": [
  276. "application/json"
  277. ],
  278. "tags": [
  279. "admin"
  280. ],
  281. "summary": "Create an organization",
  282. "operationId": "adminCreateOrg",
  283. "parameters": [
  284. {
  285. "type": "string",
  286. "description": "username of the user that will own the created organization",
  287. "name": "username",
  288. "in": "path",
  289. "required": true
  290. },
  291. {
  292. "name": "organization",
  293. "in": "body",
  294. "required": true,
  295. "schema": {
  296. "$ref": "#/definitions/CreateOrgOption"
  297. }
  298. }
  299. ],
  300. "responses": {
  301. "201": {
  302. "$ref": "#/responses/Organization"
  303. },
  304. "403": {
  305. "$ref": "#/responses/forbidden"
  306. },
  307. "422": {
  308. "$ref": "#/responses/validationError"
  309. }
  310. }
  311. }
  312. },
  313. "/admin/users/{username}/repos": {
  314. "post": {
  315. "consumes": [
  316. "application/json"
  317. ],
  318. "produces": [
  319. "application/json"
  320. ],
  321. "tags": [
  322. "admin"
  323. ],
  324. "summary": "Create a repository on behalf a user",
  325. "operationId": "adminCreateRepo",
  326. "parameters": [
  327. {
  328. "type": "string",
  329. "description": "username of the user. This user will own the created repository",
  330. "name": "username",
  331. "in": "path",
  332. "required": true
  333. },
  334. {
  335. "name": "repository",
  336. "in": "body",
  337. "required": true,
  338. "schema": {
  339. "$ref": "#/definitions/CreateRepoOption"
  340. }
  341. }
  342. ],
  343. "responses": {
  344. "201": {
  345. "$ref": "#/responses/Repository"
  346. },
  347. "403": {
  348. "$ref": "#/responses/forbidden"
  349. },
  350. "404": {
  351. "$ref": "#/responses/notFound"
  352. },
  353. "409": {
  354. "$ref": "#/responses/error"
  355. },
  356. "422": {
  357. "$ref": "#/responses/validationError"
  358. }
  359. }
  360. }
  361. },
  362. "/markdown": {
  363. "post": {
  364. "consumes": [
  365. "application/json"
  366. ],
  367. "produces": [
  368. "text/html"
  369. ],
  370. "tags": [
  371. "miscellaneous"
  372. ],
  373. "summary": "Render a markdown document as HTML",
  374. "operationId": "renderMarkdown",
  375. "parameters": [
  376. {
  377. "name": "body",
  378. "in": "body",
  379. "schema": {
  380. "$ref": "#/definitions/MarkdownOption"
  381. }
  382. }
  383. ],
  384. "responses": {
  385. "200": {
  386. "$ref": "#/responses/MarkdownRender"
  387. },
  388. "422": {
  389. "$ref": "#/responses/validationError"
  390. }
  391. }
  392. }
  393. },
  394. "/markdown/raw": {
  395. "post": {
  396. "consumes": [
  397. "text/plain"
  398. ],
  399. "produces": [
  400. "text/html"
  401. ],
  402. "tags": [
  403. "miscellaneous"
  404. ],
  405. "summary": "Render raw markdown as HTML",
  406. "operationId": "renderMarkdownRaw",
  407. "parameters": [
  408. {
  409. "description": "Request body to render",
  410. "name": "body",
  411. "in": "body",
  412. "required": true,
  413. "schema": {
  414. "type": "string"
  415. }
  416. }
  417. ],
  418. "responses": {
  419. "200": {
  420. "$ref": "#/responses/MarkdownRender"
  421. },
  422. "422": {
  423. "$ref": "#/responses/validationError"
  424. }
  425. }
  426. }
  427. },
  428. "/org/{org}/repos": {
  429. "post": {
  430. "consumes": [
  431. "application/json"
  432. ],
  433. "produces": [
  434. "application/json"
  435. ],
  436. "tags": [
  437. "organization"
  438. ],
  439. "summary": "Create a repository in an organization",
  440. "operationId": "createOrgRepo",
  441. "parameters": [
  442. {
  443. "type": "string",
  444. "description": "name of organization",
  445. "name": "org",
  446. "in": "path",
  447. "required": true
  448. },
  449. {
  450. "name": "body",
  451. "in": "body",
  452. "schema": {
  453. "$ref": "#/definitions/CreateRepoOption"
  454. }
  455. }
  456. ],
  457. "responses": {
  458. "201": {
  459. "$ref": "#/responses/Repository"
  460. },
  461. "403": {
  462. "$ref": "#/responses/forbidden"
  463. },
  464. "422": {
  465. "$ref": "#/responses/validationError"
  466. }
  467. }
  468. }
  469. },
  470. "/orgs": {
  471. "post": {
  472. "consumes": [
  473. "application/json"
  474. ],
  475. "produces": [
  476. "application/json"
  477. ],
  478. "tags": [
  479. "organization"
  480. ],
  481. "summary": "Create an organization",
  482. "operationId": "orgCreate",
  483. "parameters": [
  484. {
  485. "name": "organization",
  486. "in": "body",
  487. "required": true,
  488. "schema": {
  489. "$ref": "#/definitions/CreateOrgOption"
  490. }
  491. }
  492. ],
  493. "responses": {
  494. "201": {
  495. "$ref": "#/responses/Organization"
  496. },
  497. "403": {
  498. "$ref": "#/responses/forbidden"
  499. },
  500. "422": {
  501. "$ref": "#/responses/validationError"
  502. }
  503. }
  504. }
  505. },
  506. "/orgs/{org}": {
  507. "get": {
  508. "produces": [
  509. "application/json"
  510. ],
  511. "tags": [
  512. "organization"
  513. ],
  514. "summary": "Get an organization",
  515. "operationId": "orgGet",
  516. "parameters": [
  517. {
  518. "type": "string",
  519. "description": "name of the organization to get",
  520. "name": "org",
  521. "in": "path",
  522. "required": true
  523. }
  524. ],
  525. "responses": {
  526. "200": {
  527. "$ref": "#/responses/Organization"
  528. }
  529. }
  530. },
  531. "delete": {
  532. "produces": [
  533. "application/json"
  534. ],
  535. "tags": [
  536. "organization"
  537. ],
  538. "summary": "Delete an organization",
  539. "operationId": "orgDelete",
  540. "parameters": [
  541. {
  542. "type": "string",
  543. "description": "organization that is to be deleted",
  544. "name": "org",
  545. "in": "path",
  546. "required": true
  547. }
  548. ],
  549. "responses": {
  550. "204": {
  551. "$ref": "#/responses/empty"
  552. }
  553. }
  554. },
  555. "patch": {
  556. "consumes": [
  557. "application/json"
  558. ],
  559. "produces": [
  560. "application/json"
  561. ],
  562. "tags": [
  563. "organization"
  564. ],
  565. "summary": "Edit an organization",
  566. "operationId": "orgEdit",
  567. "parameters": [
  568. {
  569. "type": "string",
  570. "description": "name of the organization to edit",
  571. "name": "org",
  572. "in": "path",
  573. "required": true
  574. },
  575. {
  576. "name": "body",
  577. "in": "body",
  578. "required": true,
  579. "schema": {
  580. "$ref": "#/definitions/EditOrgOption"
  581. }
  582. }
  583. ],
  584. "responses": {
  585. "200": {
  586. "$ref": "#/responses/Organization"
  587. }
  588. }
  589. }
  590. },
  591. "/orgs/{org}/hooks": {
  592. "get": {
  593. "produces": [
  594. "application/json"
  595. ],
  596. "tags": [
  597. "organization"
  598. ],
  599. "summary": "List an organization's webhooks",
  600. "operationId": "orgListHooks",
  601. "parameters": [
  602. {
  603. "type": "string",
  604. "description": "name of the organization",
  605. "name": "org",
  606. "in": "path",
  607. "required": true
  608. }
  609. ],
  610. "responses": {
  611. "200": {
  612. "$ref": "#/responses/HookList"
  613. }
  614. }
  615. }
  616. },
  617. "/orgs/{org}/hooks/": {
  618. "post": {
  619. "consumes": [
  620. "application/json"
  621. ],
  622. "produces": [
  623. "application/json"
  624. ],
  625. "tags": [
  626. "organization"
  627. ],
  628. "summary": "Create a hook",
  629. "operationId": "orgCreateHook",
  630. "parameters": [
  631. {
  632. "type": "string",
  633. "description": "name of the organization",
  634. "name": "org",
  635. "in": "path",
  636. "required": true
  637. },
  638. {
  639. "name": "body",
  640. "in": "body",
  641. "required": true,
  642. "schema": {
  643. "$ref": "#/definitions/CreateHookOption"
  644. }
  645. }
  646. ],
  647. "responses": {
  648. "201": {
  649. "$ref": "#/responses/Hook"
  650. }
  651. }
  652. }
  653. },
  654. "/orgs/{org}/hooks/{id}": {
  655. "get": {
  656. "produces": [
  657. "application/json"
  658. ],
  659. "tags": [
  660. "organization"
  661. ],
  662. "summary": "Get a hook",
  663. "operationId": "orgGetHook",
  664. "parameters": [
  665. {
  666. "type": "string",
  667. "description": "name of the organization",
  668. "name": "org",
  669. "in": "path",
  670. "required": true
  671. },
  672. {
  673. "type": "integer",
  674. "format": "int64",
  675. "description": "id of the hook to get",
  676. "name": "id",
  677. "in": "path",
  678. "required": true
  679. }
  680. ],
  681. "responses": {
  682. "200": {
  683. "$ref": "#/responses/Hook"
  684. }
  685. }
  686. },
  687. "delete": {
  688. "produces": [
  689. "application/json"
  690. ],
  691. "tags": [
  692. "organization"
  693. ],
  694. "summary": "Delete a hook",
  695. "operationId": "orgDeleteHook",
  696. "parameters": [
  697. {
  698. "type": "string",
  699. "description": "name of the organization",
  700. "name": "org",
  701. "in": "path",
  702. "required": true
  703. },
  704. {
  705. "type": "integer",
  706. "format": "int64",
  707. "description": "id of the hook to delete",
  708. "name": "id",
  709. "in": "path",
  710. "required": true
  711. }
  712. ],
  713. "responses": {
  714. "204": {
  715. "$ref": "#/responses/empty"
  716. }
  717. }
  718. },
  719. "patch": {
  720. "consumes": [
  721. "application/json"
  722. ],
  723. "produces": [
  724. "application/json"
  725. ],
  726. "tags": [
  727. "organization"
  728. ],
  729. "summary": "Update a hook",
  730. "operationId": "orgEditHook",
  731. "parameters": [
  732. {
  733. "type": "string",
  734. "description": "name of the organization",
  735. "name": "org",
  736. "in": "path",
  737. "required": true
  738. },
  739. {
  740. "type": "integer",
  741. "format": "int64",
  742. "description": "id of the hook to update",
  743. "name": "id",
  744. "in": "path",
  745. "required": true
  746. },
  747. {
  748. "name": "body",
  749. "in": "body",
  750. "schema": {
  751. "$ref": "#/definitions/EditHookOption"
  752. }
  753. }
  754. ],
  755. "responses": {
  756. "200": {
  757. "$ref": "#/responses/Hook"
  758. }
  759. }
  760. }
  761. },
  762. "/orgs/{org}/members": {
  763. "get": {
  764. "produces": [
  765. "application/json"
  766. ],
  767. "tags": [
  768. "organization"
  769. ],
  770. "summary": "List an organization's members",
  771. "operationId": "orgListMembers",
  772. "parameters": [
  773. {
  774. "type": "string",
  775. "description": "name of the organization",
  776. "name": "org",
  777. "in": "path",
  778. "required": true
  779. }
  780. ],
  781. "responses": {
  782. "200": {
  783. "$ref": "#/responses/UserList"
  784. }
  785. }
  786. }
  787. },
  788. "/orgs/{org}/members/{username}": {
  789. "get": {
  790. "tags": [
  791. "organization"
  792. ],
  793. "summary": "Check if a user is a member of an organization",
  794. "operationId": "orgIsMember",
  795. "parameters": [
  796. {
  797. "type": "string",
  798. "description": "name of the organization",
  799. "name": "org",
  800. "in": "path",
  801. "required": true
  802. },
  803. {
  804. "type": "string",
  805. "description": "username of the user",
  806. "name": "username",
  807. "in": "path",
  808. "required": true
  809. }
  810. ],
  811. "responses": {
  812. "204": {
  813. "description": "user is a member"
  814. },
  815. "302": {
  816. "description": "redirection to /orgs/{org}/public_members/{username}"
  817. },
  818. "404": {
  819. "description": "user is not a member"
  820. }
  821. }
  822. },
  823. "delete": {
  824. "produces": [
  825. "application/json"
  826. ],
  827. "tags": [
  828. "organization"
  829. ],
  830. "summary": "Remove a member from an organization",
  831. "operationId": "orgDeleteMember",
  832. "parameters": [
  833. {
  834. "type": "string",
  835. "description": "name of the organization",
  836. "name": "org",
  837. "in": "path",
  838. "required": true
  839. },
  840. {
  841. "type": "string",
  842. "description": "username of the user",
  843. "name": "username",
  844. "in": "path",
  845. "required": true
  846. }
  847. ],
  848. "responses": {
  849. "204": {
  850. "description": "member removed"
  851. }
  852. }
  853. }
  854. },
  855. "/orgs/{org}/public_members": {
  856. "get": {
  857. "produces": [
  858. "application/json"
  859. ],
  860. "tags": [
  861. "organization"
  862. ],
  863. "summary": "List an organization's public members",
  864. "operationId": "orgListPublicMembers",
  865. "parameters": [
  866. {
  867. "type": "string",
  868. "description": "name of the organization",
  869. "name": "org",
  870. "in": "path",
  871. "required": true
  872. }
  873. ],
  874. "responses": {
  875. "200": {
  876. "$ref": "#/responses/UserList"
  877. }
  878. }
  879. }
  880. },
  881. "/orgs/{org}/public_members/{username}": {
  882. "get": {
  883. "tags": [
  884. "organization"
  885. ],
  886. "summary": "Check if a user is a public member of an organization",
  887. "operationId": "orgIsPublicMember",
  888. "parameters": [
  889. {
  890. "type": "string",
  891. "description": "name of the organization",
  892. "name": "org",
  893. "in": "path",
  894. "required": true
  895. },
  896. {
  897. "type": "string",
  898. "description": "username of the user",
  899. "name": "username",
  900. "in": "path",
  901. "required": true
  902. }
  903. ],
  904. "responses": {
  905. "204": {
  906. "description": "user is a public member"
  907. },
  908. "404": {
  909. "description": "user is not a public member"
  910. }
  911. }
  912. },
  913. "put": {
  914. "produces": [
  915. "application/json"
  916. ],
  917. "tags": [
  918. "organization"
  919. ],
  920. "summary": "Publicize a user's membership",
  921. "operationId": "orgPublicizeMember",
  922. "parameters": [
  923. {
  924. "type": "string",
  925. "description": "name of the organization",
  926. "name": "org",
  927. "in": "path",
  928. "required": true
  929. },
  930. {
  931. "type": "string",
  932. "description": "username of the user",
  933. "name": "username",
  934. "in": "path",
  935. "required": true
  936. }
  937. ],
  938. "responses": {
  939. "204": {
  940. "description": "membership publicized"
  941. },
  942. "403": {
  943. "$ref": "#/responses/forbidden"
  944. }
  945. }
  946. },
  947. "delete": {
  948. "produces": [
  949. "application/json"
  950. ],
  951. "tags": [
  952. "organization"
  953. ],
  954. "summary": "Conceal a user's membership",
  955. "operationId": "orgConcealMember",
  956. "parameters": [
  957. {
  958. "type": "string",
  959. "description": "name of the organization",
  960. "name": "org",
  961. "in": "path",
  962. "required": true
  963. },
  964. {
  965. "type": "string",
  966. "description": "username of the user",
  967. "name": "username",
  968. "in": "path",
  969. "required": true
  970. }
  971. ],
  972. "responses": {
  973. "204": {
  974. "$ref": "#/responses/empty"
  975. },
  976. "403": {
  977. "$ref": "#/responses/forbidden"
  978. }
  979. }
  980. }
  981. },
  982. "/orgs/{org}/repos": {
  983. "get": {
  984. "produces": [
  985. "application/json"
  986. ],
  987. "tags": [
  988. "organization"
  989. ],
  990. "summary": "List an organization's repos",
  991. "operationId": "orgListRepos",
  992. "parameters": [
  993. {
  994. "type": "string",
  995. "description": "name of the organization",
  996. "name": "org",
  997. "in": "path",
  998. "required": true
  999. }
  1000. ],
  1001. "responses": {
  1002. "200": {
  1003. "$ref": "#/responses/RepositoryList"
  1004. }
  1005. }
  1006. }
  1007. },
  1008. "/orgs/{org}/teams": {
  1009. "get": {
  1010. "produces": [
  1011. "application/json"
  1012. ],
  1013. "tags": [
  1014. "organization"
  1015. ],
  1016. "summary": "List an organization's teams",
  1017. "operationId": "orgListTeams",
  1018. "parameters": [
  1019. {
  1020. "type": "string",
  1021. "description": "name of the organization",
  1022. "name": "org",
  1023. "in": "path",
  1024. "required": true
  1025. }
  1026. ],
  1027. "responses": {
  1028. "200": {
  1029. "$ref": "#/responses/TeamList"
  1030. }
  1031. }
  1032. },
  1033. "post": {
  1034. "consumes": [
  1035. "application/json"
  1036. ],
  1037. "produces": [
  1038. "application/json"
  1039. ],
  1040. "tags": [
  1041. "organization"
  1042. ],
  1043. "summary": "Create a team",
  1044. "operationId": "orgCreateTeam",
  1045. "parameters": [
  1046. {
  1047. "type": "string",
  1048. "description": "name of the organization",
  1049. "name": "org",
  1050. "in": "path",
  1051. "required": true
  1052. },
  1053. {
  1054. "name": "body",
  1055. "in": "body",
  1056. "schema": {
  1057. "$ref": "#/definitions/CreateTeamOption"
  1058. }
  1059. }
  1060. ],
  1061. "responses": {
  1062. "201": {
  1063. "$ref": "#/responses/Team"
  1064. },
  1065. "422": {
  1066. "$ref": "#/responses/validationError"
  1067. }
  1068. }
  1069. }
  1070. },
  1071. "/orgs/{org}/teams/search": {
  1072. "get": {
  1073. "produces": [
  1074. "application/json"
  1075. ],
  1076. "tags": [
  1077. "organization"
  1078. ],
  1079. "summary": "Search for teams within an organization",
  1080. "operationId": "teamSearch",
  1081. "parameters": [
  1082. {
  1083. "type": "string",
  1084. "description": "name of the organization",
  1085. "name": "org",
  1086. "in": "path",
  1087. "required": true
  1088. },
  1089. {
  1090. "type": "string",
  1091. "description": "keywords to search",
  1092. "name": "q",
  1093. "in": "query"
  1094. },
  1095. {
  1096. "type": "boolean",
  1097. "description": "include search within team description (defaults to true)",
  1098. "name": "include_desc",
  1099. "in": "query"
  1100. },
  1101. {
  1102. "type": "integer",
  1103. "description": "limit size of results",
  1104. "name": "limit",
  1105. "in": "query"
  1106. },
  1107. {
  1108. "type": "integer",
  1109. "description": "page number of results to return (1-based)",
  1110. "name": "page",
  1111. "in": "query"
  1112. }
  1113. ],
  1114. "responses": {
  1115. "200": {
  1116. "description": "SearchResults of a successful search",
  1117. "schema": {
  1118. "type": "object",
  1119. "properties": {
  1120. "data": {
  1121. "type": "array",
  1122. "items": {
  1123. "$ref": "#/definitions/Team"
  1124. }
  1125. },
  1126. "ok": {
  1127. "type": "boolean"
  1128. }
  1129. }
  1130. }
  1131. }
  1132. }
  1133. }
  1134. },
  1135. "/repos/issues/search": {
  1136. "get": {
  1137. "produces": [
  1138. "application/json"
  1139. ],
  1140. "tags": [
  1141. "issue"
  1142. ],
  1143. "summary": "Search for issues across the repositories that the user has access to",
  1144. "operationId": "issueSearchIssues",
  1145. "parameters": [
  1146. {
  1147. "type": "string",
  1148. "description": "whether issue is open or closed",
  1149. "name": "state",
  1150. "in": "query"
  1151. },
  1152. {
  1153. "type": "string",
  1154. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  1155. "name": "labels",
  1156. "in": "query"
  1157. },
  1158. {
  1159. "type": "integer",
  1160. "description": "page number of requested issues",
  1161. "name": "page",
  1162. "in": "query"
  1163. },
  1164. {
  1165. "type": "string",
  1166. "description": "search string",
  1167. "name": "q",
  1168. "in": "query"
  1169. },
  1170. {
  1171. "type": "integer",
  1172. "format": "int64",
  1173. "description": "repository to prioritize in the results",
  1174. "name": "priority_repo_id",
  1175. "in": "query"
  1176. }
  1177. ],
  1178. "responses": {
  1179. "200": {
  1180. "$ref": "#/responses/IssueList"
  1181. }
  1182. }
  1183. }
  1184. },
  1185. "/repos/migrate": {
  1186. "post": {
  1187. "consumes": [
  1188. "application/json"
  1189. ],
  1190. "produces": [
  1191. "application/json"
  1192. ],
  1193. "tags": [
  1194. "repository"
  1195. ],
  1196. "summary": "Migrate a remote git repository",
  1197. "operationId": "repoMigrate",
  1198. "parameters": [
  1199. {
  1200. "name": "body",
  1201. "in": "body",
  1202. "schema": {
  1203. "$ref": "#/definitions/MigrateRepoForm"
  1204. }
  1205. }
  1206. ],
  1207. "responses": {
  1208. "201": {
  1209. "$ref": "#/responses/Repository"
  1210. },
  1211. "403": {
  1212. "$ref": "#/responses/forbidden"
  1213. },
  1214. "422": {
  1215. "$ref": "#/responses/validationError"
  1216. }
  1217. }
  1218. }
  1219. },
  1220. "/repos/search": {
  1221. "get": {
  1222. "produces": [
  1223. "application/json"
  1224. ],
  1225. "tags": [
  1226. "repository"
  1227. ],
  1228. "summary": "Search for repositories",
  1229. "operationId": "repoSearch",
  1230. "parameters": [
  1231. {
  1232. "type": "string",
  1233. "description": "keyword",
  1234. "name": "q",
  1235. "in": "query"
  1236. },
  1237. {
  1238. "type": "boolean",
  1239. "description": "Limit search to repositories with keyword as topic",
  1240. "name": "topic",
  1241. "in": "query"
  1242. },
  1243. {
  1244. "type": "boolean",
  1245. "description": "include search of keyword within repository description",
  1246. "name": "includeDesc",
  1247. "in": "query"
  1248. },
  1249. {
  1250. "type": "integer",
  1251. "format": "int64",
  1252. "description": "search only for repos that the user with the given id owns or contributes to",
  1253. "name": "uid",
  1254. "in": "query"
  1255. },
  1256. {
  1257. "type": "integer",
  1258. "format": "int64",
  1259. "description": "repo owner to prioritize in the results",
  1260. "name": "priority_owner_id",
  1261. "in": "query"
  1262. },
  1263. {
  1264. "type": "integer",
  1265. "format": "int64",
  1266. "description": "search only for repos that the user with the given id has starred",
  1267. "name": "starredBy",
  1268. "in": "query"
  1269. },
  1270. {
  1271. "type": "boolean",
  1272. "description": "include private repositories this user has access to (defaults to true)",
  1273. "name": "private",
  1274. "in": "query"
  1275. },
  1276. {
  1277. "type": "boolean",
  1278. "description": "include template repositories this user has access to (defaults to true)",
  1279. "name": "template",
  1280. "in": "query"
  1281. },
  1282. {
  1283. "type": "integer",
  1284. "description": "page number of results to return (1-based)",
  1285. "name": "page",
  1286. "in": "query"
  1287. },
  1288. {
  1289. "type": "integer",
  1290. "description": "page size of results, maximum page size is 50",
  1291. "name": "limit",
  1292. "in": "query"
  1293. },
  1294. {
  1295. "type": "string",
  1296. "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"",
  1297. "name": "mode",
  1298. "in": "query"
  1299. },
  1300. {
  1301. "type": "boolean",
  1302. "description": "if `uid` is given, search only for repos that the user owns",
  1303. "name": "exclusive",
  1304. "in": "query"
  1305. },
  1306. {
  1307. "type": "string",
  1308. "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"",
  1309. "name": "sort",
  1310. "in": "query"
  1311. },
  1312. {
  1313. "type": "string",
  1314. "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.",
  1315. "name": "order",
  1316. "in": "query"
  1317. }
  1318. ],
  1319. "responses": {
  1320. "200": {
  1321. "$ref": "#/responses/SearchResults"
  1322. },
  1323. "422": {
  1324. "$ref": "#/responses/validationError"
  1325. }
  1326. }
  1327. }
  1328. },
  1329. "/repos/{owner}/{repo}": {
  1330. "get": {
  1331. "produces": [
  1332. "application/json"
  1333. ],
  1334. "tags": [
  1335. "repository"
  1336. ],
  1337. "summary": "Get a repository",
  1338. "operationId": "repoGet",
  1339. "parameters": [
  1340. {
  1341. "type": "string",
  1342. "description": "owner of the repo",
  1343. "name": "owner",
  1344. "in": "path",
  1345. "required": true
  1346. },
  1347. {
  1348. "type": "string",
  1349. "description": "name of the repo",
  1350. "name": "repo",
  1351. "in": "path",
  1352. "required": true
  1353. }
  1354. ],
  1355. "responses": {
  1356. "200": {
  1357. "$ref": "#/responses/Repository"
  1358. }
  1359. }
  1360. },
  1361. "delete": {
  1362. "produces": [
  1363. "application/json"
  1364. ],
  1365. "tags": [
  1366. "repository"
  1367. ],
  1368. "summary": "Delete a repository",
  1369. "operationId": "repoDelete",
  1370. "parameters": [
  1371. {
  1372. "type": "string",
  1373. "description": "owner of the repo to delete",
  1374. "name": "owner",
  1375. "in": "path",
  1376. "required": true
  1377. },
  1378. {
  1379. "type": "string",
  1380. "description": "name of the repo to delete",
  1381. "name": "repo",
  1382. "in": "path",
  1383. "required": true
  1384. }
  1385. ],
  1386. "responses": {
  1387. "204": {
  1388. "$ref": "#/responses/empty"
  1389. },
  1390. "403": {
  1391. "$ref": "#/responses/forbidden"
  1392. }
  1393. }
  1394. },
  1395. "patch": {
  1396. "produces": [
  1397. "application/json"
  1398. ],
  1399. "tags": [
  1400. "repository"
  1401. ],
  1402. "summary": "Edit a repository's properties. Only fields that are set will be changed.",
  1403. "operationId": "repoEdit",
  1404. "parameters": [
  1405. {
  1406. "type": "string",
  1407. "description": "owner of the repo to edit",
  1408. "name": "owner",
  1409. "in": "path",
  1410. "required": true
  1411. },
  1412. {
  1413. "type": "string",
  1414. "description": "name of the repo to edit",
  1415. "name": "repo",
  1416. "in": "path",
  1417. "required": true
  1418. },
  1419. {
  1420. "description": "Properties of a repo that you can edit",
  1421. "name": "body",
  1422. "in": "body",
  1423. "schema": {
  1424. "$ref": "#/definitions/EditRepoOption"
  1425. }
  1426. }
  1427. ],
  1428. "responses": {
  1429. "200": {
  1430. "$ref": "#/responses/Repository"
  1431. },
  1432. "403": {
  1433. "$ref": "#/responses/forbidden"
  1434. },
  1435. "422": {
  1436. "$ref": "#/responses/validationError"
  1437. }
  1438. }
  1439. }
  1440. },
  1441. "/repos/{owner}/{repo}/archive/{archive}": {
  1442. "get": {
  1443. "produces": [
  1444. "application/json"
  1445. ],
  1446. "tags": [
  1447. "repository"
  1448. ],
  1449. "summary": "Get an archive of a repository",
  1450. "operationId": "repoGetArchive",
  1451. "parameters": [
  1452. {
  1453. "type": "string",
  1454. "description": "owner of the repo",
  1455. "name": "owner",
  1456. "in": "path",
  1457. "required": true
  1458. },
  1459. {
  1460. "type": "string",
  1461. "description": "name of the repo",
  1462. "name": "repo",
  1463. "in": "path",
  1464. "required": true
  1465. },
  1466. {
  1467. "type": "string",
  1468. "description": "archive to download, consisting of a git reference and archive",
  1469. "name": "archive",
  1470. "in": "path",
  1471. "required": true
  1472. }
  1473. ],
  1474. "responses": {
  1475. "200": {
  1476. "description": "success"
  1477. },
  1478. "404": {
  1479. "$ref": "#/responses/notFound"
  1480. }
  1481. }
  1482. }
  1483. },
  1484. "/repos/{owner}/{repo}/branches": {
  1485. "get": {
  1486. "produces": [
  1487. "application/json"
  1488. ],
  1489. "tags": [
  1490. "repository"
  1491. ],
  1492. "summary": "List a repository's branches",
  1493. "operationId": "repoListBranches",
  1494. "parameters": [
  1495. {
  1496. "type": "string",
  1497. "description": "owner of the repo",
  1498. "name": "owner",
  1499. "in": "path",
  1500. "required": true
  1501. },
  1502. {
  1503. "type": "string",
  1504. "description": "name of the repo",
  1505. "name": "repo",
  1506. "in": "path",
  1507. "required": true
  1508. }
  1509. ],
  1510. "responses": {
  1511. "200": {
  1512. "$ref": "#/responses/BranchList"
  1513. }
  1514. }
  1515. }
  1516. },
  1517. "/repos/{owner}/{repo}/branches/{branch}": {
  1518. "get": {
  1519. "produces": [
  1520. "application/json"
  1521. ],
  1522. "tags": [
  1523. "repository"
  1524. ],
  1525. "summary": "Retrieve a specific branch from a repository, including its effective branch protection",
  1526. "operationId": "repoGetBranch",
  1527. "parameters": [
  1528. {
  1529. "type": "string",
  1530. "description": "owner of the repo",
  1531. "name": "owner",
  1532. "in": "path",
  1533. "required": true
  1534. },
  1535. {
  1536. "type": "string",
  1537. "description": "name of the repo",
  1538. "name": "repo",
  1539. "in": "path",
  1540. "required": true
  1541. },
  1542. {
  1543. "type": "string",
  1544. "description": "branch to get",
  1545. "name": "branch",
  1546. "in": "path",
  1547. "required": true
  1548. }
  1549. ],
  1550. "responses": {
  1551. "200": {
  1552. "$ref": "#/responses/Branch"
  1553. }
  1554. }
  1555. }
  1556. },
  1557. "/repos/{owner}/{repo}/collaborators": {
  1558. "get": {
  1559. "produces": [
  1560. "application/json"
  1561. ],
  1562. "tags": [
  1563. "repository"
  1564. ],
  1565. "summary": "List a repository's collaborators",
  1566. "operationId": "repoListCollaborators",
  1567. "parameters": [
  1568. {
  1569. "type": "string",
  1570. "description": "owner of the repo",
  1571. "name": "owner",
  1572. "in": "path",
  1573. "required": true
  1574. },
  1575. {
  1576. "type": "string",
  1577. "description": "name of the repo",
  1578. "name": "repo",
  1579. "in": "path",
  1580. "required": true
  1581. }
  1582. ],
  1583. "responses": {
  1584. "200": {
  1585. "$ref": "#/responses/UserList"
  1586. }
  1587. }
  1588. }
  1589. },
  1590. "/repos/{owner}/{repo}/collaborators/{collaborator}": {
  1591. "get": {
  1592. "produces": [
  1593. "application/json"
  1594. ],
  1595. "tags": [
  1596. "repository"
  1597. ],
  1598. "summary": "Check if a user is a collaborator of a repository",
  1599. "operationId": "repoCheckCollaborator",
  1600. "parameters": [
  1601. {
  1602. "type": "string",
  1603. "description": "owner of the repo",
  1604. "name": "owner",
  1605. "in": "path",
  1606. "required": true
  1607. },
  1608. {
  1609. "type": "string",
  1610. "description": "name of the repo",
  1611. "name": "repo",
  1612. "in": "path",
  1613. "required": true
  1614. },
  1615. {
  1616. "type": "string",
  1617. "description": "username of the collaborator",
  1618. "name": "collaborator",
  1619. "in": "path",
  1620. "required": true
  1621. }
  1622. ],
  1623. "responses": {
  1624. "204": {
  1625. "$ref": "#/responses/empty"
  1626. },
  1627. "404": {
  1628. "$ref": "#/responses/notFound"
  1629. },
  1630. "422": {
  1631. "$ref": "#/responses/validationError"
  1632. }
  1633. }
  1634. },
  1635. "put": {
  1636. "produces": [
  1637. "application/json"
  1638. ],
  1639. "tags": [
  1640. "repository"
  1641. ],
  1642. "summary": "Add a collaborator to a repository",
  1643. "operationId": "repoAddCollaborator",
  1644. "parameters": [
  1645. {
  1646. "type": "string",
  1647. "description": "owner of the repo",
  1648. "name": "owner",
  1649. "in": "path",
  1650. "required": true
  1651. },
  1652. {
  1653. "type": "string",
  1654. "description": "name of the repo",
  1655. "name": "repo",
  1656. "in": "path",
  1657. "required": true
  1658. },
  1659. {
  1660. "type": "string",
  1661. "description": "username of the collaborator to add",
  1662. "name": "collaborator",
  1663. "in": "path",
  1664. "required": true
  1665. },
  1666. {
  1667. "name": "body",
  1668. "in": "body",
  1669. "schema": {
  1670. "$ref": "#/definitions/AddCollaboratorOption"
  1671. }
  1672. }
  1673. ],
  1674. "responses": {
  1675. "204": {
  1676. "$ref": "#/responses/empty"
  1677. },
  1678. "422": {
  1679. "$ref": "#/responses/validationError"
  1680. }
  1681. }
  1682. },
  1683. "delete": {
  1684. "produces": [
  1685. "application/json"
  1686. ],
  1687. "tags": [
  1688. "repository"
  1689. ],
  1690. "summary": "Delete a collaborator from a repository",
  1691. "operationId": "repoDeleteCollaborator",
  1692. "parameters": [
  1693. {
  1694. "type": "string",
  1695. "description": "owner of the repo",
  1696. "name": "owner",
  1697. "in": "path",
  1698. "required": true
  1699. },
  1700. {
  1701. "type": "string",
  1702. "description": "name of the repo",
  1703. "name": "repo",
  1704. "in": "path",
  1705. "required": true
  1706. },
  1707. {
  1708. "type": "string",
  1709. "description": "username of the collaborator to delete",
  1710. "name": "collaborator",
  1711. "in": "path",
  1712. "required": true
  1713. }
  1714. ],
  1715. "responses": {
  1716. "204": {
  1717. "$ref": "#/responses/empty"
  1718. },
  1719. "422": {
  1720. "$ref": "#/responses/validationError"
  1721. }
  1722. }
  1723. }
  1724. },
  1725. "/repos/{owner}/{repo}/commits": {
  1726. "get": {
  1727. "produces": [
  1728. "application/json"
  1729. ],
  1730. "tags": [
  1731. "repository"
  1732. ],
  1733. "summary": "Get a list of all commits from a repository",
  1734. "operationId": "repoGetAllCommits",
  1735. "parameters": [
  1736. {
  1737. "type": "string",
  1738. "description": "owner of the repo",
  1739. "name": "owner",
  1740. "in": "path",
  1741. "required": true
  1742. },
  1743. {
  1744. "type": "string",
  1745. "description": "name of the repo",
  1746. "name": "repo",
  1747. "in": "path",
  1748. "required": true
  1749. },
  1750. {
  1751. "type": "string",
  1752. "description": "SHA or branch to start listing commits from (usually 'master')",
  1753. "name": "sha",
  1754. "in": "query"
  1755. },
  1756. {
  1757. "type": "integer",
  1758. "description": "page number of requested commits",
  1759. "name": "page",
  1760. "in": "query"
  1761. }
  1762. ],
  1763. "responses": {
  1764. "200": {
  1765. "$ref": "#/responses/CommitList"
  1766. },
  1767. "404": {
  1768. "$ref": "#/responses/notFound"
  1769. },
  1770. "409": {
  1771. "$ref": "#/responses/EmptyRepository"
  1772. }
  1773. }
  1774. }
  1775. },
  1776. "/repos/{owner}/{repo}/commits/{ref}/statuses": {
  1777. "get": {
  1778. "produces": [
  1779. "application/json"
  1780. ],
  1781. "tags": [
  1782. "repository"
  1783. ],
  1784. "summary": "Get a commit's combined status, by branch/tag/commit reference",
  1785. "operationId": "repoGetCombinedStatusByRef",
  1786. "parameters": [
  1787. {
  1788. "type": "string",
  1789. "description": "owner of the repo",
  1790. "name": "owner",
  1791. "in": "path",
  1792. "required": true
  1793. },
  1794. {
  1795. "type": "string",
  1796. "description": "name of the repo",
  1797. "name": "repo",
  1798. "in": "path",
  1799. "required": true
  1800. },
  1801. {
  1802. "type": "string",
  1803. "description": "name of branch/tag/commit",
  1804. "name": "ref",
  1805. "in": "path",
  1806. "required": true
  1807. },
  1808. {
  1809. "type": "integer",
  1810. "description": "page number of results",
  1811. "name": "page",
  1812. "in": "query"
  1813. }
  1814. ],
  1815. "responses": {
  1816. "200": {
  1817. "$ref": "#/responses/Status"
  1818. },
  1819. "400": {
  1820. "$ref": "#/responses/error"
  1821. }
  1822. }
  1823. }
  1824. },
  1825. "/repos/{owner}/{repo}/contents": {
  1826. "get": {
  1827. "produces": [
  1828. "application/json"
  1829. ],
  1830. "tags": [
  1831. "repository"
  1832. ],
  1833. "summary": "Gets the metadata of all the entries of the root dir",
  1834. "operationId": "repoGetContentsList",
  1835. "parameters": [
  1836. {
  1837. "type": "string",
  1838. "description": "owner of the repo",
  1839. "name": "owner",
  1840. "in": "path",
  1841. "required": true
  1842. },
  1843. {
  1844. "type": "string",
  1845. "description": "name of the repo",
  1846. "name": "repo",
  1847. "in": "path",
  1848. "required": true
  1849. },
  1850. {
  1851. "type": "string",
  1852. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  1853. "name": "ref",
  1854. "in": "query"
  1855. }
  1856. ],
  1857. "responses": {
  1858. "200": {
  1859. "$ref": "#/responses/ContentsListResponse"
  1860. }
  1861. }
  1862. }
  1863. },
  1864. "/repos/{owner}/{repo}/contents/{filepath}": {
  1865. "get": {
  1866. "produces": [
  1867. "application/json"
  1868. ],
  1869. "tags": [
  1870. "repository"
  1871. ],
  1872. "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir",
  1873. "operationId": "repoGetContents",
  1874. "parameters": [
  1875. {
  1876. "type": "string",
  1877. "description": "owner of the repo",
  1878. "name": "owner",
  1879. "in": "path",
  1880. "required": true
  1881. },
  1882. {
  1883. "type": "string",
  1884. "description": "name of the repo",
  1885. "name": "repo",
  1886. "in": "path",
  1887. "required": true
  1888. },
  1889. {
  1890. "type": "string",
  1891. "description": "path of the dir, file, symlink or submodule in the repo",
  1892. "name": "filepath",
  1893. "in": "path",
  1894. "required": true
  1895. },
  1896. {
  1897. "type": "string",
  1898. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  1899. "name": "ref",
  1900. "in": "query"
  1901. }
  1902. ],
  1903. "responses": {
  1904. "200": {
  1905. "$ref": "#/responses/ContentsResponse"
  1906. }
  1907. }
  1908. },
  1909. "put": {
  1910. "consumes": [
  1911. "application/json"
  1912. ],
  1913. "produces": [
  1914. "application/json"
  1915. ],
  1916. "tags": [
  1917. "repository"
  1918. ],
  1919. "summary": "Update a file in a repository",
  1920. "operationId": "repoUpdateFile",
  1921. "parameters": [
  1922. {
  1923. "type": "string",
  1924. "description": "owner of the repo",
  1925. "name": "owner",
  1926. "in": "path",
  1927. "required": true
  1928. },
  1929. {
  1930. "type": "string",
  1931. "description": "name of the repo",
  1932. "name": "repo",
  1933. "in": "path",
  1934. "required": true
  1935. },
  1936. {
  1937. "type": "string",
  1938. "description": "path of the file to update",
  1939. "name": "filepath",
  1940. "in": "path",
  1941. "required": true
  1942. },
  1943. {
  1944. "name": "body",
  1945. "in": "body",
  1946. "required": true,
  1947. "schema": {
  1948. "$ref": "#/definitions/UpdateFileOptions"
  1949. }
  1950. }
  1951. ],
  1952. "responses": {
  1953. "200": {
  1954. "$ref": "#/responses/FileResponse"
  1955. }
  1956. }
  1957. },
  1958. "post": {
  1959. "consumes": [
  1960. "application/json"
  1961. ],
  1962. "produces": [
  1963. "application/json"
  1964. ],
  1965. "tags": [
  1966. "repository"
  1967. ],
  1968. "summary": "Create a file in a repository",
  1969. "operationId": "repoCreateFile",
  1970. "parameters": [
  1971. {
  1972. "type": "string",
  1973. "description": "owner of the repo",
  1974. "name": "owner",
  1975. "in": "path",
  1976. "required": true
  1977. },
  1978. {
  1979. "type": "string",
  1980. "description": "name of the repo",
  1981. "name": "repo",
  1982. "in": "path",
  1983. "required": true
  1984. },
  1985. {
  1986. "type": "string",
  1987. "description": "path of the file to create",
  1988. "name": "filepath",
  1989. "in": "path",
  1990. "required": true
  1991. },
  1992. {
  1993. "name": "body",
  1994. "in": "body",
  1995. "required": true,
  1996. "schema": {
  1997. "$ref": "#/definitions/CreateFileOptions"
  1998. }
  1999. }
  2000. ],
  2001. "responses": {
  2002. "201": {
  2003. "$ref": "#/responses/FileResponse"
  2004. }
  2005. }
  2006. },
  2007. "delete": {
  2008. "consumes": [
  2009. "application/json"
  2010. ],
  2011. "produces": [
  2012. "application/json"
  2013. ],
  2014. "tags": [
  2015. "repository"
  2016. ],
  2017. "summary": "Delete a file in a repository",
  2018. "operationId": "repoDeleteFile",
  2019. "parameters": [
  2020. {
  2021. "type": "string",
  2022. "description": "owner of the repo",
  2023. "name": "owner",
  2024. "in": "path",
  2025. "required": true
  2026. },
  2027. {
  2028. "type": "string",
  2029. "description": "name of the repo",
  2030. "name": "repo",
  2031. "in": "path",
  2032. "required": true
  2033. },
  2034. {
  2035. "type": "string",
  2036. "description": "path of the file to delete",
  2037. "name": "filepath",
  2038. "in": "path",
  2039. "required": true
  2040. },
  2041. {
  2042. "name": "body",
  2043. "in": "body",
  2044. "required": true,
  2045. "schema": {
  2046. "$ref": "#/definitions/DeleteFileOptions"
  2047. }
  2048. }
  2049. ],
  2050. "responses": {
  2051. "200": {
  2052. "$ref": "#/responses/FileDeleteResponse"
  2053. }
  2054. }
  2055. }
  2056. },
  2057. "/repos/{owner}/{repo}/editorconfig/{filepath}": {
  2058. "get": {
  2059. "produces": [
  2060. "application/json"
  2061. ],
  2062. "tags": [
  2063. "repository"
  2064. ],
  2065. "summary": "Get the EditorConfig definitions of a file in a repository",
  2066. "operationId": "repoGetEditorConfig",
  2067. "parameters": [
  2068. {
  2069. "type": "string",
  2070. "description": "owner of the repo",
  2071. "name": "owner",
  2072. "in": "path",
  2073. "required": true
  2074. },
  2075. {
  2076. "type": "string",
  2077. "description": "name of the repo",
  2078. "name": "repo",
  2079. "in": "path",
  2080. "required": true
  2081. },
  2082. {
  2083. "type": "string",
  2084. "description": "filepath of file to get",
  2085. "name": "filepath",
  2086. "in": "path",
  2087. "required": true
  2088. }
  2089. ],
  2090. "responses": {
  2091. "200": {
  2092. "description": "success"
  2093. },
  2094. "404": {
  2095. "$ref": "#/responses/notFound"
  2096. }
  2097. }
  2098. }
  2099. },
  2100. "/repos/{owner}/{repo}/forks": {
  2101. "get": {
  2102. "produces": [
  2103. "application/json"
  2104. ],
  2105. "tags": [
  2106. "repository"
  2107. ],
  2108. "summary": "List a repository's forks",
  2109. "operationId": "listForks",
  2110. "parameters": [
  2111. {
  2112. "type": "string",
  2113. "description": "owner of the repo",
  2114. "name": "owner",
  2115. "in": "path",
  2116. "required": true
  2117. },
  2118. {
  2119. "type": "string",
  2120. "description": "name of the repo",
  2121. "name": "repo",
  2122. "in": "path",
  2123. "required": true
  2124. }
  2125. ],
  2126. "responses": {
  2127. "200": {
  2128. "$ref": "#/responses/RepositoryList"
  2129. }
  2130. }
  2131. },
  2132. "post": {
  2133. "produces": [
  2134. "application/json"
  2135. ],
  2136. "tags": [
  2137. "repository"
  2138. ],
  2139. "summary": "Fork a repository",
  2140. "operationId": "createFork",
  2141. "parameters": [
  2142. {
  2143. "type": "string",
  2144. "description": "owner of the repo to fork",
  2145. "name": "owner",
  2146. "in": "path",
  2147. "required": true
  2148. },
  2149. {
  2150. "type": "string",
  2151. "description": "name of the repo to fork",
  2152. "name": "repo",
  2153. "in": "path",
  2154. "required": true
  2155. },
  2156. {
  2157. "name": "body",
  2158. "in": "body",
  2159. "schema": {
  2160. "$ref": "#/definitions/CreateForkOption"
  2161. }
  2162. }
  2163. ],
  2164. "responses": {
  2165. "202": {
  2166. "$ref": "#/responses/Repository"
  2167. },
  2168. "403": {
  2169. "$ref": "#/responses/forbidden"
  2170. },
  2171. "422": {
  2172. "$ref": "#/responses/validationError"
  2173. }
  2174. }
  2175. }
  2176. },
  2177. "/repos/{owner}/{repo}/git/blobs/{sha}": {
  2178. "get": {
  2179. "produces": [
  2180. "application/json"
  2181. ],
  2182. "tags": [
  2183. "repository"
  2184. ],
  2185. "summary": "Gets the blob of a repository.",
  2186. "operationId": "GetBlob",
  2187. "parameters": [
  2188. {
  2189. "type": "string",
  2190. "description": "owner of the repo",
  2191. "name": "owner",
  2192. "in": "path",
  2193. "required": true
  2194. },
  2195. {
  2196. "type": "string",
  2197. "description": "name of the repo",
  2198. "name": "repo",
  2199. "in": "path",
  2200. "required": true
  2201. },
  2202. {
  2203. "type": "string",
  2204. "description": "sha of the commit",
  2205. "name": "sha",
  2206. "in": "path",
  2207. "required": true
  2208. }
  2209. ],
  2210. "responses": {
  2211. "200": {
  2212. "$ref": "#/responses/GitBlobResponse"
  2213. },
  2214. "400": {
  2215. "$ref": "#/responses/error"
  2216. }
  2217. }
  2218. }
  2219. },
  2220. "/repos/{owner}/{repo}/git/commits/{sha}": {
  2221. "get": {
  2222. "produces": [
  2223. "application/json"
  2224. ],
  2225. "tags": [
  2226. "repository"
  2227. ],
  2228. "summary": "Get a single commit from a repository",
  2229. "operationId": "repoGetSingleCommit",
  2230. "parameters": [
  2231. {
  2232. "type": "string",
  2233. "description": "owner of the repo",
  2234. "name": "owner",
  2235. "in": "path",
  2236. "required": true
  2237. },
  2238. {
  2239. "type": "string",
  2240. "description": "name of the repo",
  2241. "name": "repo",
  2242. "in": "path",
  2243. "required": true
  2244. },
  2245. {
  2246. "type": "string",
  2247. "description": "the commit hash",
  2248. "name": "sha",
  2249. "in": "path",
  2250. "required": true
  2251. }
  2252. ],
  2253. "responses": {
  2254. "200": {
  2255. "$ref": "#/responses/Commit"
  2256. },
  2257. "404": {
  2258. "$ref": "#/responses/notFound"
  2259. }
  2260. }
  2261. }
  2262. },
  2263. "/repos/{owner}/{repo}/git/refs": {
  2264. "get": {
  2265. "produces": [
  2266. "application/json"
  2267. ],
  2268. "tags": [
  2269. "repository"
  2270. ],
  2271. "summary": "Get specified ref or filtered repository's refs",
  2272. "operationId": "repoListAllGitRefs",
  2273. "parameters": [
  2274. {
  2275. "type": "string",
  2276. "description": "owner of the repo",
  2277. "name": "owner",
  2278. "in": "path",
  2279. "required": true
  2280. },
  2281. {
  2282. "type": "string",
  2283. "description": "name of the repo",
  2284. "name": "repo",
  2285. "in": "path",
  2286. "required": true
  2287. }
  2288. ],
  2289. "responses": {
  2290. "200": {
  2291. "$ref": "#/responses/ReferenceList"
  2292. },
  2293. "404": {
  2294. "$ref": "#/responses/notFound"
  2295. }
  2296. }
  2297. }
  2298. },
  2299. "/repos/{owner}/{repo}/git/refs/{ref}": {
  2300. "get": {
  2301. "produces": [
  2302. "application/json"
  2303. ],
  2304. "tags": [
  2305. "repository"
  2306. ],
  2307. "summary": "Get specified ref or filtered repository's refs",
  2308. "operationId": "repoListGitRefs",
  2309. "parameters": [
  2310. {
  2311. "type": "string",
  2312. "description": "owner of the repo",
  2313. "name": "owner",
  2314. "in": "path",
  2315. "required": true
  2316. },
  2317. {
  2318. "type": "string",
  2319. "description": "name of the repo",
  2320. "name": "repo",
  2321. "in": "path",
  2322. "required": true
  2323. },
  2324. {
  2325. "type": "string",
  2326. "description": "part or full name of the ref",
  2327. "name": "ref",
  2328. "in": "path",
  2329. "required": true
  2330. }
  2331. ],
  2332. "responses": {
  2333. "200": {
  2334. "$ref": "#/responses/ReferenceList"
  2335. },
  2336. "404": {
  2337. "$ref": "#/responses/notFound"
  2338. }
  2339. }
  2340. }
  2341. },
  2342. "/repos/{owner}/{repo}/git/tags/{sha}": {
  2343. "get": {
  2344. "produces": [
  2345. "application/json"
  2346. ],
  2347. "tags": [
  2348. "repository"
  2349. ],
  2350. "summary": "Gets the tag object of an annotated tag (not lightweight tags)",
  2351. "operationId": "GetTag",
  2352. "parameters": [
  2353. {
  2354. "type": "string",
  2355. "description": "owner of the repo",
  2356. "name": "owner",
  2357. "in": "path",
  2358. "required": true
  2359. },
  2360. {
  2361. "type": "string",
  2362. "description": "name of the repo",
  2363. "name": "repo",
  2364. "in": "path",
  2365. "required": true
  2366. },
  2367. {
  2368. "type": "string",
  2369. "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.",
  2370. "name": "sha",
  2371. "in": "path",
  2372. "required": true
  2373. }
  2374. ],
  2375. "responses": {
  2376. "200": {
  2377. "$ref": "#/responses/AnnotatedTag"
  2378. },
  2379. "400": {
  2380. "$ref": "#/responses/error"
  2381. }
  2382. }
  2383. }
  2384. },
  2385. "/repos/{owner}/{repo}/git/trees/{sha}": {
  2386. "get": {
  2387. "produces": [
  2388. "application/json"
  2389. ],
  2390. "tags": [
  2391. "repository"
  2392. ],
  2393. "summary": "Gets the tree of a repository.",
  2394. "operationId": "GetTree",
  2395. "parameters": [
  2396. {
  2397. "type": "string",
  2398. "description": "owner of the repo",
  2399. "name": "owner",
  2400. "in": "path",
  2401. "required": true
  2402. },
  2403. {
  2404. "type": "string",
  2405. "description": "name of the repo",
  2406. "name": "repo",
  2407. "in": "path",
  2408. "required": true
  2409. },
  2410. {
  2411. "type": "string",
  2412. "description": "sha of the commit",
  2413. "name": "sha",
  2414. "in": "path",
  2415. "required": true
  2416. },
  2417. {
  2418. "type": "boolean",
  2419. "description": "show all directories and files",
  2420. "name": "recursive",
  2421. "in": "query"
  2422. },
  2423. {
  2424. "type": "integer",
  2425. "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",
  2426. "name": "page",
  2427. "in": "query"
  2428. },
  2429. {
  2430. "type": "integer",
  2431. "description": "number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE",
  2432. "name": "per_page",
  2433. "in": "query"
  2434. }
  2435. ],
  2436. "responses": {
  2437. "200": {
  2438. "$ref": "#/responses/GitTreeResponse"
  2439. },
  2440. "400": {
  2441. "$ref": "#/responses/error"
  2442. }
  2443. }
  2444. }
  2445. },
  2446. "/repos/{owner}/{repo}/hooks": {
  2447. "get": {
  2448. "produces": [
  2449. "application/json"
  2450. ],
  2451. "tags": [
  2452. "repository"
  2453. ],
  2454. "summary": "List the hooks in a repository",
  2455. "operationId": "repoListHooks",
  2456. "parameters": [
  2457. {
  2458. "type": "string",
  2459. "description": "owner of the repo",
  2460. "name": "owner",
  2461. "in": "path",
  2462. "required": true
  2463. },
  2464. {
  2465. "type": "string",
  2466. "description": "name of the repo",
  2467. "name": "repo",
  2468. "in": "path",
  2469. "required": true
  2470. }
  2471. ],
  2472. "responses": {
  2473. "200": {
  2474. "$ref": "#/responses/HookList"
  2475. }
  2476. }
  2477. },
  2478. "post": {
  2479. "consumes": [
  2480. "application/json"
  2481. ],
  2482. "produces": [
  2483. "application/json"
  2484. ],
  2485. "tags": [
  2486. "repository"
  2487. ],
  2488. "summary": "Create a hook",
  2489. "operationId": "repoCreateHook",
  2490. "parameters": [
  2491. {
  2492. "type": "string",
  2493. "description": "owner of the repo",
  2494. "name": "owner",
  2495. "in": "path",
  2496. "required": true
  2497. },
  2498. {
  2499. "type": "string",
  2500. "description": "name of the repo",
  2501. "name": "repo",
  2502. "in": "path",
  2503. "required": true
  2504. },
  2505. {
  2506. "name": "body",
  2507. "in": "body",
  2508. "schema": {
  2509. "$ref": "#/definitions/CreateHookOption"
  2510. }
  2511. }
  2512. ],
  2513. "responses": {
  2514. "201": {
  2515. "$ref": "#/responses/Hook"
  2516. }
  2517. }
  2518. }
  2519. },
  2520. "/repos/{owner}/{repo}/hooks/git": {
  2521. "get": {
  2522. "produces": [
  2523. "application/json"
  2524. ],
  2525. "tags": [
  2526. "repository"
  2527. ],
  2528. "summary": "List the Git hooks in a repository",
  2529. "operationId": "repoListGitHooks",
  2530. "parameters": [
  2531. {
  2532. "type": "string",
  2533. "description": "owner of the repo",
  2534. "name": "owner",
  2535. "in": "path",
  2536. "required": true
  2537. },
  2538. {
  2539. "type": "string",
  2540. "description": "name of the repo",
  2541. "name": "repo",
  2542. "in": "path",
  2543. "required": true
  2544. }
  2545. ],
  2546. "responses": {
  2547. "200": {
  2548. "$ref": "#/responses/GitHookList"
  2549. }
  2550. }
  2551. }
  2552. },
  2553. "/repos/{owner}/{repo}/hooks/git/{id}": {
  2554. "get": {
  2555. "produces": [
  2556. "application/json"
  2557. ],
  2558. "tags": [
  2559. "repository"
  2560. ],
  2561. "summary": "Get a Git hook",
  2562. "operationId": "repoGetGitHook",
  2563. "parameters": [
  2564. {
  2565. "type": "string",
  2566. "description": "owner of the repo",
  2567. "name": "owner",
  2568. "in": "path",
  2569. "required": true
  2570. },
  2571. {
  2572. "type": "string",
  2573. "description": "name of the repo",
  2574. "name": "repo",
  2575. "in": "path",
  2576. "required": true
  2577. },
  2578. {
  2579. "type": "string",
  2580. "description": "id of the hook to get",
  2581. "name": "id",
  2582. "in": "path",
  2583. "required": true
  2584. }
  2585. ],
  2586. "responses": {
  2587. "200": {
  2588. "$ref": "#/responses/GitHook"
  2589. },
  2590. "404": {
  2591. "$ref": "#/responses/notFound"
  2592. }
  2593. }
  2594. },
  2595. "delete": {
  2596. "produces": [
  2597. "application/json"
  2598. ],
  2599. "tags": [
  2600. "repository"
  2601. ],
  2602. "summary": "Delete a Git hook in a repository",
  2603. "operationId": "repoDeleteGitHook",
  2604. "parameters": [
  2605. {
  2606. "type": "string",
  2607. "description": "owner of the repo",
  2608. "name": "owner",
  2609. "in": "path",
  2610. "required": true
  2611. },
  2612. {
  2613. "type": "string",
  2614. "description": "name of the repo",
  2615. "name": "repo",
  2616. "in": "path",
  2617. "required": true
  2618. },
  2619. {
  2620. "type": "string",
  2621. "description": "id of the hook to get",
  2622. "name": "id",
  2623. "in": "path",
  2624. "required": true
  2625. }
  2626. ],
  2627. "responses": {
  2628. "204": {
  2629. "$ref": "#/responses/empty"
  2630. },
  2631. "404": {
  2632. "$ref": "#/responses/notFound"
  2633. }
  2634. }
  2635. },
  2636. "patch": {
  2637. "produces": [
  2638. "application/json"
  2639. ],
  2640. "tags": [
  2641. "repository"
  2642. ],
  2643. "summary": "Edit a Git hook in a repository",
  2644. "operationId": "repoEditGitHook",
  2645. "parameters": [
  2646. {
  2647. "type": "string",
  2648. "description": "owner of the repo",
  2649. "name": "owner",
  2650. "in": "path",
  2651. "required": true
  2652. },
  2653. {
  2654. "type": "string",
  2655. "description": "name of the repo",
  2656. "name": "repo",
  2657. "in": "path",
  2658. "required": true
  2659. },
  2660. {
  2661. "type": "string",
  2662. "description": "id of the hook to get",
  2663. "name": "id",
  2664. "in": "path",
  2665. "required": true
  2666. },
  2667. {
  2668. "name": "body",
  2669. "in": "body",
  2670. "schema": {
  2671. "$ref": "#/definitions/EditGitHookOption"
  2672. }
  2673. }
  2674. ],
  2675. "responses": {
  2676. "200": {
  2677. "$ref": "#/responses/GitHook"
  2678. },
  2679. "404": {
  2680. "$ref": "#/responses/notFound"
  2681. }
  2682. }
  2683. }
  2684. },
  2685. "/repos/{owner}/{repo}/hooks/{id}": {
  2686. "get": {
  2687. "produces": [
  2688. "application/json"
  2689. ],
  2690. "tags": [
  2691. "repository"
  2692. ],
  2693. "summary": "Get a hook",
  2694. "operationId": "repoGetHook",
  2695. "parameters": [
  2696. {
  2697. "type": "string",
  2698. "description": "owner of the repo",
  2699. "name": "owner",
  2700. "in": "path",
  2701. "required": true
  2702. },
  2703. {
  2704. "type": "string",
  2705. "description": "name of the repo",
  2706. "name": "repo",
  2707. "in": "path",
  2708. "required": true
  2709. },
  2710. {
  2711. "type": "integer",
  2712. "format": "int64",
  2713. "description": "id of the hook to get",
  2714. "name": "id",
  2715. "in": "path",
  2716. "required": true
  2717. }
  2718. ],
  2719. "responses": {
  2720. "200": {
  2721. "$ref": "#/responses/Hook"
  2722. },
  2723. "404": {
  2724. "$ref": "#/responses/notFound"
  2725. }
  2726. }
  2727. },
  2728. "delete": {
  2729. "produces": [
  2730. "application/json"
  2731. ],
  2732. "tags": [
  2733. "repository"
  2734. ],
  2735. "summary": "Delete a hook in a repository",
  2736. "operationId": "repoDeleteHook",
  2737. "parameters": [
  2738. {
  2739. "type": "string",
  2740. "description": "owner of the repo",
  2741. "name": "owner",
  2742. "in": "path",
  2743. "required": true
  2744. },
  2745. {
  2746. "type": "string",
  2747. "description": "name of the repo",
  2748. "name": "repo",
  2749. "in": "path",
  2750. "required": true
  2751. },
  2752. {
  2753. "type": "integer",
  2754. "format": "int64",
  2755. "description": "id of the hook to delete",
  2756. "name": "id",
  2757. "in": "path",
  2758. "required": true
  2759. }
  2760. ],
  2761. "responses": {
  2762. "204": {
  2763. "$ref": "#/responses/empty"
  2764. },
  2765. "404": {
  2766. "$ref": "#/responses/notFound"
  2767. }
  2768. }
  2769. },
  2770. "patch": {
  2771. "produces": [
  2772. "application/json"
  2773. ],
  2774. "tags": [
  2775. "repository"
  2776. ],
  2777. "summary": "Edit a hook in a repository",
  2778. "operationId": "repoEditHook",
  2779. "parameters": [
  2780. {
  2781. "type": "string",
  2782. "description": "owner of the repo",
  2783. "name": "owner",
  2784. "in": "path",
  2785. "required": true
  2786. },
  2787. {
  2788. "type": "string",
  2789. "description": "name of the repo",
  2790. "name": "repo",
  2791. "in": "path",
  2792. "required": true
  2793. },
  2794. {
  2795. "type": "integer",
  2796. "format": "int64",
  2797. "description": "index of the hook",
  2798. "name": "id",
  2799. "in": "path",
  2800. "required": true
  2801. },
  2802. {
  2803. "name": "body",
  2804. "in": "body",
  2805. "schema": {
  2806. "$ref": "#/definitions/EditHookOption"
  2807. }
  2808. }
  2809. ],
  2810. "responses": {
  2811. "200": {
  2812. "$ref": "#/responses/Hook"
  2813. }
  2814. }
  2815. }
  2816. },
  2817. "/repos/{owner}/{repo}/hooks/{id}/tests": {
  2818. "post": {
  2819. "produces": [
  2820. "application/json"
  2821. ],
  2822. "tags": [
  2823. "repository"
  2824. ],
  2825. "summary": "Test a push webhook",
  2826. "operationId": "repoTestHook",
  2827. "parameters": [
  2828. {
  2829. "type": "string",
  2830. "description": "owner of the repo",
  2831. "name": "owner",
  2832. "in": "path",
  2833. "required": true
  2834. },
  2835. {
  2836. "type": "string",
  2837. "description": "name of the repo",
  2838. "name": "repo",
  2839. "in": "path",
  2840. "required": true
  2841. },
  2842. {
  2843. "type": "integer",
  2844. "format": "int64",
  2845. "description": "id of the hook to test",
  2846. "name": "id",
  2847. "in": "path",
  2848. "required": true
  2849. }
  2850. ],
  2851. "responses": {
  2852. "204": {
  2853. "$ref": "#/responses/empty"
  2854. }
  2855. }
  2856. }
  2857. },
  2858. "/repos/{owner}/{repo}/issues": {
  2859. "get": {
  2860. "produces": [
  2861. "application/json"
  2862. ],
  2863. "tags": [
  2864. "issue"
  2865. ],
  2866. "summary": "List a repository's issues",
  2867. "operationId": "issueListIssues",
  2868. "parameters": [
  2869. {
  2870. "type": "string",
  2871. "description": "owner of the repo",
  2872. "name": "owner",
  2873. "in": "path",
  2874. "required": true
  2875. },
  2876. {
  2877. "type": "string",
  2878. "description": "name of the repo",
  2879. "name": "repo",
  2880. "in": "path",
  2881. "required": true
  2882. },
  2883. {
  2884. "type": "string",
  2885. "description": "whether issue is open or closed",
  2886. "name": "state",
  2887. "in": "query"
  2888. },
  2889. {
  2890. "type": "string",
  2891. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  2892. "name": "labels",
  2893. "in": "query"
  2894. },
  2895. {
  2896. "type": "integer",
  2897. "description": "page number of requested issues",
  2898. "name": "page",
  2899. "in": "query"
  2900. },
  2901. {
  2902. "type": "string",
  2903. "description": "search string",
  2904. "name": "q",
  2905. "in": "query"
  2906. }
  2907. ],
  2908. "responses": {
  2909. "200": {
  2910. "$ref": "#/responses/IssueList"
  2911. }
  2912. }
  2913. },
  2914. "post": {
  2915. "consumes": [
  2916. "application/json"
  2917. ],
  2918. "produces": [
  2919. "application/json"
  2920. ],
  2921. "tags": [
  2922. "issue"
  2923. ],
  2924. "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  2925. "operationId": "issueCreateIssue",
  2926. "parameters": [
  2927. {
  2928. "type": "string",
  2929. "description": "owner of the repo",
  2930. "name": "owner",
  2931. "in": "path",
  2932. "required": true
  2933. },
  2934. {
  2935. "type": "string",
  2936. "description": "name of the repo",
  2937. "name": "repo",
  2938. "in": "path",
  2939. "required": true
  2940. },
  2941. {
  2942. "name": "body",
  2943. "in": "body",
  2944. "schema": {
  2945. "$ref": "#/definitions/CreateIssueOption"
  2946. }
  2947. }
  2948. ],
  2949. "responses": {
  2950. "201": {
  2951. "$ref": "#/responses/Issue"
  2952. },
  2953. "403": {
  2954. "$ref": "#/responses/forbidden"
  2955. },
  2956. "412": {
  2957. "$ref": "#/responses/error"
  2958. },
  2959. "422": {
  2960. "$ref": "#/responses/validationError"
  2961. }
  2962. }
  2963. }
  2964. },
  2965. "/repos/{owner}/{repo}/issues/comments": {
  2966. "get": {
  2967. "produces": [
  2968. "application/json"
  2969. ],
  2970. "tags": [
  2971. "issue"
  2972. ],
  2973. "summary": "List all comments in a repository",
  2974. "operationId": "issueGetRepoComments",
  2975. "parameters": [
  2976. {
  2977. "type": "string",
  2978. "description": "owner of the repo",
  2979. "name": "owner",
  2980. "in": "path",
  2981. "required": true
  2982. },
  2983. {
  2984. "type": "string",
  2985. "description": "name of the repo",
  2986. "name": "repo",
  2987. "in": "path",
  2988. "required": true
  2989. },
  2990. {
  2991. "type": "string",
  2992. "description": "if provided, only comments updated since the provided time are returned.",
  2993. "name": "since",
  2994. "in": "query"
  2995. }
  2996. ],
  2997. "responses": {
  2998. "200": {
  2999. "$ref": "#/responses/CommentList"
  3000. }
  3001. }
  3002. }
  3003. },
  3004. "/repos/{owner}/{repo}/issues/comments/{id}": {
  3005. "delete": {
  3006. "tags": [
  3007. "issue"
  3008. ],
  3009. "summary": "Delete a comment",
  3010. "operationId": "issueDeleteComment",
  3011. "parameters": [
  3012. {
  3013. "type": "string",
  3014. "description": "owner of the repo",
  3015. "name": "owner",
  3016. "in": "path",
  3017. "required": true
  3018. },
  3019. {
  3020. "type": "string",
  3021. "description": "name of the repo",
  3022. "name": "repo",
  3023. "in": "path",
  3024. "required": true
  3025. },
  3026. {
  3027. "type": "integer",
  3028. "format": "int64",
  3029. "description": "id of comment to delete",
  3030. "name": "id",
  3031. "in": "path",
  3032. "required": true
  3033. }
  3034. ],
  3035. "responses": {
  3036. "204": {
  3037. "$ref": "#/responses/empty"
  3038. },
  3039. "403": {
  3040. "$ref": "#/responses/forbidden"
  3041. }
  3042. }
  3043. },
  3044. "patch": {
  3045. "consumes": [
  3046. "application/json"
  3047. ],
  3048. "produces": [
  3049. "application/json"
  3050. ],
  3051. "tags": [
  3052. "issue"
  3053. ],
  3054. "summary": "Edit a comment",
  3055. "operationId": "issueEditComment",
  3056. "parameters": [
  3057. {
  3058. "type": "string",
  3059. "description": "owner of the repo",
  3060. "name": "owner",
  3061. "in": "path",
  3062. "required": true
  3063. },
  3064. {
  3065. "type": "string",
  3066. "description": "name of the repo",
  3067. "name": "repo",
  3068. "in": "path",
  3069. "required": true
  3070. },
  3071. {
  3072. "type": "integer",
  3073. "format": "int64",
  3074. "description": "id of the comment to edit",
  3075. "name": "id",
  3076. "in": "path",
  3077. "required": true
  3078. },
  3079. {
  3080. "name": "body",
  3081. "in": "body",
  3082. "schema": {
  3083. "$ref": "#/definitions/EditIssueCommentOption"
  3084. }
  3085. }
  3086. ],
  3087. "responses": {
  3088. "200": {
  3089. "$ref": "#/responses/Comment"
  3090. }
  3091. }
  3092. }
  3093. },
  3094. "/repos/{owner}/{repo}/issues/comments/{id}/reactions": {
  3095. "get": {
  3096. "consumes": [
  3097. "application/json"
  3098. ],
  3099. "produces": [
  3100. "application/json"
  3101. ],
  3102. "tags": [
  3103. "issue"
  3104. ],
  3105. "summary": "Get a list reactions of a issue comment",
  3106. "operationId": "issueGetCommentReactions",
  3107. "parameters": [
  3108. {
  3109. "type": "string",
  3110. "description": "owner of the repo",
  3111. "name": "owner",
  3112. "in": "path",
  3113. "required": true
  3114. },
  3115. {
  3116. "type": "string",
  3117. "description": "name of the repo",
  3118. "name": "repo",
  3119. "in": "path",
  3120. "required": true
  3121. },
  3122. {
  3123. "type": "integer",
  3124. "format": "int64",
  3125. "description": "id of the comment to edit",
  3126. "name": "id",
  3127. "in": "path",
  3128. "required": true
  3129. }
  3130. ],
  3131. "responses": {
  3132. "200": {
  3133. "$ref": "#/responses/ReactionResponseList"
  3134. },
  3135. "403": {
  3136. "$ref": "#/responses/forbidden"
  3137. }
  3138. }
  3139. },
  3140. "post": {
  3141. "consumes": [
  3142. "application/json"
  3143. ],
  3144. "produces": [
  3145. "application/json"
  3146. ],
  3147. "tags": [
  3148. "issue"
  3149. ],
  3150. "summary": "Add a reaction to a comment of a issue comment",
  3151. "operationId": "issuePostCommentReaction",
  3152. "parameters": [
  3153. {
  3154. "type": "string",
  3155. "description": "owner of the repo",
  3156. "name": "owner",
  3157. "in": "path",
  3158. "required": true
  3159. },
  3160. {
  3161. "type": "string",
  3162. "description": "name of the repo",
  3163. "name": "repo",
  3164. "in": "path",
  3165. "required": true
  3166. },
  3167. {
  3168. "type": "integer",
  3169. "format": "int64",
  3170. "description": "id of the comment to edit",
  3171. "name": "id",
  3172. "in": "path",
  3173. "required": true
  3174. },
  3175. {
  3176. "name": "content",
  3177. "in": "body",
  3178. "schema": {
  3179. "$ref": "#/definitions/EditReactionOption"
  3180. }
  3181. }
  3182. ],
  3183. "responses": {
  3184. "201": {
  3185. "$ref": "#/responses/ReactionResponse"
  3186. },
  3187. "403": {
  3188. "$ref": "#/responses/forbidden"
  3189. }
  3190. }
  3191. },
  3192. "delete": {
  3193. "consumes": [
  3194. "application/json"
  3195. ],
  3196. "produces": [
  3197. "application/json"
  3198. ],
  3199. "tags": [
  3200. "issue"
  3201. ],
  3202. "summary": "Remove a reaction from a comment of a issue comment",
  3203. "operationId": "issueDeleteCommentReaction",
  3204. "parameters": [
  3205. {
  3206. "type": "string",
  3207. "description": "owner of the repo",
  3208. "name": "owner",
  3209. "in": "path",
  3210. "required": true
  3211. },
  3212. {
  3213. "type": "string",
  3214. "description": "name of the repo",
  3215. "name": "repo",
  3216. "in": "path",
  3217. "required": true
  3218. },
  3219. {
  3220. "type": "integer",
  3221. "format": "int64",
  3222. "description": "id of the comment to edit",
  3223. "name": "id",
  3224. "in": "path",
  3225. "required": true
  3226. },
  3227. {
  3228. "name": "content",
  3229. "in": "body",
  3230. "schema": {
  3231. "$ref": "#/definitions/EditReactionOption"
  3232. }
  3233. }
  3234. ],
  3235. "responses": {
  3236. "200": {
  3237. "$ref": "#/responses/empty"
  3238. },
  3239. "403": {
  3240. "$ref": "#/responses/forbidden"
  3241. }
  3242. }
  3243. }
  3244. },
  3245. "/repos/{owner}/{repo}/issues/{id}/times": {
  3246. "get": {
  3247. "produces": [
  3248. "application/json"
  3249. ],
  3250. "tags": [
  3251. "issue"
  3252. ],
  3253. "summary": "List an issue's tracked times",
  3254. "operationId": "issueTrackedTimes",
  3255. "parameters": [
  3256. {
  3257. "type": "string",
  3258. "description": "owner of the repo",
  3259. "name": "owner",
  3260. "in": "path",
  3261. "required": true
  3262. },
  3263. {
  3264. "type": "string",
  3265. "description": "name of the repo",
  3266. "name": "repo",
  3267. "in": "path",
  3268. "required": true
  3269. },
  3270. {
  3271. "type": "integer",
  3272. "format": "int64",
  3273. "description": "index of the issue",
  3274. "name": "id",
  3275. "in": "path",
  3276. "required": true
  3277. }
  3278. ],
  3279. "responses": {
  3280. "200": {
  3281. "$ref": "#/responses/TrackedTimeList"
  3282. },
  3283. "404": {
  3284. "$ref": "#/responses/notFound"
  3285. }
  3286. }
  3287. },
  3288. "post": {
  3289. "consumes": [
  3290. "application/json"
  3291. ],
  3292. "produces": [
  3293. "application/json"
  3294. ],
  3295. "tags": [
  3296. "issue"
  3297. ],
  3298. "summary": "Add a tracked time to a issue",
  3299. "operationId": "issueAddTime",
  3300. "parameters": [
  3301. {
  3302. "type": "string",
  3303. "description": "owner of the repo",
  3304. "name": "owner",
  3305. "in": "path",
  3306. "required": true
  3307. },
  3308. {
  3309. "type": "string",
  3310. "description": "name of the repo",
  3311. "name": "repo",
  3312. "in": "path",
  3313. "required": true
  3314. },
  3315. {
  3316. "type": "integer",
  3317. "format": "int64",
  3318. "description": "index of the issue to add tracked time to",
  3319. "name": "id",
  3320. "in": "path",
  3321. "required": true
  3322. },
  3323. {
  3324. "name": "body",
  3325. "in": "body",
  3326. "schema": {
  3327. "$ref": "#/definitions/AddTimeOption"
  3328. }
  3329. }
  3330. ],
  3331. "responses": {
  3332. "200": {
  3333. "$ref": "#/responses/TrackedTime"
  3334. },
  3335. "400": {
  3336. "$ref": "#/responses/error"
  3337. },
  3338. "403": {
  3339. "$ref": "#/responses/forbidden"
  3340. }
  3341. }
  3342. }
  3343. },
  3344. "/repos/{owner}/{repo}/issues/{index}": {
  3345. "get": {
  3346. "produces": [
  3347. "application/json"
  3348. ],
  3349. "tags": [
  3350. "issue"
  3351. ],
  3352. "summary": "Get an issue",
  3353. "operationId": "issueGetIssue",
  3354. "parameters": [
  3355. {
  3356. "type": "string",
  3357. "description": "owner of the repo",
  3358. "name": "owner",
  3359. "in": "path",
  3360. "required": true
  3361. },
  3362. {
  3363. "type": "string",
  3364. "description": "name of the repo",
  3365. "name": "repo",
  3366. "in": "path",
  3367. "required": true
  3368. },
  3369. {
  3370. "type": "integer",
  3371. "format": "int64",
  3372. "description": "index of the issue to get",
  3373. "name": "index",
  3374. "in": "path",
  3375. "required": true
  3376. }
  3377. ],
  3378. "responses": {
  3379. "200": {
  3380. "$ref": "#/responses/Issue"
  3381. },
  3382. "404": {
  3383. "$ref": "#/responses/notFound"
  3384. }
  3385. }
  3386. },
  3387. "patch": {
  3388. "consumes": [
  3389. "application/json"
  3390. ],
  3391. "produces": [
  3392. "application/json"
  3393. ],
  3394. "tags": [
  3395. "issue"
  3396. ],
  3397. "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  3398. "operationId": "issueEditIssue",
  3399. "parameters": [
  3400. {
  3401. "type": "string",
  3402. "description": "owner of the repo",
  3403. "name": "owner",
  3404. "in": "path",
  3405. "required": true
  3406. },
  3407. {
  3408. "type": "string",
  3409. "description": "name of the repo",
  3410. "name": "repo",
  3411. "in": "path",
  3412. "required": true
  3413. },
  3414. {
  3415. "type": "integer",
  3416. "format": "int64",
  3417. "description": "index of the issue to edit",
  3418. "name": "index",
  3419. "in": "path",
  3420. "required": true
  3421. },
  3422. {
  3423. "name": "body",
  3424. "in": "body",
  3425. "schema": {
  3426. "$ref": "#/definitions/EditIssueOption"
  3427. }
  3428. }
  3429. ],
  3430. "responses": {
  3431. "201": {
  3432. "$ref": "#/responses/Issue"
  3433. },
  3434. "403": {
  3435. "$ref": "#/responses/forbidden"
  3436. },
  3437. "404": {
  3438. "$ref": "#/responses/notFound"
  3439. },
  3440. "412": {
  3441. "$ref": "#/responses/error"
  3442. }
  3443. }
  3444. }
  3445. },
  3446. "/repos/{owner}/{repo}/issues/{index}/comments": {
  3447. "get": {
  3448. "produces": [
  3449. "application/json"
  3450. ],
  3451. "tags": [
  3452. "issue"
  3453. ],
  3454. "summary": "List all comments on an issue",
  3455. "operationId": "issueGetComments",
  3456. "parameters": [
  3457. {
  3458. "type": "string",
  3459. "description": "owner of the repo",
  3460. "name": "owner",
  3461. "in": "path",
  3462. "required": true
  3463. },
  3464. {
  3465. "type": "string",
  3466. "description": "name of the repo",
  3467. "name": "repo",
  3468. "in": "path",
  3469. "required": true
  3470. },
  3471. {
  3472. "type": "integer",
  3473. "format": "int64",
  3474. "description": "index of the issue",
  3475. "name": "index",
  3476. "in": "path",
  3477. "required": true
  3478. },
  3479. {
  3480. "type": "string",
  3481. "description": "if provided, only comments updated since the specified time are returned.",
  3482. "name": "since",
  3483. "in": "query"
  3484. }
  3485. ],
  3486. "responses": {
  3487. "200": {
  3488. "$ref": "#/responses/CommentList"
  3489. }
  3490. }
  3491. },
  3492. "post": {
  3493. "consumes": [
  3494. "application/json"
  3495. ],
  3496. "produces": [
  3497. "application/json"
  3498. ],
  3499. "tags": [
  3500. "issue"
  3501. ],
  3502. "summary": "Add a comment to an issue",
  3503. "operationId": "issueCreateComment",
  3504. "parameters": [
  3505. {
  3506. "type": "string",
  3507. "description": "owner of the repo",
  3508. "name": "owner",
  3509. "in": "path",
  3510. "required": true
  3511. },
  3512. {
  3513. "type": "string",
  3514. "description": "name of the repo",
  3515. "name": "repo",
  3516. "in": "path",
  3517. "required": true
  3518. },
  3519. {
  3520. "type": "integer",
  3521. "format": "int64",
  3522. "description": "index of the issue",
  3523. "name": "index",
  3524. "in": "path",
  3525. "required": true
  3526. },
  3527. {
  3528. "name": "body",
  3529. "in": "body",
  3530. "schema": {
  3531. "$ref": "#/definitions/CreateIssueCommentOption"
  3532. }
  3533. }
  3534. ],
  3535. "responses": {
  3536. "201": {
  3537. "$ref": "#/responses/Comment"
  3538. },
  3539. "403": {
  3540. "$ref": "#/responses/forbidden"
  3541. }
  3542. }
  3543. }
  3544. },
  3545. "/repos/{owner}/{repo}/issues/{index}/comments/{id}": {
  3546. "delete": {
  3547. "tags": [
  3548. "issue"
  3549. ],
  3550. "summary": "Delete a comment",
  3551. "operationId": "issueDeleteCommentDeprecated",
  3552. "deprecated": true,
  3553. "parameters": [
  3554. {
  3555. "type": "string",
  3556. "description": "owner of the repo",
  3557. "name": "owner",
  3558. "in": "path",
  3559. "required": true
  3560. },
  3561. {
  3562. "type": "string",
  3563. "description": "name of the repo",
  3564. "name": "repo",
  3565. "in": "path",
  3566. "required": true
  3567. },
  3568. {
  3569. "type": "integer",
  3570. "description": "this parameter is ignored",
  3571. "name": "index",
  3572. "in": "path",
  3573. "required": true
  3574. },
  3575. {
  3576. "type": "integer",
  3577. "format": "int64",
  3578. "description": "id of comment to delete",
  3579. "name": "id",
  3580. "in": "path",
  3581. "required": true
  3582. }
  3583. ],
  3584. "responses": {
  3585. "204": {
  3586. "$ref": "#/responses/empty"
  3587. },
  3588. "403": {
  3589. "$ref": "#/responses/forbidden"
  3590. }
  3591. }
  3592. },
  3593. "patch": {
  3594. "consumes": [
  3595. "application/json"
  3596. ],
  3597. "produces": [
  3598. "application/json"
  3599. ],
  3600. "tags": [
  3601. "issue"
  3602. ],
  3603. "summary": "Edit a comment",
  3604. "operationId": "issueEditCommentDeprecated",
  3605. "deprecated": true,
  3606. "parameters": [
  3607. {
  3608. "type": "string",
  3609. "description": "owner of the repo",
  3610. "name": "owner",
  3611. "in": "path",
  3612. "required": true
  3613. },
  3614. {
  3615. "type": "string",
  3616. "description": "name of the repo",
  3617. "name": "repo",
  3618. "in": "path",
  3619. "required": true
  3620. },
  3621. {
  3622. "type": "integer",
  3623. "description": "this parameter is ignored",
  3624. "name": "index",
  3625. "in": "path",
  3626. "required": true
  3627. },
  3628. {
  3629. "type": "integer",
  3630. "format": "int64",
  3631. "description": "id of the comment to edit",
  3632. "name": "id",
  3633. "in": "path",
  3634. "required": true
  3635. },
  3636. {
  3637. "name": "body",
  3638. "in": "body",
  3639. "schema": {
  3640. "$ref": "#/definitions/EditIssueCommentOption"
  3641. }
  3642. }
  3643. ],
  3644. "responses": {
  3645. "200": {
  3646. "$ref": "#/responses/Comment"
  3647. },
  3648. "204": {
  3649. "$ref": "#/responses/empty"
  3650. },
  3651. "403": {
  3652. "$ref": "#/responses/forbidden"
  3653. }
  3654. }
  3655. }
  3656. },
  3657. "/repos/{owner}/{repo}/issues/{index}/deadline": {
  3658. "post": {
  3659. "consumes": [
  3660. "application/json"
  3661. ],
  3662. "produces": [
  3663. "application/json"
  3664. ],
  3665. "tags": [
  3666. "issue"
  3667. ],
  3668. "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.",
  3669. "operationId": "issueEditIssueDeadline",
  3670. "parameters": [
  3671. {
  3672. "type": "string",
  3673. "description": "owner of the repo",
  3674. "name": "owner",
  3675. "in": "path",
  3676. "required": true
  3677. },
  3678. {
  3679. "type": "string",
  3680. "description": "name of the repo",
  3681. "name": "repo",
  3682. "in": "path",
  3683. "required": true
  3684. },
  3685. {
  3686. "type": "integer",
  3687. "format": "int64",
  3688. "description": "index of the issue to create or update a deadline on",
  3689. "name": "index",
  3690. "in": "path",
  3691. "required": true
  3692. },
  3693. {
  3694. "name": "body",
  3695. "in": "body",
  3696. "schema": {
  3697. "$ref": "#/definitions/EditDeadlineOption"
  3698. }
  3699. }
  3700. ],
  3701. "responses": {
  3702. "201": {
  3703. "$ref": "#/responses/IssueDeadline"
  3704. },
  3705. "403": {
  3706. "$ref": "#/responses/forbidden"
  3707. },
  3708. "404": {
  3709. "$ref": "#/responses/notFound"
  3710. }
  3711. }
  3712. }
  3713. },
  3714. "/repos/{owner}/{repo}/issues/{index}/labels": {
  3715. "get": {
  3716. "produces": [
  3717. "application/json"
  3718. ],
  3719. "tags": [
  3720. "issue"
  3721. ],
  3722. "summary": "Get an issue's labels",
  3723. "operationId": "issueGetLabels",
  3724. "parameters": [
  3725. {
  3726. "type": "string",
  3727. "description": "owner of the repo",
  3728. "name": "owner",
  3729. "in": "path",
  3730. "required": true
  3731. },
  3732. {
  3733. "type": "string",
  3734. "description": "name of the repo",
  3735. "name": "repo",
  3736. "in": "path",
  3737. "required": true
  3738. },
  3739. {
  3740. "type": "integer",
  3741. "format": "int64",
  3742. "description": "index of the issue",
  3743. "name": "index",
  3744. "in": "path",
  3745. "required": true
  3746. }
  3747. ],
  3748. "responses": {
  3749. "200": {
  3750. "$ref": "#/responses/LabelList"
  3751. },
  3752. "404": {
  3753. "$ref": "#/responses/notFound"
  3754. }
  3755. }
  3756. },
  3757. "put": {
  3758. "consumes": [
  3759. "application/json"
  3760. ],
  3761. "produces": [
  3762. "application/json"
  3763. ],
  3764. "tags": [
  3765. "issue"
  3766. ],
  3767. "summary": "Replace an issue's labels",
  3768. "operationId": "issueReplaceLabels",
  3769. "parameters": [
  3770. {
  3771. "type": "string",
  3772. "description": "owner of the repo",
  3773. "name": "owner",
  3774. "in": "path",
  3775. "required": true
  3776. },
  3777. {
  3778. "type": "string",
  3779. "description": "name of the repo",
  3780. "name": "repo",
  3781. "in": "path",
  3782. "required": true
  3783. },
  3784. {
  3785. "type": "integer",
  3786. "format": "int64",
  3787. "description": "index of the issue",
  3788. "name": "index",
  3789. "in": "path",
  3790. "required": true
  3791. },
  3792. {
  3793. "name": "body",
  3794. "in": "body",
  3795. "schema": {
  3796. "$ref": "#/definitions/IssueLabelsOption"
  3797. }
  3798. }
  3799. ],
  3800. "responses": {
  3801. "200": {
  3802. "$ref": "#/responses/LabelList"
  3803. },
  3804. "403": {
  3805. "$ref": "#/responses/forbidden"
  3806. }
  3807. }
  3808. },
  3809. "post": {
  3810. "consumes": [
  3811. "application/json"
  3812. ],
  3813. "produces": [
  3814. "application/json"
  3815. ],
  3816. "tags": [
  3817. "issue"
  3818. ],
  3819. "summary": "Add a label to an issue",
  3820. "operationId": "issueAddLabel",
  3821. "parameters": [
  3822. {
  3823. "type": "string",
  3824. "description": "owner of the repo",
  3825. "name": "owner",
  3826. "in": "path",
  3827. "required": true
  3828. },
  3829. {
  3830. "type": "string",
  3831. "description": "name of the repo",
  3832. "name": "repo",
  3833. "in": "path",
  3834. "required": true
  3835. },
  3836. {
  3837. "type": "integer",
  3838. "format": "int64",
  3839. "description": "index of the issue",
  3840. "name": "index",
  3841. "in": "path",
  3842. "required": true
  3843. },
  3844. {
  3845. "name": "body",
  3846. "in": "body",
  3847. "schema": {
  3848. "$ref": "#/definitions/IssueLabelsOption"
  3849. }
  3850. }
  3851. ],
  3852. "responses": {
  3853. "200": {
  3854. "$ref": "#/responses/LabelList"
  3855. },
  3856. "403": {
  3857. "$ref": "#/responses/forbidden"
  3858. }
  3859. }
  3860. },
  3861. "delete": {
  3862. "produces": [
  3863. "application/json"
  3864. ],
  3865. "tags": [
  3866. "issue"
  3867. ],
  3868. "summary": "Remove all labels from an issue",
  3869. "operationId": "issueClearLabels",
  3870. "parameters": [
  3871. {
  3872. "type": "string",
  3873. "description": "owner of the repo",
  3874. "name": "owner",
  3875. "in": "path",
  3876. "required": true
  3877. },
  3878. {
  3879. "type": "string",
  3880. "description": "name of the repo",
  3881. "name": "repo",
  3882. "in": "path",
  3883. "required": true
  3884. },
  3885. {
  3886. "type": "integer",
  3887. "format": "int64",
  3888. "description": "index of the issue",
  3889. "name": "index",
  3890. "in": "path",
  3891. "required": true
  3892. }
  3893. ],
  3894. "responses": {
  3895. "204": {
  3896. "$ref": "#/responses/empty"
  3897. },
  3898. "403": {
  3899. "$ref": "#/responses/forbidden"
  3900. }
  3901. }
  3902. }
  3903. },
  3904. "/repos/{owner}/{repo}/issues/{index}/labels/{id}": {
  3905. "delete": {
  3906. "produces": [
  3907. "application/json"
  3908. ],
  3909. "tags": [
  3910. "issue"
  3911. ],
  3912. "summary": "Remove a label from an issue",
  3913. "operationId": "issueRemoveLabel",
  3914. "parameters": [
  3915. {
  3916. "type": "string",
  3917. "description": "owner of the repo",
  3918. "name": "owner",
  3919. "in": "path",
  3920. "required": true
  3921. },
  3922. {
  3923. "type": "string",
  3924. "description": "name of the repo",
  3925. "name": "repo",
  3926. "in": "path",
  3927. "required": true
  3928. },
  3929. {
  3930. "type": "integer",
  3931. "format": "int64",
  3932. "description": "index of the issue",
  3933. "name": "index",
  3934. "in": "path",
  3935. "required": true
  3936. },
  3937. {
  3938. "type": "integer",
  3939. "format": "int64",
  3940. "description": "id of the label to remove",
  3941. "name": "id",
  3942. "in": "path",
  3943. "required": true
  3944. }
  3945. ],
  3946. "responses": {
  3947. "204": {
  3948. "$ref": "#/responses/empty"
  3949. },
  3950. "403": {
  3951. "$ref": "#/responses/forbidden"
  3952. },
  3953. "422": {
  3954. "$ref": "#/responses/validationError"
  3955. }
  3956. }
  3957. }
  3958. },
  3959. "/repos/{owner}/{repo}/issues/{index}/reactions": {
  3960. "get": {
  3961. "consumes": [
  3962. "application/json"
  3963. ],
  3964. "produces": [
  3965. "application/json"
  3966. ],
  3967. "tags": [
  3968. "issue"
  3969. ],
  3970. "summary": "Get a list reactions of a issue",
  3971. "operationId": "issueGetIssueReactions",
  3972. "parameters": [
  3973. {
  3974. "type": "string",
  3975. "description": "owner of the repo",
  3976. "name": "owner",
  3977. "in": "path",
  3978. "required": true
  3979. },
  3980. {
  3981. "type": "string",
  3982. "description": "name of the repo",
  3983. "name": "repo",
  3984. "in": "path",
  3985. "required": true
  3986. },
  3987. {
  3988. "type": "integer",
  3989. "format": "int64",
  3990. "description": "index of the issue",
  3991. "name": "index",
  3992. "in": "path",
  3993. "required": true
  3994. }
  3995. ],
  3996. "responses": {
  3997. "200": {
  3998. "$ref": "#/responses/ReactionResponseList"
  3999. },
  4000. "403": {
  4001. "$ref": "#/responses/forbidden"
  4002. }
  4003. }
  4004. },
  4005. "post": {
  4006. "consumes": [
  4007. "application/json"
  4008. ],
  4009. "produces": [
  4010. "application/json"
  4011. ],
  4012. "tags": [
  4013. "issue"
  4014. ],
  4015. "summary": "Add a reaction to a comment of a issue",
  4016. "operationId": "issuePostIssueReaction",
  4017. "parameters": [
  4018. {
  4019. "type": "string",
  4020. "description": "owner of the repo",
  4021. "name": "owner",
  4022. "in": "path",
  4023. "required": true
  4024. },
  4025. {
  4026. "type": "string",
  4027. "description": "name of the repo",
  4028. "name": "repo",
  4029. "in": "path",
  4030. "required": true
  4031. },
  4032. {
  4033. "type": "integer",
  4034. "format": "int64",
  4035. "description": "index of the issue",
  4036. "name": "index",
  4037. "in": "path",
  4038. "required": true
  4039. },
  4040. {
  4041. "name": "content",
  4042. "in": "body",
  4043. "schema": {
  4044. "$ref": "#/definitions/EditReactionOption"
  4045. }
  4046. }
  4047. ],
  4048. "responses": {
  4049. "201": {
  4050. "$ref": "#/responses/ReactionResponse"
  4051. },
  4052. "403": {
  4053. "$ref": "#/responses/forbidden"
  4054. }
  4055. }
  4056. },
  4057. "delete": {
  4058. "consumes": [
  4059. "application/json"
  4060. ],
  4061. "produces": [
  4062. "application/json"
  4063. ],
  4064. "tags": [
  4065. "issue"
  4066. ],
  4067. "summary": "Remove a reaction from a comment of a issue",
  4068. "operationId": "issueDeleteIssueReaction",
  4069. "parameters": [
  4070. {
  4071. "type": "string",
  4072. "description": "owner of the repo",
  4073. "name": "owner",
  4074. "in": "path",
  4075. "required": true
  4076. },
  4077. {
  4078. "type": "string",
  4079. "description": "name of the repo",
  4080. "name": "repo",
  4081. "in": "path",
  4082. "required": true
  4083. },
  4084. {
  4085. "type": "integer",
  4086. "format": "int64",
  4087. "description": "index of the issue",
  4088. "name": "index",
  4089. "in": "path",
  4090. "required": true
  4091. },
  4092. {
  4093. "name": "content",
  4094. "in": "body",
  4095. "schema": {
  4096. "$ref": "#/definitions/EditReactionOption"
  4097. }
  4098. }
  4099. ],
  4100. "responses": {
  4101. "200": {
  4102. "$ref": "#/responses/empty"
  4103. },
  4104. "403": {
  4105. "$ref": "#/responses/forbidden"
  4106. }
  4107. }
  4108. }
  4109. },
  4110. "/repos/{owner}/{repo}/issues/{index}/stopwatch/delete": {
  4111. "delete": {
  4112. "consumes": [
  4113. "application/json"
  4114. ],
  4115. "produces": [
  4116. "application/json"
  4117. ],
  4118. "tags": [
  4119. "issue"
  4120. ],
  4121. "summary": "Delete an issue's existing stopwatch.",
  4122. "operationId": "issueDeleteStopWatch",
  4123. "parameters": [
  4124. {
  4125. "type": "string",
  4126. "description": "owner of the repo",
  4127. "name": "owner",
  4128. "in": "path",
  4129. "required": true
  4130. },
  4131. {
  4132. "type": "string",
  4133. "description": "name of the repo",
  4134. "name": "repo",
  4135. "in": "path",
  4136. "required": true
  4137. },
  4138. {
  4139. "type": "integer",
  4140. "format": "int64",
  4141. "description": "index of the issue to stop the stopwatch on",
  4142. "name": "index",
  4143. "in": "path",
  4144. "required": true
  4145. }
  4146. ],
  4147. "responses": {
  4148. "204": {
  4149. "$ref": "#/responses/empty"
  4150. },
  4151. "403": {
  4152. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  4153. },
  4154. "404": {
  4155. "$ref": "#/responses/notFound"
  4156. },
  4157. "409": {
  4158. "description": "Cannot cancel a non existent stopwatch"
  4159. }
  4160. }
  4161. }
  4162. },
  4163. "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": {
  4164. "post": {
  4165. "consumes": [
  4166. "application/json"
  4167. ],
  4168. "produces": [
  4169. "application/json"
  4170. ],
  4171. "tags": [
  4172. "issue"
  4173. ],
  4174. "summary": "Start stopwatch on an issue.",
  4175. "operationId": "issueStartStopWatch",
  4176. "parameters": [
  4177. {
  4178. "type": "string",
  4179. "description": "owner of the repo",
  4180. "name": "owner",
  4181. "in": "path",
  4182. "required": true
  4183. },
  4184. {
  4185. "type": "string",
  4186. "description": "name of the repo",
  4187. "name": "repo",
  4188. "in": "path",
  4189. "required": true
  4190. },
  4191. {
  4192. "type": "integer",
  4193. "format": "int64",
  4194. "description": "index of the issue to create the stopwatch on",
  4195. "name": "index",
  4196. "in": "path",
  4197. "required": true
  4198. }
  4199. ],
  4200. "responses": {
  4201. "201": {
  4202. "$ref": "#/responses/empty"
  4203. },
  4204. "403": {
  4205. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  4206. },
  4207. "404": {
  4208. "$ref": "#/responses/notFound"
  4209. },
  4210. "409": {
  4211. "description": "Cannot start a stopwatch again if it already exists"
  4212. }
  4213. }
  4214. }
  4215. },
  4216. "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": {
  4217. "post": {
  4218. "consumes": [
  4219. "application/json"
  4220. ],
  4221. "produces": [
  4222. "application/json"
  4223. ],
  4224. "tags": [
  4225. "issue"
  4226. ],
  4227. "summary": "Stop an issue's existing stopwatch.",
  4228. "operationId": "issueStopStopWatch",
  4229. "parameters": [
  4230. {
  4231. "type": "string",
  4232. "description": "owner of the repo",
  4233. "name": "owner",
  4234. "in": "path",
  4235. "required": true
  4236. },
  4237. {
  4238. "type": "string",
  4239. "description": "name of the repo",
  4240. "name": "repo",
  4241. "in": "path",
  4242. "required": true
  4243. },
  4244. {
  4245. "type": "integer",
  4246. "format": "int64",
  4247. "description": "index of the issue to stop the stopwatch on",
  4248. "name": "index",
  4249. "in": "path",
  4250. "required": true
  4251. }
  4252. ],
  4253. "responses": {
  4254. "201": {
  4255. "$ref": "#/responses/empty"
  4256. },
  4257. "403": {
  4258. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  4259. },
  4260. "404": {
  4261. "$ref": "#/responses/notFound"
  4262. },
  4263. "409": {
  4264. "description": "Cannot stop a non existent stopwatch"
  4265. }
  4266. }
  4267. }
  4268. },
  4269. "/repos/{owner}/{repo}/issues/{index}/subscriptions": {
  4270. "get": {
  4271. "consumes": [
  4272. "application/json"
  4273. ],
  4274. "produces": [
  4275. "application/json"
  4276. ],
  4277. "tags": [
  4278. "issue"
  4279. ],
  4280. "summary": "Get users who subscribed on an issue.",
  4281. "operationId": "issueSubscriptions",
  4282. "parameters": [
  4283. {
  4284. "type": "string",
  4285. "description": "owner of the repo",
  4286. "name": "owner",
  4287. "in": "path",
  4288. "required": true
  4289. },
  4290. {
  4291. "type": "string",
  4292. "description": "name of the repo",
  4293. "name": "repo",
  4294. "in": "path",
  4295. "required": true
  4296. },
  4297. {
  4298. "type": "integer",
  4299. "format": "int64",
  4300. "description": "index of the issue",
  4301. "name": "index",
  4302. "in": "path",
  4303. "required": true
  4304. }
  4305. ],
  4306. "responses": {
  4307. "200": {
  4308. "$ref": "#/responses/UserList"
  4309. },
  4310. "404": {
  4311. "$ref": "#/responses/notFound"
  4312. }
  4313. }
  4314. }
  4315. },
  4316. "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}": {
  4317. "put": {
  4318. "consumes": [
  4319. "application/json"
  4320. ],
  4321. "produces": [
  4322. "application/json"
  4323. ],
  4324. "tags": [
  4325. "issue"
  4326. ],
  4327. "summary": "Subscribe user to issue",
  4328. "operationId": "issueAddSubscription",
  4329. "parameters": [
  4330. {
  4331. "type": "string",
  4332. "description": "owner of the repo",
  4333. "name": "owner",
  4334. "in": "path",
  4335. "required": true
  4336. },
  4337. {
  4338. "type": "string",
  4339. "description": "name of the repo",
  4340. "name": "repo",
  4341. "in": "path",
  4342. "required": true
  4343. },
  4344. {
  4345. "type": "integer",
  4346. "format": "int64",
  4347. "description": "index of the issue",
  4348. "name": "index",
  4349. "in": "path",
  4350. "required": true
  4351. },
  4352. {
  4353. "type": "string",
  4354. "description": "user to subscribe",
  4355. "name": "user",
  4356. "in": "path",
  4357. "required": true
  4358. }
  4359. ],
  4360. "responses": {
  4361. "201": {
  4362. "$ref": "#/responses/empty"
  4363. },
  4364. "304": {
  4365. "description": "User can only subscribe itself if he is no admin"
  4366. },
  4367. "404": {
  4368. "$ref": "#/responses/notFound"
  4369. }
  4370. }
  4371. },
  4372. "delete": {
  4373. "consumes": [
  4374. "application/json"
  4375. ],
  4376. "produces": [
  4377. "application/json"
  4378. ],
  4379. "tags": [
  4380. "issue"
  4381. ],
  4382. "summary": "Unsubscribe user from issue",
  4383. "operationId": "issueDeleteSubscription",
  4384. "parameters": [
  4385. {
  4386. "type": "string",
  4387. "description": "owner of the repo",
  4388. "name": "owner",
  4389. "in": "path",
  4390. "required": true
  4391. },
  4392. {
  4393. "type": "string",
  4394. "description": "name of the repo",
  4395. "name": "repo",
  4396. "in": "path",
  4397. "required": true
  4398. },
  4399. {
  4400. "type": "integer",
  4401. "format": "int64",
  4402. "description": "index of the issue",
  4403. "name": "index",
  4404. "in": "path",
  4405. "required": true
  4406. },
  4407. {
  4408. "type": "string",
  4409. "description": "user witch unsubscribe",
  4410. "name": "user",
  4411. "in": "path",
  4412. "required": true
  4413. }
  4414. ],
  4415. "responses": {
  4416. "201": {
  4417. "$ref": "#/responses/empty"
  4418. },
  4419. "304": {
  4420. "description": "User can only subscribe itself if he is no admin"
  4421. },
  4422. "404": {
  4423. "$ref": "#/responses/notFound"
  4424. }
  4425. }
  4426. }
  4427. },
  4428. "/repos/{owner}/{repo}/keys": {
  4429. "get": {
  4430. "produces": [
  4431. "application/json"
  4432. ],
  4433. "tags": [
  4434. "repository"
  4435. ],
  4436. "summary": "List a repository's keys",
  4437. "operationId": "repoListKeys",
  4438. "parameters": [
  4439. {
  4440. "type": "string",
  4441. "description": "owner of the repo",
  4442. "name": "owner",
  4443. "in": "path",
  4444. "required": true
  4445. },
  4446. {
  4447. "type": "string",
  4448. "description": "name of the repo",
  4449. "name": "repo",
  4450. "in": "path",
  4451. "required": true
  4452. },
  4453. {
  4454. "type": "integer",
  4455. "description": "the key_id to search for",
  4456. "name": "key_id",
  4457. "in": "query"
  4458. },
  4459. {
  4460. "type": "string",
  4461. "description": "fingerprint of the key",
  4462. "name": "fingerprint",
  4463. "in": "query"
  4464. }
  4465. ],
  4466. "responses": {
  4467. "200": {
  4468. "$ref": "#/responses/DeployKeyList"
  4469. }
  4470. }
  4471. },
  4472. "post": {
  4473. "consumes": [
  4474. "application/json"
  4475. ],
  4476. "produces": [
  4477. "application/json"
  4478. ],
  4479. "tags": [
  4480. "repository"
  4481. ],
  4482. "summary": "Add a key to a repository",
  4483. "operationId": "repoCreateKey",
  4484. "parameters": [
  4485. {
  4486. "type": "string",
  4487. "description": "owner of the repo",
  4488. "name": "owner",
  4489. "in": "path",
  4490. "required": true
  4491. },
  4492. {
  4493. "type": "string",
  4494. "description": "name of the repo",
  4495. "name": "repo",
  4496. "in": "path",
  4497. "required": true
  4498. },
  4499. {
  4500. "name": "body",
  4501. "in": "body",
  4502. "schema": {
  4503. "$ref": "#/definitions/CreateKeyOption"
  4504. }
  4505. }
  4506. ],
  4507. "responses": {
  4508. "201": {
  4509. "$ref": "#/responses/DeployKey"
  4510. },
  4511. "422": {
  4512. "$ref": "#/responses/validationError"
  4513. }
  4514. }
  4515. }
  4516. },
  4517. "/repos/{owner}/{repo}/keys/{id}": {
  4518. "get": {
  4519. "produces": [
  4520. "application/json"
  4521. ],
  4522. "tags": [
  4523. "repository"
  4524. ],
  4525. "summary": "Get a repository's key by id",
  4526. "operationId": "repoGetKey",
  4527. "parameters": [
  4528. {
  4529. "type": "string",
  4530. "description": "owner of the repo",
  4531. "name": "owner",
  4532. "in": "path",
  4533. "required": true
  4534. },
  4535. {
  4536. "type": "string",
  4537. "description": "name of the repo",
  4538. "name": "repo",
  4539. "in": "path",
  4540. "required": true
  4541. },
  4542. {
  4543. "type": "integer",
  4544. "format": "int64",
  4545. "description": "id of the key to get",
  4546. "name": "id",
  4547. "in": "path",
  4548. "required": true
  4549. }
  4550. ],
  4551. "responses": {
  4552. "200": {
  4553. "$ref": "#/responses/DeployKey"
  4554. }
  4555. }
  4556. },
  4557. "delete": {
  4558. "tags": [
  4559. "repository"
  4560. ],
  4561. "summary": "Delete a key from a repository",
  4562. "operationId": "repoDeleteKey",
  4563. "parameters": [
  4564. {
  4565. "type": "string",
  4566. "description": "owner of the repo",
  4567. "name": "owner",
  4568. "in": "path",
  4569. "required": true
  4570. },
  4571. {
  4572. "type": "string",
  4573. "description": "name of the repo",
  4574. "name": "repo",
  4575. "in": "path",
  4576. "required": true
  4577. },
  4578. {
  4579. "type": "integer",
  4580. "format": "int64",
  4581. "description": "id of the key to delete",
  4582. "name": "id",
  4583. "in": "path",
  4584. "required": true
  4585. }
  4586. ],
  4587. "responses": {
  4588. "204": {
  4589. "$ref": "#/responses/empty"
  4590. },
  4591. "403": {
  4592. "$ref": "#/responses/forbidden"
  4593. }
  4594. }
  4595. }
  4596. },
  4597. "/repos/{owner}/{repo}/labels": {
  4598. "get": {
  4599. "produces": [
  4600. "application/json"
  4601. ],
  4602. "tags": [
  4603. "issue"
  4604. ],
  4605. "summary": "Get all of a repository's labels",
  4606. "operationId": "issueListLabels",
  4607. "parameters": [
  4608. {
  4609. "type": "string",
  4610. "description": "owner of the repo",
  4611. "name": "owner",
  4612. "in": "path",
  4613. "required": true
  4614. },
  4615. {
  4616. "type": "string",
  4617. "description": "name of the repo",
  4618. "name": "repo",
  4619. "in": "path",
  4620. "required": true
  4621. }
  4622. ],
  4623. "responses": {
  4624. "200": {
  4625. "$ref": "#/responses/LabelList"
  4626. }
  4627. }
  4628. },
  4629. "post": {
  4630. "consumes": [
  4631. "application/json"
  4632. ],
  4633. "produces": [
  4634. "application/json"
  4635. ],
  4636. "tags": [
  4637. "issue"
  4638. ],
  4639. "summary": "Create a label",
  4640. "operationId": "issueCreateLabel",
  4641. "parameters": [
  4642. {
  4643. "type": "string",
  4644. "description": "owner of the repo",
  4645. "name": "owner",
  4646. "in": "path",
  4647. "required": true
  4648. },
  4649. {
  4650. "type": "string",
  4651. "description": "name of the repo",
  4652. "name": "repo",
  4653. "in": "path",
  4654. "required": true
  4655. },
  4656. {
  4657. "name": "body",
  4658. "in": "body",
  4659. "schema": {
  4660. "$ref": "#/definitions/CreateLabelOption"
  4661. }
  4662. }
  4663. ],
  4664. "responses": {
  4665. "201": {
  4666. "$ref": "#/responses/Label"
  4667. }
  4668. }
  4669. }
  4670. },
  4671. "/repos/{owner}/{repo}/labels/{id}": {
  4672. "get": {
  4673. "produces": [
  4674. "application/json"
  4675. ],
  4676. "tags": [
  4677. "issue"
  4678. ],
  4679. "summary": "Get a single label",
  4680. "operationId": "issueGetLabel",
  4681. "parameters": [
  4682. {
  4683. "type": "string",
  4684. "description": "owner of the repo",
  4685. "name": "owner",
  4686. "in": "path",
  4687. "required": true
  4688. },
  4689. {
  4690. "type": "string",
  4691. "description": "name of the repo",
  4692. "name": "repo",
  4693. "in": "path",
  4694. "required": true
  4695. },
  4696. {
  4697. "type": "integer",
  4698. "format": "int64",
  4699. "description": "id of the label to get",
  4700. "name": "id",
  4701. "in": "path",
  4702. "required": true
  4703. }
  4704. ],
  4705. "responses": {
  4706. "200": {
  4707. "$ref": "#/responses/Label"
  4708. }
  4709. }
  4710. },
  4711. "delete": {
  4712. "tags": [
  4713. "issue"
  4714. ],
  4715. "summary": "Delete a label",
  4716. "operationId": "issueDeleteLabel",
  4717. "parameters": [
  4718. {
  4719. "type": "string",
  4720. "description": "owner of the repo",
  4721. "name": "owner",
  4722. "in": "path",
  4723. "required": true
  4724. },
  4725. {
  4726. "type": "string",
  4727. "description": "name of the repo",
  4728. "name": "repo",
  4729. "in": "path",
  4730. "required": true
  4731. },
  4732. {
  4733. "type": "integer",
  4734. "format": "int64",
  4735. "description": "id of the label to delete",
  4736. "name": "id",
  4737. "in": "path",
  4738. "required": true
  4739. }
  4740. ],
  4741. "responses": {
  4742. "204": {
  4743. "$ref": "#/responses/empty"
  4744. }
  4745. }
  4746. },
  4747. "patch": {
  4748. "consumes": [
  4749. "application/json"
  4750. ],
  4751. "produces": [
  4752. "application/json"
  4753. ],
  4754. "tags": [
  4755. "issue"
  4756. ],
  4757. "summary": "Update a label",
  4758. "operationId": "issueEditLabel",
  4759. "parameters": [
  4760. {
  4761. "type": "string",
  4762. "description": "owner of the repo",
  4763. "name": "owner",
  4764. "in": "path",
  4765. "required": true
  4766. },
  4767. {
  4768. "type": "string",
  4769. "description": "name of the repo",
  4770. "name": "repo",
  4771. "in": "path",
  4772. "required": true
  4773. },
  4774. {
  4775. "type": "integer",
  4776. "format": "int64",
  4777. "description": "id of the label to edit",
  4778. "name": "id",
  4779. "in": "path",
  4780. "required": true
  4781. },
  4782. {
  4783. "name": "body",
  4784. "in": "body",
  4785. "schema": {
  4786. "$ref": "#/definitions/EditLabelOption"
  4787. }
  4788. }
  4789. ],
  4790. "responses": {
  4791. "200": {
  4792. "$ref": "#/responses/Label"
  4793. }
  4794. }
  4795. }
  4796. },
  4797. "/repos/{owner}/{repo}/milestones": {
  4798. "get": {
  4799. "produces": [
  4800. "application/json"
  4801. ],
  4802. "tags": [
  4803. "issue"
  4804. ],
  4805. "summary": "Get all of a repository's opened milestones",
  4806. "operationId": "issueGetMilestonesList",
  4807. "parameters": [
  4808. {
  4809. "type": "string",
  4810. "description": "owner of the repo",
  4811. "name": "owner",
  4812. "in": "path",
  4813. "required": true
  4814. },
  4815. {
  4816. "type": "string",
  4817. "description": "name of the repo",
  4818. "name": "repo",
  4819. "in": "path",
  4820. "required": true
  4821. },
  4822. {
  4823. "type": "string",
  4824. "description": "Milestone state, Recognised values are open, closed and all. Defaults to \"open\"",
  4825. "name": "state",
  4826. "in": "query"
  4827. }
  4828. ],
  4829. "responses": {
  4830. "200": {
  4831. "$ref": "#/responses/MilestoneList"
  4832. }
  4833. }
  4834. },
  4835. "post": {
  4836. "consumes": [
  4837. "application/json"
  4838. ],
  4839. "produces": [
  4840. "application/json"
  4841. ],
  4842. "tags": [
  4843. "issue"
  4844. ],
  4845. "summary": "Create a milestone",
  4846. "operationId": "issueCreateMilestone",
  4847. "parameters": [
  4848. {
  4849. "type": "string",
  4850. "description": "owner of the repo",
  4851. "name": "owner",
  4852. "in": "path",
  4853. "required": true
  4854. },
  4855. {
  4856. "type": "string",
  4857. "description": "name of the repo",
  4858. "name": "repo",
  4859. "in": "path",
  4860. "required": true
  4861. },
  4862. {
  4863. "name": "body",
  4864. "in": "body",
  4865. "schema": {
  4866. "$ref": "#/definitions/CreateMilestoneOption"
  4867. }
  4868. }
  4869. ],
  4870. "responses": {
  4871. "201": {
  4872. "$ref": "#/responses/Milestone"
  4873. }
  4874. }
  4875. }
  4876. },
  4877. "/repos/{owner}/{repo}/milestones/{id}": {
  4878. "get": {
  4879. "produces": [
  4880. "application/json"
  4881. ],
  4882. "tags": [
  4883. "issue"
  4884. ],
  4885. "summary": "Get a milestone",
  4886. "operationId": "issueGetMilestone",
  4887. "parameters": [
  4888. {
  4889. "type": "string",
  4890. "description": "owner of the repo",
  4891. "name": "owner",
  4892. "in": "path",
  4893. "required": true
  4894. },
  4895. {
  4896. "type": "string",
  4897. "description": "name of the repo",
  4898. "name": "repo",
  4899. "in": "path",
  4900. "required": true
  4901. },
  4902. {
  4903. "type": "integer",
  4904. "format": "int64",
  4905. "description": "id of the milestone",
  4906. "name": "id",
  4907. "in": "path",
  4908. "required": true
  4909. }
  4910. ],
  4911. "responses": {
  4912. "200": {
  4913. "$ref": "#/responses/Milestone"
  4914. }
  4915. }
  4916. },
  4917. "delete": {
  4918. "tags": [
  4919. "issue"
  4920. ],
  4921. "summary": "Delete a milestone",
  4922. "operationId": "issueDeleteMilestone",
  4923. "parameters": [
  4924. {
  4925. "type": "string",
  4926. "description": "owner of the repo",
  4927. "name": "owner",
  4928. "in": "path",
  4929. "required": true
  4930. },
  4931. {
  4932. "type": "string",
  4933. "description": "name of the repo",
  4934. "name": "repo",
  4935. "in": "path",
  4936. "required": true
  4937. },
  4938. {
  4939. "type": "integer",
  4940. "format": "int64",
  4941. "description": "id of the milestone to delete",
  4942. "name": "id",
  4943. "in": "path",
  4944. "required": true
  4945. }
  4946. ],
  4947. "responses": {
  4948. "204": {
  4949. "$ref": "#/responses/empty"
  4950. }
  4951. }
  4952. },
  4953. "patch": {
  4954. "consumes": [
  4955. "application/json"
  4956. ],
  4957. "produces": [
  4958. "application/json"
  4959. ],
  4960. "tags": [
  4961. "issue"
  4962. ],
  4963. "summary": "Update a milestone",
  4964. "operationId": "issueEditMilestone",
  4965. "parameters": [
  4966. {
  4967. "type": "string",
  4968. "description": "owner of the repo",
  4969. "name": "owner",
  4970. "in": "path",
  4971. "required": true
  4972. },
  4973. {
  4974. "type": "string",
  4975. "description": "name of the repo",
  4976. "name": "repo",
  4977. "in": "path",
  4978. "required": true
  4979. },
  4980. {
  4981. "type": "integer",
  4982. "format": "int64",
  4983. "description": "id of the milestone",
  4984. "name": "id",
  4985. "in": "path",
  4986. "required": true
  4987. },
  4988. {
  4989. "name": "body",
  4990. "in": "body",
  4991. "schema": {
  4992. "$ref": "#/definitions/EditMilestoneOption"
  4993. }
  4994. }
  4995. ],
  4996. "responses": {
  4997. "200": {
  4998. "$ref": "#/responses/Milestone"
  4999. }
  5000. }
  5001. }
  5002. },
  5003. "/repos/{owner}/{repo}/mirror-sync": {
  5004. "post": {
  5005. "produces": [
  5006. "application/json"
  5007. ],
  5008. "tags": [
  5009. "repository"
  5010. ],
  5011. "summary": "Sync a mirrored repository",
  5012. "operationId": "repoMirrorSync",
  5013. "parameters": [
  5014. {
  5015. "type": "string",
  5016. "description": "owner of the repo to sync",
  5017. "name": "owner",
  5018. "in": "path",
  5019. "required": true
  5020. },
  5021. {
  5022. "type": "string",
  5023. "description": "name of the repo to sync",
  5024. "name": "repo",
  5025. "in": "path",
  5026. "required": true
  5027. }
  5028. ],
  5029. "responses": {
  5030. "200": {
  5031. "$ref": "#/responses/empty"
  5032. },
  5033. "403": {
  5034. "$ref": "#/responses/forbidden"
  5035. }
  5036. }
  5037. }
  5038. },
  5039. "/repos/{owner}/{repo}/pulls": {
  5040. "get": {
  5041. "produces": [
  5042. "application/json"
  5043. ],
  5044. "tags": [
  5045. "repository"
  5046. ],
  5047. "summary": "List a repo's pull requests",
  5048. "operationId": "repoListPullRequests",
  5049. "parameters": [
  5050. {
  5051. "type": "string",
  5052. "description": "owner of the repo",
  5053. "name": "owner",
  5054. "in": "path",
  5055. "required": true
  5056. },
  5057. {
  5058. "type": "string",
  5059. "description": "name of the repo",
  5060. "name": "repo",
  5061. "in": "path",
  5062. "required": true
  5063. },
  5064. {
  5065. "type": "integer",
  5066. "description": "Page number",
  5067. "name": "page",
  5068. "in": "query"
  5069. },
  5070. {
  5071. "enum": [
  5072. "closed",
  5073. "open",
  5074. "all"
  5075. ],
  5076. "type": "string",
  5077. "description": "State of pull request: open or closed (optional)",
  5078. "name": "state",
  5079. "in": "query"
  5080. },
  5081. {
  5082. "enum": [
  5083. "oldest",
  5084. "recentupdate",
  5085. "leastupdate",
  5086. "mostcomment",
  5087. "leastcomment",
  5088. "priority"
  5089. ],
  5090. "type": "string",
  5091. "description": "Type of sort",
  5092. "name": "sort",
  5093. "in": "query"
  5094. },
  5095. {
  5096. "type": "integer",
  5097. "format": "int64",
  5098. "description": "ID of the milestone",
  5099. "name": "milestone",
  5100. "in": "query"
  5101. },
  5102. {
  5103. "type": "array",
  5104. "items": {
  5105. "type": "integer",
  5106. "format": "int64"
  5107. },
  5108. "collectionFormat": "multi",
  5109. "description": "Label IDs",
  5110. "name": "labels",
  5111. "in": "query"
  5112. }
  5113. ],
  5114. "responses": {
  5115. "200": {
  5116. "$ref": "#/responses/PullRequestList"
  5117. }
  5118. }
  5119. },
  5120. "post": {
  5121. "consumes": [
  5122. "application/json"
  5123. ],
  5124. "produces": [
  5125. "application/json"
  5126. ],
  5127. "tags": [
  5128. "repository"
  5129. ],
  5130. "summary": "Create a pull request",
  5131. "operationId": "repoCreatePullRequest",
  5132. "parameters": [
  5133. {
  5134. "type": "string",
  5135. "description": "owner of the repo",
  5136. "name": "owner",
  5137. "in": "path",
  5138. "required": true
  5139. },
  5140. {
  5141. "type": "string",
  5142. "description": "name of the repo",
  5143. "name": "repo",
  5144. "in": "path",
  5145. "required": true
  5146. },
  5147. {
  5148. "name": "body",
  5149. "in": "body",
  5150. "schema": {
  5151. "$ref": "#/definitions/CreatePullRequestOption"
  5152. }
  5153. }
  5154. ],
  5155. "responses": {
  5156. "201": {
  5157. "$ref": "#/responses/PullRequest"
  5158. },
  5159. "409": {
  5160. "$ref": "#/responses/error"
  5161. },
  5162. "422": {
  5163. "$ref": "#/responses/validationError"
  5164. }
  5165. }
  5166. }
  5167. },
  5168. "/repos/{owner}/{repo}/pulls/{index}": {
  5169. "get": {
  5170. "produces": [
  5171. "application/json"
  5172. ],
  5173. "tags": [
  5174. "repository"
  5175. ],
  5176. "summary": "Get a pull request",
  5177. "operationId": "repoGetPullRequest",
  5178. "parameters": [
  5179. {
  5180. "type": "string",
  5181. "description": "owner of the repo",
  5182. "name": "owner",
  5183. "in": "path",
  5184. "required": true
  5185. },
  5186. {
  5187. "type": "string",
  5188. "description": "name of the repo",
  5189. "name": "repo",
  5190. "in": "path",
  5191. "required": true
  5192. },
  5193. {
  5194. "type": "integer",
  5195. "format": "int64",
  5196. "description": "index of the pull request to get",
  5197. "name": "index",
  5198. "in": "path",
  5199. "required": true
  5200. }
  5201. ],
  5202. "responses": {
  5203. "200": {
  5204. "$ref": "#/responses/PullRequest"
  5205. }
  5206. }
  5207. },
  5208. "patch": {
  5209. "consumes": [
  5210. "application/json"
  5211. ],
  5212. "produces": [
  5213. "application/json"
  5214. ],
  5215. "tags": [
  5216. "repository"
  5217. ],
  5218. "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.",
  5219. "operationId": "repoEditPullRequest",
  5220. "parameters": [
  5221. {
  5222. "type": "string",
  5223. "description": "owner of the repo",
  5224. "name": "owner",
  5225. "in": "path",
  5226. "required": true
  5227. },
  5228. {
  5229. "type": "string",
  5230. "description": "name of the repo",
  5231. "name": "repo",
  5232. "in": "path",
  5233. "required": true
  5234. },
  5235. {
  5236. "type": "integer",
  5237. "format": "int64",
  5238. "description": "index of the pull request to edit",
  5239. "name": "index",
  5240. "in": "path",
  5241. "required": true
  5242. },
  5243. {
  5244. "name": "body",
  5245. "in": "body",
  5246. "schema": {
  5247. "$ref": "#/definitions/EditPullRequestOption"
  5248. }
  5249. }
  5250. ],
  5251. "responses": {
  5252. "201": {
  5253. "$ref": "#/responses/PullRequest"
  5254. },
  5255. "403": {
  5256. "$ref": "#/responses/forbidden"
  5257. },
  5258. "412": {
  5259. "$ref": "#/responses/error"
  5260. },
  5261. "422": {
  5262. "$ref": "#/responses/validationError"
  5263. }
  5264. }
  5265. }
  5266. },
  5267. "/repos/{owner}/{repo}/pulls/{index}/merge": {
  5268. "get": {
  5269. "produces": [
  5270. "application/json"
  5271. ],
  5272. "tags": [
  5273. "repository"
  5274. ],
  5275. "summary": "Check if a pull request has been merged",
  5276. "operationId": "repoPullRequestIsMerged",
  5277. "parameters": [
  5278. {
  5279. "type": "string",
  5280. "description": "owner of the repo",
  5281. "name": "owner",
  5282. "in": "path",
  5283. "required": true
  5284. },
  5285. {
  5286. "type": "string",
  5287. "description": "name of the repo",
  5288. "name": "repo",
  5289. "in": "path",
  5290. "required": true
  5291. },
  5292. {
  5293. "type": "integer",
  5294. "format": "int64",
  5295. "description": "index of the pull request",
  5296. "name": "index",
  5297. "in": "path",
  5298. "required": true
  5299. }
  5300. ],
  5301. "responses": {
  5302. "204": {
  5303. "description": "pull request has been merged"
  5304. },
  5305. "404": {
  5306. "description": "pull request has not been merged"
  5307. }
  5308. }
  5309. },
  5310. "post": {
  5311. "produces": [
  5312. "application/json"
  5313. ],
  5314. "tags": [
  5315. "repository"
  5316. ],
  5317. "summary": "Merge a pull request",
  5318. "operationId": "repoMergePullRequest",
  5319. "parameters": [
  5320. {
  5321. "type": "string",
  5322. "description": "owner of the repo",
  5323. "name": "owner",
  5324. "in": "path",
  5325. "required": true
  5326. },
  5327. {
  5328. "type": "string",
  5329. "description": "name of the repo",
  5330. "name": "repo",
  5331. "in": "path",
  5332. "required": true
  5333. },
  5334. {
  5335. "type": "integer",
  5336. "format": "int64",
  5337. "description": "index of the pull request to merge",
  5338. "name": "index",
  5339. "in": "path",
  5340. "required": true
  5341. },
  5342. {
  5343. "name": "body",
  5344. "in": "body",
  5345. "schema": {
  5346. "$ref": "#/definitions/MergePullRequestOption"
  5347. }
  5348. }
  5349. ],
  5350. "responses": {
  5351. "200": {
  5352. "$ref": "#/responses/empty"
  5353. },
  5354. "405": {
  5355. "$ref": "#/responses/empty"
  5356. },
  5357. "409": {
  5358. "$ref": "#/responses/error"
  5359. }
  5360. }
  5361. }
  5362. },
  5363. "/repos/{owner}/{repo}/raw/{filepath}": {
  5364. "get": {
  5365. "produces": [
  5366. "application/json"
  5367. ],
  5368. "tags": [
  5369. "repository"
  5370. ],
  5371. "summary": "Get a file from a repository",
  5372. "operationId": "repoGetRawFile",
  5373. "parameters": [
  5374. {
  5375. "type": "string",
  5376. "description": "owner of the repo",
  5377. "name": "owner",
  5378. "in": "path",
  5379. "required": true
  5380. },
  5381. {
  5382. "type": "string",
  5383. "description": "name of the repo",
  5384. "name": "repo",
  5385. "in": "path",
  5386. "required": true
  5387. },
  5388. {
  5389. "type": "string",
  5390. "description": "filepath of the file to get",
  5391. "name": "filepath",
  5392. "in": "path",
  5393. "required": true
  5394. }
  5395. ],
  5396. "responses": {
  5397. "200": {
  5398. "description": "success"
  5399. },
  5400. "404": {
  5401. "$ref": "#/responses/notFound"
  5402. }
  5403. }
  5404. }
  5405. },
  5406. "/repos/{owner}/{repo}/releases": {
  5407. "get": {
  5408. "produces": [
  5409. "application/json"
  5410. ],
  5411. "tags": [
  5412. "repository"
  5413. ],
  5414. "summary": "List a repo's releases",
  5415. "operationId": "repoListReleases",
  5416. "parameters": [
  5417. {
  5418. "type": "string",
  5419. "description": "owner of the repo",
  5420. "name": "owner",
  5421. "in": "path",
  5422. "required": true
  5423. },
  5424. {
  5425. "type": "string",
  5426. "description": "name of the repo",
  5427. "name": "repo",
  5428. "in": "path",
  5429. "required": true
  5430. },
  5431. {
  5432. "type": "integer",
  5433. "description": "page wants to load",
  5434. "name": "page",
  5435. "in": "query"
  5436. },
  5437. {
  5438. "type": "integer",
  5439. "description": "items count every page wants to load",
  5440. "name": "per_page",
  5441. "in": "query"
  5442. }
  5443. ],
  5444. "responses": {
  5445. "200": {
  5446. "$ref": "#/responses/ReleaseList"
  5447. }
  5448. }
  5449. },
  5450. "post": {
  5451. "consumes": [
  5452. "application/json"
  5453. ],
  5454. "produces": [
  5455. "application/json"
  5456. ],
  5457. "tags": [
  5458. "repository"
  5459. ],
  5460. "summary": "Create a release",
  5461. "operationId": "repoCreateRelease",
  5462. "parameters": [
  5463. {
  5464. "type": "string",
  5465. "description": "owner of the repo",
  5466. "name": "owner",
  5467. "in": "path",
  5468. "required": true
  5469. },
  5470. {
  5471. "type": "string",
  5472. "description": "name of the repo",
  5473. "name": "repo",
  5474. "in": "path",
  5475. "required": true
  5476. },
  5477. {
  5478. "name": "body",
  5479. "in": "body",
  5480. "schema": {
  5481. "$ref": "#/definitions/CreateReleaseOption"
  5482. }
  5483. }
  5484. ],
  5485. "responses": {
  5486. "201": {
  5487. "$ref": "#/responses/Release"
  5488. },
  5489. "409": {
  5490. "$ref": "#/responses/error"
  5491. }
  5492. }
  5493. }
  5494. },
  5495. "/repos/{owner}/{repo}/releases/{id}": {
  5496. "get": {
  5497. "produces": [
  5498. "application/json"
  5499. ],
  5500. "tags": [
  5501. "repository"
  5502. ],
  5503. "summary": "Get a release",
  5504. "operationId": "repoGetRelease",
  5505. "parameters": [
  5506. {
  5507. "type": "string",
  5508. "description": "owner of the repo",
  5509. "name": "owner",
  5510. "in": "path",
  5511. "required": true
  5512. },
  5513. {
  5514. "type": "string",
  5515. "description": "name of the repo",
  5516. "name": "repo",
  5517. "in": "path",
  5518. "required": true
  5519. },
  5520. {
  5521. "type": "integer",
  5522. "format": "int64",
  5523. "description": "id of the release to get",
  5524. "name": "id",
  5525. "in": "path",
  5526. "required": true
  5527. }
  5528. ],
  5529. "responses": {
  5530. "200": {
  5531. "$ref": "#/responses/Release"
  5532. }
  5533. }
  5534. },
  5535. "delete": {
  5536. "tags": [
  5537. "repository"
  5538. ],
  5539. "summary": "Delete a release",
  5540. "operationId": "repoDeleteRelease",
  5541. "parameters": [
  5542. {
  5543. "type": "string",
  5544. "description": "owner of the repo",
  5545. "name": "owner",
  5546. "in": "path",
  5547. "required": true
  5548. },
  5549. {
  5550. "type": "string",
  5551. "description": "name of the repo",
  5552. "name": "repo",
  5553. "in": "path",
  5554. "required": true
  5555. },
  5556. {
  5557. "type": "integer",
  5558. "format": "int64",
  5559. "description": "id of the release to delete",
  5560. "name": "id",
  5561. "in": "path",
  5562. "required": true
  5563. }
  5564. ],
  5565. "responses": {
  5566. "204": {
  5567. "$ref": "#/responses/empty"
  5568. }
  5569. }
  5570. },
  5571. "patch": {
  5572. "consumes": [
  5573. "application/json"
  5574. ],
  5575. "produces": [
  5576. "application/json"
  5577. ],
  5578. "tags": [
  5579. "repository"
  5580. ],
  5581. "summary": "Update a release",
  5582. "operationId": "repoEditRelease",
  5583. "parameters": [
  5584. {
  5585. "type": "string",
  5586. "description": "owner of the repo",
  5587. "name": "owner",
  5588. "in": "path",
  5589. "required": true
  5590. },
  5591. {
  5592. "type": "string",
  5593. "description": "name of the repo",
  5594. "name": "repo",
  5595. "in": "path",
  5596. "required": true
  5597. },
  5598. {
  5599. "type": "integer",
  5600. "format": "int64",
  5601. "description": "id of the release to edit",
  5602. "name": "id",
  5603. "in": "path",
  5604. "required": true
  5605. },
  5606. {
  5607. "name": "body",
  5608. "in": "body",
  5609. "schema": {
  5610. "$ref": "#/definitions/EditReleaseOption"
  5611. }
  5612. }
  5613. ],
  5614. "responses": {
  5615. "200": {
  5616. "$ref": "#/responses/Release"
  5617. }
  5618. }
  5619. }
  5620. },
  5621. "/repos/{owner}/{repo}/releases/{id}/assets": {
  5622. "get": {
  5623. "produces": [
  5624. "application/json"
  5625. ],
  5626. "tags": [
  5627. "repository"
  5628. ],
  5629. "summary": "List release's attachments",
  5630. "operationId": "repoListReleaseAttachments",
  5631. "parameters": [
  5632. {
  5633. "type": "string",
  5634. "description": "owner of the repo",
  5635. "name": "owner",
  5636. "in": "path",
  5637. "required": true
  5638. },
  5639. {
  5640. "type": "string",
  5641. "description": "name of the repo",
  5642. "name": "repo",
  5643. "in": "path",
  5644. "required": true
  5645. },
  5646. {
  5647. "type": "integer",
  5648. "format": "int64",
  5649. "description": "id of the release",
  5650. "name": "id",
  5651. "in": "path",
  5652. "required": true
  5653. }
  5654. ],
  5655. "responses": {
  5656. "200": {
  5657. "$ref": "#/responses/AttachmentList"
  5658. }
  5659. }
  5660. },
  5661. "post": {
  5662. "consumes": [
  5663. "multipart/form-data"
  5664. ],
  5665. "produces": [
  5666. "application/json"
  5667. ],
  5668. "tags": [
  5669. "repository"
  5670. ],
  5671. "summary": "Create a release attachment",
  5672. "operationId": "repoCreateReleaseAttachment",
  5673. "parameters": [
  5674. {
  5675. "type": "string",
  5676. "description": "owner of the repo",
  5677. "name": "owner",
  5678. "in": "path",
  5679. "required": true
  5680. },
  5681. {
  5682. "type": "string",
  5683. "description": "name of the repo",
  5684. "name": "repo",
  5685. "in": "path",
  5686. "required": true
  5687. },
  5688. {
  5689. "type": "integer",
  5690. "format": "int64",
  5691. "description": "id of the release",
  5692. "name": "id",
  5693. "in": "path",
  5694. "required": true
  5695. },
  5696. {
  5697. "type": "string",
  5698. "description": "name of the attachment",
  5699. "name": "name",
  5700. "in": "query"
  5701. },
  5702. {
  5703. "type": "file",
  5704. "description": "attachment to upload",
  5705. "name": "attachment",
  5706. "in": "formData",
  5707. "required": true
  5708. }
  5709. ],
  5710. "responses": {
  5711. "201": {
  5712. "$ref": "#/responses/Attachment"
  5713. },
  5714. "400": {
  5715. "$ref": "#/responses/error"
  5716. }
  5717. }
  5718. }
  5719. },
  5720. "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": {
  5721. "get": {
  5722. "produces": [
  5723. "application/json"
  5724. ],
  5725. "tags": [
  5726. "repository"
  5727. ],
  5728. "summary": "Get a release attachment",
  5729. "operationId": "repoGetReleaseAttachment",
  5730. "parameters": [
  5731. {
  5732. "type": "string",
  5733. "description": "owner of the repo",
  5734. "name": "owner",
  5735. "in": "path",
  5736. "required": true
  5737. },
  5738. {
  5739. "type": "string",
  5740. "description": "name of the repo",
  5741. "name": "repo",
  5742. "in": "path",
  5743. "required": true
  5744. },
  5745. {
  5746. "type": "integer",
  5747. "format": "int64",
  5748. "description": "id of the release",
  5749. "name": "id",
  5750. "in": "path",
  5751. "required": true
  5752. },
  5753. {
  5754. "type": "integer",
  5755. "format": "int64",
  5756. "description": "id of the attachment to get",
  5757. "name": "attachment_id",
  5758. "in": "path",
  5759. "required": true
  5760. }
  5761. ],
  5762. "responses": {
  5763. "200": {
  5764. "$ref": "#/responses/Attachment"
  5765. }
  5766. }
  5767. },
  5768. "delete": {
  5769. "produces": [
  5770. "application/json"
  5771. ],
  5772. "tags": [
  5773. "repository"
  5774. ],
  5775. "summary": "Delete a release attachment",
  5776. "operationId": "repoDeleteReleaseAttachment",
  5777. "parameters": [
  5778. {
  5779. "type": "string",
  5780. "description": "owner of the repo",
  5781. "name": "owner",
  5782. "in": "path",
  5783. "required": true
  5784. },
  5785. {
  5786. "type": "string",
  5787. "description": "name of the repo",
  5788. "name": "repo",
  5789. "in": "path",
  5790. "required": true
  5791. },
  5792. {
  5793. "type": "integer",
  5794. "format": "int64",
  5795. "description": "id of the release",
  5796. "name": "id",
  5797. "in": "path",
  5798. "required": true
  5799. },
  5800. {
  5801. "type": "integer",
  5802. "format": "int64",
  5803. "description": "id of the attachment to delete",
  5804. "name": "attachment_id",
  5805. "in": "path",
  5806. "required": true
  5807. }
  5808. ],
  5809. "responses": {
  5810. "204": {
  5811. "$ref": "#/responses/empty"
  5812. }
  5813. }
  5814. },
  5815. "patch": {
  5816. "consumes": [
  5817. "application/json"
  5818. ],
  5819. "produces": [
  5820. "application/json"
  5821. ],
  5822. "tags": [
  5823. "repository"
  5824. ],
  5825. "summary": "Edit a release attachment",
  5826. "operationId": "repoEditReleaseAttachment",
  5827. "parameters": [
  5828. {
  5829. "type": "string",
  5830. "description": "owner of the repo",
  5831. "name": "owner",
  5832. "in": "path",
  5833. "required": true
  5834. },
  5835. {
  5836. "type": "string",
  5837. "description": "name of the repo",
  5838. "name": "repo",
  5839. "in": "path",
  5840. "required": true
  5841. },
  5842. {
  5843. "type": "integer",
  5844. "format": "int64",
  5845. "description": "id of the release",
  5846. "name": "id",
  5847. "in": "path",
  5848. "required": true
  5849. },
  5850. {
  5851. "type": "integer",
  5852. "format": "int64",
  5853. "description": "id of the attachment to edit",
  5854. "name": "attachment_id",
  5855. "in": "path",
  5856. "required": true
  5857. },
  5858. {
  5859. "name": "body",
  5860. "in": "body",
  5861. "schema": {
  5862. "$ref": "#/definitions/EditAttachmentOptions"
  5863. }
  5864. }
  5865. ],
  5866. "responses": {
  5867. "201": {
  5868. "$ref": "#/responses/Attachment"
  5869. }
  5870. }
  5871. }
  5872. },
  5873. "/repos/{owner}/{repo}/signing-key.gpg": {
  5874. "get": {
  5875. "produces": [
  5876. "text/plain"
  5877. ],
  5878. "tags": [
  5879. "repository"
  5880. ],
  5881. "summary": "Get signing-key.gpg for given repository",
  5882. "operationId": "repoSigningKey",
  5883. "parameters": [
  5884. {
  5885. "type": "string",
  5886. "description": "owner of the repo",
  5887. "name": "owner",
  5888. "in": "path",
  5889. "required": true
  5890. },
  5891. {
  5892. "type": "string",
  5893. "description": "name of the repo",
  5894. "name": "repo",
  5895. "in": "path",
  5896. "required": true
  5897. }
  5898. ],
  5899. "responses": {
  5900. "200": {
  5901. "description": "GPG armored public key",
  5902. "schema": {
  5903. "type": "string"
  5904. }
  5905. }
  5906. }
  5907. }
  5908. },
  5909. "/repos/{owner}/{repo}/stargazers": {
  5910. "get": {
  5911. "produces": [
  5912. "application/json"
  5913. ],
  5914. "tags": [
  5915. "repository"
  5916. ],
  5917. "summary": "List a repo's stargazers",
  5918. "operationId": "repoListStargazers",
  5919. "parameters": [
  5920. {
  5921. "type": "string",
  5922. "description": "owner of the repo",
  5923. "name": "owner",
  5924. "in": "path",
  5925. "required": true
  5926. },
  5927. {
  5928. "type": "string",
  5929. "description": "name of the repo",
  5930. "name": "repo",
  5931. "in": "path",
  5932. "required": true
  5933. }
  5934. ],
  5935. "responses": {
  5936. "200": {
  5937. "$ref": "#/responses/UserList"
  5938. }
  5939. }
  5940. }
  5941. },
  5942. "/repos/{owner}/{repo}/statuses/{sha}": {
  5943. "get": {
  5944. "produces": [
  5945. "application/json"
  5946. ],
  5947. "tags": [
  5948. "repository"
  5949. ],
  5950. "summary": "Get a commit's statuses",
  5951. "operationId": "repoListStatuses",
  5952. "parameters": [
  5953. {
  5954. "type": "string",
  5955. "description": "owner of the repo",
  5956. "name": "owner",
  5957. "in": "path",
  5958. "required": true
  5959. },
  5960. {
  5961. "type": "string",
  5962. "description": "name of the repo",
  5963. "name": "repo",
  5964. "in": "path",
  5965. "required": true
  5966. },
  5967. {
  5968. "type": "string",
  5969. "description": "sha of the commit",
  5970. "name": "sha",
  5971. "in": "path",
  5972. "required": true
  5973. },
  5974. {
  5975. "type": "integer",
  5976. "description": "page number of results",
  5977. "name": "page",
  5978. "in": "query"
  5979. },
  5980. {
  5981. "enum": [
  5982. "oldest",
  5983. "recentupdate",
  5984. "leastupdate",
  5985. "leastindex",
  5986. "highestindex"
  5987. ],
  5988. "type": "string",
  5989. "description": "type of sort",
  5990. "name": "sort",
  5991. "in": "query"
  5992. },
  5993. {
  5994. "enum": [
  5995. "pending",
  5996. "success",
  5997. "error",
  5998. "failure",
  5999. "warning"
  6000. ],
  6001. "type": "string",
  6002. "description": "type of state",
  6003. "name": "state",
  6004. "in": "query"
  6005. }
  6006. ],
  6007. "responses": {
  6008. "200": {
  6009. "$ref": "#/responses/StatusList"
  6010. },
  6011. "400": {
  6012. "$ref": "#/responses/error"
  6013. }
  6014. }
  6015. },
  6016. "post": {
  6017. "produces": [
  6018. "application/json"
  6019. ],
  6020. "tags": [
  6021. "repository"
  6022. ],
  6023. "summary": "Create a commit status",
  6024. "operationId": "repoCreateStatus",
  6025. "parameters": [
  6026. {
  6027. "type": "string",
  6028. "description": "owner of the repo",
  6029. "name": "owner",
  6030. "in": "path",
  6031. "required": true
  6032. },
  6033. {
  6034. "type": "string",
  6035. "description": "name of the repo",
  6036. "name": "repo",
  6037. "in": "path",
  6038. "required": true
  6039. },
  6040. {
  6041. "type": "string",
  6042. "description": "sha of the commit",
  6043. "name": "sha",
  6044. "in": "path",
  6045. "required": true
  6046. },
  6047. {
  6048. "name": "body",
  6049. "in": "body",
  6050. "schema": {
  6051. "$ref": "#/definitions/CreateStatusOption"
  6052. }
  6053. }
  6054. ],
  6055. "responses": {
  6056. "201": {
  6057. "$ref": "#/responses/Status"
  6058. },
  6059. "400": {
  6060. "$ref": "#/responses/error"
  6061. }
  6062. }
  6063. }
  6064. },
  6065. "/repos/{owner}/{repo}/subscribers": {
  6066. "get": {
  6067. "produces": [
  6068. "application/json"
  6069. ],
  6070. "tags": [
  6071. "repository"
  6072. ],
  6073. "summary": "List a repo's watchers",
  6074. "operationId": "repoListSubscribers",
  6075. "parameters": [
  6076. {
  6077. "type": "string",
  6078. "description": "owner of the repo",
  6079. "name": "owner",
  6080. "in": "path",
  6081. "required": true
  6082. },
  6083. {
  6084. "type": "string",
  6085. "description": "name of the repo",
  6086. "name": "repo",
  6087. "in": "path",
  6088. "required": true
  6089. }
  6090. ],
  6091. "responses": {
  6092. "200": {
  6093. "$ref": "#/responses/UserList"
  6094. }
  6095. }
  6096. }
  6097. },
  6098. "/repos/{owner}/{repo}/subscription": {
  6099. "get": {
  6100. "tags": [
  6101. "repository"
  6102. ],
  6103. "summary": "Check if the current user is watching a repo",
  6104. "operationId": "userCurrentCheckSubscription",
  6105. "parameters": [
  6106. {
  6107. "type": "string",
  6108. "description": "owner of the repo",
  6109. "name": "owner",
  6110. "in": "path",
  6111. "required": true
  6112. },
  6113. {
  6114. "type": "string",
  6115. "description": "name of the repo",
  6116. "name": "repo",
  6117. "in": "path",
  6118. "required": true
  6119. }
  6120. ],
  6121. "responses": {
  6122. "200": {
  6123. "$ref": "#/responses/WatchInfo"
  6124. }
  6125. }
  6126. },
  6127. "put": {
  6128. "tags": [
  6129. "repository"
  6130. ],
  6131. "summary": "Watch a repo",
  6132. "operationId": "userCurrentPutSubscription",
  6133. "parameters": [
  6134. {
  6135. "type": "string",
  6136. "description": "owner of the repo",
  6137. "name": "owner",
  6138. "in": "path",
  6139. "required": true
  6140. },
  6141. {
  6142. "type": "string",
  6143. "description": "name of the repo",
  6144. "name": "repo",
  6145. "in": "path",
  6146. "required": true
  6147. }
  6148. ],
  6149. "responses": {
  6150. "200": {
  6151. "$ref": "#/responses/WatchInfo"
  6152. }
  6153. }
  6154. },
  6155. "delete": {
  6156. "tags": [
  6157. "repository"
  6158. ],
  6159. "summary": "Unwatch a repo",
  6160. "operationId": "userCurrentDeleteSubscription",
  6161. "parameters": [
  6162. {
  6163. "type": "string",
  6164. "description": "owner of the repo",
  6165. "name": "owner",
  6166. "in": "path",
  6167. "required": true
  6168. },
  6169. {
  6170. "type": "string",
  6171. "description": "name of the repo",
  6172. "name": "repo",
  6173. "in": "path",
  6174. "required": true
  6175. }
  6176. ],
  6177. "responses": {
  6178. "204": {
  6179. "$ref": "#/responses/empty"
  6180. }
  6181. }
  6182. }
  6183. },
  6184. "/repos/{owner}/{repo}/tags": {
  6185. "get": {
  6186. "produces": [
  6187. "application/json"
  6188. ],
  6189. "tags": [
  6190. "repository"
  6191. ],
  6192. "summary": "List a repository's tags",
  6193. "operationId": "repoListTags",
  6194. "parameters": [
  6195. {
  6196. "type": "string",
  6197. "description": "owner of the repo",
  6198. "name": "owner",
  6199. "in": "path",
  6200. "required": true
  6201. },
  6202. {
  6203. "type": "string",
  6204. "description": "name of the repo",
  6205. "name": "repo",
  6206. "in": "path",
  6207. "required": true
  6208. }
  6209. ],
  6210. "responses": {
  6211. "200": {
  6212. "$ref": "#/responses/TagList"
  6213. }
  6214. }
  6215. }
  6216. },
  6217. "/repos/{owner}/{repo}/times": {
  6218. "get": {
  6219. "produces": [
  6220. "application/json"
  6221. ],
  6222. "tags": [
  6223. "repository"
  6224. ],
  6225. "summary": "List a repo's tracked times",
  6226. "operationId": "repoTrackedTimes",
  6227. "parameters": [
  6228. {
  6229. "type": "string",
  6230. "description": "owner of the repo",
  6231. "name": "owner",
  6232. "in": "path",
  6233. "required": true
  6234. },
  6235. {
  6236. "type": "string",
  6237. "description": "name of the repo",
  6238. "name": "repo",
  6239. "in": "path",
  6240. "required": true
  6241. }
  6242. ],
  6243. "responses": {
  6244. "200": {
  6245. "$ref": "#/responses/TrackedTimeList"
  6246. },
  6247. "400": {
  6248. "$ref": "#/responses/error"
  6249. }
  6250. }
  6251. }
  6252. },
  6253. "/repos/{owner}/{repo}/times/{user}": {
  6254. "get": {
  6255. "produces": [
  6256. "application/json"
  6257. ],
  6258. "tags": [
  6259. "user"
  6260. ],
  6261. "summary": "List a user's tracked times in a repo",
  6262. "operationId": "userTrackedTimes",
  6263. "parameters": [
  6264. {
  6265. "type": "string",
  6266. "description": "owner of the repo",
  6267. "name": "owner",
  6268. "in": "path",
  6269. "required": true
  6270. },
  6271. {
  6272. "type": "string",
  6273. "description": "name of the repo",
  6274. "name": "repo",
  6275. "in": "path",
  6276. "required": true
  6277. },
  6278. {
  6279. "type": "string",
  6280. "description": "username of user",
  6281. "name": "user",
  6282. "in": "path",
  6283. "required": true
  6284. }
  6285. ],
  6286. "responses": {
  6287. "200": {
  6288. "$ref": "#/responses/TrackedTimeList"
  6289. },
  6290. "400": {
  6291. "$ref": "#/responses/error"
  6292. }
  6293. }
  6294. }
  6295. },
  6296. "/repos/{owner}/{repo}/topics": {
  6297. "get": {
  6298. "produces": [
  6299. "application/json"
  6300. ],
  6301. "tags": [
  6302. "repository"
  6303. ],
  6304. "summary": "Get list of topics that a repository has",
  6305. "operationId": "repoListTopics",
  6306. "parameters": [
  6307. {
  6308. "type": "string",
  6309. "description": "owner of the repo",
  6310. "name": "owner",
  6311. "in": "path",
  6312. "required": true
  6313. },
  6314. {
  6315. "type": "string",
  6316. "description": "name of the repo",
  6317. "name": "repo",
  6318. "in": "path",
  6319. "required": true
  6320. }
  6321. ],
  6322. "responses": {
  6323. "200": {
  6324. "$ref": "#/responses/TopicNames"
  6325. }
  6326. }
  6327. },
  6328. "put": {
  6329. "produces": [
  6330. "application/json"
  6331. ],
  6332. "tags": [
  6333. "repository"
  6334. ],
  6335. "summary": "Replace list of topics for a repository",
  6336. "operationId": "repoUpdateTopics",
  6337. "parameters": [
  6338. {
  6339. "type": "string",
  6340. "description": "owner of the repo",
  6341. "name": "owner",
  6342. "in": "path",
  6343. "required": true
  6344. },
  6345. {
  6346. "type": "string",
  6347. "description": "name of the repo",
  6348. "name": "repo",
  6349. "in": "path",
  6350. "required": true
  6351. },
  6352. {
  6353. "name": "body",
  6354. "in": "body",
  6355. "schema": {
  6356. "$ref": "#/definitions/RepoTopicOptions"
  6357. }
  6358. }
  6359. ],
  6360. "responses": {
  6361. "204": {
  6362. "$ref": "#/responses/empty"
  6363. },
  6364. "422": {
  6365. "$ref": "#/responses/invalidTopicsError"
  6366. }
  6367. }
  6368. }
  6369. },
  6370. "/repos/{owner}/{repo}/topics/{topic}": {
  6371. "put": {
  6372. "produces": [
  6373. "application/json"
  6374. ],
  6375. "tags": [
  6376. "repository"
  6377. ],
  6378. "summary": "Add a topic to a repository",
  6379. "operationId": "repoAddTopíc",
  6380. "parameters": [
  6381. {
  6382. "type": "string",
  6383. "description": "owner of the repo",
  6384. "name": "owner",
  6385. "in": "path",
  6386. "required": true
  6387. },
  6388. {
  6389. "type": "string",
  6390. "description": "name of the repo",
  6391. "name": "repo",
  6392. "in": "path",
  6393. "required": true
  6394. },
  6395. {
  6396. "type": "string",
  6397. "description": "name of the topic to add",
  6398. "name": "topic",
  6399. "in": "path",
  6400. "required": true
  6401. }
  6402. ],
  6403. "responses": {
  6404. "204": {
  6405. "$ref": "#/responses/empty"
  6406. },
  6407. "422": {
  6408. "$ref": "#/responses/invalidTopicsError"
  6409. }
  6410. }
  6411. },
  6412. "delete": {
  6413. "produces": [
  6414. "application/json"
  6415. ],
  6416. "tags": [
  6417. "repository"
  6418. ],
  6419. "summary": "Delete a topic from a repository",
  6420. "operationId": "repoDeleteTopic",
  6421. "parameters": [
  6422. {
  6423. "type": "string",
  6424. "description": "owner of the repo",
  6425. "name": "owner",
  6426. "in": "path",
  6427. "required": true
  6428. },
  6429. {
  6430. "type": "string",
  6431. "description": "name of the repo",
  6432. "name": "repo",
  6433. "in": "path",
  6434. "required": true
  6435. },
  6436. {
  6437. "type": "string",
  6438. "description": "name of the topic to delete",
  6439. "name": "topic",
  6440. "in": "path",
  6441. "required": true
  6442. }
  6443. ],
  6444. "responses": {
  6445. "204": {
  6446. "$ref": "#/responses/empty"
  6447. },
  6448. "422": {
  6449. "$ref": "#/responses/invalidTopicsError"
  6450. }
  6451. }
  6452. }
  6453. },
  6454. "/repositories/{id}": {
  6455. "get": {
  6456. "produces": [
  6457. "application/json"
  6458. ],
  6459. "tags": [
  6460. "repository"
  6461. ],
  6462. "summary": "Get a repository by id",
  6463. "operationId": "repoGetByID",
  6464. "parameters": [
  6465. {
  6466. "type": "integer",
  6467. "format": "int64",
  6468. "description": "id of the repo to get",
  6469. "name": "id",
  6470. "in": "path",
  6471. "required": true
  6472. }
  6473. ],
  6474. "responses": {
  6475. "200": {
  6476. "$ref": "#/responses/Repository"
  6477. }
  6478. }
  6479. }
  6480. },
  6481. "/signing-key.gpg": {
  6482. "get": {
  6483. "produces": [
  6484. "text/plain"
  6485. ],
  6486. "tags": [
  6487. "miscellaneous"
  6488. ],
  6489. "summary": "Get default signing-key.gpg",
  6490. "operationId": "getSigningKey",
  6491. "responses": {
  6492. "200": {
  6493. "description": "GPG armored public key",
  6494. "schema": {
  6495. "type": "string"
  6496. }
  6497. }
  6498. }
  6499. }
  6500. },
  6501. "/teams/{id}": {
  6502. "get": {
  6503. "produces": [
  6504. "application/json"
  6505. ],
  6506. "tags": [
  6507. "organization"
  6508. ],
  6509. "summary": "Get a team",
  6510. "operationId": "orgGetTeam",
  6511. "parameters": [
  6512. {
  6513. "type": "integer",
  6514. "format": "int64",
  6515. "description": "id of the team to get",
  6516. "name": "id",
  6517. "in": "path",
  6518. "required": true
  6519. }
  6520. ],
  6521. "responses": {
  6522. "200": {
  6523. "$ref": "#/responses/Team"
  6524. }
  6525. }
  6526. },
  6527. "delete": {
  6528. "tags": [
  6529. "organization"
  6530. ],
  6531. "summary": "Delete a team",
  6532. "operationId": "orgDeleteTeam",
  6533. "parameters": [
  6534. {
  6535. "type": "integer",
  6536. "format": "int64",
  6537. "description": "id of the team to delete",
  6538. "name": "id",
  6539. "in": "path",
  6540. "required": true
  6541. }
  6542. ],
  6543. "responses": {
  6544. "204": {
  6545. "description": "team deleted"
  6546. }
  6547. }
  6548. },
  6549. "patch": {
  6550. "consumes": [
  6551. "application/json"
  6552. ],
  6553. "produces": [
  6554. "application/json"
  6555. ],
  6556. "tags": [
  6557. "organization"
  6558. ],
  6559. "summary": "Edit a team",
  6560. "operationId": "orgEditTeam",
  6561. "parameters": [
  6562. {
  6563. "type": "integer",
  6564. "description": "id of the team to edit",
  6565. "name": "id",
  6566. "in": "path",
  6567. "required": true
  6568. },
  6569. {
  6570. "name": "body",
  6571. "in": "body",
  6572. "schema": {
  6573. "$ref": "#/definitions/EditTeamOption"
  6574. }
  6575. }
  6576. ],
  6577. "responses": {
  6578. "200": {
  6579. "$ref": "#/responses/Team"
  6580. }
  6581. }
  6582. }
  6583. },
  6584. "/teams/{id}/members": {
  6585. "get": {
  6586. "produces": [
  6587. "application/json"
  6588. ],
  6589. "tags": [
  6590. "organization"
  6591. ],
  6592. "summary": "List a team's members",
  6593. "operationId": "orgListTeamMembers",
  6594. "parameters": [
  6595. {
  6596. "type": "integer",
  6597. "format": "int64",
  6598. "description": "id of the team",
  6599. "name": "id",
  6600. "in": "path",
  6601. "required": true
  6602. }
  6603. ],
  6604. "responses": {
  6605. "200": {
  6606. "$ref": "#/responses/UserList"
  6607. }
  6608. }
  6609. }
  6610. },
  6611. "/teams/{id}/members/{username}": {
  6612. "get": {
  6613. "produces": [
  6614. "application/json"
  6615. ],
  6616. "tags": [
  6617. "organization"
  6618. ],
  6619. "summary": "List a particular member of team",
  6620. "operationId": "orgListTeamMember",
  6621. "parameters": [
  6622. {
  6623. "type": "integer",
  6624. "format": "int64",
  6625. "description": "id of the team",
  6626. "name": "id",
  6627. "in": "path",
  6628. "required": true
  6629. },
  6630. {
  6631. "type": "string",
  6632. "description": "username of the member to list",
  6633. "name": "username",
  6634. "in": "path",
  6635. "required": true
  6636. }
  6637. ],
  6638. "responses": {
  6639. "200": {
  6640. "$ref": "#/responses/User"
  6641. },
  6642. "404": {
  6643. "$ref": "#/responses/notFound"
  6644. }
  6645. }
  6646. },
  6647. "put": {
  6648. "produces": [
  6649. "application/json"
  6650. ],
  6651. "tags": [
  6652. "organization"
  6653. ],
  6654. "summary": "Add a team member",
  6655. "operationId": "orgAddTeamMember",
  6656. "parameters": [
  6657. {
  6658. "type": "integer",
  6659. "format": "int64",
  6660. "description": "id of the team",
  6661. "name": "id",
  6662. "in": "path",
  6663. "required": true
  6664. },
  6665. {
  6666. "type": "string",
  6667. "description": "username of the user to add",
  6668. "name": "username",
  6669. "in": "path",
  6670. "required": true
  6671. }
  6672. ],
  6673. "responses": {
  6674. "204": {
  6675. "$ref": "#/responses/empty"
  6676. },
  6677. "404": {
  6678. "$ref": "#/responses/notFound"
  6679. }
  6680. }
  6681. },
  6682. "delete": {
  6683. "produces": [
  6684. "application/json"
  6685. ],
  6686. "tags": [
  6687. "organization"
  6688. ],
  6689. "summary": "Remove a team member",
  6690. "operationId": "orgRemoveTeamMember",
  6691. "parameters": [
  6692. {
  6693. "type": "integer",
  6694. "format": "int64",
  6695. "description": "id of the team",
  6696. "name": "id",
  6697. "in": "path",
  6698. "required": true
  6699. },
  6700. {
  6701. "type": "string",
  6702. "description": "username of the user to remove",
  6703. "name": "username",
  6704. "in": "path",
  6705. "required": true
  6706. }
  6707. ],
  6708. "responses": {
  6709. "204": {
  6710. "$ref": "#/responses/empty"
  6711. },
  6712. "404": {
  6713. "$ref": "#/responses/notFound"
  6714. }
  6715. }
  6716. }
  6717. },
  6718. "/teams/{id}/repos": {
  6719. "get": {
  6720. "produces": [
  6721. "application/json"
  6722. ],
  6723. "tags": [
  6724. "organization"
  6725. ],
  6726. "summary": "List a team's repos",
  6727. "operationId": "orgListTeamRepos",
  6728. "parameters": [
  6729. {
  6730. "type": "integer",
  6731. "format": "int64",
  6732. "description": "id of the team",
  6733. "name": "id",
  6734. "in": "path",
  6735. "required": true
  6736. }
  6737. ],
  6738. "responses": {
  6739. "200": {
  6740. "$ref": "#/responses/RepositoryList"
  6741. }
  6742. }
  6743. }
  6744. },
  6745. "/teams/{id}/repos/{org}/{repo}": {
  6746. "put": {
  6747. "produces": [
  6748. "application/json"
  6749. ],
  6750. "tags": [
  6751. "organization"
  6752. ],
  6753. "summary": "Add a repository to a team",
  6754. "operationId": "orgAddTeamRepository",
  6755. "parameters": [
  6756. {
  6757. "type": "integer",
  6758. "format": "int64",
  6759. "description": "id of the team",
  6760. "name": "id",
  6761. "in": "path",
  6762. "required": true
  6763. },
  6764. {
  6765. "type": "string",
  6766. "description": "organization that owns the repo to add",
  6767. "name": "org",
  6768. "in": "path",
  6769. "required": true
  6770. },
  6771. {
  6772. "type": "string",
  6773. "description": "name of the repo to add",
  6774. "name": "repo",
  6775. "in": "path",
  6776. "required": true
  6777. }
  6778. ],
  6779. "responses": {
  6780. "204": {
  6781. "$ref": "#/responses/empty"
  6782. },
  6783. "403": {
  6784. "$ref": "#/responses/forbidden"
  6785. }
  6786. }
  6787. },
  6788. "delete": {
  6789. "description": "This does not delete the repository, it only removes the repository from the team.",
  6790. "produces": [
  6791. "application/json"
  6792. ],
  6793. "tags": [
  6794. "organization"
  6795. ],
  6796. "summary": "Remove a repository from a team",
  6797. "operationId": "orgRemoveTeamRepository",
  6798. "parameters": [
  6799. {
  6800. "type": "integer",
  6801. "format": "int64",
  6802. "description": "id of the team",
  6803. "name": "id",
  6804. "in": "path",
  6805. "required": true
  6806. },
  6807. {
  6808. "type": "string",
  6809. "description": "organization that owns the repo to remove",
  6810. "name": "org",
  6811. "in": "path",
  6812. "required": true
  6813. },
  6814. {
  6815. "type": "string",
  6816. "description": "name of the repo to remove",
  6817. "name": "repo",
  6818. "in": "path",
  6819. "required": true
  6820. }
  6821. ],
  6822. "responses": {
  6823. "204": {
  6824. "$ref": "#/responses/empty"
  6825. },
  6826. "403": {
  6827. "$ref": "#/responses/forbidden"
  6828. }
  6829. }
  6830. }
  6831. },
  6832. "/topics/search": {
  6833. "get": {
  6834. "produces": [
  6835. "application/json"
  6836. ],
  6837. "tags": [
  6838. "repository"
  6839. ],
  6840. "summary": "search topics via keyword",
  6841. "operationId": "topicSearch",
  6842. "parameters": [
  6843. {
  6844. "type": "string",
  6845. "description": "keywords to search",
  6846. "name": "q",
  6847. "in": "query",
  6848. "required": true
  6849. }
  6850. ],
  6851. "responses": {
  6852. "200": {
  6853. "$ref": "#/responses/TopicListResponse"
  6854. },
  6855. "403": {
  6856. "$ref": "#/responses/forbidden"
  6857. }
  6858. }
  6859. }
  6860. },
  6861. "/user": {
  6862. "get": {
  6863. "produces": [
  6864. "application/json"
  6865. ],
  6866. "tags": [
  6867. "user"
  6868. ],
  6869. "summary": "Get the authenticated user",
  6870. "operationId": "userGetCurrent",
  6871. "responses": {
  6872. "200": {
  6873. "$ref": "#/responses/User"
  6874. }
  6875. }
  6876. }
  6877. },
  6878. "/user/emails": {
  6879. "get": {
  6880. "produces": [
  6881. "application/json"
  6882. ],
  6883. "tags": [
  6884. "user"
  6885. ],
  6886. "summary": "List the authenticated user's email addresses",
  6887. "operationId": "userListEmails",
  6888. "responses": {
  6889. "200": {
  6890. "$ref": "#/responses/EmailList"
  6891. }
  6892. }
  6893. },
  6894. "post": {
  6895. "produces": [
  6896. "application/json"
  6897. ],
  6898. "tags": [
  6899. "user"
  6900. ],
  6901. "summary": "Add email addresses",
  6902. "operationId": "userAddEmail",
  6903. "parameters": [
  6904. {
  6905. "name": "body",
  6906. "in": "body",
  6907. "schema": {
  6908. "$ref": "#/definitions/CreateEmailOption"
  6909. }
  6910. }
  6911. ],
  6912. "responses": {
  6913. "201": {
  6914. "$ref": "#/responses/EmailList"
  6915. },
  6916. "422": {
  6917. "$ref": "#/responses/validationError"
  6918. }
  6919. }
  6920. },
  6921. "delete": {
  6922. "produces": [
  6923. "application/json"
  6924. ],
  6925. "tags": [
  6926. "user"
  6927. ],
  6928. "summary": "Delete email addresses",
  6929. "operationId": "userDeleteEmail",
  6930. "parameters": [
  6931. {
  6932. "name": "body",
  6933. "in": "body",
  6934. "schema": {
  6935. "$ref": "#/definitions/DeleteEmailOption"
  6936. }
  6937. }
  6938. ],
  6939. "responses": {
  6940. "204": {
  6941. "$ref": "#/responses/empty"
  6942. }
  6943. }
  6944. }
  6945. },
  6946. "/user/followers": {
  6947. "get": {
  6948. "produces": [
  6949. "application/json"
  6950. ],
  6951. "tags": [
  6952. "user"
  6953. ],
  6954. "summary": "List the authenticated user's followers",
  6955. "operationId": "userCurrentListFollowers",
  6956. "responses": {
  6957. "200": {
  6958. "$ref": "#/responses/UserList"
  6959. }
  6960. }
  6961. }
  6962. },
  6963. "/user/following": {
  6964. "get": {
  6965. "produces": [
  6966. "application/json"
  6967. ],
  6968. "tags": [
  6969. "user"
  6970. ],
  6971. "summary": "List the users that the authenticated user is following",
  6972. "operationId": "userCurrentListFollowing",
  6973. "responses": {
  6974. "200": {
  6975. "$ref": "#/responses/UserList"
  6976. }
  6977. }
  6978. }
  6979. },
  6980. "/user/following/{username}": {
  6981. "get": {
  6982. "tags": [
  6983. "user"
  6984. ],
  6985. "summary": "Check whether a user is followed by the authenticated user",
  6986. "operationId": "userCurrentCheckFollowing",
  6987. "parameters": [
  6988. {
  6989. "type": "string",
  6990. "description": "username of followed user",
  6991. "name": "username",
  6992. "in": "path",
  6993. "required": true
  6994. }
  6995. ],
  6996. "responses": {
  6997. "204": {
  6998. "$ref": "#/responses/empty"
  6999. },
  7000. "404": {
  7001. "$ref": "#/responses/notFound"
  7002. }
  7003. }
  7004. },
  7005. "put": {
  7006. "tags": [
  7007. "user"
  7008. ],
  7009. "summary": "Follow a user",
  7010. "operationId": "userCurrentPutFollow",
  7011. "parameters": [
  7012. {
  7013. "type": "string",
  7014. "description": "username of user to follow",
  7015. "name": "username",
  7016. "in": "path",
  7017. "required": true
  7018. }
  7019. ],
  7020. "responses": {
  7021. "204": {
  7022. "$ref": "#/responses/empty"
  7023. }
  7024. }
  7025. },
  7026. "delete": {
  7027. "tags": [
  7028. "user"
  7029. ],
  7030. "summary": "Unfollow a user",
  7031. "operationId": "userCurrentDeleteFollow",
  7032. "parameters": [
  7033. {
  7034. "type": "string",
  7035. "description": "username of user to unfollow",
  7036. "name": "username",
  7037. "in": "path",
  7038. "required": true
  7039. }
  7040. ],
  7041. "responses": {
  7042. "204": {
  7043. "$ref": "#/responses/empty"
  7044. }
  7045. }
  7046. }
  7047. },
  7048. "/user/gpg_keys": {
  7049. "get": {
  7050. "produces": [
  7051. "application/json"
  7052. ],
  7053. "tags": [
  7054. "user"
  7055. ],
  7056. "summary": "List the authenticated user's GPG keys",
  7057. "operationId": "userCurrentListGPGKeys",
  7058. "responses": {
  7059. "200": {
  7060. "$ref": "#/responses/GPGKeyList"
  7061. }
  7062. }
  7063. },
  7064. "post": {
  7065. "consumes": [
  7066. "application/json"
  7067. ],
  7068. "produces": [
  7069. "application/json"
  7070. ],
  7071. "tags": [
  7072. "user"
  7073. ],
  7074. "summary": "Create a GPG key",
  7075. "operationId": "userCurrentPostGPGKey",
  7076. "parameters": [
  7077. {
  7078. "name": "Form",
  7079. "in": "body",
  7080. "schema": {
  7081. "$ref": "#/definitions/CreateGPGKeyOption"
  7082. }
  7083. }
  7084. ],
  7085. "responses": {
  7086. "201": {
  7087. "$ref": "#/responses/GPGKey"
  7088. },
  7089. "422": {
  7090. "$ref": "#/responses/validationError"
  7091. }
  7092. }
  7093. }
  7094. },
  7095. "/user/gpg_keys/{id}": {
  7096. "get": {
  7097. "produces": [
  7098. "application/json"
  7099. ],
  7100. "tags": [
  7101. "user"
  7102. ],
  7103. "summary": "Get a GPG key",
  7104. "operationId": "userCurrentGetGPGKey",
  7105. "parameters": [
  7106. {
  7107. "type": "integer",
  7108. "format": "int64",
  7109. "description": "id of key to get",
  7110. "name": "id",
  7111. "in": "path",
  7112. "required": true
  7113. }
  7114. ],
  7115. "responses": {
  7116. "200": {
  7117. "$ref": "#/responses/GPGKey"
  7118. },
  7119. "404": {
  7120. "$ref": "#/responses/notFound"
  7121. }
  7122. }
  7123. },
  7124. "delete": {
  7125. "produces": [
  7126. "application/json"
  7127. ],
  7128. "tags": [
  7129. "user"
  7130. ],
  7131. "summary": "Remove a GPG key",
  7132. "operationId": "userCurrentDeleteGPGKey",
  7133. "parameters": [
  7134. {
  7135. "type": "integer",
  7136. "format": "int64",
  7137. "description": "id of key to delete",
  7138. "name": "id",
  7139. "in": "path",
  7140. "required": true
  7141. }
  7142. ],
  7143. "responses": {
  7144. "204": {
  7145. "$ref": "#/responses/empty"
  7146. },
  7147. "403": {
  7148. "$ref": "#/responses/forbidden"
  7149. }
  7150. }
  7151. }
  7152. },
  7153. "/user/keys": {
  7154. "get": {
  7155. "produces": [
  7156. "application/json"
  7157. ],
  7158. "tags": [
  7159. "user"
  7160. ],
  7161. "summary": "List the authenticated user's public keys",
  7162. "operationId": "userCurrentListKeys",
  7163. "parameters": [
  7164. {
  7165. "type": "string",
  7166. "description": "fingerprint of the key",
  7167. "name": "fingerprint",
  7168. "in": "query"
  7169. }
  7170. ],
  7171. "responses": {
  7172. "200": {
  7173. "$ref": "#/responses/PublicKeyList"
  7174. }
  7175. }
  7176. },
  7177. "post": {
  7178. "consumes": [
  7179. "application/json"
  7180. ],
  7181. "produces": [
  7182. "application/json"
  7183. ],
  7184. "tags": [
  7185. "user"
  7186. ],
  7187. "summary": "Create a public key",
  7188. "operationId": "userCurrentPostKey",
  7189. "parameters": [
  7190. {
  7191. "name": "body",
  7192. "in": "body",
  7193. "schema": {
  7194. "$ref": "#/definitions/CreateKeyOption"
  7195. }
  7196. }
  7197. ],
  7198. "responses": {
  7199. "201": {
  7200. "$ref": "#/responses/PublicKey"
  7201. },
  7202. "422": {
  7203. "$ref": "#/responses/validationError"
  7204. }
  7205. }
  7206. }
  7207. },
  7208. "/user/keys/{id}": {
  7209. "get": {
  7210. "produces": [
  7211. "application/json"
  7212. ],
  7213. "tags": [
  7214. "user"
  7215. ],
  7216. "summary": "Get a public key",
  7217. "operationId": "userCurrentGetKey",
  7218. "parameters": [
  7219. {
  7220. "type": "integer",
  7221. "format": "int64",
  7222. "description": "id of key to get",
  7223. "name": "id",
  7224. "in": "path",
  7225. "required": true
  7226. }
  7227. ],
  7228. "responses": {
  7229. "200": {
  7230. "$ref": "#/responses/PublicKey"
  7231. },
  7232. "404": {
  7233. "$ref": "#/responses/notFound"
  7234. }
  7235. }
  7236. },
  7237. "delete": {
  7238. "produces": [
  7239. "application/json"
  7240. ],
  7241. "tags": [
  7242. "user"
  7243. ],
  7244. "summary": "Delete a public key",
  7245. "operationId": "userCurrentDeleteKey",
  7246. "parameters": [
  7247. {
  7248. "type": "integer",
  7249. "format": "int64",
  7250. "description": "id of key to delete",
  7251. "name": "id",
  7252. "in": "path",
  7253. "required": true
  7254. }
  7255. ],
  7256. "responses": {
  7257. "204": {
  7258. "$ref": "#/responses/empty"
  7259. },
  7260. "403": {
  7261. "$ref": "#/responses/forbidden"
  7262. },
  7263. "404": {
  7264. "$ref": "#/responses/notFound"
  7265. }
  7266. }
  7267. }
  7268. },
  7269. "/user/orgs": {
  7270. "get": {
  7271. "produces": [
  7272. "application/json"
  7273. ],
  7274. "tags": [
  7275. "organization"
  7276. ],
  7277. "summary": "List the current user's organizations",
  7278. "operationId": "orgListCurrentUserOrgs",
  7279. "responses": {
  7280. "200": {
  7281. "$ref": "#/responses/OrganizationList"
  7282. }
  7283. }
  7284. }
  7285. },
  7286. "/user/repos": {
  7287. "get": {
  7288. "produces": [
  7289. "application/json"
  7290. ],
  7291. "tags": [
  7292. "user"
  7293. ],
  7294. "summary": "List the repos that the authenticated user owns or has access to",
  7295. "operationId": "userCurrentListRepos",
  7296. "responses": {
  7297. "200": {
  7298. "$ref": "#/responses/RepositoryList"
  7299. }
  7300. }
  7301. },
  7302. "post": {
  7303. "consumes": [
  7304. "application/json"
  7305. ],
  7306. "produces": [
  7307. "application/json"
  7308. ],
  7309. "tags": [
  7310. "repository",
  7311. "user"
  7312. ],
  7313. "summary": "Create a repository",
  7314. "operationId": "createCurrentUserRepo",
  7315. "parameters": [
  7316. {
  7317. "name": "body",
  7318. "in": "body",
  7319. "schema": {
  7320. "$ref": "#/definitions/CreateRepoOption"
  7321. }
  7322. }
  7323. ],
  7324. "responses": {
  7325. "201": {
  7326. "$ref": "#/responses/Repository"
  7327. },
  7328. "409": {
  7329. "description": "The repository with the same name already exists."
  7330. },
  7331. "422": {
  7332. "$ref": "#/responses/validationError"
  7333. }
  7334. }
  7335. }
  7336. },
  7337. "/user/starred": {
  7338. "get": {
  7339. "produces": [
  7340. "application/json"
  7341. ],
  7342. "tags": [
  7343. "user"
  7344. ],
  7345. "summary": "The repos that the authenticated user has starred",
  7346. "operationId": "userCurrentListStarred",
  7347. "responses": {
  7348. "200": {
  7349. "$ref": "#/responses/RepositoryList"
  7350. }
  7351. }
  7352. }
  7353. },
  7354. "/user/starred/{owner}/{repo}": {
  7355. "get": {
  7356. "tags": [
  7357. "user"
  7358. ],
  7359. "summary": "Whether the authenticated is starring the repo",
  7360. "operationId": "userCurrentCheckStarring",
  7361. "parameters": [
  7362. {
  7363. "type": "string",
  7364. "description": "owner of the repo",
  7365. "name": "owner",
  7366. "in": "path",
  7367. "required": true
  7368. },
  7369. {
  7370. "type": "string",
  7371. "description": "name of the repo",
  7372. "name": "repo",
  7373. "in": "path",
  7374. "required": true
  7375. }
  7376. ],
  7377. "responses": {
  7378. "204": {
  7379. "$ref": "#/responses/empty"
  7380. },
  7381. "404": {
  7382. "$ref": "#/responses/notFound"
  7383. }
  7384. }
  7385. },
  7386. "put": {
  7387. "tags": [
  7388. "user"
  7389. ],
  7390. "summary": "Star the given repo",
  7391. "operationId": "userCurrentPutStar",
  7392. "parameters": [
  7393. {
  7394. "type": "string",
  7395. "description": "owner of the repo to star",
  7396. "name": "owner",
  7397. "in": "path",
  7398. "required": true
  7399. },
  7400. {
  7401. "type": "string",
  7402. "description": "name of the repo to star",
  7403. "name": "repo",
  7404. "in": "path",
  7405. "required": true
  7406. }
  7407. ],
  7408. "responses": {
  7409. "204": {
  7410. "$ref": "#/responses/empty"
  7411. }
  7412. }
  7413. },
  7414. "delete": {
  7415. "tags": [
  7416. "user"
  7417. ],
  7418. "summary": "Unstar the given repo",
  7419. "operationId": "userCurrentDeleteStar",
  7420. "parameters": [
  7421. {
  7422. "type": "string",
  7423. "description": "owner of the repo to unstar",
  7424. "name": "owner",
  7425. "in": "path",
  7426. "required": true
  7427. },
  7428. {
  7429. "type": "string",
  7430. "description": "name of the repo to unstar",
  7431. "name": "repo",
  7432. "in": "path",
  7433. "required": true
  7434. }
  7435. ],
  7436. "responses": {
  7437. "204": {
  7438. "$ref": "#/responses/empty"
  7439. }
  7440. }
  7441. }
  7442. },
  7443. "/user/stopwatches": {
  7444. "get": {
  7445. "consumes": [
  7446. "application/json"
  7447. ],
  7448. "produces": [
  7449. "application/json"
  7450. ],
  7451. "tags": [
  7452. "user"
  7453. ],
  7454. "summary": "Get list of all existing stopwatches",
  7455. "operationId": "userGetStopWatches",
  7456. "responses": {
  7457. "200": {
  7458. "$ref": "#/responses/StopWatchList"
  7459. }
  7460. }
  7461. }
  7462. },
  7463. "/user/subscriptions": {
  7464. "get": {
  7465. "produces": [
  7466. "application/json"
  7467. ],
  7468. "tags": [
  7469. "user"
  7470. ],
  7471. "summary": "List repositories watched by the authenticated user",
  7472. "operationId": "userCurrentListSubscriptions",
  7473. "responses": {
  7474. "200": {
  7475. "$ref": "#/responses/RepositoryList"
  7476. }
  7477. }
  7478. }
  7479. },
  7480. "/user/teams": {
  7481. "get": {
  7482. "produces": [
  7483. "application/json"
  7484. ],
  7485. "tags": [
  7486. "user"
  7487. ],
  7488. "summary": "List all the teams a user belongs to",
  7489. "operationId": "userListTeams",
  7490. "responses": {
  7491. "200": {
  7492. "$ref": "#/responses/TeamList"
  7493. }
  7494. }
  7495. }
  7496. },
  7497. "/user/times": {
  7498. "get": {
  7499. "produces": [
  7500. "application/json"
  7501. ],
  7502. "tags": [
  7503. "user"
  7504. ],
  7505. "summary": "List the current user's tracked times",
  7506. "operationId": "userCurrentTrackedTimes",
  7507. "responses": {
  7508. "200": {
  7509. "$ref": "#/responses/TrackedTimeList"
  7510. }
  7511. }
  7512. }
  7513. },
  7514. "/users/search": {
  7515. "get": {
  7516. "produces": [
  7517. "application/json"
  7518. ],
  7519. "tags": [
  7520. "user"
  7521. ],
  7522. "summary": "Search for users",
  7523. "operationId": "userSearch",
  7524. "parameters": [
  7525. {
  7526. "type": "string",
  7527. "description": "keyword",
  7528. "name": "q",
  7529. "in": "query"
  7530. },
  7531. {
  7532. "type": "integer",
  7533. "format": "int64",
  7534. "description": "ID of the user to search for",
  7535. "name": "uid",
  7536. "in": "query"
  7537. },
  7538. {
  7539. "type": "integer",
  7540. "description": "maximum number of users to return",
  7541. "name": "limit",
  7542. "in": "query"
  7543. }
  7544. ],
  7545. "responses": {
  7546. "200": {
  7547. "description": "SearchResults of a successful search",
  7548. "schema": {
  7549. "type": "object",
  7550. "properties": {
  7551. "data": {
  7552. "type": "array",
  7553. "items": {
  7554. "$ref": "#/definitions/User"
  7555. }
  7556. },
  7557. "ok": {
  7558. "type": "boolean"
  7559. }
  7560. }
  7561. }
  7562. }
  7563. }
  7564. }
  7565. },
  7566. "/users/{follower}/following/{followee}": {
  7567. "get": {
  7568. "tags": [
  7569. "user"
  7570. ],
  7571. "summary": "Check if one user is following another user",
  7572. "operationId": "userCheckFollowing",
  7573. "parameters": [
  7574. {
  7575. "type": "string",
  7576. "description": "username of following user",
  7577. "name": "follower",
  7578. "in": "path",
  7579. "required": true
  7580. },
  7581. {
  7582. "type": "string",
  7583. "description": "username of followed user",
  7584. "name": "followee",
  7585. "in": "path",
  7586. "required": true
  7587. }
  7588. ],
  7589. "responses": {
  7590. "204": {
  7591. "$ref": "#/responses/empty"
  7592. },
  7593. "404": {
  7594. "$ref": "#/responses/notFound"
  7595. }
  7596. }
  7597. }
  7598. },
  7599. "/users/{username}": {
  7600. "get": {
  7601. "produces": [
  7602. "application/json"
  7603. ],
  7604. "tags": [
  7605. "user"
  7606. ],
  7607. "summary": "Get a user",
  7608. "operationId": "userGet",
  7609. "parameters": [
  7610. {
  7611. "type": "string",
  7612. "description": "username of user to get",
  7613. "name": "username",
  7614. "in": "path",
  7615. "required": true
  7616. }
  7617. ],
  7618. "responses": {
  7619. "200": {
  7620. "$ref": "#/responses/User"
  7621. },
  7622. "404": {
  7623. "$ref": "#/responses/notFound"
  7624. }
  7625. }
  7626. }
  7627. },
  7628. "/users/{username}/followers": {
  7629. "get": {
  7630. "produces": [
  7631. "application/json"
  7632. ],
  7633. "tags": [
  7634. "user"
  7635. ],
  7636. "summary": "List the given user's followers",
  7637. "operationId": "userListFollowers",
  7638. "parameters": [
  7639. {
  7640. "type": "string",
  7641. "description": "username of user",
  7642. "name": "username",
  7643. "in": "path",
  7644. "required": true
  7645. }
  7646. ],
  7647. "responses": {
  7648. "200": {
  7649. "$ref": "#/responses/UserList"
  7650. }
  7651. }
  7652. }
  7653. },
  7654. "/users/{username}/following": {
  7655. "get": {
  7656. "produces": [
  7657. "application/json"
  7658. ],
  7659. "tags": [
  7660. "user"
  7661. ],
  7662. "summary": "List the users that the given user is following",
  7663. "operationId": "userListFollowing",
  7664. "parameters": [
  7665. {
  7666. "type": "string",
  7667. "description": "username of user",
  7668. "name": "username",
  7669. "in": "path",
  7670. "required": true
  7671. }
  7672. ],
  7673. "responses": {
  7674. "200": {
  7675. "$ref": "#/responses/UserList"
  7676. }
  7677. }
  7678. }
  7679. },
  7680. "/users/{username}/gpg_keys": {
  7681. "get": {
  7682. "produces": [
  7683. "application/json"
  7684. ],
  7685. "tags": [
  7686. "user"
  7687. ],
  7688. "summary": "List the given user's GPG keys",
  7689. "operationId": "userListGPGKeys",
  7690. "parameters": [
  7691. {
  7692. "type": "string",
  7693. "description": "username of user",
  7694. "name": "username",
  7695. "in": "path",
  7696. "required": true
  7697. }
  7698. ],
  7699. "responses": {
  7700. "200": {
  7701. "$ref": "#/responses/GPGKeyList"
  7702. }
  7703. }
  7704. }
  7705. },
  7706. "/users/{username}/heatmap": {
  7707. "get": {
  7708. "produces": [
  7709. "application/json"
  7710. ],
  7711. "tags": [
  7712. "user"
  7713. ],
  7714. "summary": "Get a user's heatmap",
  7715. "operationId": "userGetHeatmapData",
  7716. "parameters": [
  7717. {
  7718. "type": "string",
  7719. "description": "username of user to get",
  7720. "name": "username",
  7721. "in": "path",
  7722. "required": true
  7723. }
  7724. ],
  7725. "responses": {
  7726. "200": {
  7727. "$ref": "#/responses/UserHeatmapData"
  7728. },
  7729. "404": {
  7730. "$ref": "#/responses/notFound"
  7731. }
  7732. }
  7733. }
  7734. },
  7735. "/users/{username}/keys": {
  7736. "get": {
  7737. "produces": [
  7738. "application/json"
  7739. ],
  7740. "tags": [
  7741. "user"
  7742. ],
  7743. "summary": "List the given user's public keys",
  7744. "operationId": "userListKeys",
  7745. "parameters": [
  7746. {
  7747. "type": "string",
  7748. "description": "username of user",
  7749. "name": "username",
  7750. "in": "path",
  7751. "required": true
  7752. },
  7753. {
  7754. "type": "string",
  7755. "description": "fingerprint of the key",
  7756. "name": "fingerprint",
  7757. "in": "query"
  7758. }
  7759. ],
  7760. "responses": {
  7761. "200": {
  7762. "$ref": "#/responses/PublicKeyList"
  7763. }
  7764. }
  7765. }
  7766. },
  7767. "/users/{username}/orgs": {
  7768. "get": {
  7769. "produces": [
  7770. "application/json"
  7771. ],
  7772. "tags": [
  7773. "organization"
  7774. ],
  7775. "summary": "List a user's organizations",
  7776. "operationId": "orgListUserOrgs",
  7777. "parameters": [
  7778. {
  7779. "type": "string",
  7780. "description": "username of user",
  7781. "name": "username",
  7782. "in": "path",
  7783. "required": true
  7784. }
  7785. ],
  7786. "responses": {
  7787. "200": {
  7788. "$ref": "#/responses/OrganizationList"
  7789. }
  7790. }
  7791. }
  7792. },
  7793. "/users/{username}/repos": {
  7794. "get": {
  7795. "produces": [
  7796. "application/json"
  7797. ],
  7798. "tags": [
  7799. "user"
  7800. ],
  7801. "summary": "List the repos owned by the given user",
  7802. "operationId": "userListRepos",
  7803. "parameters": [
  7804. {
  7805. "type": "string",
  7806. "description": "username of user",
  7807. "name": "username",
  7808. "in": "path",
  7809. "required": true
  7810. }
  7811. ],
  7812. "responses": {
  7813. "200": {
  7814. "$ref": "#/responses/RepositoryList"
  7815. }
  7816. }
  7817. }
  7818. },
  7819. "/users/{username}/starred": {
  7820. "get": {
  7821. "produces": [
  7822. "application/json"
  7823. ],
  7824. "tags": [
  7825. "user"
  7826. ],
  7827. "summary": "The repos that the given user has starred",
  7828. "operationId": "userListStarred",
  7829. "parameters": [
  7830. {
  7831. "type": "string",
  7832. "description": "username of user",
  7833. "name": "username",
  7834. "in": "path",
  7835. "required": true
  7836. }
  7837. ],
  7838. "responses": {
  7839. "200": {
  7840. "$ref": "#/responses/RepositoryList"
  7841. }
  7842. }
  7843. }
  7844. },
  7845. "/users/{username}/subscriptions": {
  7846. "get": {
  7847. "produces": [
  7848. "application/json"
  7849. ],
  7850. "tags": [
  7851. "user"
  7852. ],
  7853. "summary": "List the repositories watched by a user",
  7854. "operationId": "userListSubscriptions",
  7855. "parameters": [
  7856. {
  7857. "type": "string",
  7858. "description": "username of the user",
  7859. "name": "username",
  7860. "in": "path",
  7861. "required": true
  7862. }
  7863. ],
  7864. "responses": {
  7865. "200": {
  7866. "$ref": "#/responses/RepositoryList"
  7867. }
  7868. }
  7869. }
  7870. },
  7871. "/users/{username}/tokens": {
  7872. "get": {
  7873. "produces": [
  7874. "application/json"
  7875. ],
  7876. "tags": [
  7877. "user"
  7878. ],
  7879. "summary": "List the authenticated user's access tokens",
  7880. "operationId": "userGetTokens",
  7881. "parameters": [
  7882. {
  7883. "type": "string",
  7884. "description": "username of user",
  7885. "name": "username",
  7886. "in": "path",
  7887. "required": true
  7888. }
  7889. ],
  7890. "responses": {
  7891. "200": {
  7892. "$ref": "#/responses/AccessTokenList"
  7893. }
  7894. }
  7895. },
  7896. "post": {
  7897. "consumes": [
  7898. "application/json"
  7899. ],
  7900. "produces": [
  7901. "application/json"
  7902. ],
  7903. "tags": [
  7904. "user"
  7905. ],
  7906. "summary": "Create an access token",
  7907. "operationId": "userCreateToken",
  7908. "parameters": [
  7909. {
  7910. "type": "string",
  7911. "x-go-name": "Name",
  7912. "description": "username of user",
  7913. "name": "username",
  7914. "in": "path",
  7915. "required": true
  7916. },
  7917. {
  7918. "name": "accessToken",
  7919. "in": "body",
  7920. "schema": {
  7921. "type": "object",
  7922. "required": [
  7923. "name"
  7924. ],
  7925. "properties": {
  7926. "name": {
  7927. "type": "string"
  7928. }
  7929. }
  7930. }
  7931. }
  7932. ],
  7933. "responses": {
  7934. "200": {
  7935. "$ref": "#/responses/AccessToken"
  7936. }
  7937. }
  7938. }
  7939. },
  7940. "/users/{username}/tokens/{token}": {
  7941. "delete": {
  7942. "produces": [
  7943. "application/json"
  7944. ],
  7945. "tags": [
  7946. "user"
  7947. ],
  7948. "summary": "delete an access token",
  7949. "operationId": "userDeleteAccessToken",
  7950. "parameters": [
  7951. {
  7952. "type": "string",
  7953. "description": "username of user",
  7954. "name": "username",
  7955. "in": "path",
  7956. "required": true
  7957. },
  7958. {
  7959. "type": "integer",
  7960. "format": "int64",
  7961. "description": "token to be deleted",
  7962. "name": "token",
  7963. "in": "path",
  7964. "required": true
  7965. }
  7966. ],
  7967. "responses": {
  7968. "204": {
  7969. "$ref": "#/responses/empty"
  7970. }
  7971. }
  7972. }
  7973. },
  7974. "/version": {
  7975. "get": {
  7976. "produces": [
  7977. "application/json"
  7978. ],
  7979. "tags": [
  7980. "miscellaneous"
  7981. ],
  7982. "summary": "Returns the version of the Gitea application",
  7983. "operationId": "getVersion",
  7984. "responses": {
  7985. "200": {
  7986. "$ref": "#/responses/ServerVersion"
  7987. }
  7988. }
  7989. }
  7990. }
  7991. },
  7992. "definitions": {
  7993. "APIError": {
  7994. "description": "APIError is an api error with a message",
  7995. "type": "object",
  7996. "properties": {
  7997. "message": {
  7998. "type": "string",
  7999. "x-go-name": "Message"
  8000. },
  8001. "url": {
  8002. "type": "string",
  8003. "x-go-name": "URL"
  8004. }
  8005. },
  8006. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8007. },
  8008. "AccessToken": {
  8009. "type": "object",
  8010. "title": "AccessToken represents an API access token.",
  8011. "properties": {
  8012. "id": {
  8013. "type": "integer",
  8014. "format": "int64",
  8015. "x-go-name": "ID"
  8016. },
  8017. "name": {
  8018. "type": "string",
  8019. "x-go-name": "Name"
  8020. },
  8021. "sha1": {
  8022. "type": "string",
  8023. "x-go-name": "Token"
  8024. },
  8025. "token_last_eight": {
  8026. "type": "string",
  8027. "x-go-name": "TokenLastEight"
  8028. }
  8029. },
  8030. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8031. },
  8032. "AddCollaboratorOption": {
  8033. "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository",
  8034. "type": "object",
  8035. "properties": {
  8036. "permission": {
  8037. "type": "string",
  8038. "x-go-name": "Permission"
  8039. }
  8040. },
  8041. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8042. },
  8043. "AddTimeOption": {
  8044. "description": "AddTimeOption options for adding time to an issue",
  8045. "type": "object",
  8046. "required": [
  8047. "time"
  8048. ],
  8049. "properties": {
  8050. "time": {
  8051. "description": "time in seconds",
  8052. "type": "integer",
  8053. "format": "int64",
  8054. "x-go-name": "Time"
  8055. }
  8056. },
  8057. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8058. },
  8059. "AnnotatedTag": {
  8060. "description": "AnnotatedTag represents an annotated tag",
  8061. "type": "object",
  8062. "properties": {
  8063. "message": {
  8064. "type": "string",
  8065. "x-go-name": "Message"
  8066. },
  8067. "object": {
  8068. "$ref": "#/definitions/AnnotatedTagObject"
  8069. },
  8070. "sha": {
  8071. "type": "string",
  8072. "x-go-name": "SHA"
  8073. },
  8074. "tag": {
  8075. "type": "string",
  8076. "x-go-name": "Tag"
  8077. },
  8078. "tagger": {
  8079. "$ref": "#/definitions/CommitUser"
  8080. },
  8081. "url": {
  8082. "type": "string",
  8083. "x-go-name": "URL"
  8084. },
  8085. "verification": {
  8086. "$ref": "#/definitions/PayloadCommitVerification"
  8087. }
  8088. },
  8089. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8090. },
  8091. "AnnotatedTagObject": {
  8092. "description": "AnnotatedTagObject contains meta information of the tag object",
  8093. "type": "object",
  8094. "properties": {
  8095. "sha": {
  8096. "type": "string",
  8097. "x-go-name": "SHA"
  8098. },
  8099. "type": {
  8100. "type": "string",
  8101. "x-go-name": "Type"
  8102. },
  8103. "url": {
  8104. "type": "string",
  8105. "x-go-name": "URL"
  8106. }
  8107. },
  8108. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8109. },
  8110. "Attachment": {
  8111. "description": "Attachment a generic attachment",
  8112. "type": "object",
  8113. "properties": {
  8114. "browser_download_url": {
  8115. "type": "string",
  8116. "x-go-name": "DownloadURL"
  8117. },
  8118. "created_at": {
  8119. "type": "string",
  8120. "format": "date-time",
  8121. "x-go-name": "Created"
  8122. },
  8123. "download_count": {
  8124. "type": "integer",
  8125. "format": "int64",
  8126. "x-go-name": "DownloadCount"
  8127. },
  8128. "id": {
  8129. "type": "integer",
  8130. "format": "int64",
  8131. "x-go-name": "ID"
  8132. },
  8133. "name": {
  8134. "type": "string",
  8135. "x-go-name": "Name"
  8136. },
  8137. "size": {
  8138. "type": "integer",
  8139. "format": "int64",
  8140. "x-go-name": "Size"
  8141. },
  8142. "uuid": {
  8143. "type": "string",
  8144. "x-go-name": "UUID"
  8145. }
  8146. },
  8147. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8148. },
  8149. "Branch": {
  8150. "description": "Branch represents a repository branch",
  8151. "type": "object",
  8152. "properties": {
  8153. "commit": {
  8154. "$ref": "#/definitions/PayloadCommit"
  8155. },
  8156. "enable_status_check": {
  8157. "type": "boolean",
  8158. "x-go-name": "EnableStatusCheck"
  8159. },
  8160. "name": {
  8161. "type": "string",
  8162. "x-go-name": "Name"
  8163. },
  8164. "protected": {
  8165. "type": "boolean",
  8166. "x-go-name": "Protected"
  8167. },
  8168. "required_approvals": {
  8169. "type": "integer",
  8170. "format": "int64",
  8171. "x-go-name": "RequiredApprovals"
  8172. },
  8173. "status_check_contexts": {
  8174. "type": "array",
  8175. "items": {
  8176. "type": "string"
  8177. },
  8178. "x-go-name": "StatusCheckContexts"
  8179. },
  8180. "user_can_merge": {
  8181. "type": "boolean",
  8182. "x-go-name": "UserCanMerge"
  8183. },
  8184. "user_can_push": {
  8185. "type": "boolean",
  8186. "x-go-name": "UserCanPush"
  8187. }
  8188. },
  8189. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8190. },
  8191. "Comment": {
  8192. "description": "Comment represents a comment on a commit or issue",
  8193. "type": "object",
  8194. "properties": {
  8195. "body": {
  8196. "type": "string",
  8197. "x-go-name": "Body"
  8198. },
  8199. "created_at": {
  8200. "type": "string",
  8201. "format": "date-time",
  8202. "x-go-name": "Created"
  8203. },
  8204. "html_url": {
  8205. "type": "string",
  8206. "x-go-name": "HTMLURL"
  8207. },
  8208. "id": {
  8209. "type": "integer",
  8210. "format": "int64",
  8211. "x-go-name": "ID"
  8212. },
  8213. "issue_url": {
  8214. "type": "string",
  8215. "x-go-name": "IssueURL"
  8216. },
  8217. "original_author": {
  8218. "type": "string",
  8219. "x-go-name": "OriginalAuthor"
  8220. },
  8221. "original_author_id": {
  8222. "type": "integer",
  8223. "format": "int64",
  8224. "x-go-name": "OriginalAuthorID"
  8225. },
  8226. "pull_request_url": {
  8227. "type": "string",
  8228. "x-go-name": "PRURL"
  8229. },
  8230. "updated_at": {
  8231. "type": "string",
  8232. "format": "date-time",
  8233. "x-go-name": "Updated"
  8234. },
  8235. "user": {
  8236. "$ref": "#/definitions/User"
  8237. }
  8238. },
  8239. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8240. },
  8241. "Commit": {
  8242. "type": "object",
  8243. "title": "Commit contains information generated from a Git commit.",
  8244. "properties": {
  8245. "author": {
  8246. "$ref": "#/definitions/User"
  8247. },
  8248. "commit": {
  8249. "$ref": "#/definitions/RepoCommit"
  8250. },
  8251. "committer": {
  8252. "$ref": "#/definitions/User"
  8253. },
  8254. "html_url": {
  8255. "type": "string",
  8256. "x-go-name": "HTMLURL"
  8257. },
  8258. "parents": {
  8259. "type": "array",
  8260. "items": {
  8261. "$ref": "#/definitions/CommitMeta"
  8262. },
  8263. "x-go-name": "Parents"
  8264. },
  8265. "sha": {
  8266. "type": "string",
  8267. "x-go-name": "SHA"
  8268. },
  8269. "url": {
  8270. "type": "string",
  8271. "x-go-name": "URL"
  8272. }
  8273. },
  8274. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8275. },
  8276. "CommitDateOptions": {
  8277. "description": "CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE",
  8278. "type": "object",
  8279. "properties": {
  8280. "author": {
  8281. "type": "string",
  8282. "format": "date-time",
  8283. "x-go-name": "Author"
  8284. },
  8285. "committer": {
  8286. "type": "string",
  8287. "format": "date-time",
  8288. "x-go-name": "Committer"
  8289. }
  8290. },
  8291. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8292. },
  8293. "CommitMeta": {
  8294. "type": "object",
  8295. "title": "CommitMeta contains meta information of a commit in terms of API.",
  8296. "properties": {
  8297. "sha": {
  8298. "type": "string",
  8299. "x-go-name": "SHA"
  8300. },
  8301. "url": {
  8302. "type": "string",
  8303. "x-go-name": "URL"
  8304. }
  8305. },
  8306. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8307. },
  8308. "CommitUser": {
  8309. "type": "object",
  8310. "title": "CommitUser contains information of a user in the context of a commit.",
  8311. "properties": {
  8312. "date": {
  8313. "type": "string",
  8314. "x-go-name": "Date"
  8315. },
  8316. "email": {
  8317. "type": "string",
  8318. "format": "email",
  8319. "x-go-name": "Email"
  8320. },
  8321. "name": {
  8322. "type": "string",
  8323. "x-go-name": "Name"
  8324. }
  8325. },
  8326. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8327. },
  8328. "ContentsResponse": {
  8329. "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content",
  8330. "type": "object",
  8331. "properties": {
  8332. "_links": {
  8333. "$ref": "#/definitions/FileLinksResponse"
  8334. },
  8335. "content": {
  8336. "description": "`content` is populated when `type` is `file`, otherwise null",
  8337. "type": "string",
  8338. "x-go-name": "Content"
  8339. },
  8340. "download_url": {
  8341. "type": "string",
  8342. "x-go-name": "DownloadURL"
  8343. },
  8344. "encoding": {
  8345. "description": "`encoding` is populated when `type` is `file`, otherwise null",
  8346. "type": "string",
  8347. "x-go-name": "Encoding"
  8348. },
  8349. "git_url": {
  8350. "type": "string",
  8351. "x-go-name": "GitURL"
  8352. },
  8353. "html_url": {
  8354. "type": "string",
  8355. "x-go-name": "HTMLURL"
  8356. },
  8357. "name": {
  8358. "type": "string",
  8359. "x-go-name": "Name"
  8360. },
  8361. "path": {
  8362. "type": "string",
  8363. "x-go-name": "Path"
  8364. },
  8365. "sha": {
  8366. "type": "string",
  8367. "x-go-name": "SHA"
  8368. },
  8369. "size": {
  8370. "type": "integer",
  8371. "format": "int64",
  8372. "x-go-name": "Size"
  8373. },
  8374. "submodule_git_url": {
  8375. "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null",
  8376. "type": "string",
  8377. "x-go-name": "SubmoduleGitURL"
  8378. },
  8379. "target": {
  8380. "description": "`target` is populated when `type` is `symlink`, otherwise null",
  8381. "type": "string",
  8382. "x-go-name": "Target"
  8383. },
  8384. "type": {
  8385. "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`",
  8386. "type": "string",
  8387. "x-go-name": "Type"
  8388. },
  8389. "url": {
  8390. "type": "string",
  8391. "x-go-name": "URL"
  8392. }
  8393. },
  8394. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8395. },
  8396. "CreateEmailOption": {
  8397. "description": "CreateEmailOption options when creating email addresses",
  8398. "type": "object",
  8399. "properties": {
  8400. "emails": {
  8401. "description": "email addresses to add",
  8402. "type": "array",
  8403. "items": {
  8404. "type": "string"
  8405. },
  8406. "x-go-name": "Emails"
  8407. }
  8408. },
  8409. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8410. },
  8411. "CreateFileOptions": {
  8412. "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)",
  8413. "type": "object",
  8414. "required": [
  8415. "content"
  8416. ],
  8417. "properties": {
  8418. "author": {
  8419. "$ref": "#/definitions/Identity"
  8420. },
  8421. "branch": {
  8422. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  8423. "type": "string",
  8424. "x-go-name": "BranchName"
  8425. },
  8426. "committer": {
  8427. "$ref": "#/definitions/Identity"
  8428. },
  8429. "content": {
  8430. "description": "content must be base64 encoded",
  8431. "type": "string",
  8432. "x-go-name": "Content"
  8433. },
  8434. "dates": {
  8435. "$ref": "#/definitions/CommitDateOptions"
  8436. },
  8437. "message": {
  8438. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  8439. "type": "string",
  8440. "x-go-name": "Message"
  8441. },
  8442. "new_branch": {
  8443. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  8444. "type": "string",
  8445. "x-go-name": "NewBranchName"
  8446. }
  8447. },
  8448. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8449. },
  8450. "CreateForkOption": {
  8451. "description": "CreateForkOption options for creating a fork",
  8452. "type": "object",
  8453. "properties": {
  8454. "organization": {
  8455. "description": "organization name, if forking into an organization",
  8456. "type": "string",
  8457. "x-go-name": "Organization"
  8458. }
  8459. },
  8460. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8461. },
  8462. "CreateGPGKeyOption": {
  8463. "description": "CreateGPGKeyOption options create user GPG key",
  8464. "type": "object",
  8465. "required": [
  8466. "armored_public_key"
  8467. ],
  8468. "properties": {
  8469. "armored_public_key": {
  8470. "description": "An armored GPG key to add",
  8471. "type": "string",
  8472. "uniqueItems": true,
  8473. "x-go-name": "ArmoredKey"
  8474. }
  8475. },
  8476. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8477. },
  8478. "CreateHookOption": {
  8479. "description": "CreateHookOption options when create a hook",
  8480. "type": "object",
  8481. "required": [
  8482. "type",
  8483. "config"
  8484. ],
  8485. "properties": {
  8486. "active": {
  8487. "type": "boolean",
  8488. "default": false,
  8489. "x-go-name": "Active"
  8490. },
  8491. "branch_filter": {
  8492. "type": "string",
  8493. "x-go-name": "BranchFilter"
  8494. },
  8495. "config": {
  8496. "type": "object",
  8497. "additionalProperties": {
  8498. "type": "string"
  8499. },
  8500. "x-go-name": "Config"
  8501. },
  8502. "events": {
  8503. "type": "array",
  8504. "items": {
  8505. "type": "string"
  8506. },
  8507. "x-go-name": "Events"
  8508. },
  8509. "type": {
  8510. "type": "string",
  8511. "enum": [
  8512. "gitea",
  8513. "gogs",
  8514. "slack",
  8515. "discord"
  8516. ],
  8517. "x-go-name": "Type"
  8518. }
  8519. },
  8520. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8521. },
  8522. "CreateIssueCommentOption": {
  8523. "description": "CreateIssueCommentOption options for creating a comment on an issue",
  8524. "type": "object",
  8525. "required": [
  8526. "body"
  8527. ],
  8528. "properties": {
  8529. "body": {
  8530. "type": "string",
  8531. "x-go-name": "Body"
  8532. }
  8533. },
  8534. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8535. },
  8536. "CreateIssueOption": {
  8537. "description": "CreateIssueOption options to create one issue",
  8538. "type": "object",
  8539. "required": [
  8540. "title"
  8541. ],
  8542. "properties": {
  8543. "assignee": {
  8544. "description": "username of assignee",
  8545. "type": "string",
  8546. "x-go-name": "Assignee"
  8547. },
  8548. "assignees": {
  8549. "type": "array",
  8550. "items": {
  8551. "type": "string"
  8552. },
  8553. "x-go-name": "Assignees"
  8554. },
  8555. "body": {
  8556. "type": "string",
  8557. "x-go-name": "Body"
  8558. },
  8559. "closed": {
  8560. "type": "boolean",
  8561. "x-go-name": "Closed"
  8562. },
  8563. "due_date": {
  8564. "type": "string",
  8565. "format": "date-time",
  8566. "x-go-name": "Deadline"
  8567. },
  8568. "labels": {
  8569. "description": "list of label ids",
  8570. "type": "array",
  8571. "items": {
  8572. "type": "integer",
  8573. "format": "int64"
  8574. },
  8575. "x-go-name": "Labels"
  8576. },
  8577. "milestone": {
  8578. "description": "milestone id",
  8579. "type": "integer",
  8580. "format": "int64",
  8581. "x-go-name": "Milestone"
  8582. },
  8583. "title": {
  8584. "type": "string",
  8585. "x-go-name": "Title"
  8586. }
  8587. },
  8588. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8589. },
  8590. "CreateKeyOption": {
  8591. "description": "CreateKeyOption options when creating a key",
  8592. "type": "object",
  8593. "required": [
  8594. "title",
  8595. "key"
  8596. ],
  8597. "properties": {
  8598. "key": {
  8599. "description": "An armored SSH key to add",
  8600. "type": "string",
  8601. "uniqueItems": true,
  8602. "x-go-name": "Key"
  8603. },
  8604. "read_only": {
  8605. "description": "Describe if the key has only read access or read/write",
  8606. "type": "boolean",
  8607. "x-go-name": "ReadOnly"
  8608. },
  8609. "title": {
  8610. "description": "Title of the key to add",
  8611. "type": "string",
  8612. "uniqueItems": true,
  8613. "x-go-name": "Title"
  8614. }
  8615. },
  8616. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8617. },
  8618. "CreateLabelOption": {
  8619. "description": "CreateLabelOption options for creating a label",
  8620. "type": "object",
  8621. "required": [
  8622. "name",
  8623. "color"
  8624. ],
  8625. "properties": {
  8626. "color": {
  8627. "type": "string",
  8628. "x-go-name": "Color",
  8629. "example": "#00aabb"
  8630. },
  8631. "description": {
  8632. "type": "string",
  8633. "x-go-name": "Description"
  8634. },
  8635. "name": {
  8636. "type": "string",
  8637. "x-go-name": "Name"
  8638. }
  8639. },
  8640. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8641. },
  8642. "CreateMilestoneOption": {
  8643. "description": "CreateMilestoneOption options for creating a milestone",
  8644. "type": "object",
  8645. "properties": {
  8646. "description": {
  8647. "type": "string",
  8648. "x-go-name": "Description"
  8649. },
  8650. "due_on": {
  8651. "type": "string",
  8652. "format": "date-time",
  8653. "x-go-name": "Deadline"
  8654. },
  8655. "title": {
  8656. "type": "string",
  8657. "x-go-name": "Title"
  8658. }
  8659. },
  8660. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8661. },
  8662. "CreateOrgOption": {
  8663. "description": "CreateOrgOption options for creating an organization",
  8664. "type": "object",
  8665. "required": [
  8666. "username"
  8667. ],
  8668. "properties": {
  8669. "description": {
  8670. "type": "string",
  8671. "x-go-name": "Description"
  8672. },
  8673. "full_name": {
  8674. "type": "string",
  8675. "x-go-name": "FullName"
  8676. },
  8677. "location": {
  8678. "type": "string",
  8679. "x-go-name": "Location"
  8680. },
  8681. "repo_admin_change_team_access": {
  8682. "type": "boolean",
  8683. "x-go-name": "RepoAdminChangeTeamAccess"
  8684. },
  8685. "username": {
  8686. "type": "string",
  8687. "x-go-name": "UserName"
  8688. },
  8689. "visibility": {
  8690. "description": "possible values are `public` (default), `limited` or `private`",
  8691. "type": "string",
  8692. "enum": [
  8693. "public",
  8694. "limited",
  8695. "private"
  8696. ],
  8697. "x-go-name": "Visibility"
  8698. },
  8699. "website": {
  8700. "type": "string",
  8701. "x-go-name": "Website"
  8702. }
  8703. },
  8704. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8705. },
  8706. "CreatePullRequestOption": {
  8707. "description": "CreatePullRequestOption options when creating a pull request",
  8708. "type": "object",
  8709. "properties": {
  8710. "assignee": {
  8711. "type": "string",
  8712. "x-go-name": "Assignee"
  8713. },
  8714. "assignees": {
  8715. "type": "array",
  8716. "items": {
  8717. "type": "string"
  8718. },
  8719. "x-go-name": "Assignees"
  8720. },
  8721. "base": {
  8722. "type": "string",
  8723. "x-go-name": "Base"
  8724. },
  8725. "body": {
  8726. "type": "string",
  8727. "x-go-name": "Body"
  8728. },
  8729. "due_date": {
  8730. "type": "string",
  8731. "format": "date-time",
  8732. "x-go-name": "Deadline"
  8733. },
  8734. "head": {
  8735. "type": "string",
  8736. "x-go-name": "Head"
  8737. },
  8738. "labels": {
  8739. "type": "array",
  8740. "items": {
  8741. "type": "integer",
  8742. "format": "int64"
  8743. },
  8744. "x-go-name": "Labels"
  8745. },
  8746. "milestone": {
  8747. "type": "integer",
  8748. "format": "int64",
  8749. "x-go-name": "Milestone"
  8750. },
  8751. "title": {
  8752. "type": "string",
  8753. "x-go-name": "Title"
  8754. }
  8755. },
  8756. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8757. },
  8758. "CreateReleaseOption": {
  8759. "description": "CreateReleaseOption options when creating a release",
  8760. "type": "object",
  8761. "required": [
  8762. "tag_name"
  8763. ],
  8764. "properties": {
  8765. "body": {
  8766. "type": "string",
  8767. "x-go-name": "Note"
  8768. },
  8769. "draft": {
  8770. "type": "boolean",
  8771. "x-go-name": "IsDraft"
  8772. },
  8773. "name": {
  8774. "type": "string",
  8775. "x-go-name": "Title"
  8776. },
  8777. "prerelease": {
  8778. "type": "boolean",
  8779. "x-go-name": "IsPrerelease"
  8780. },
  8781. "tag_name": {
  8782. "type": "string",
  8783. "x-go-name": "TagName"
  8784. },
  8785. "target_commitish": {
  8786. "type": "string",
  8787. "x-go-name": "Target"
  8788. }
  8789. },
  8790. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8791. },
  8792. "CreateRepoOption": {
  8793. "description": "CreateRepoOption options when creating repository",
  8794. "type": "object",
  8795. "required": [
  8796. "name"
  8797. ],
  8798. "properties": {
  8799. "auto_init": {
  8800. "description": "Whether the repository should be auto-intialized?",
  8801. "type": "boolean",
  8802. "x-go-name": "AutoInit"
  8803. },
  8804. "description": {
  8805. "description": "Description of the repository to create",
  8806. "type": "string",
  8807. "x-go-name": "Description"
  8808. },
  8809. "gitignores": {
  8810. "description": "Gitignores to use",
  8811. "type": "string",
  8812. "x-go-name": "Gitignores"
  8813. },
  8814. "issue_labels": {
  8815. "description": "Issue Label set to use",
  8816. "type": "string",
  8817. "x-go-name": "IssueLabels"
  8818. },
  8819. "license": {
  8820. "description": "License to use",
  8821. "type": "string",
  8822. "x-go-name": "License"
  8823. },
  8824. "name": {
  8825. "description": "Name of the repository to create",
  8826. "type": "string",
  8827. "uniqueItems": true,
  8828. "x-go-name": "Name"
  8829. },
  8830. "private": {
  8831. "description": "Whether the repository is private",
  8832. "type": "boolean",
  8833. "x-go-name": "Private"
  8834. },
  8835. "readme": {
  8836. "description": "Readme of the repository to create",
  8837. "type": "string",
  8838. "x-go-name": "Readme"
  8839. }
  8840. },
  8841. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8842. },
  8843. "CreateStatusOption": {
  8844. "description": "CreateStatusOption holds the information needed to create a new Status for a Commit",
  8845. "type": "object",
  8846. "properties": {
  8847. "context": {
  8848. "type": "string",
  8849. "x-go-name": "Context"
  8850. },
  8851. "description": {
  8852. "type": "string",
  8853. "x-go-name": "Description"
  8854. },
  8855. "state": {
  8856. "$ref": "#/definitions/StatusState"
  8857. },
  8858. "target_url": {
  8859. "type": "string",
  8860. "x-go-name": "TargetURL"
  8861. }
  8862. },
  8863. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8864. },
  8865. "CreateTeamOption": {
  8866. "description": "CreateTeamOption options for creating a team",
  8867. "type": "object",
  8868. "required": [
  8869. "name"
  8870. ],
  8871. "properties": {
  8872. "can_create_org_repo": {
  8873. "type": "boolean",
  8874. "x-go-name": "CanCreateOrgRepo"
  8875. },
  8876. "description": {
  8877. "type": "string",
  8878. "x-go-name": "Description"
  8879. },
  8880. "includes_all_repositories": {
  8881. "type": "boolean",
  8882. "x-go-name": "IncludesAllRepositories"
  8883. },
  8884. "name": {
  8885. "type": "string",
  8886. "x-go-name": "Name"
  8887. },
  8888. "permission": {
  8889. "type": "string",
  8890. "enum": [
  8891. "read",
  8892. "write",
  8893. "admin"
  8894. ],
  8895. "x-go-name": "Permission"
  8896. },
  8897. "units": {
  8898. "type": "array",
  8899. "items": {
  8900. "type": "string"
  8901. },
  8902. "x-go-name": "Units",
  8903. "example": [
  8904. "repo.code",
  8905. "repo.issues",
  8906. "repo.ext_issues",
  8907. "repo.wiki",
  8908. "repo.pulls",
  8909. "repo.releases",
  8910. "repo.ext_wiki"
  8911. ]
  8912. }
  8913. },
  8914. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8915. },
  8916. "CreateUserOption": {
  8917. "description": "CreateUserOption create user options",
  8918. "type": "object",
  8919. "required": [
  8920. "username",
  8921. "email",
  8922. "password"
  8923. ],
  8924. "properties": {
  8925. "email": {
  8926. "type": "string",
  8927. "format": "email",
  8928. "x-go-name": "Email"
  8929. },
  8930. "full_name": {
  8931. "type": "string",
  8932. "x-go-name": "FullName"
  8933. },
  8934. "login_name": {
  8935. "type": "string",
  8936. "x-go-name": "LoginName"
  8937. },
  8938. "must_change_password": {
  8939. "type": "boolean",
  8940. "x-go-name": "MustChangePassword"
  8941. },
  8942. "password": {
  8943. "type": "string",
  8944. "x-go-name": "Password"
  8945. },
  8946. "send_notify": {
  8947. "type": "boolean",
  8948. "x-go-name": "SendNotify"
  8949. },
  8950. "source_id": {
  8951. "type": "integer",
  8952. "format": "int64",
  8953. "x-go-name": "SourceID"
  8954. },
  8955. "username": {
  8956. "type": "string",
  8957. "x-go-name": "Username"
  8958. }
  8959. },
  8960. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8961. },
  8962. "DeleteEmailOption": {
  8963. "description": "DeleteEmailOption options when deleting email addresses",
  8964. "type": "object",
  8965. "properties": {
  8966. "emails": {
  8967. "description": "email addresses to delete",
  8968. "type": "array",
  8969. "items": {
  8970. "type": "string"
  8971. },
  8972. "x-go-name": "Emails"
  8973. }
  8974. },
  8975. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8976. },
  8977. "DeleteFileOptions": {
  8978. "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)",
  8979. "type": "object",
  8980. "required": [
  8981. "sha"
  8982. ],
  8983. "properties": {
  8984. "author": {
  8985. "$ref": "#/definitions/Identity"
  8986. },
  8987. "branch": {
  8988. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  8989. "type": "string",
  8990. "x-go-name": "BranchName"
  8991. },
  8992. "committer": {
  8993. "$ref": "#/definitions/Identity"
  8994. },
  8995. "dates": {
  8996. "$ref": "#/definitions/CommitDateOptions"
  8997. },
  8998. "message": {
  8999. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  9000. "type": "string",
  9001. "x-go-name": "Message"
  9002. },
  9003. "new_branch": {
  9004. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  9005. "type": "string",
  9006. "x-go-name": "NewBranchName"
  9007. },
  9008. "sha": {
  9009. "description": "sha is the SHA for the file that already exists",
  9010. "type": "string",
  9011. "x-go-name": "SHA"
  9012. }
  9013. },
  9014. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9015. },
  9016. "DeployKey": {
  9017. "description": "DeployKey a deploy key",
  9018. "type": "object",
  9019. "properties": {
  9020. "created_at": {
  9021. "type": "string",
  9022. "format": "date-time",
  9023. "x-go-name": "Created"
  9024. },
  9025. "fingerprint": {
  9026. "type": "string",
  9027. "x-go-name": "Fingerprint"
  9028. },
  9029. "id": {
  9030. "type": "integer",
  9031. "format": "int64",
  9032. "x-go-name": "ID"
  9033. },
  9034. "key": {
  9035. "type": "string",
  9036. "x-go-name": "Key"
  9037. },
  9038. "key_id": {
  9039. "type": "integer",
  9040. "format": "int64",
  9041. "x-go-name": "KeyID"
  9042. },
  9043. "read_only": {
  9044. "type": "boolean",
  9045. "x-go-name": "ReadOnly"
  9046. },
  9047. "repository": {
  9048. "$ref": "#/definitions/Repository"
  9049. },
  9050. "title": {
  9051. "type": "string",
  9052. "x-go-name": "Title"
  9053. },
  9054. "url": {
  9055. "type": "string",
  9056. "x-go-name": "URL"
  9057. }
  9058. },
  9059. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9060. },
  9061. "EditAttachmentOptions": {
  9062. "description": "EditAttachmentOptions options for editing attachments",
  9063. "type": "object",
  9064. "properties": {
  9065. "name": {
  9066. "type": "string",
  9067. "x-go-name": "Name"
  9068. }
  9069. },
  9070. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9071. },
  9072. "EditDeadlineOption": {
  9073. "description": "EditDeadlineOption options for creating a deadline",
  9074. "type": "object",
  9075. "required": [
  9076. "due_date"
  9077. ],
  9078. "properties": {
  9079. "due_date": {
  9080. "type": "string",
  9081. "format": "date-time",
  9082. "x-go-name": "Deadline"
  9083. }
  9084. },
  9085. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9086. },
  9087. "EditGitHookOption": {
  9088. "description": "EditGitHookOption options when modifying one Git hook",
  9089. "type": "object",
  9090. "properties": {
  9091. "content": {
  9092. "type": "string",
  9093. "x-go-name": "Content"
  9094. }
  9095. },
  9096. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9097. },
  9098. "EditHookOption": {
  9099. "description": "EditHookOption options when modify one hook",
  9100. "type": "object",
  9101. "properties": {
  9102. "active": {
  9103. "type": "boolean",
  9104. "x-go-name": "Active"
  9105. },
  9106. "branch_filter": {
  9107. "type": "string",
  9108. "x-go-name": "BranchFilter"
  9109. },
  9110. "config": {
  9111. "type": "object",
  9112. "additionalProperties": {
  9113. "type": "string"
  9114. },
  9115. "x-go-name": "Config"
  9116. },
  9117. "events": {
  9118. "type": "array",
  9119. "items": {
  9120. "type": "string"
  9121. },
  9122. "x-go-name": "Events"
  9123. }
  9124. },
  9125. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9126. },
  9127. "EditIssueCommentOption": {
  9128. "description": "EditIssueCommentOption options for editing a comment",
  9129. "type": "object",
  9130. "required": [
  9131. "body"
  9132. ],
  9133. "properties": {
  9134. "body": {
  9135. "type": "string",
  9136. "x-go-name": "Body"
  9137. }
  9138. },
  9139. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9140. },
  9141. "EditIssueOption": {
  9142. "description": "EditIssueOption options for editing an issue",
  9143. "type": "object",
  9144. "properties": {
  9145. "assignee": {
  9146. "type": "string",
  9147. "x-go-name": "Assignee"
  9148. },
  9149. "assignees": {
  9150. "type": "array",
  9151. "items": {
  9152. "type": "string"
  9153. },
  9154. "x-go-name": "Assignees"
  9155. },
  9156. "body": {
  9157. "type": "string",
  9158. "x-go-name": "Body"
  9159. },
  9160. "due_date": {
  9161. "type": "string",
  9162. "format": "date-time",
  9163. "x-go-name": "Deadline"
  9164. },
  9165. "milestone": {
  9166. "type": "integer",
  9167. "format": "int64",
  9168. "x-go-name": "Milestone"
  9169. },
  9170. "state": {
  9171. "type": "string",
  9172. "x-go-name": "State"
  9173. },
  9174. "title": {
  9175. "type": "string",
  9176. "x-go-name": "Title"
  9177. },
  9178. "unset_due_date": {
  9179. "type": "boolean",
  9180. "x-go-name": "RemoveDeadline"
  9181. }
  9182. },
  9183. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9184. },
  9185. "EditLabelOption": {
  9186. "description": "EditLabelOption options for editing a label",
  9187. "type": "object",
  9188. "properties": {
  9189. "color": {
  9190. "type": "string",
  9191. "x-go-name": "Color"
  9192. },
  9193. "description": {
  9194. "type": "string",
  9195. "x-go-name": "Description"
  9196. },
  9197. "name": {
  9198. "type": "string",
  9199. "x-go-name": "Name"
  9200. }
  9201. },
  9202. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9203. },
  9204. "EditMilestoneOption": {
  9205. "description": "EditMilestoneOption options for editing a milestone",
  9206. "type": "object",
  9207. "properties": {
  9208. "description": {
  9209. "type": "string",
  9210. "x-go-name": "Description"
  9211. },
  9212. "due_on": {
  9213. "type": "string",
  9214. "format": "date-time",
  9215. "x-go-name": "Deadline"
  9216. },
  9217. "state": {
  9218. "type": "string",
  9219. "x-go-name": "State"
  9220. },
  9221. "title": {
  9222. "type": "string",
  9223. "x-go-name": "Title"
  9224. }
  9225. },
  9226. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9227. },
  9228. "EditOrgOption": {
  9229. "description": "EditOrgOption options for editing an organization",
  9230. "type": "object",
  9231. "properties": {
  9232. "description": {
  9233. "type": "string",
  9234. "x-go-name": "Description"
  9235. },
  9236. "full_name": {
  9237. "type": "string",
  9238. "x-go-name": "FullName"
  9239. },
  9240. "location": {
  9241. "type": "string",
  9242. "x-go-name": "Location"
  9243. },
  9244. "repo_admin_change_team_access": {
  9245. "type": "boolean",
  9246. "x-go-name": "RepoAdminChangeTeamAccess"
  9247. },
  9248. "visibility": {
  9249. "description": "possible values are `public`, `limited` or `private`",
  9250. "type": "string",
  9251. "enum": [
  9252. "public",
  9253. "limited",
  9254. "private"
  9255. ],
  9256. "x-go-name": "Visibility"
  9257. },
  9258. "website": {
  9259. "type": "string",
  9260. "x-go-name": "Website"
  9261. }
  9262. },
  9263. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9264. },
  9265. "EditPullRequestOption": {
  9266. "description": "EditPullRequestOption options when modify pull request",
  9267. "type": "object",
  9268. "properties": {
  9269. "assignee": {
  9270. "type": "string",
  9271. "x-go-name": "Assignee"
  9272. },
  9273. "assignees": {
  9274. "type": "array",
  9275. "items": {
  9276. "type": "string"
  9277. },
  9278. "x-go-name": "Assignees"
  9279. },
  9280. "body": {
  9281. "type": "string",
  9282. "x-go-name": "Body"
  9283. },
  9284. "due_date": {
  9285. "type": "string",
  9286. "format": "date-time",
  9287. "x-go-name": "Deadline"
  9288. },
  9289. "labels": {
  9290. "type": "array",
  9291. "items": {
  9292. "type": "integer",
  9293. "format": "int64"
  9294. },
  9295. "x-go-name": "Labels"
  9296. },
  9297. "milestone": {
  9298. "type": "integer",
  9299. "format": "int64",
  9300. "x-go-name": "Milestone"
  9301. },
  9302. "state": {
  9303. "type": "string",
  9304. "x-go-name": "State"
  9305. },
  9306. "title": {
  9307. "type": "string",
  9308. "x-go-name": "Title"
  9309. },
  9310. "unset_due_date": {
  9311. "type": "boolean",
  9312. "x-go-name": "RemoveDeadline"
  9313. }
  9314. },
  9315. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9316. },
  9317. "EditReactionOption": {
  9318. "description": "EditReactionOption contain the reaction type",
  9319. "type": "object",
  9320. "properties": {
  9321. "content": {
  9322. "type": "string",
  9323. "x-go-name": "Reaction"
  9324. }
  9325. },
  9326. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9327. },
  9328. "EditReleaseOption": {
  9329. "description": "EditReleaseOption options when editing a release",
  9330. "type": "object",
  9331. "properties": {
  9332. "body": {
  9333. "type": "string",
  9334. "x-go-name": "Note"
  9335. },
  9336. "draft": {
  9337. "type": "boolean",
  9338. "x-go-name": "IsDraft"
  9339. },
  9340. "name": {
  9341. "type": "string",
  9342. "x-go-name": "Title"
  9343. },
  9344. "prerelease": {
  9345. "type": "boolean",
  9346. "x-go-name": "IsPrerelease"
  9347. },
  9348. "tag_name": {
  9349. "type": "string",
  9350. "x-go-name": "TagName"
  9351. },
  9352. "target_commitish": {
  9353. "type": "string",
  9354. "x-go-name": "Target"
  9355. }
  9356. },
  9357. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9358. },
  9359. "EditRepoOption": {
  9360. "description": "EditRepoOption options when editing a repository's properties",
  9361. "type": "object",
  9362. "properties": {
  9363. "allow_merge_commits": {
  9364. "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`.",
  9365. "type": "boolean",
  9366. "x-go-name": "AllowMerge"
  9367. },
  9368. "allow_rebase": {
  9369. "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.",
  9370. "type": "boolean",
  9371. "x-go-name": "AllowRebase"
  9372. },
  9373. "allow_rebase_explicit": {
  9374. "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`.",
  9375. "type": "boolean",
  9376. "x-go-name": "AllowRebaseMerge"
  9377. },
  9378. "allow_squash_merge": {
  9379. "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.",
  9380. "type": "boolean",
  9381. "x-go-name": "AllowSquash"
  9382. },
  9383. "archived": {
  9384. "description": "set to `true` to archive this repository.",
  9385. "type": "boolean",
  9386. "x-go-name": "Archived"
  9387. },
  9388. "default_branch": {
  9389. "description": "sets the default branch for this repository.",
  9390. "type": "string",
  9391. "x-go-name": "DefaultBranch"
  9392. },
  9393. "description": {
  9394. "description": "a short description of the repository.",
  9395. "type": "string",
  9396. "x-go-name": "Description"
  9397. },
  9398. "external_tracker": {
  9399. "$ref": "#/definitions/ExternalTracker"
  9400. },
  9401. "external_wiki": {
  9402. "$ref": "#/definitions/ExternalWiki"
  9403. },
  9404. "has_issues": {
  9405. "description": "either `true` to enable issues for this repository or `false` to disable them.",
  9406. "type": "boolean",
  9407. "x-go-name": "HasIssues"
  9408. },
  9409. "has_pull_requests": {
  9410. "description": "either `true` to allow pull requests, or `false` to prevent pull request.",
  9411. "type": "boolean",
  9412. "x-go-name": "HasPullRequests"
  9413. },
  9414. "has_wiki": {
  9415. "description": "either `true` to enable the wiki for this repository or `false` to disable it.",
  9416. "type": "boolean",
  9417. "x-go-name": "HasWiki"
  9418. },
  9419. "ignore_whitespace_conflicts": {
  9420. "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.",
  9421. "type": "boolean",
  9422. "x-go-name": "IgnoreWhitespaceConflicts"
  9423. },
  9424. "internal_tracker": {
  9425. "$ref": "#/definitions/InternalTracker"
  9426. },
  9427. "name": {
  9428. "description": "name of the repository",
  9429. "type": "string",
  9430. "uniqueItems": true,
  9431. "x-go-name": "Name"
  9432. },
  9433. "private": {
  9434. "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.",
  9435. "type": "boolean",
  9436. "x-go-name": "Private"
  9437. },
  9438. "template": {
  9439. "description": "either `true` to make this repository a template or `false` to make it a normal repository",
  9440. "type": "boolean",
  9441. "x-go-name": "Template"
  9442. },
  9443. "website": {
  9444. "description": "a URL with more information about the repository.",
  9445. "type": "string",
  9446. "x-go-name": "Website"
  9447. }
  9448. },
  9449. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9450. },
  9451. "EditTeamOption": {
  9452. "description": "EditTeamOption options for editing a team",
  9453. "type": "object",
  9454. "required": [
  9455. "name"
  9456. ],
  9457. "properties": {
  9458. "can_create_org_repo": {
  9459. "type": "boolean",
  9460. "x-go-name": "CanCreateOrgRepo"
  9461. },
  9462. "description": {
  9463. "type": "string",
  9464. "x-go-name": "Description"
  9465. },
  9466. "includes_all_repositories": {
  9467. "type": "boolean",
  9468. "x-go-name": "IncludesAllRepositories"
  9469. },
  9470. "name": {
  9471. "type": "string",
  9472. "x-go-name": "Name"
  9473. },
  9474. "permission": {
  9475. "type": "string",
  9476. "enum": [
  9477. "read",
  9478. "write",
  9479. "admin"
  9480. ],
  9481. "x-go-name": "Permission"
  9482. },
  9483. "units": {
  9484. "type": "array",
  9485. "items": {
  9486. "type": "string"
  9487. },
  9488. "x-go-name": "Units",
  9489. "example": [
  9490. "repo.code",
  9491. "repo.issues",
  9492. "repo.ext_issues",
  9493. "repo.wiki",
  9494. "repo.pulls",
  9495. "repo.releases",
  9496. "repo.ext_wiki"
  9497. ]
  9498. }
  9499. },
  9500. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9501. },
  9502. "EditUserOption": {
  9503. "description": "EditUserOption edit user options",
  9504. "type": "object",
  9505. "required": [
  9506. "email"
  9507. ],
  9508. "properties": {
  9509. "active": {
  9510. "type": "boolean",
  9511. "x-go-name": "Active"
  9512. },
  9513. "admin": {
  9514. "type": "boolean",
  9515. "x-go-name": "Admin"
  9516. },
  9517. "allow_create_organization": {
  9518. "type": "boolean",
  9519. "x-go-name": "AllowCreateOrganization"
  9520. },
  9521. "allow_git_hook": {
  9522. "type": "boolean",
  9523. "x-go-name": "AllowGitHook"
  9524. },
  9525. "allow_import_local": {
  9526. "type": "boolean",
  9527. "x-go-name": "AllowImportLocal"
  9528. },
  9529. "email": {
  9530. "type": "string",
  9531. "format": "email",
  9532. "x-go-name": "Email"
  9533. },
  9534. "full_name": {
  9535. "type": "string",
  9536. "x-go-name": "FullName"
  9537. },
  9538. "location": {
  9539. "type": "string",
  9540. "x-go-name": "Location"
  9541. },
  9542. "login_name": {
  9543. "type": "string",
  9544. "x-go-name": "LoginName"
  9545. },
  9546. "max_repo_creation": {
  9547. "type": "integer",
  9548. "format": "int64",
  9549. "x-go-name": "MaxRepoCreation"
  9550. },
  9551. "must_change_password": {
  9552. "type": "boolean",
  9553. "x-go-name": "MustChangePassword"
  9554. },
  9555. "password": {
  9556. "type": "string",
  9557. "x-go-name": "Password"
  9558. },
  9559. "prohibit_login": {
  9560. "type": "boolean",
  9561. "x-go-name": "ProhibitLogin"
  9562. },
  9563. "source_id": {
  9564. "type": "integer",
  9565. "format": "int64",
  9566. "x-go-name": "SourceID"
  9567. },
  9568. "website": {
  9569. "type": "string",
  9570. "x-go-name": "Website"
  9571. }
  9572. },
  9573. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9574. },
  9575. "Email": {
  9576. "description": "Email an email address belonging to a user",
  9577. "type": "object",
  9578. "properties": {
  9579. "email": {
  9580. "type": "string",
  9581. "format": "email",
  9582. "x-go-name": "Email"
  9583. },
  9584. "primary": {
  9585. "type": "boolean",
  9586. "x-go-name": "Primary"
  9587. },
  9588. "verified": {
  9589. "type": "boolean",
  9590. "x-go-name": "Verified"
  9591. }
  9592. },
  9593. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9594. },
  9595. "ExternalTracker": {
  9596. "description": "ExternalTracker represents settings for external tracker",
  9597. "type": "object",
  9598. "properties": {
  9599. "external_tracker_format": {
  9600. "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.",
  9601. "type": "string",
  9602. "x-go-name": "ExternalTrackerFormat"
  9603. },
  9604. "external_tracker_style": {
  9605. "description": "External Issue Tracker Number Format, either `numeric` or `alphanumeric`",
  9606. "type": "string",
  9607. "x-go-name": "ExternalTrackerStyle"
  9608. },
  9609. "external_tracker_url": {
  9610. "description": "URL of external issue tracker.",
  9611. "type": "string",
  9612. "x-go-name": "ExternalTrackerURL"
  9613. }
  9614. },
  9615. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9616. },
  9617. "ExternalWiki": {
  9618. "description": "ExternalWiki represents setting for external wiki",
  9619. "type": "object",
  9620. "properties": {
  9621. "external_wiki_url": {
  9622. "description": "URL of external wiki.",
  9623. "type": "string",
  9624. "x-go-name": "ExternalWikiURL"
  9625. }
  9626. },
  9627. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9628. },
  9629. "FileCommitResponse": {
  9630. "type": "object",
  9631. "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.",
  9632. "properties": {
  9633. "author": {
  9634. "$ref": "#/definitions/CommitUser"
  9635. },
  9636. "committer": {
  9637. "$ref": "#/definitions/CommitUser"
  9638. },
  9639. "html_url": {
  9640. "type": "string",
  9641. "x-go-name": "HTMLURL"
  9642. },
  9643. "message": {
  9644. "type": "string",
  9645. "x-go-name": "Message"
  9646. },
  9647. "parents": {
  9648. "type": "array",
  9649. "items": {
  9650. "$ref": "#/definitions/CommitMeta"
  9651. },
  9652. "x-go-name": "Parents"
  9653. },
  9654. "sha": {
  9655. "type": "string",
  9656. "x-go-name": "SHA"
  9657. },
  9658. "tree": {
  9659. "$ref": "#/definitions/CommitMeta"
  9660. },
  9661. "url": {
  9662. "type": "string",
  9663. "x-go-name": "URL"
  9664. }
  9665. },
  9666. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9667. },
  9668. "FileDeleteResponse": {
  9669. "description": "FileDeleteResponse contains information about a repo's file that was deleted",
  9670. "type": "object",
  9671. "properties": {
  9672. "commit": {
  9673. "$ref": "#/definitions/FileCommitResponse"
  9674. },
  9675. "content": {
  9676. "type": "object",
  9677. "x-go-name": "Content"
  9678. },
  9679. "verification": {
  9680. "$ref": "#/definitions/PayloadCommitVerification"
  9681. }
  9682. },
  9683. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9684. },
  9685. "FileLinksResponse": {
  9686. "description": "FileLinksResponse contains the links for a repo's file",
  9687. "type": "object",
  9688. "properties": {
  9689. "git": {
  9690. "type": "string",
  9691. "x-go-name": "GitURL"
  9692. },
  9693. "html": {
  9694. "type": "string",
  9695. "x-go-name": "HTMLURL"
  9696. },
  9697. "self": {
  9698. "type": "string",
  9699. "x-go-name": "Self"
  9700. }
  9701. },
  9702. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9703. },
  9704. "FileResponse": {
  9705. "description": "FileResponse contains information about a repo's file",
  9706. "type": "object",
  9707. "properties": {
  9708. "commit": {
  9709. "$ref": "#/definitions/FileCommitResponse"
  9710. },
  9711. "content": {
  9712. "$ref": "#/definitions/ContentsResponse"
  9713. },
  9714. "verification": {
  9715. "$ref": "#/definitions/PayloadCommitVerification"
  9716. }
  9717. },
  9718. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9719. },
  9720. "GPGKey": {
  9721. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  9722. "type": "object",
  9723. "properties": {
  9724. "can_certify": {
  9725. "type": "boolean",
  9726. "x-go-name": "CanCertify"
  9727. },
  9728. "can_encrypt_comms": {
  9729. "type": "boolean",
  9730. "x-go-name": "CanEncryptComms"
  9731. },
  9732. "can_encrypt_storage": {
  9733. "type": "boolean",
  9734. "x-go-name": "CanEncryptStorage"
  9735. },
  9736. "can_sign": {
  9737. "type": "boolean",
  9738. "x-go-name": "CanSign"
  9739. },
  9740. "created_at": {
  9741. "type": "string",
  9742. "format": "date-time",
  9743. "x-go-name": "Created"
  9744. },
  9745. "emails": {
  9746. "type": "array",
  9747. "items": {
  9748. "$ref": "#/definitions/GPGKeyEmail"
  9749. },
  9750. "x-go-name": "Emails"
  9751. },
  9752. "expires_at": {
  9753. "type": "string",
  9754. "format": "date-time",
  9755. "x-go-name": "Expires"
  9756. },
  9757. "id": {
  9758. "type": "integer",
  9759. "format": "int64",
  9760. "x-go-name": "ID"
  9761. },
  9762. "key_id": {
  9763. "type": "string",
  9764. "x-go-name": "KeyID"
  9765. },
  9766. "primary_key_id": {
  9767. "type": "string",
  9768. "x-go-name": "PrimaryKeyID"
  9769. },
  9770. "public_key": {
  9771. "type": "string",
  9772. "x-go-name": "PublicKey"
  9773. },
  9774. "subkeys": {
  9775. "type": "array",
  9776. "items": {
  9777. "$ref": "#/definitions/GPGKey"
  9778. },
  9779. "x-go-name": "SubsKey"
  9780. }
  9781. },
  9782. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9783. },
  9784. "GPGKeyEmail": {
  9785. "description": "GPGKeyEmail an email attached to a GPGKey",
  9786. "type": "object",
  9787. "properties": {
  9788. "email": {
  9789. "type": "string",
  9790. "x-go-name": "Email"
  9791. },
  9792. "verified": {
  9793. "type": "boolean",
  9794. "x-go-name": "Verified"
  9795. }
  9796. },
  9797. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9798. },
  9799. "GitBlobResponse": {
  9800. "description": "GitBlobResponse represents a git blob",
  9801. "type": "object",
  9802. "properties": {
  9803. "content": {
  9804. "type": "string",
  9805. "x-go-name": "Content"
  9806. },
  9807. "encoding": {
  9808. "type": "string",
  9809. "x-go-name": "Encoding"
  9810. },
  9811. "sha": {
  9812. "type": "string",
  9813. "x-go-name": "SHA"
  9814. },
  9815. "size": {
  9816. "type": "integer",
  9817. "format": "int64",
  9818. "x-go-name": "Size"
  9819. },
  9820. "url": {
  9821. "type": "string",
  9822. "x-go-name": "URL"
  9823. }
  9824. },
  9825. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9826. },
  9827. "GitEntry": {
  9828. "description": "GitEntry represents a git tree",
  9829. "type": "object",
  9830. "properties": {
  9831. "mode": {
  9832. "type": "string",
  9833. "x-go-name": "Mode"
  9834. },
  9835. "path": {
  9836. "type": "string",
  9837. "x-go-name": "Path"
  9838. },
  9839. "sha": {
  9840. "type": "string",
  9841. "x-go-name": "SHA"
  9842. },
  9843. "size": {
  9844. "type": "integer",
  9845. "format": "int64",
  9846. "x-go-name": "Size"
  9847. },
  9848. "type": {
  9849. "type": "string",
  9850. "x-go-name": "Type"
  9851. },
  9852. "url": {
  9853. "type": "string",
  9854. "x-go-name": "URL"
  9855. }
  9856. },
  9857. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9858. },
  9859. "GitHook": {
  9860. "description": "GitHook represents a Git repository hook",
  9861. "type": "object",
  9862. "properties": {
  9863. "content": {
  9864. "type": "string",
  9865. "x-go-name": "Content"
  9866. },
  9867. "is_active": {
  9868. "type": "boolean",
  9869. "x-go-name": "IsActive"
  9870. },
  9871. "name": {
  9872. "type": "string",
  9873. "x-go-name": "Name"
  9874. }
  9875. },
  9876. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9877. },
  9878. "GitObject": {
  9879. "type": "object",
  9880. "title": "GitObject represents a Git object.",
  9881. "properties": {
  9882. "sha": {
  9883. "type": "string",
  9884. "x-go-name": "SHA"
  9885. },
  9886. "type": {
  9887. "type": "string",
  9888. "x-go-name": "Type"
  9889. },
  9890. "url": {
  9891. "type": "string",
  9892. "x-go-name": "URL"
  9893. }
  9894. },
  9895. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9896. },
  9897. "GitTreeResponse": {
  9898. "description": "GitTreeResponse returns a git tree",
  9899. "type": "object",
  9900. "properties": {
  9901. "page": {
  9902. "type": "integer",
  9903. "format": "int64",
  9904. "x-go-name": "Page"
  9905. },
  9906. "sha": {
  9907. "type": "string",
  9908. "x-go-name": "SHA"
  9909. },
  9910. "total_count": {
  9911. "type": "integer",
  9912. "format": "int64",
  9913. "x-go-name": "TotalCount"
  9914. },
  9915. "tree": {
  9916. "type": "array",
  9917. "items": {
  9918. "$ref": "#/definitions/GitEntry"
  9919. },
  9920. "x-go-name": "Entries"
  9921. },
  9922. "truncated": {
  9923. "type": "boolean",
  9924. "x-go-name": "Truncated"
  9925. },
  9926. "url": {
  9927. "type": "string",
  9928. "x-go-name": "URL"
  9929. }
  9930. },
  9931. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9932. },
  9933. "Hook": {
  9934. "description": "Hook a hook is a web hook when one repository changed",
  9935. "type": "object",
  9936. "properties": {
  9937. "active": {
  9938. "type": "boolean",
  9939. "x-go-name": "Active"
  9940. },
  9941. "config": {
  9942. "type": "object",
  9943. "additionalProperties": {
  9944. "type": "string"
  9945. },
  9946. "x-go-name": "Config"
  9947. },
  9948. "created_at": {
  9949. "type": "string",
  9950. "format": "date-time",
  9951. "x-go-name": "Created"
  9952. },
  9953. "events": {
  9954. "type": "array",
  9955. "items": {
  9956. "type": "string"
  9957. },
  9958. "x-go-name": "Events"
  9959. },
  9960. "id": {
  9961. "type": "integer",
  9962. "format": "int64",
  9963. "x-go-name": "ID"
  9964. },
  9965. "type": {
  9966. "type": "string",
  9967. "x-go-name": "Type"
  9968. },
  9969. "updated_at": {
  9970. "type": "string",
  9971. "format": "date-time",
  9972. "x-go-name": "Updated"
  9973. }
  9974. },
  9975. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9976. },
  9977. "Identity": {
  9978. "description": "Identity for a person's identity like an author or committer",
  9979. "type": "object",
  9980. "properties": {
  9981. "email": {
  9982. "type": "string",
  9983. "format": "email",
  9984. "x-go-name": "Email"
  9985. },
  9986. "name": {
  9987. "type": "string",
  9988. "x-go-name": "Name"
  9989. }
  9990. },
  9991. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9992. },
  9993. "InternalTracker": {
  9994. "description": "InternalTracker represents settings for internal tracker",
  9995. "type": "object",
  9996. "properties": {
  9997. "allow_only_contributors_to_track_time": {
  9998. "description": "Let only contributors track time (Built-in issue tracker)",
  9999. "type": "boolean",
  10000. "x-go-name": "AllowOnlyContributorsToTrackTime"
  10001. },
  10002. "enable_issue_dependencies": {
  10003. "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)",
  10004. "type": "boolean",
  10005. "x-go-name": "EnableIssueDependencies"
  10006. },
  10007. "enable_time_tracker": {
  10008. "description": "Enable time tracking (Built-in issue tracker)",
  10009. "type": "boolean",
  10010. "x-go-name": "EnableTimeTracker"
  10011. }
  10012. },
  10013. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10014. },
  10015. "Issue": {
  10016. "description": "Issue represents an issue in a repository",
  10017. "type": "object",
  10018. "properties": {
  10019. "assignee": {
  10020. "$ref": "#/definitions/User"
  10021. },
  10022. "assignees": {
  10023. "type": "array",
  10024. "items": {
  10025. "$ref": "#/definitions/User"
  10026. },
  10027. "x-go-name": "Assignees"
  10028. },
  10029. "body": {
  10030. "type": "string",
  10031. "x-go-name": "Body"
  10032. },
  10033. "closed_at": {
  10034. "type": "string",
  10035. "format": "date-time",
  10036. "x-go-name": "Closed"
  10037. },
  10038. "comments": {
  10039. "type": "integer",
  10040. "format": "int64",
  10041. "x-go-name": "Comments"
  10042. },
  10043. "created_at": {
  10044. "type": "string",
  10045. "format": "date-time",
  10046. "x-go-name": "Created"
  10047. },
  10048. "due_date": {
  10049. "type": "string",
  10050. "format": "date-time",
  10051. "x-go-name": "Deadline"
  10052. },
  10053. "id": {
  10054. "type": "integer",
  10055. "format": "int64",
  10056. "x-go-name": "ID"
  10057. },
  10058. "labels": {
  10059. "type": "array",
  10060. "items": {
  10061. "$ref": "#/definitions/Label"
  10062. },
  10063. "x-go-name": "Labels"
  10064. },
  10065. "milestone": {
  10066. "$ref": "#/definitions/Milestone"
  10067. },
  10068. "number": {
  10069. "type": "integer",
  10070. "format": "int64",
  10071. "x-go-name": "Index"
  10072. },
  10073. "original_author": {
  10074. "type": "string",
  10075. "x-go-name": "OriginalAuthor"
  10076. },
  10077. "original_author_id": {
  10078. "type": "integer",
  10079. "format": "int64",
  10080. "x-go-name": "OriginalAuthorID"
  10081. },
  10082. "pull_request": {
  10083. "$ref": "#/definitions/PullRequestMeta"
  10084. },
  10085. "repository": {
  10086. "$ref": "#/definitions/RepositoryMeta"
  10087. },
  10088. "state": {
  10089. "$ref": "#/definitions/StateType"
  10090. },
  10091. "title": {
  10092. "type": "string",
  10093. "x-go-name": "Title"
  10094. },
  10095. "updated_at": {
  10096. "type": "string",
  10097. "format": "date-time",
  10098. "x-go-name": "Updated"
  10099. },
  10100. "url": {
  10101. "type": "string",
  10102. "x-go-name": "URL"
  10103. },
  10104. "user": {
  10105. "$ref": "#/definitions/User"
  10106. }
  10107. },
  10108. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10109. },
  10110. "IssueDeadline": {
  10111. "description": "IssueDeadline represents an issue deadline",
  10112. "type": "object",
  10113. "properties": {
  10114. "due_date": {
  10115. "type": "string",
  10116. "format": "date-time",
  10117. "x-go-name": "Deadline"
  10118. }
  10119. },
  10120. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10121. },
  10122. "IssueLabelsOption": {
  10123. "description": "IssueLabelsOption a collection of labels",
  10124. "type": "object",
  10125. "properties": {
  10126. "labels": {
  10127. "description": "list of label IDs",
  10128. "type": "array",
  10129. "items": {
  10130. "type": "integer",
  10131. "format": "int64"
  10132. },
  10133. "x-go-name": "Labels"
  10134. }
  10135. },
  10136. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10137. },
  10138. "Label": {
  10139. "description": "Label a label to an issue or a pr",
  10140. "type": "object",
  10141. "properties": {
  10142. "color": {
  10143. "type": "string",
  10144. "x-go-name": "Color",
  10145. "example": "00aabb"
  10146. },
  10147. "description": {
  10148. "type": "string",
  10149. "x-go-name": "Description"
  10150. },
  10151. "id": {
  10152. "type": "integer",
  10153. "format": "int64",
  10154. "x-go-name": "ID"
  10155. },
  10156. "name": {
  10157. "type": "string",
  10158. "x-go-name": "Name"
  10159. },
  10160. "url": {
  10161. "type": "string",
  10162. "x-go-name": "URL"
  10163. }
  10164. },
  10165. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10166. },
  10167. "MarkdownOption": {
  10168. "description": "MarkdownOption markdown options",
  10169. "type": "object",
  10170. "properties": {
  10171. "Context": {
  10172. "description": "Context to render\n\nin: body",
  10173. "type": "string"
  10174. },
  10175. "Mode": {
  10176. "description": "Mode to render\n\nin: body",
  10177. "type": "string"
  10178. },
  10179. "Text": {
  10180. "description": "Text markdown to render\n\nin: body",
  10181. "type": "string"
  10182. },
  10183. "Wiki": {
  10184. "description": "Is it a wiki page ?\n\nin: body",
  10185. "type": "boolean"
  10186. }
  10187. },
  10188. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10189. },
  10190. "MergePullRequestOption": {
  10191. "description": "MergePullRequestForm form for merging Pull Request",
  10192. "type": "object",
  10193. "required": [
  10194. "Do"
  10195. ],
  10196. "properties": {
  10197. "Do": {
  10198. "type": "string",
  10199. "enum": [
  10200. "merge",
  10201. "rebase",
  10202. "rebase-merge",
  10203. "squash"
  10204. ]
  10205. },
  10206. "MergeMessageField": {
  10207. "type": "string"
  10208. },
  10209. "MergeTitleField": {
  10210. "type": "string"
  10211. }
  10212. },
  10213. "x-go-name": "MergePullRequestForm",
  10214. "x-go-package": "code.gitea.io/gitea/modules/auth"
  10215. },
  10216. "MigrateRepoForm": {
  10217. "description": "MigrateRepoForm form for migrating repository",
  10218. "type": "object",
  10219. "required": [
  10220. "clone_addr",
  10221. "uid",
  10222. "repo_name"
  10223. ],
  10224. "properties": {
  10225. "auth_password": {
  10226. "type": "string",
  10227. "x-go-name": "AuthPassword"
  10228. },
  10229. "auth_username": {
  10230. "type": "string",
  10231. "x-go-name": "AuthUsername"
  10232. },
  10233. "clone_addr": {
  10234. "type": "string",
  10235. "x-go-name": "CloneAddr"
  10236. },
  10237. "description": {
  10238. "type": "string",
  10239. "x-go-name": "Description"
  10240. },
  10241. "issues": {
  10242. "type": "boolean",
  10243. "x-go-name": "Issues"
  10244. },
  10245. "labels": {
  10246. "type": "boolean",
  10247. "x-go-name": "Labels"
  10248. },
  10249. "milestones": {
  10250. "type": "boolean",
  10251. "x-go-name": "Milestones"
  10252. },
  10253. "mirror": {
  10254. "type": "boolean",
  10255. "x-go-name": "Mirror"
  10256. },
  10257. "private": {
  10258. "type": "boolean",
  10259. "x-go-name": "Private"
  10260. },
  10261. "pull_requests": {
  10262. "type": "boolean",
  10263. "x-go-name": "PullRequests"
  10264. },
  10265. "releases": {
  10266. "type": "boolean",
  10267. "x-go-name": "Releases"
  10268. },
  10269. "repo_name": {
  10270. "type": "string",
  10271. "x-go-name": "RepoName"
  10272. },
  10273. "uid": {
  10274. "type": "integer",
  10275. "format": "int64",
  10276. "x-go-name": "UID"
  10277. },
  10278. "wiki": {
  10279. "type": "boolean",
  10280. "x-go-name": "Wiki"
  10281. }
  10282. },
  10283. "x-go-package": "code.gitea.io/gitea/modules/auth"
  10284. },
  10285. "Milestone": {
  10286. "description": "Milestone milestone is a collection of issues on one repository",
  10287. "type": "object",
  10288. "properties": {
  10289. "closed_at": {
  10290. "type": "string",
  10291. "format": "date-time",
  10292. "x-go-name": "Closed"
  10293. },
  10294. "closed_issues": {
  10295. "type": "integer",
  10296. "format": "int64",
  10297. "x-go-name": "ClosedIssues"
  10298. },
  10299. "description": {
  10300. "type": "string",
  10301. "x-go-name": "Description"
  10302. },
  10303. "due_on": {
  10304. "type": "string",
  10305. "format": "date-time",
  10306. "x-go-name": "Deadline"
  10307. },
  10308. "id": {
  10309. "type": "integer",
  10310. "format": "int64",
  10311. "x-go-name": "ID"
  10312. },
  10313. "open_issues": {
  10314. "type": "integer",
  10315. "format": "int64",
  10316. "x-go-name": "OpenIssues"
  10317. },
  10318. "state": {
  10319. "$ref": "#/definitions/StateType"
  10320. },
  10321. "title": {
  10322. "type": "string",
  10323. "x-go-name": "Title"
  10324. }
  10325. },
  10326. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10327. },
  10328. "Organization": {
  10329. "description": "Organization represents an organization",
  10330. "type": "object",
  10331. "properties": {
  10332. "avatar_url": {
  10333. "type": "string",
  10334. "x-go-name": "AvatarURL"
  10335. },
  10336. "description": {
  10337. "type": "string",
  10338. "x-go-name": "Description"
  10339. },
  10340. "full_name": {
  10341. "type": "string",
  10342. "x-go-name": "FullName"
  10343. },
  10344. "id": {
  10345. "type": "integer",
  10346. "format": "int64",
  10347. "x-go-name": "ID"
  10348. },
  10349. "location": {
  10350. "type": "string",
  10351. "x-go-name": "Location"
  10352. },
  10353. "repo_admin_change_team_access": {
  10354. "type": "boolean",
  10355. "x-go-name": "RepoAdminChangeTeamAccess"
  10356. },
  10357. "username": {
  10358. "type": "string",
  10359. "x-go-name": "UserName"
  10360. },
  10361. "visibility": {
  10362. "type": "string",
  10363. "x-go-name": "Visibility"
  10364. },
  10365. "website": {
  10366. "type": "string",
  10367. "x-go-name": "Website"
  10368. }
  10369. },
  10370. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10371. },
  10372. "PRBranchInfo": {
  10373. "description": "PRBranchInfo information about a branch",
  10374. "type": "object",
  10375. "properties": {
  10376. "label": {
  10377. "type": "string",
  10378. "x-go-name": "Name"
  10379. },
  10380. "ref": {
  10381. "type": "string",
  10382. "x-go-name": "Ref"
  10383. },
  10384. "repo": {
  10385. "$ref": "#/definitions/Repository"
  10386. },
  10387. "repo_id": {
  10388. "type": "integer",
  10389. "format": "int64",
  10390. "x-go-name": "RepoID"
  10391. },
  10392. "sha": {
  10393. "type": "string",
  10394. "x-go-name": "Sha"
  10395. }
  10396. },
  10397. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10398. },
  10399. "PayloadCommit": {
  10400. "description": "PayloadCommit represents a commit",
  10401. "type": "object",
  10402. "properties": {
  10403. "added": {
  10404. "type": "array",
  10405. "items": {
  10406. "type": "string"
  10407. },
  10408. "x-go-name": "Added"
  10409. },
  10410. "author": {
  10411. "$ref": "#/definitions/PayloadUser"
  10412. },
  10413. "committer": {
  10414. "$ref": "#/definitions/PayloadUser"
  10415. },
  10416. "id": {
  10417. "description": "sha1 hash of the commit",
  10418. "type": "string",
  10419. "x-go-name": "ID"
  10420. },
  10421. "message": {
  10422. "type": "string",
  10423. "x-go-name": "Message"
  10424. },
  10425. "modified": {
  10426. "type": "array",
  10427. "items": {
  10428. "type": "string"
  10429. },
  10430. "x-go-name": "Modified"
  10431. },
  10432. "removed": {
  10433. "type": "array",
  10434. "items": {
  10435. "type": "string"
  10436. },
  10437. "x-go-name": "Removed"
  10438. },
  10439. "timestamp": {
  10440. "type": "string",
  10441. "format": "date-time",
  10442. "x-go-name": "Timestamp"
  10443. },
  10444. "url": {
  10445. "type": "string",
  10446. "x-go-name": "URL"
  10447. },
  10448. "verification": {
  10449. "$ref": "#/definitions/PayloadCommitVerification"
  10450. }
  10451. },
  10452. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10453. },
  10454. "PayloadCommitVerification": {
  10455. "description": "PayloadCommitVerification represents the GPG verification of a commit",
  10456. "type": "object",
  10457. "properties": {
  10458. "payload": {
  10459. "type": "string",
  10460. "x-go-name": "Payload"
  10461. },
  10462. "reason": {
  10463. "type": "string",
  10464. "x-go-name": "Reason"
  10465. },
  10466. "signature": {
  10467. "type": "string",
  10468. "x-go-name": "Signature"
  10469. },
  10470. "signer": {
  10471. "$ref": "#/definitions/PayloadUser"
  10472. },
  10473. "verified": {
  10474. "type": "boolean",
  10475. "x-go-name": "Verified"
  10476. }
  10477. },
  10478. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10479. },
  10480. "PayloadUser": {
  10481. "description": "PayloadUser represents the author or committer of a commit",
  10482. "type": "object",
  10483. "properties": {
  10484. "email": {
  10485. "type": "string",
  10486. "format": "email",
  10487. "x-go-name": "Email"
  10488. },
  10489. "name": {
  10490. "description": "Full name of the commit author",
  10491. "type": "string",
  10492. "x-go-name": "Name"
  10493. },
  10494. "username": {
  10495. "type": "string",
  10496. "x-go-name": "UserName"
  10497. }
  10498. },
  10499. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10500. },
  10501. "Permission": {
  10502. "description": "Permission represents a set of permissions",
  10503. "type": "object",
  10504. "properties": {
  10505. "admin": {
  10506. "type": "boolean",
  10507. "x-go-name": "Admin"
  10508. },
  10509. "pull": {
  10510. "type": "boolean",
  10511. "x-go-name": "Pull"
  10512. },
  10513. "push": {
  10514. "type": "boolean",
  10515. "x-go-name": "Push"
  10516. }
  10517. },
  10518. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10519. },
  10520. "PublicKey": {
  10521. "description": "PublicKey publickey is a user key to push code to repository",
  10522. "type": "object",
  10523. "properties": {
  10524. "created_at": {
  10525. "type": "string",
  10526. "format": "date-time",
  10527. "x-go-name": "Created"
  10528. },
  10529. "fingerprint": {
  10530. "type": "string",
  10531. "x-go-name": "Fingerprint"
  10532. },
  10533. "id": {
  10534. "type": "integer",
  10535. "format": "int64",
  10536. "x-go-name": "ID"
  10537. },
  10538. "key": {
  10539. "type": "string",
  10540. "x-go-name": "Key"
  10541. },
  10542. "key_type": {
  10543. "type": "string",
  10544. "x-go-name": "KeyType"
  10545. },
  10546. "read_only": {
  10547. "type": "boolean",
  10548. "x-go-name": "ReadOnly"
  10549. },
  10550. "title": {
  10551. "type": "string",
  10552. "x-go-name": "Title"
  10553. },
  10554. "url": {
  10555. "type": "string",
  10556. "x-go-name": "URL"
  10557. },
  10558. "user": {
  10559. "$ref": "#/definitions/User"
  10560. }
  10561. },
  10562. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10563. },
  10564. "PullRequest": {
  10565. "description": "PullRequest represents a pull request",
  10566. "type": "object",
  10567. "properties": {
  10568. "assignee": {
  10569. "$ref": "#/definitions/User"
  10570. },
  10571. "assignees": {
  10572. "type": "array",
  10573. "items": {
  10574. "$ref": "#/definitions/User"
  10575. },
  10576. "x-go-name": "Assignees"
  10577. },
  10578. "base": {
  10579. "$ref": "#/definitions/PRBranchInfo"
  10580. },
  10581. "body": {
  10582. "type": "string",
  10583. "x-go-name": "Body"
  10584. },
  10585. "closed_at": {
  10586. "type": "string",
  10587. "format": "date-time",
  10588. "x-go-name": "Closed"
  10589. },
  10590. "comments": {
  10591. "type": "integer",
  10592. "format": "int64",
  10593. "x-go-name": "Comments"
  10594. },
  10595. "created_at": {
  10596. "type": "string",
  10597. "format": "date-time",
  10598. "x-go-name": "Created"
  10599. },
  10600. "diff_url": {
  10601. "type": "string",
  10602. "x-go-name": "DiffURL"
  10603. },
  10604. "due_date": {
  10605. "type": "string",
  10606. "format": "date-time",
  10607. "x-go-name": "Deadline"
  10608. },
  10609. "head": {
  10610. "$ref": "#/definitions/PRBranchInfo"
  10611. },
  10612. "html_url": {
  10613. "type": "string",
  10614. "x-go-name": "HTMLURL"
  10615. },
  10616. "id": {
  10617. "type": "integer",
  10618. "format": "int64",
  10619. "x-go-name": "ID"
  10620. },
  10621. "labels": {
  10622. "type": "array",
  10623. "items": {
  10624. "$ref": "#/definitions/Label"
  10625. },
  10626. "x-go-name": "Labels"
  10627. },
  10628. "merge_base": {
  10629. "type": "string",
  10630. "x-go-name": "MergeBase"
  10631. },
  10632. "merge_commit_sha": {
  10633. "type": "string",
  10634. "x-go-name": "MergedCommitID"
  10635. },
  10636. "mergeable": {
  10637. "type": "boolean",
  10638. "x-go-name": "Mergeable"
  10639. },
  10640. "merged": {
  10641. "type": "boolean",
  10642. "x-go-name": "HasMerged"
  10643. },
  10644. "merged_at": {
  10645. "type": "string",
  10646. "format": "date-time",
  10647. "x-go-name": "Merged"
  10648. },
  10649. "merged_by": {
  10650. "$ref": "#/definitions/User"
  10651. },
  10652. "milestone": {
  10653. "$ref": "#/definitions/Milestone"
  10654. },
  10655. "number": {
  10656. "type": "integer",
  10657. "format": "int64",
  10658. "x-go-name": "Index"
  10659. },
  10660. "patch_url": {
  10661. "type": "string",
  10662. "x-go-name": "PatchURL"
  10663. },
  10664. "state": {
  10665. "$ref": "#/definitions/StateType"
  10666. },
  10667. "title": {
  10668. "type": "string",
  10669. "x-go-name": "Title"
  10670. },
  10671. "updated_at": {
  10672. "type": "string",
  10673. "format": "date-time",
  10674. "x-go-name": "Updated"
  10675. },
  10676. "url": {
  10677. "type": "string",
  10678. "x-go-name": "URL"
  10679. },
  10680. "user": {
  10681. "$ref": "#/definitions/User"
  10682. }
  10683. },
  10684. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10685. },
  10686. "PullRequestMeta": {
  10687. "description": "PullRequestMeta PR info if an issue is a PR",
  10688. "type": "object",
  10689. "properties": {
  10690. "merged": {
  10691. "type": "boolean",
  10692. "x-go-name": "HasMerged"
  10693. },
  10694. "merged_at": {
  10695. "type": "string",
  10696. "format": "date-time",
  10697. "x-go-name": "Merged"
  10698. }
  10699. },
  10700. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10701. },
  10702. "ReactionResponse": {
  10703. "description": "ReactionResponse contain one reaction",
  10704. "type": "object",
  10705. "properties": {
  10706. "content": {
  10707. "type": "string",
  10708. "x-go-name": "Reaction"
  10709. },
  10710. "created_at": {
  10711. "type": "string",
  10712. "format": "date-time",
  10713. "x-go-name": "Created"
  10714. },
  10715. "user": {
  10716. "$ref": "#/definitions/User"
  10717. }
  10718. },
  10719. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10720. },
  10721. "Reference": {
  10722. "type": "object",
  10723. "title": "Reference represents a Git reference.",
  10724. "properties": {
  10725. "object": {
  10726. "$ref": "#/definitions/GitObject"
  10727. },
  10728. "ref": {
  10729. "type": "string",
  10730. "x-go-name": "Ref"
  10731. },
  10732. "url": {
  10733. "type": "string",
  10734. "x-go-name": "URL"
  10735. }
  10736. },
  10737. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10738. },
  10739. "Release": {
  10740. "description": "Release represents a repository release",
  10741. "type": "object",
  10742. "properties": {
  10743. "assets": {
  10744. "type": "array",
  10745. "items": {
  10746. "$ref": "#/definitions/Attachment"
  10747. },
  10748. "x-go-name": "Attachments"
  10749. },
  10750. "author": {
  10751. "$ref": "#/definitions/User"
  10752. },
  10753. "body": {
  10754. "type": "string",
  10755. "x-go-name": "Note"
  10756. },
  10757. "created_at": {
  10758. "type": "string",
  10759. "format": "date-time",
  10760. "x-go-name": "CreatedAt"
  10761. },
  10762. "draft": {
  10763. "type": "boolean",
  10764. "x-go-name": "IsDraft"
  10765. },
  10766. "id": {
  10767. "type": "integer",
  10768. "format": "int64",
  10769. "x-go-name": "ID"
  10770. },
  10771. "name": {
  10772. "type": "string",
  10773. "x-go-name": "Title"
  10774. },
  10775. "prerelease": {
  10776. "type": "boolean",
  10777. "x-go-name": "IsPrerelease"
  10778. },
  10779. "published_at": {
  10780. "type": "string",
  10781. "format": "date-time",
  10782. "x-go-name": "PublishedAt"
  10783. },
  10784. "tag_name": {
  10785. "type": "string",
  10786. "x-go-name": "TagName"
  10787. },
  10788. "tarball_url": {
  10789. "type": "string",
  10790. "x-go-name": "TarURL"
  10791. },
  10792. "target_commitish": {
  10793. "type": "string",
  10794. "x-go-name": "Target"
  10795. },
  10796. "url": {
  10797. "type": "string",
  10798. "x-go-name": "URL"
  10799. },
  10800. "zipball_url": {
  10801. "type": "string",
  10802. "x-go-name": "ZipURL"
  10803. }
  10804. },
  10805. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10806. },
  10807. "RepoCommit": {
  10808. "type": "object",
  10809. "title": "RepoCommit contains information of a commit in the context of a repository.",
  10810. "properties": {
  10811. "author": {
  10812. "$ref": "#/definitions/CommitUser"
  10813. },
  10814. "committer": {
  10815. "$ref": "#/definitions/CommitUser"
  10816. },
  10817. "message": {
  10818. "type": "string",
  10819. "x-go-name": "Message"
  10820. },
  10821. "tree": {
  10822. "$ref": "#/definitions/CommitMeta"
  10823. },
  10824. "url": {
  10825. "type": "string",
  10826. "x-go-name": "URL"
  10827. }
  10828. },
  10829. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10830. },
  10831. "RepoTopicOptions": {
  10832. "description": "RepoTopicOptions a collection of repo topic names",
  10833. "type": "object",
  10834. "properties": {
  10835. "topics": {
  10836. "description": "list of topic names",
  10837. "type": "array",
  10838. "items": {
  10839. "type": "string"
  10840. },
  10841. "x-go-name": "Topics"
  10842. }
  10843. },
  10844. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10845. },
  10846. "Repository": {
  10847. "description": "Repository represents a repository",
  10848. "type": "object",
  10849. "properties": {
  10850. "allow_merge_commits": {
  10851. "type": "boolean",
  10852. "x-go-name": "AllowMerge"
  10853. },
  10854. "allow_rebase": {
  10855. "type": "boolean",
  10856. "x-go-name": "AllowRebase"
  10857. },
  10858. "allow_rebase_explicit": {
  10859. "type": "boolean",
  10860. "x-go-name": "AllowRebaseMerge"
  10861. },
  10862. "allow_squash_merge": {
  10863. "type": "boolean",
  10864. "x-go-name": "AllowSquash"
  10865. },
  10866. "archived": {
  10867. "type": "boolean",
  10868. "x-go-name": "Archived"
  10869. },
  10870. "avatar_url": {
  10871. "type": "string",
  10872. "x-go-name": "AvatarURL"
  10873. },
  10874. "clone_url": {
  10875. "type": "string",
  10876. "x-go-name": "CloneURL"
  10877. },
  10878. "created_at": {
  10879. "type": "string",
  10880. "format": "date-time",
  10881. "x-go-name": "Created"
  10882. },
  10883. "default_branch": {
  10884. "type": "string",
  10885. "x-go-name": "DefaultBranch"
  10886. },
  10887. "description": {
  10888. "type": "string",
  10889. "x-go-name": "Description"
  10890. },
  10891. "empty": {
  10892. "type": "boolean",
  10893. "x-go-name": "Empty"
  10894. },
  10895. "external_tracker": {
  10896. "$ref": "#/definitions/ExternalTracker"
  10897. },
  10898. "external_wiki": {
  10899. "$ref": "#/definitions/ExternalWiki"
  10900. },
  10901. "fork": {
  10902. "type": "boolean",
  10903. "x-go-name": "Fork"
  10904. },
  10905. "forks_count": {
  10906. "type": "integer",
  10907. "format": "int64",
  10908. "x-go-name": "Forks"
  10909. },
  10910. "full_name": {
  10911. "type": "string",
  10912. "x-go-name": "FullName"
  10913. },
  10914. "has_issues": {
  10915. "type": "boolean",
  10916. "x-go-name": "HasIssues"
  10917. },
  10918. "has_pull_requests": {
  10919. "type": "boolean",
  10920. "x-go-name": "HasPullRequests"
  10921. },
  10922. "has_wiki": {
  10923. "type": "boolean",
  10924. "x-go-name": "HasWiki"
  10925. },
  10926. "html_url": {
  10927. "type": "string",
  10928. "x-go-name": "HTMLURL"
  10929. },
  10930. "id": {
  10931. "type": "integer",
  10932. "format": "int64",
  10933. "x-go-name": "ID"
  10934. },
  10935. "ignore_whitespace_conflicts": {
  10936. "type": "boolean",
  10937. "x-go-name": "IgnoreWhitespaceConflicts"
  10938. },
  10939. "internal_tracker": {
  10940. "$ref": "#/definitions/InternalTracker"
  10941. },
  10942. "mirror": {
  10943. "type": "boolean",
  10944. "x-go-name": "Mirror"
  10945. },
  10946. "name": {
  10947. "type": "string",
  10948. "x-go-name": "Name"
  10949. },
  10950. "open_issues_count": {
  10951. "type": "integer",
  10952. "format": "int64",
  10953. "x-go-name": "OpenIssues"
  10954. },
  10955. "open_pr_counter": {
  10956. "type": "integer",
  10957. "format": "int64",
  10958. "x-go-name": "OpenPulls"
  10959. },
  10960. "original_url": {
  10961. "type": "string",
  10962. "x-go-name": "OriginalURL"
  10963. },
  10964. "owner": {
  10965. "$ref": "#/definitions/User"
  10966. },
  10967. "parent": {
  10968. "$ref": "#/definitions/Repository"
  10969. },
  10970. "permissions": {
  10971. "$ref": "#/definitions/Permission"
  10972. },
  10973. "private": {
  10974. "type": "boolean",
  10975. "x-go-name": "Private"
  10976. },
  10977. "release_counter": {
  10978. "type": "integer",
  10979. "format": "int64",
  10980. "x-go-name": "Releases"
  10981. },
  10982. "size": {
  10983. "type": "integer",
  10984. "format": "int64",
  10985. "x-go-name": "Size"
  10986. },
  10987. "ssh_url": {
  10988. "type": "string",
  10989. "x-go-name": "SSHURL"
  10990. },
  10991. "stars_count": {
  10992. "type": "integer",
  10993. "format": "int64",
  10994. "x-go-name": "Stars"
  10995. },
  10996. "template": {
  10997. "type": "boolean",
  10998. "x-go-name": "Template"
  10999. },
  11000. "updated_at": {
  11001. "type": "string",
  11002. "format": "date-time",
  11003. "x-go-name": "Updated"
  11004. },
  11005. "watchers_count": {
  11006. "type": "integer",
  11007. "format": "int64",
  11008. "x-go-name": "Watchers"
  11009. },
  11010. "website": {
  11011. "type": "string",
  11012. "x-go-name": "Website"
  11013. }
  11014. },
  11015. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11016. },
  11017. "RepositoryMeta": {
  11018. "description": "RepositoryMeta basic repository information",
  11019. "type": "object",
  11020. "properties": {
  11021. "full_name": {
  11022. "type": "string",
  11023. "x-go-name": "FullName"
  11024. },
  11025. "id": {
  11026. "type": "integer",
  11027. "format": "int64",
  11028. "x-go-name": "ID"
  11029. },
  11030. "name": {
  11031. "type": "string",
  11032. "x-go-name": "Name"
  11033. }
  11034. },
  11035. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11036. },
  11037. "SearchResults": {
  11038. "description": "SearchResults results of a successful search",
  11039. "type": "object",
  11040. "properties": {
  11041. "data": {
  11042. "type": "array",
  11043. "items": {
  11044. "$ref": "#/definitions/Repository"
  11045. },
  11046. "x-go-name": "Data"
  11047. },
  11048. "ok": {
  11049. "type": "boolean",
  11050. "x-go-name": "OK"
  11051. }
  11052. },
  11053. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11054. },
  11055. "ServerVersion": {
  11056. "description": "ServerVersion wraps the version of the server",
  11057. "type": "object",
  11058. "properties": {
  11059. "version": {
  11060. "type": "string",
  11061. "x-go-name": "Version"
  11062. }
  11063. },
  11064. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11065. },
  11066. "StateType": {
  11067. "description": "StateType issue state type",
  11068. "type": "string",
  11069. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11070. },
  11071. "Status": {
  11072. "description": "Status holds a single Status of a single Commit",
  11073. "type": "object",
  11074. "properties": {
  11075. "context": {
  11076. "type": "string",
  11077. "x-go-name": "Context"
  11078. },
  11079. "created_at": {
  11080. "type": "string",
  11081. "format": "date-time",
  11082. "x-go-name": "Created"
  11083. },
  11084. "creator": {
  11085. "$ref": "#/definitions/User"
  11086. },
  11087. "description": {
  11088. "type": "string",
  11089. "x-go-name": "Description"
  11090. },
  11091. "id": {
  11092. "type": "integer",
  11093. "format": "int64",
  11094. "x-go-name": "ID"
  11095. },
  11096. "status": {
  11097. "$ref": "#/definitions/StatusState"
  11098. },
  11099. "target_url": {
  11100. "type": "string",
  11101. "x-go-name": "TargetURL"
  11102. },
  11103. "updated_at": {
  11104. "type": "string",
  11105. "format": "date-time",
  11106. "x-go-name": "Updated"
  11107. },
  11108. "url": {
  11109. "type": "string",
  11110. "x-go-name": "URL"
  11111. }
  11112. },
  11113. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11114. },
  11115. "StatusState": {
  11116. "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"",
  11117. "type": "string",
  11118. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11119. },
  11120. "StopWatch": {
  11121. "description": "StopWatch represent a running stopwatch",
  11122. "type": "object",
  11123. "properties": {
  11124. "created": {
  11125. "type": "string",
  11126. "format": "date-time",
  11127. "x-go-name": "Created"
  11128. },
  11129. "issue_index": {
  11130. "type": "integer",
  11131. "format": "int64",
  11132. "x-go-name": "IssueIndex"
  11133. }
  11134. },
  11135. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11136. },
  11137. "Tag": {
  11138. "description": "Tag represents a repository tag",
  11139. "type": "object",
  11140. "properties": {
  11141. "commit": {
  11142. "$ref": "#/definitions/CommitMeta"
  11143. },
  11144. "id": {
  11145. "type": "string",
  11146. "x-go-name": "ID"
  11147. },
  11148. "name": {
  11149. "type": "string",
  11150. "x-go-name": "Name"
  11151. },
  11152. "tarball_url": {
  11153. "type": "string",
  11154. "x-go-name": "TarballURL"
  11155. },
  11156. "zipball_url": {
  11157. "type": "string",
  11158. "x-go-name": "ZipballURL"
  11159. }
  11160. },
  11161. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11162. },
  11163. "Team": {
  11164. "description": "Team represents a team in an organization",
  11165. "type": "object",
  11166. "properties": {
  11167. "can_create_org_repo": {
  11168. "type": "boolean",
  11169. "x-go-name": "CanCreateOrgRepo"
  11170. },
  11171. "description": {
  11172. "type": "string",
  11173. "x-go-name": "Description"
  11174. },
  11175. "id": {
  11176. "type": "integer",
  11177. "format": "int64",
  11178. "x-go-name": "ID"
  11179. },
  11180. "includes_all_repositories": {
  11181. "type": "boolean",
  11182. "x-go-name": "IncludesAllRepositories"
  11183. },
  11184. "name": {
  11185. "type": "string",
  11186. "x-go-name": "Name"
  11187. },
  11188. "organization": {
  11189. "$ref": "#/definitions/Organization"
  11190. },
  11191. "permission": {
  11192. "type": "string",
  11193. "enum": [
  11194. "none",
  11195. "read",
  11196. "write",
  11197. "admin",
  11198. "owner"
  11199. ],
  11200. "x-go-name": "Permission"
  11201. },
  11202. "units": {
  11203. "type": "array",
  11204. "items": {
  11205. "type": "string"
  11206. },
  11207. "x-go-name": "Units",
  11208. "example": [
  11209. "repo.code",
  11210. "repo.issues",
  11211. "repo.ext_issues",
  11212. "repo.wiki",
  11213. "repo.pulls",
  11214. "repo.releases",
  11215. "repo.ext_wiki"
  11216. ]
  11217. }
  11218. },
  11219. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11220. },
  11221. "TimeStamp": {
  11222. "description": "TimeStamp defines a timestamp",
  11223. "type": "integer",
  11224. "format": "int64",
  11225. "x-go-package": "code.gitea.io/gitea/modules/timeutil"
  11226. },
  11227. "TopicName": {
  11228. "description": "TopicName a list of repo topic names",
  11229. "type": "object",
  11230. "properties": {
  11231. "topics": {
  11232. "type": "array",
  11233. "items": {
  11234. "type": "string"
  11235. },
  11236. "x-go-name": "TopicNames"
  11237. }
  11238. },
  11239. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11240. },
  11241. "TopicResponse": {
  11242. "description": "TopicResponse for returning topics",
  11243. "type": "object",
  11244. "properties": {
  11245. "created": {
  11246. "type": "string",
  11247. "format": "date-time",
  11248. "x-go-name": "Created"
  11249. },
  11250. "id": {
  11251. "type": "integer",
  11252. "format": "int64",
  11253. "x-go-name": "ID"
  11254. },
  11255. "repo_count": {
  11256. "type": "integer",
  11257. "format": "int64",
  11258. "x-go-name": "RepoCount"
  11259. },
  11260. "topic_name": {
  11261. "type": "string",
  11262. "x-go-name": "Name"
  11263. },
  11264. "updated": {
  11265. "type": "string",
  11266. "format": "date-time",
  11267. "x-go-name": "Updated"
  11268. }
  11269. },
  11270. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11271. },
  11272. "TrackedTime": {
  11273. "description": "TrackedTime worked time for an issue / pr",
  11274. "type": "object",
  11275. "properties": {
  11276. "created": {
  11277. "type": "string",
  11278. "format": "date-time",
  11279. "x-go-name": "Created"
  11280. },
  11281. "id": {
  11282. "type": "integer",
  11283. "format": "int64",
  11284. "x-go-name": "ID"
  11285. },
  11286. "issue_id": {
  11287. "type": "integer",
  11288. "format": "int64",
  11289. "x-go-name": "IssueID"
  11290. },
  11291. "time": {
  11292. "description": "Time in seconds",
  11293. "type": "integer",
  11294. "format": "int64",
  11295. "x-go-name": "Time"
  11296. },
  11297. "user_id": {
  11298. "type": "integer",
  11299. "format": "int64",
  11300. "x-go-name": "UserID"
  11301. }
  11302. },
  11303. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11304. },
  11305. "UpdateFileOptions": {
  11306. "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)",
  11307. "type": "object",
  11308. "required": [
  11309. "sha",
  11310. "content"
  11311. ],
  11312. "properties": {
  11313. "author": {
  11314. "$ref": "#/definitions/Identity"
  11315. },
  11316. "branch": {
  11317. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  11318. "type": "string",
  11319. "x-go-name": "BranchName"
  11320. },
  11321. "committer": {
  11322. "$ref": "#/definitions/Identity"
  11323. },
  11324. "content": {
  11325. "description": "content must be base64 encoded",
  11326. "type": "string",
  11327. "x-go-name": "Content"
  11328. },
  11329. "dates": {
  11330. "$ref": "#/definitions/CommitDateOptions"
  11331. },
  11332. "from_path": {
  11333. "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL",
  11334. "type": "string",
  11335. "x-go-name": "FromPath"
  11336. },
  11337. "message": {
  11338. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  11339. "type": "string",
  11340. "x-go-name": "Message"
  11341. },
  11342. "new_branch": {
  11343. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  11344. "type": "string",
  11345. "x-go-name": "NewBranchName"
  11346. },
  11347. "sha": {
  11348. "description": "sha is the SHA for the file that already exists",
  11349. "type": "string",
  11350. "x-go-name": "SHA"
  11351. }
  11352. },
  11353. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11354. },
  11355. "User": {
  11356. "description": "User represents a user",
  11357. "type": "object",
  11358. "properties": {
  11359. "avatar_url": {
  11360. "description": "URL to the user's avatar",
  11361. "type": "string",
  11362. "x-go-name": "AvatarURL"
  11363. },
  11364. "created": {
  11365. "type": "string",
  11366. "format": "date-time",
  11367. "x-go-name": "Created"
  11368. },
  11369. "email": {
  11370. "type": "string",
  11371. "format": "email",
  11372. "x-go-name": "Email"
  11373. },
  11374. "full_name": {
  11375. "description": "the user's full name",
  11376. "type": "string",
  11377. "x-go-name": "FullName"
  11378. },
  11379. "id": {
  11380. "description": "the user's id",
  11381. "type": "integer",
  11382. "format": "int64",
  11383. "x-go-name": "ID"
  11384. },
  11385. "is_admin": {
  11386. "description": "Is the user an administrator",
  11387. "type": "boolean",
  11388. "x-go-name": "IsAdmin"
  11389. },
  11390. "language": {
  11391. "description": "User locale",
  11392. "type": "string",
  11393. "x-go-name": "Language"
  11394. },
  11395. "last_login": {
  11396. "type": "string",
  11397. "format": "date-time",
  11398. "x-go-name": "LastLogin"
  11399. },
  11400. "login": {
  11401. "description": "the user's username",
  11402. "type": "string",
  11403. "x-go-name": "UserName"
  11404. }
  11405. },
  11406. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11407. },
  11408. "UserHeatmapData": {
  11409. "description": "UserHeatmapData represents the data needed to create a heatmap",
  11410. "type": "object",
  11411. "properties": {
  11412. "contributions": {
  11413. "type": "integer",
  11414. "format": "int64",
  11415. "x-go-name": "Contributions"
  11416. },
  11417. "timestamp": {
  11418. "$ref": "#/definitions/TimeStamp"
  11419. }
  11420. },
  11421. "x-go-package": "code.gitea.io/gitea/models"
  11422. },
  11423. "WatchInfo": {
  11424. "description": "WatchInfo represents an API watch status of one repository",
  11425. "type": "object",
  11426. "properties": {
  11427. "created_at": {
  11428. "type": "string",
  11429. "format": "date-time",
  11430. "x-go-name": "CreatedAt"
  11431. },
  11432. "ignored": {
  11433. "type": "boolean",
  11434. "x-go-name": "Ignored"
  11435. },
  11436. "reason": {
  11437. "type": "object",
  11438. "x-go-name": "Reason"
  11439. },
  11440. "repository_url": {
  11441. "type": "string",
  11442. "x-go-name": "RepositoryURL"
  11443. },
  11444. "subscribed": {
  11445. "type": "boolean",
  11446. "x-go-name": "Subscribed"
  11447. },
  11448. "url": {
  11449. "type": "string",
  11450. "x-go-name": "URL"
  11451. }
  11452. },
  11453. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11454. }
  11455. },
  11456. "responses": {
  11457. "AccessToken": {
  11458. "description": "AccessToken represents an API access token.",
  11459. "headers": {
  11460. "id": {
  11461. "type": "integer",
  11462. "format": "int64"
  11463. },
  11464. "name": {
  11465. "type": "string"
  11466. },
  11467. "sha1": {
  11468. "type": "string"
  11469. },
  11470. "token_last_eight": {
  11471. "type": "string"
  11472. }
  11473. }
  11474. },
  11475. "AccessTokenList": {
  11476. "description": "AccessTokenList represents a list of API access token.",
  11477. "schema": {
  11478. "type": "array",
  11479. "items": {
  11480. "$ref": "#/definitions/AccessToken"
  11481. }
  11482. }
  11483. },
  11484. "AnnotatedTag": {
  11485. "description": "AnnotatedTag",
  11486. "schema": {
  11487. "$ref": "#/definitions/AnnotatedTag"
  11488. }
  11489. },
  11490. "Attachment": {
  11491. "description": "Attachment",
  11492. "schema": {
  11493. "$ref": "#/definitions/Attachment"
  11494. }
  11495. },
  11496. "AttachmentList": {
  11497. "description": "AttachmentList",
  11498. "schema": {
  11499. "type": "array",
  11500. "items": {
  11501. "$ref": "#/definitions/Attachment"
  11502. }
  11503. }
  11504. },
  11505. "Branch": {
  11506. "description": "Branch",
  11507. "schema": {
  11508. "$ref": "#/definitions/Branch"
  11509. }
  11510. },
  11511. "BranchList": {
  11512. "description": "BranchList",
  11513. "schema": {
  11514. "type": "array",
  11515. "items": {
  11516. "$ref": "#/definitions/Branch"
  11517. }
  11518. }
  11519. },
  11520. "Comment": {
  11521. "description": "Comment",
  11522. "schema": {
  11523. "$ref": "#/definitions/Comment"
  11524. }
  11525. },
  11526. "CommentList": {
  11527. "description": "CommentList",
  11528. "schema": {
  11529. "type": "array",
  11530. "items": {
  11531. "$ref": "#/definitions/Comment"
  11532. }
  11533. }
  11534. },
  11535. "Commit": {
  11536. "description": "Commit",
  11537. "schema": {
  11538. "$ref": "#/definitions/Commit"
  11539. }
  11540. },
  11541. "CommitList": {
  11542. "description": "CommitList",
  11543. "schema": {
  11544. "type": "array",
  11545. "items": {
  11546. "$ref": "#/definitions/Commit"
  11547. }
  11548. },
  11549. "headers": {
  11550. "X-HasMore": {
  11551. "type": "boolean",
  11552. "description": "True if there is another page"
  11553. },
  11554. "X-Page": {
  11555. "type": "integer",
  11556. "format": "int64",
  11557. "description": "The current page"
  11558. },
  11559. "X-PageCount": {
  11560. "type": "integer",
  11561. "format": "int64",
  11562. "description": "Total number of pages"
  11563. },
  11564. "X-PerPage": {
  11565. "type": "integer",
  11566. "format": "int64",
  11567. "description": "Commits per page"
  11568. },
  11569. "X-Total": {
  11570. "type": "integer",
  11571. "format": "int64",
  11572. "description": "Total commit count"
  11573. }
  11574. }
  11575. },
  11576. "ContentsListResponse": {
  11577. "description": "ContentsListResponse",
  11578. "schema": {
  11579. "type": "array",
  11580. "items": {
  11581. "$ref": "#/definitions/ContentsResponse"
  11582. }
  11583. }
  11584. },
  11585. "ContentsResponse": {
  11586. "description": "ContentsResponse",
  11587. "schema": {
  11588. "$ref": "#/definitions/ContentsResponse"
  11589. }
  11590. },
  11591. "DeployKey": {
  11592. "description": "DeployKey",
  11593. "schema": {
  11594. "$ref": "#/definitions/DeployKey"
  11595. }
  11596. },
  11597. "DeployKeyList": {
  11598. "description": "DeployKeyList",
  11599. "schema": {
  11600. "type": "array",
  11601. "items": {
  11602. "$ref": "#/definitions/DeployKey"
  11603. }
  11604. }
  11605. },
  11606. "EditReactionOption": {
  11607. "description": "EditReactionOption",
  11608. "schema": {
  11609. "$ref": "#/definitions/EditReactionOption"
  11610. }
  11611. },
  11612. "EmailList": {
  11613. "description": "EmailList",
  11614. "schema": {
  11615. "type": "array",
  11616. "items": {
  11617. "$ref": "#/definitions/Email"
  11618. }
  11619. }
  11620. },
  11621. "EmptyRepository": {
  11622. "description": "EmptyRepository",
  11623. "schema": {
  11624. "$ref": "#/definitions/APIError"
  11625. }
  11626. },
  11627. "FileDeleteResponse": {
  11628. "description": "FileDeleteResponse",
  11629. "schema": {
  11630. "$ref": "#/definitions/FileDeleteResponse"
  11631. }
  11632. },
  11633. "FileResponse": {
  11634. "description": "FileResponse",
  11635. "schema": {
  11636. "$ref": "#/definitions/FileResponse"
  11637. }
  11638. },
  11639. "GPGKey": {
  11640. "description": "GPGKey",
  11641. "schema": {
  11642. "$ref": "#/definitions/GPGKey"
  11643. }
  11644. },
  11645. "GPGKeyList": {
  11646. "description": "GPGKeyList",
  11647. "schema": {
  11648. "type": "array",
  11649. "items": {
  11650. "$ref": "#/definitions/GPGKey"
  11651. }
  11652. }
  11653. },
  11654. "GitBlobResponse": {
  11655. "description": "GitBlobResponse",
  11656. "schema": {
  11657. "$ref": "#/definitions/GitBlobResponse"
  11658. }
  11659. },
  11660. "GitHook": {
  11661. "description": "GitHook",
  11662. "schema": {
  11663. "$ref": "#/definitions/GitHook"
  11664. }
  11665. },
  11666. "GitHookList": {
  11667. "description": "GitHookList",
  11668. "schema": {
  11669. "type": "array",
  11670. "items": {
  11671. "$ref": "#/definitions/GitHook"
  11672. }
  11673. }
  11674. },
  11675. "GitTreeResponse": {
  11676. "description": "GitTreeResponse",
  11677. "schema": {
  11678. "$ref": "#/definitions/GitTreeResponse"
  11679. }
  11680. },
  11681. "Hook": {
  11682. "description": "Hook",
  11683. "schema": {
  11684. "$ref": "#/definitions/Hook"
  11685. }
  11686. },
  11687. "HookList": {
  11688. "description": "HookList",
  11689. "schema": {
  11690. "type": "array",
  11691. "items": {
  11692. "$ref": "#/definitions/Hook"
  11693. }
  11694. }
  11695. },
  11696. "Issue": {
  11697. "description": "Issue",
  11698. "schema": {
  11699. "$ref": "#/definitions/Issue"
  11700. }
  11701. },
  11702. "IssueDeadline": {
  11703. "description": "IssueDeadline",
  11704. "schema": {
  11705. "$ref": "#/definitions/IssueDeadline"
  11706. }
  11707. },
  11708. "IssueList": {
  11709. "description": "IssueList",
  11710. "schema": {
  11711. "type": "array",
  11712. "items": {
  11713. "$ref": "#/definitions/Issue"
  11714. }
  11715. }
  11716. },
  11717. "Label": {
  11718. "description": "Label",
  11719. "schema": {
  11720. "$ref": "#/definitions/Label"
  11721. }
  11722. },
  11723. "LabelList": {
  11724. "description": "LabelList",
  11725. "schema": {
  11726. "type": "array",
  11727. "items": {
  11728. "$ref": "#/definitions/Label"
  11729. }
  11730. }
  11731. },
  11732. "MarkdownRender": {
  11733. "description": "MarkdownRender is a rendered markdown document",
  11734. "schema": {
  11735. "type": "string"
  11736. }
  11737. },
  11738. "Milestone": {
  11739. "description": "Milestone",
  11740. "schema": {
  11741. "$ref": "#/definitions/Milestone"
  11742. }
  11743. },
  11744. "MilestoneList": {
  11745. "description": "MilestoneList",
  11746. "schema": {
  11747. "type": "array",
  11748. "items": {
  11749. "$ref": "#/definitions/Milestone"
  11750. }
  11751. }
  11752. },
  11753. "Organization": {
  11754. "description": "Organization",
  11755. "schema": {
  11756. "$ref": "#/definitions/Organization"
  11757. }
  11758. },
  11759. "OrganizationList": {
  11760. "description": "OrganizationList",
  11761. "schema": {
  11762. "type": "array",
  11763. "items": {
  11764. "$ref": "#/definitions/Organization"
  11765. }
  11766. }
  11767. },
  11768. "PublicKey": {
  11769. "description": "PublicKey",
  11770. "schema": {
  11771. "$ref": "#/definitions/PublicKey"
  11772. }
  11773. },
  11774. "PublicKeyList": {
  11775. "description": "PublicKeyList",
  11776. "schema": {
  11777. "type": "array",
  11778. "items": {
  11779. "$ref": "#/definitions/PublicKey"
  11780. }
  11781. }
  11782. },
  11783. "PullRequest": {
  11784. "description": "PullRequest",
  11785. "schema": {
  11786. "$ref": "#/definitions/PullRequest"
  11787. }
  11788. },
  11789. "PullRequestList": {
  11790. "description": "PullRequestList",
  11791. "schema": {
  11792. "type": "array",
  11793. "items": {
  11794. "$ref": "#/definitions/PullRequest"
  11795. }
  11796. }
  11797. },
  11798. "ReactionResponse": {
  11799. "description": "ReactionResponse",
  11800. "schema": {
  11801. "$ref": "#/definitions/ReactionResponse"
  11802. }
  11803. },
  11804. "ReactionResponseList": {
  11805. "description": "ReactionResponseList",
  11806. "schema": {
  11807. "type": "array",
  11808. "items": {
  11809. "$ref": "#/definitions/ReactionResponse"
  11810. }
  11811. }
  11812. },
  11813. "Reference": {
  11814. "description": "Reference",
  11815. "schema": {
  11816. "$ref": "#/definitions/Reference"
  11817. }
  11818. },
  11819. "ReferenceList": {
  11820. "description": "ReferenceList",
  11821. "schema": {
  11822. "type": "array",
  11823. "items": {
  11824. "$ref": "#/definitions/Reference"
  11825. }
  11826. }
  11827. },
  11828. "Release": {
  11829. "description": "Release",
  11830. "schema": {
  11831. "$ref": "#/definitions/Release"
  11832. }
  11833. },
  11834. "ReleaseList": {
  11835. "description": "ReleaseList",
  11836. "schema": {
  11837. "type": "array",
  11838. "items": {
  11839. "$ref": "#/definitions/Release"
  11840. }
  11841. }
  11842. },
  11843. "Repository": {
  11844. "description": "Repository",
  11845. "schema": {
  11846. "$ref": "#/definitions/Repository"
  11847. }
  11848. },
  11849. "RepositoryList": {
  11850. "description": "RepositoryList",
  11851. "schema": {
  11852. "type": "array",
  11853. "items": {
  11854. "$ref": "#/definitions/Repository"
  11855. }
  11856. }
  11857. },
  11858. "SearchResults": {
  11859. "description": "SearchResults",
  11860. "schema": {
  11861. "$ref": "#/definitions/SearchResults"
  11862. }
  11863. },
  11864. "ServerVersion": {
  11865. "description": "ServerVersion",
  11866. "schema": {
  11867. "$ref": "#/definitions/ServerVersion"
  11868. }
  11869. },
  11870. "Status": {
  11871. "description": "Status",
  11872. "schema": {
  11873. "$ref": "#/definitions/Status"
  11874. }
  11875. },
  11876. "StatusList": {
  11877. "description": "StatusList",
  11878. "schema": {
  11879. "type": "array",
  11880. "items": {
  11881. "$ref": "#/definitions/Status"
  11882. }
  11883. }
  11884. },
  11885. "StopWatch": {
  11886. "description": "StopWatch",
  11887. "schema": {
  11888. "$ref": "#/definitions/StopWatch"
  11889. }
  11890. },
  11891. "StopWatchList": {
  11892. "description": "StopWatchList",
  11893. "schema": {
  11894. "type": "array",
  11895. "items": {
  11896. "$ref": "#/definitions/StopWatch"
  11897. }
  11898. }
  11899. },
  11900. "Tag": {
  11901. "description": "Tag",
  11902. "schema": {
  11903. "$ref": "#/definitions/Tag"
  11904. }
  11905. },
  11906. "TagList": {
  11907. "description": "TagList",
  11908. "schema": {
  11909. "type": "array",
  11910. "items": {
  11911. "$ref": "#/definitions/Tag"
  11912. }
  11913. }
  11914. },
  11915. "Team": {
  11916. "description": "Team",
  11917. "schema": {
  11918. "$ref": "#/definitions/Team"
  11919. }
  11920. },
  11921. "TeamList": {
  11922. "description": "TeamList",
  11923. "schema": {
  11924. "type": "array",
  11925. "items": {
  11926. "$ref": "#/definitions/Team"
  11927. }
  11928. }
  11929. },
  11930. "TopicListResponse": {
  11931. "description": "TopicListResponse",
  11932. "schema": {
  11933. "type": "array",
  11934. "items": {
  11935. "$ref": "#/definitions/TopicResponse"
  11936. }
  11937. }
  11938. },
  11939. "TopicNames": {
  11940. "description": "TopicNames",
  11941. "schema": {
  11942. "$ref": "#/definitions/TopicName"
  11943. }
  11944. },
  11945. "TrackedTime": {
  11946. "description": "TrackedTime",
  11947. "schema": {
  11948. "$ref": "#/definitions/TrackedTime"
  11949. }
  11950. },
  11951. "TrackedTimeList": {
  11952. "description": "TrackedTimeList",
  11953. "schema": {
  11954. "type": "array",
  11955. "items": {
  11956. "$ref": "#/definitions/TrackedTime"
  11957. }
  11958. }
  11959. },
  11960. "User": {
  11961. "description": "User",
  11962. "schema": {
  11963. "$ref": "#/definitions/User"
  11964. }
  11965. },
  11966. "UserHeatmapData": {
  11967. "description": "UserHeatmapData",
  11968. "schema": {
  11969. "type": "array",
  11970. "items": {
  11971. "$ref": "#/definitions/UserHeatmapData"
  11972. }
  11973. }
  11974. },
  11975. "UserList": {
  11976. "description": "UserList",
  11977. "schema": {
  11978. "type": "array",
  11979. "items": {
  11980. "$ref": "#/definitions/User"
  11981. }
  11982. }
  11983. },
  11984. "WatchInfo": {
  11985. "description": "WatchInfo",
  11986. "schema": {
  11987. "$ref": "#/definitions/WatchInfo"
  11988. }
  11989. },
  11990. "empty": {
  11991. "description": "APIEmpty is an empty response"
  11992. },
  11993. "error": {
  11994. "description": "APIError is error format response",
  11995. "headers": {
  11996. "message": {
  11997. "type": "string"
  11998. },
  11999. "url": {
  12000. "type": "string"
  12001. }
  12002. }
  12003. },
  12004. "forbidden": {
  12005. "description": "APIForbiddenError is a forbidden error response",
  12006. "headers": {
  12007. "message": {
  12008. "type": "string"
  12009. },
  12010. "url": {
  12011. "type": "string"
  12012. }
  12013. }
  12014. },
  12015. "invalidTopicsError": {
  12016. "description": "APIInvalidTopicsError is error format response to invalid topics",
  12017. "headers": {
  12018. "invalidTopics": {
  12019. "type": "array",
  12020. "items": {
  12021. "type": "string"
  12022. }
  12023. },
  12024. "message": {
  12025. "type": "string"
  12026. }
  12027. }
  12028. },
  12029. "notFound": {
  12030. "description": "APINotFound is a not found empty response"
  12031. },
  12032. "parameterBodies": {
  12033. "description": "parameterBodies",
  12034. "schema": {
  12035. "$ref": "#/definitions/RepoTopicOptions"
  12036. }
  12037. },
  12038. "redirect": {
  12039. "description": "APIRedirect is a redirect response"
  12040. },
  12041. "validationError": {
  12042. "description": "APIValidationError is error format response related to input validation",
  12043. "headers": {
  12044. "message": {
  12045. "type": "string"
  12046. },
  12047. "url": {
  12048. "type": "string"
  12049. }
  12050. }
  12051. }
  12052. },
  12053. "securityDefinitions": {
  12054. "AccessToken": {
  12055. "type": "apiKey",
  12056. "name": "access_token",
  12057. "in": "query"
  12058. },
  12059. "AuthorizationHeaderToken": {
  12060. "description": "API tokens must be prepended with \"token\" followed by a space.",
  12061. "type": "apiKey",
  12062. "name": "Authorization",
  12063. "in": "header"
  12064. },
  12065. "BasicAuth": {
  12066. "type": "basic"
  12067. },
  12068. "SudoHeader": {
  12069. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  12070. "type": "apiKey",
  12071. "name": "Sudo",
  12072. "in": "header"
  12073. },
  12074. "SudoParam": {
  12075. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  12076. "type": "apiKey",
  12077. "name": "sudo",
  12078. "in": "query"
  12079. },
  12080. "Token": {
  12081. "type": "apiKey",
  12082. "name": "token",
  12083. "in": "query"
  12084. }
  12085. },
  12086. "security": [
  12087. {
  12088. "BasicAuth": []
  12089. },
  12090. {
  12091. "Token": []
  12092. },
  12093. {
  12094. "AccessToken": []
  12095. },
  12096. {
  12097. "AuthorizationHeaderToken": []
  12098. },
  12099. {
  12100. "SudoParam": []
  12101. },
  12102. {
  12103. "SudoHeader": []
  12104. }
  12105. ]
  12106. }