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

v1_json.tmpl 309 kB

Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
5 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
6 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
6 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
5 years ago
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
Repository avatars (#6986) * Repository avatars - first variant of code from old work for gogs - add migration 87 - add new option in app.ini - add en-US locale string - add new class in repository.less * Add changed index.css, remove unused template name * Update en-us doc about configuration options * Add comments to new functions, add new option to docker app.ini * Add comment for lint * Remove variable, not needed * Fix formatting * Update swagger api template * Check if avatar exists * Fix avatar link/path checks * Typo * TEXT column can't have a default value * Fixes: - remove old avatar file on upload - use ID in name of avatar file - users may upload same files - add simple tests * Fix fmt check * Generate PNG instead of "static" GIF * More informative comment * Fix error message * Update avatar upload checks: - add file size check - add new option - update config docs - add new string to en-us locale * Fixes: - use FileHEader field for check file size - add new test - upload big image * Fix formatting * Update comments * Update log message * Removed wrong style - not needed * Use Sync2 to migrate * Update repos list view - bigger avatar - fix html blocks alignment * A little adjust avatar size * Use small icons for explore/repo list * Use new cool avatar preparation func by @lafriks * Missing changes for new function * Remove unused import, move imports * Missed new option definition in app.ini Add file size check in user/profile avatar upload * Use smaller field length for Avatar * Use session to update repo DB data, update DeleteAvatar - use session too * Fix err variable definition * As suggested @lafriks - return as soon as possible, code readability
6 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
5 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238
  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/{index}": {
  3246. "get": {
  3247. "produces": [
  3248. "application/json"
  3249. ],
  3250. "tags": [
  3251. "issue"
  3252. ],
  3253. "summary": "Get an issue",
  3254. "operationId": "issueGetIssue",
  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 to get",
  3274. "name": "index",
  3275. "in": "path",
  3276. "required": true
  3277. }
  3278. ],
  3279. "responses": {
  3280. "200": {
  3281. "$ref": "#/responses/Issue"
  3282. },
  3283. "404": {
  3284. "$ref": "#/responses/notFound"
  3285. }
  3286. }
  3287. },
  3288. "patch": {
  3289. "consumes": [
  3290. "application/json"
  3291. ],
  3292. "produces": [
  3293. "application/json"
  3294. ],
  3295. "tags": [
  3296. "issue"
  3297. ],
  3298. "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  3299. "operationId": "issueEditIssue",
  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 edit",
  3319. "name": "index",
  3320. "in": "path",
  3321. "required": true
  3322. },
  3323. {
  3324. "name": "body",
  3325. "in": "body",
  3326. "schema": {
  3327. "$ref": "#/definitions/EditIssueOption"
  3328. }
  3329. }
  3330. ],
  3331. "responses": {
  3332. "201": {
  3333. "$ref": "#/responses/Issue"
  3334. },
  3335. "403": {
  3336. "$ref": "#/responses/forbidden"
  3337. },
  3338. "404": {
  3339. "$ref": "#/responses/notFound"
  3340. },
  3341. "412": {
  3342. "$ref": "#/responses/error"
  3343. }
  3344. }
  3345. }
  3346. },
  3347. "/repos/{owner}/{repo}/issues/{index}/comments": {
  3348. "get": {
  3349. "produces": [
  3350. "application/json"
  3351. ],
  3352. "tags": [
  3353. "issue"
  3354. ],
  3355. "summary": "List all comments on an issue",
  3356. "operationId": "issueGetComments",
  3357. "parameters": [
  3358. {
  3359. "type": "string",
  3360. "description": "owner of the repo",
  3361. "name": "owner",
  3362. "in": "path",
  3363. "required": true
  3364. },
  3365. {
  3366. "type": "string",
  3367. "description": "name of the repo",
  3368. "name": "repo",
  3369. "in": "path",
  3370. "required": true
  3371. },
  3372. {
  3373. "type": "integer",
  3374. "format": "int64",
  3375. "description": "index of the issue",
  3376. "name": "index",
  3377. "in": "path",
  3378. "required": true
  3379. },
  3380. {
  3381. "type": "string",
  3382. "description": "if provided, only comments updated since the specified time are returned.",
  3383. "name": "since",
  3384. "in": "query"
  3385. }
  3386. ],
  3387. "responses": {
  3388. "200": {
  3389. "$ref": "#/responses/CommentList"
  3390. }
  3391. }
  3392. },
  3393. "post": {
  3394. "consumes": [
  3395. "application/json"
  3396. ],
  3397. "produces": [
  3398. "application/json"
  3399. ],
  3400. "tags": [
  3401. "issue"
  3402. ],
  3403. "summary": "Add a comment to an issue",
  3404. "operationId": "issueCreateComment",
  3405. "parameters": [
  3406. {
  3407. "type": "string",
  3408. "description": "owner of the repo",
  3409. "name": "owner",
  3410. "in": "path",
  3411. "required": true
  3412. },
  3413. {
  3414. "type": "string",
  3415. "description": "name of the repo",
  3416. "name": "repo",
  3417. "in": "path",
  3418. "required": true
  3419. },
  3420. {
  3421. "type": "integer",
  3422. "format": "int64",
  3423. "description": "index of the issue",
  3424. "name": "index",
  3425. "in": "path",
  3426. "required": true
  3427. },
  3428. {
  3429. "name": "body",
  3430. "in": "body",
  3431. "schema": {
  3432. "$ref": "#/definitions/CreateIssueCommentOption"
  3433. }
  3434. }
  3435. ],
  3436. "responses": {
  3437. "201": {
  3438. "$ref": "#/responses/Comment"
  3439. },
  3440. "403": {
  3441. "$ref": "#/responses/forbidden"
  3442. }
  3443. }
  3444. }
  3445. },
  3446. "/repos/{owner}/{repo}/issues/{index}/comments/{id}": {
  3447. "delete": {
  3448. "tags": [
  3449. "issue"
  3450. ],
  3451. "summary": "Delete a comment",
  3452. "operationId": "issueDeleteCommentDeprecated",
  3453. "deprecated": true,
  3454. "parameters": [
  3455. {
  3456. "type": "string",
  3457. "description": "owner of the repo",
  3458. "name": "owner",
  3459. "in": "path",
  3460. "required": true
  3461. },
  3462. {
  3463. "type": "string",
  3464. "description": "name of the repo",
  3465. "name": "repo",
  3466. "in": "path",
  3467. "required": true
  3468. },
  3469. {
  3470. "type": "integer",
  3471. "description": "this parameter is ignored",
  3472. "name": "index",
  3473. "in": "path",
  3474. "required": true
  3475. },
  3476. {
  3477. "type": "integer",
  3478. "format": "int64",
  3479. "description": "id of comment to delete",
  3480. "name": "id",
  3481. "in": "path",
  3482. "required": true
  3483. }
  3484. ],
  3485. "responses": {
  3486. "204": {
  3487. "$ref": "#/responses/empty"
  3488. },
  3489. "403": {
  3490. "$ref": "#/responses/forbidden"
  3491. }
  3492. }
  3493. },
  3494. "patch": {
  3495. "consumes": [
  3496. "application/json"
  3497. ],
  3498. "produces": [
  3499. "application/json"
  3500. ],
  3501. "tags": [
  3502. "issue"
  3503. ],
  3504. "summary": "Edit a comment",
  3505. "operationId": "issueEditCommentDeprecated",
  3506. "deprecated": true,
  3507. "parameters": [
  3508. {
  3509. "type": "string",
  3510. "description": "owner of the repo",
  3511. "name": "owner",
  3512. "in": "path",
  3513. "required": true
  3514. },
  3515. {
  3516. "type": "string",
  3517. "description": "name of the repo",
  3518. "name": "repo",
  3519. "in": "path",
  3520. "required": true
  3521. },
  3522. {
  3523. "type": "integer",
  3524. "description": "this parameter is ignored",
  3525. "name": "index",
  3526. "in": "path",
  3527. "required": true
  3528. },
  3529. {
  3530. "type": "integer",
  3531. "format": "int64",
  3532. "description": "id of the comment to edit",
  3533. "name": "id",
  3534. "in": "path",
  3535. "required": true
  3536. },
  3537. {
  3538. "name": "body",
  3539. "in": "body",
  3540. "schema": {
  3541. "$ref": "#/definitions/EditIssueCommentOption"
  3542. }
  3543. }
  3544. ],
  3545. "responses": {
  3546. "200": {
  3547. "$ref": "#/responses/Comment"
  3548. },
  3549. "204": {
  3550. "$ref": "#/responses/empty"
  3551. },
  3552. "403": {
  3553. "$ref": "#/responses/forbidden"
  3554. }
  3555. }
  3556. }
  3557. },
  3558. "/repos/{owner}/{repo}/issues/{index}/deadline": {
  3559. "post": {
  3560. "consumes": [
  3561. "application/json"
  3562. ],
  3563. "produces": [
  3564. "application/json"
  3565. ],
  3566. "tags": [
  3567. "issue"
  3568. ],
  3569. "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.",
  3570. "operationId": "issueEditIssueDeadline",
  3571. "parameters": [
  3572. {
  3573. "type": "string",
  3574. "description": "owner of the repo",
  3575. "name": "owner",
  3576. "in": "path",
  3577. "required": true
  3578. },
  3579. {
  3580. "type": "string",
  3581. "description": "name of the repo",
  3582. "name": "repo",
  3583. "in": "path",
  3584. "required": true
  3585. },
  3586. {
  3587. "type": "integer",
  3588. "format": "int64",
  3589. "description": "index of the issue to create or update a deadline on",
  3590. "name": "index",
  3591. "in": "path",
  3592. "required": true
  3593. },
  3594. {
  3595. "name": "body",
  3596. "in": "body",
  3597. "schema": {
  3598. "$ref": "#/definitions/EditDeadlineOption"
  3599. }
  3600. }
  3601. ],
  3602. "responses": {
  3603. "201": {
  3604. "$ref": "#/responses/IssueDeadline"
  3605. },
  3606. "403": {
  3607. "$ref": "#/responses/forbidden"
  3608. },
  3609. "404": {
  3610. "$ref": "#/responses/notFound"
  3611. }
  3612. }
  3613. }
  3614. },
  3615. "/repos/{owner}/{repo}/issues/{index}/labels": {
  3616. "get": {
  3617. "produces": [
  3618. "application/json"
  3619. ],
  3620. "tags": [
  3621. "issue"
  3622. ],
  3623. "summary": "Get an issue's labels",
  3624. "operationId": "issueGetLabels",
  3625. "parameters": [
  3626. {
  3627. "type": "string",
  3628. "description": "owner of the repo",
  3629. "name": "owner",
  3630. "in": "path",
  3631. "required": true
  3632. },
  3633. {
  3634. "type": "string",
  3635. "description": "name of the repo",
  3636. "name": "repo",
  3637. "in": "path",
  3638. "required": true
  3639. },
  3640. {
  3641. "type": "integer",
  3642. "format": "int64",
  3643. "description": "index of the issue",
  3644. "name": "index",
  3645. "in": "path",
  3646. "required": true
  3647. }
  3648. ],
  3649. "responses": {
  3650. "200": {
  3651. "$ref": "#/responses/LabelList"
  3652. },
  3653. "404": {
  3654. "$ref": "#/responses/notFound"
  3655. }
  3656. }
  3657. },
  3658. "put": {
  3659. "consumes": [
  3660. "application/json"
  3661. ],
  3662. "produces": [
  3663. "application/json"
  3664. ],
  3665. "tags": [
  3666. "issue"
  3667. ],
  3668. "summary": "Replace an issue's labels",
  3669. "operationId": "issueReplaceLabels",
  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",
  3689. "name": "index",
  3690. "in": "path",
  3691. "required": true
  3692. },
  3693. {
  3694. "name": "body",
  3695. "in": "body",
  3696. "schema": {
  3697. "$ref": "#/definitions/IssueLabelsOption"
  3698. }
  3699. }
  3700. ],
  3701. "responses": {
  3702. "200": {
  3703. "$ref": "#/responses/LabelList"
  3704. },
  3705. "403": {
  3706. "$ref": "#/responses/forbidden"
  3707. }
  3708. }
  3709. },
  3710. "post": {
  3711. "consumes": [
  3712. "application/json"
  3713. ],
  3714. "produces": [
  3715. "application/json"
  3716. ],
  3717. "tags": [
  3718. "issue"
  3719. ],
  3720. "summary": "Add a label to an issue",
  3721. "operationId": "issueAddLabel",
  3722. "parameters": [
  3723. {
  3724. "type": "string",
  3725. "description": "owner of the repo",
  3726. "name": "owner",
  3727. "in": "path",
  3728. "required": true
  3729. },
  3730. {
  3731. "type": "string",
  3732. "description": "name of the repo",
  3733. "name": "repo",
  3734. "in": "path",
  3735. "required": true
  3736. },
  3737. {
  3738. "type": "integer",
  3739. "format": "int64",
  3740. "description": "index of the issue",
  3741. "name": "index",
  3742. "in": "path",
  3743. "required": true
  3744. },
  3745. {
  3746. "name": "body",
  3747. "in": "body",
  3748. "schema": {
  3749. "$ref": "#/definitions/IssueLabelsOption"
  3750. }
  3751. }
  3752. ],
  3753. "responses": {
  3754. "200": {
  3755. "$ref": "#/responses/LabelList"
  3756. },
  3757. "403": {
  3758. "$ref": "#/responses/forbidden"
  3759. }
  3760. }
  3761. },
  3762. "delete": {
  3763. "produces": [
  3764. "application/json"
  3765. ],
  3766. "tags": [
  3767. "issue"
  3768. ],
  3769. "summary": "Remove all labels from an issue",
  3770. "operationId": "issueClearLabels",
  3771. "parameters": [
  3772. {
  3773. "type": "string",
  3774. "description": "owner of the repo",
  3775. "name": "owner",
  3776. "in": "path",
  3777. "required": true
  3778. },
  3779. {
  3780. "type": "string",
  3781. "description": "name of the repo",
  3782. "name": "repo",
  3783. "in": "path",
  3784. "required": true
  3785. },
  3786. {
  3787. "type": "integer",
  3788. "format": "int64",
  3789. "description": "index of the issue",
  3790. "name": "index",
  3791. "in": "path",
  3792. "required": true
  3793. }
  3794. ],
  3795. "responses": {
  3796. "204": {
  3797. "$ref": "#/responses/empty"
  3798. },
  3799. "403": {
  3800. "$ref": "#/responses/forbidden"
  3801. }
  3802. }
  3803. }
  3804. },
  3805. "/repos/{owner}/{repo}/issues/{index}/labels/{id}": {
  3806. "delete": {
  3807. "produces": [
  3808. "application/json"
  3809. ],
  3810. "tags": [
  3811. "issue"
  3812. ],
  3813. "summary": "Remove a label from an issue",
  3814. "operationId": "issueRemoveLabel",
  3815. "parameters": [
  3816. {
  3817. "type": "string",
  3818. "description": "owner of the repo",
  3819. "name": "owner",
  3820. "in": "path",
  3821. "required": true
  3822. },
  3823. {
  3824. "type": "string",
  3825. "description": "name of the repo",
  3826. "name": "repo",
  3827. "in": "path",
  3828. "required": true
  3829. },
  3830. {
  3831. "type": "integer",
  3832. "format": "int64",
  3833. "description": "index of the issue",
  3834. "name": "index",
  3835. "in": "path",
  3836. "required": true
  3837. },
  3838. {
  3839. "type": "integer",
  3840. "format": "int64",
  3841. "description": "id of the label to remove",
  3842. "name": "id",
  3843. "in": "path",
  3844. "required": true
  3845. }
  3846. ],
  3847. "responses": {
  3848. "204": {
  3849. "$ref": "#/responses/empty"
  3850. },
  3851. "403": {
  3852. "$ref": "#/responses/forbidden"
  3853. },
  3854. "422": {
  3855. "$ref": "#/responses/validationError"
  3856. }
  3857. }
  3858. }
  3859. },
  3860. "/repos/{owner}/{repo}/issues/{index}/reactions": {
  3861. "get": {
  3862. "consumes": [
  3863. "application/json"
  3864. ],
  3865. "produces": [
  3866. "application/json"
  3867. ],
  3868. "tags": [
  3869. "issue"
  3870. ],
  3871. "summary": "Get a list reactions of a issue",
  3872. "operationId": "issueGetIssueReactions",
  3873. "parameters": [
  3874. {
  3875. "type": "string",
  3876. "description": "owner of the repo",
  3877. "name": "owner",
  3878. "in": "path",
  3879. "required": true
  3880. },
  3881. {
  3882. "type": "string",
  3883. "description": "name of the repo",
  3884. "name": "repo",
  3885. "in": "path",
  3886. "required": true
  3887. },
  3888. {
  3889. "type": "integer",
  3890. "format": "int64",
  3891. "description": "index of the issue",
  3892. "name": "index",
  3893. "in": "path",
  3894. "required": true
  3895. }
  3896. ],
  3897. "responses": {
  3898. "200": {
  3899. "$ref": "#/responses/ReactionResponseList"
  3900. },
  3901. "403": {
  3902. "$ref": "#/responses/forbidden"
  3903. }
  3904. }
  3905. },
  3906. "post": {
  3907. "consumes": [
  3908. "application/json"
  3909. ],
  3910. "produces": [
  3911. "application/json"
  3912. ],
  3913. "tags": [
  3914. "issue"
  3915. ],
  3916. "summary": "Add a reaction to a comment of a issue",
  3917. "operationId": "issuePostIssueReaction",
  3918. "parameters": [
  3919. {
  3920. "type": "string",
  3921. "description": "owner of the repo",
  3922. "name": "owner",
  3923. "in": "path",
  3924. "required": true
  3925. },
  3926. {
  3927. "type": "string",
  3928. "description": "name of the repo",
  3929. "name": "repo",
  3930. "in": "path",
  3931. "required": true
  3932. },
  3933. {
  3934. "type": "integer",
  3935. "format": "int64",
  3936. "description": "index of the issue",
  3937. "name": "index",
  3938. "in": "path",
  3939. "required": true
  3940. },
  3941. {
  3942. "name": "content",
  3943. "in": "body",
  3944. "schema": {
  3945. "$ref": "#/definitions/EditReactionOption"
  3946. }
  3947. }
  3948. ],
  3949. "responses": {
  3950. "201": {
  3951. "$ref": "#/responses/ReactionResponse"
  3952. },
  3953. "403": {
  3954. "$ref": "#/responses/forbidden"
  3955. }
  3956. }
  3957. },
  3958. "delete": {
  3959. "consumes": [
  3960. "application/json"
  3961. ],
  3962. "produces": [
  3963. "application/json"
  3964. ],
  3965. "tags": [
  3966. "issue"
  3967. ],
  3968. "summary": "Remove a reaction from a comment of a issue",
  3969. "operationId": "issueDeleteIssueReaction",
  3970. "parameters": [
  3971. {
  3972. "type": "string",
  3973. "description": "owner of the repo",
  3974. "name": "owner",
  3975. "in": "path",
  3976. "required": true
  3977. },
  3978. {
  3979. "type": "string",
  3980. "description": "name of the repo",
  3981. "name": "repo",
  3982. "in": "path",
  3983. "required": true
  3984. },
  3985. {
  3986. "type": "integer",
  3987. "format": "int64",
  3988. "description": "index of the issue",
  3989. "name": "index",
  3990. "in": "path",
  3991. "required": true
  3992. },
  3993. {
  3994. "name": "content",
  3995. "in": "body",
  3996. "schema": {
  3997. "$ref": "#/definitions/EditReactionOption"
  3998. }
  3999. }
  4000. ],
  4001. "responses": {
  4002. "200": {
  4003. "$ref": "#/responses/empty"
  4004. },
  4005. "403": {
  4006. "$ref": "#/responses/forbidden"
  4007. }
  4008. }
  4009. }
  4010. },
  4011. "/repos/{owner}/{repo}/issues/{index}/stopwatch/delete": {
  4012. "delete": {
  4013. "consumes": [
  4014. "application/json"
  4015. ],
  4016. "produces": [
  4017. "application/json"
  4018. ],
  4019. "tags": [
  4020. "issue"
  4021. ],
  4022. "summary": "Delete an issue's existing stopwatch.",
  4023. "operationId": "issueDeleteStopWatch",
  4024. "parameters": [
  4025. {
  4026. "type": "string",
  4027. "description": "owner of the repo",
  4028. "name": "owner",
  4029. "in": "path",
  4030. "required": true
  4031. },
  4032. {
  4033. "type": "string",
  4034. "description": "name of the repo",
  4035. "name": "repo",
  4036. "in": "path",
  4037. "required": true
  4038. },
  4039. {
  4040. "type": "integer",
  4041. "format": "int64",
  4042. "description": "index of the issue to stop the stopwatch on",
  4043. "name": "index",
  4044. "in": "path",
  4045. "required": true
  4046. }
  4047. ],
  4048. "responses": {
  4049. "204": {
  4050. "$ref": "#/responses/empty"
  4051. },
  4052. "403": {
  4053. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  4054. },
  4055. "404": {
  4056. "$ref": "#/responses/notFound"
  4057. },
  4058. "409": {
  4059. "description": "Cannot cancel a non existent stopwatch"
  4060. }
  4061. }
  4062. }
  4063. },
  4064. "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": {
  4065. "post": {
  4066. "consumes": [
  4067. "application/json"
  4068. ],
  4069. "produces": [
  4070. "application/json"
  4071. ],
  4072. "tags": [
  4073. "issue"
  4074. ],
  4075. "summary": "Start stopwatch on an issue.",
  4076. "operationId": "issueStartStopWatch",
  4077. "parameters": [
  4078. {
  4079. "type": "string",
  4080. "description": "owner of the repo",
  4081. "name": "owner",
  4082. "in": "path",
  4083. "required": true
  4084. },
  4085. {
  4086. "type": "string",
  4087. "description": "name of the repo",
  4088. "name": "repo",
  4089. "in": "path",
  4090. "required": true
  4091. },
  4092. {
  4093. "type": "integer",
  4094. "format": "int64",
  4095. "description": "index of the issue to create the stopwatch on",
  4096. "name": "index",
  4097. "in": "path",
  4098. "required": true
  4099. }
  4100. ],
  4101. "responses": {
  4102. "201": {
  4103. "$ref": "#/responses/empty"
  4104. },
  4105. "403": {
  4106. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  4107. },
  4108. "404": {
  4109. "$ref": "#/responses/notFound"
  4110. },
  4111. "409": {
  4112. "description": "Cannot start a stopwatch again if it already exists"
  4113. }
  4114. }
  4115. }
  4116. },
  4117. "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": {
  4118. "post": {
  4119. "consumes": [
  4120. "application/json"
  4121. ],
  4122. "produces": [
  4123. "application/json"
  4124. ],
  4125. "tags": [
  4126. "issue"
  4127. ],
  4128. "summary": "Stop an issue's existing stopwatch.",
  4129. "operationId": "issueStopStopWatch",
  4130. "parameters": [
  4131. {
  4132. "type": "string",
  4133. "description": "owner of the repo",
  4134. "name": "owner",
  4135. "in": "path",
  4136. "required": true
  4137. },
  4138. {
  4139. "type": "string",
  4140. "description": "name of the repo",
  4141. "name": "repo",
  4142. "in": "path",
  4143. "required": true
  4144. },
  4145. {
  4146. "type": "integer",
  4147. "format": "int64",
  4148. "description": "index of the issue to stop the stopwatch on",
  4149. "name": "index",
  4150. "in": "path",
  4151. "required": true
  4152. }
  4153. ],
  4154. "responses": {
  4155. "201": {
  4156. "$ref": "#/responses/empty"
  4157. },
  4158. "403": {
  4159. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  4160. },
  4161. "404": {
  4162. "$ref": "#/responses/notFound"
  4163. },
  4164. "409": {
  4165. "description": "Cannot stop a non existent stopwatch"
  4166. }
  4167. }
  4168. }
  4169. },
  4170. "/repos/{owner}/{repo}/issues/{index}/subscriptions": {
  4171. "get": {
  4172. "consumes": [
  4173. "application/json"
  4174. ],
  4175. "produces": [
  4176. "application/json"
  4177. ],
  4178. "tags": [
  4179. "issue"
  4180. ],
  4181. "summary": "Get users who subscribed on an issue.",
  4182. "operationId": "issueSubscriptions",
  4183. "parameters": [
  4184. {
  4185. "type": "string",
  4186. "description": "owner of the repo",
  4187. "name": "owner",
  4188. "in": "path",
  4189. "required": true
  4190. },
  4191. {
  4192. "type": "string",
  4193. "description": "name of the repo",
  4194. "name": "repo",
  4195. "in": "path",
  4196. "required": true
  4197. },
  4198. {
  4199. "type": "integer",
  4200. "format": "int64",
  4201. "description": "index of the issue",
  4202. "name": "index",
  4203. "in": "path",
  4204. "required": true
  4205. }
  4206. ],
  4207. "responses": {
  4208. "200": {
  4209. "$ref": "#/responses/UserList"
  4210. },
  4211. "404": {
  4212. "$ref": "#/responses/notFound"
  4213. }
  4214. }
  4215. }
  4216. },
  4217. "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}": {
  4218. "put": {
  4219. "consumes": [
  4220. "application/json"
  4221. ],
  4222. "produces": [
  4223. "application/json"
  4224. ],
  4225. "tags": [
  4226. "issue"
  4227. ],
  4228. "summary": "Subscribe user to issue",
  4229. "operationId": "issueAddSubscription",
  4230. "parameters": [
  4231. {
  4232. "type": "string",
  4233. "description": "owner of the repo",
  4234. "name": "owner",
  4235. "in": "path",
  4236. "required": true
  4237. },
  4238. {
  4239. "type": "string",
  4240. "description": "name of the repo",
  4241. "name": "repo",
  4242. "in": "path",
  4243. "required": true
  4244. },
  4245. {
  4246. "type": "integer",
  4247. "format": "int64",
  4248. "description": "index of the issue",
  4249. "name": "index",
  4250. "in": "path",
  4251. "required": true
  4252. },
  4253. {
  4254. "type": "string",
  4255. "description": "user to subscribe",
  4256. "name": "user",
  4257. "in": "path",
  4258. "required": true
  4259. }
  4260. ],
  4261. "responses": {
  4262. "201": {
  4263. "$ref": "#/responses/empty"
  4264. },
  4265. "304": {
  4266. "description": "User can only subscribe itself if he is no admin"
  4267. },
  4268. "404": {
  4269. "$ref": "#/responses/notFound"
  4270. }
  4271. }
  4272. },
  4273. "delete": {
  4274. "consumes": [
  4275. "application/json"
  4276. ],
  4277. "produces": [
  4278. "application/json"
  4279. ],
  4280. "tags": [
  4281. "issue"
  4282. ],
  4283. "summary": "Unsubscribe user from issue",
  4284. "operationId": "issueDeleteSubscription",
  4285. "parameters": [
  4286. {
  4287. "type": "string",
  4288. "description": "owner of the repo",
  4289. "name": "owner",
  4290. "in": "path",
  4291. "required": true
  4292. },
  4293. {
  4294. "type": "string",
  4295. "description": "name of the repo",
  4296. "name": "repo",
  4297. "in": "path",
  4298. "required": true
  4299. },
  4300. {
  4301. "type": "integer",
  4302. "format": "int64",
  4303. "description": "index of the issue",
  4304. "name": "index",
  4305. "in": "path",
  4306. "required": true
  4307. },
  4308. {
  4309. "type": "string",
  4310. "description": "user witch unsubscribe",
  4311. "name": "user",
  4312. "in": "path",
  4313. "required": true
  4314. }
  4315. ],
  4316. "responses": {
  4317. "201": {
  4318. "$ref": "#/responses/empty"
  4319. },
  4320. "304": {
  4321. "description": "User can only subscribe itself if he is no admin"
  4322. },
  4323. "404": {
  4324. "$ref": "#/responses/notFound"
  4325. }
  4326. }
  4327. }
  4328. },
  4329. "/repos/{owner}/{repo}/issues/{index}/times": {
  4330. "get": {
  4331. "produces": [
  4332. "application/json"
  4333. ],
  4334. "tags": [
  4335. "issue"
  4336. ],
  4337. "summary": "List an issue's tracked times",
  4338. "operationId": "issueTrackedTimes",
  4339. "parameters": [
  4340. {
  4341. "type": "string",
  4342. "description": "owner of the repo",
  4343. "name": "owner",
  4344. "in": "path",
  4345. "required": true
  4346. },
  4347. {
  4348. "type": "string",
  4349. "description": "name of the repo",
  4350. "name": "repo",
  4351. "in": "path",
  4352. "required": true
  4353. },
  4354. {
  4355. "type": "integer",
  4356. "format": "int64",
  4357. "description": "index of the issue",
  4358. "name": "index",
  4359. "in": "path",
  4360. "required": true
  4361. }
  4362. ],
  4363. "responses": {
  4364. "200": {
  4365. "$ref": "#/responses/TrackedTimeList"
  4366. },
  4367. "404": {
  4368. "$ref": "#/responses/notFound"
  4369. }
  4370. }
  4371. },
  4372. "post": {
  4373. "consumes": [
  4374. "application/json"
  4375. ],
  4376. "produces": [
  4377. "application/json"
  4378. ],
  4379. "tags": [
  4380. "issue"
  4381. ],
  4382. "summary": "Add tracked time to a issue",
  4383. "operationId": "issueAddTime",
  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. "name": "body",
  4409. "in": "body",
  4410. "schema": {
  4411. "$ref": "#/definitions/AddTimeOption"
  4412. }
  4413. }
  4414. ],
  4415. "responses": {
  4416. "200": {
  4417. "$ref": "#/responses/TrackedTime"
  4418. },
  4419. "400": {
  4420. "$ref": "#/responses/error"
  4421. },
  4422. "403": {
  4423. "$ref": "#/responses/forbidden"
  4424. }
  4425. }
  4426. },
  4427. "delete": {
  4428. "consumes": [
  4429. "application/json"
  4430. ],
  4431. "produces": [
  4432. "application/json"
  4433. ],
  4434. "tags": [
  4435. "issue"
  4436. ],
  4437. "summary": "Reset a tracked time of an issue",
  4438. "operationId": "issueResetTime",
  4439. "parameters": [
  4440. {
  4441. "type": "string",
  4442. "description": "owner of the repo",
  4443. "name": "owner",
  4444. "in": "path",
  4445. "required": true
  4446. },
  4447. {
  4448. "type": "string",
  4449. "description": "name of the repo",
  4450. "name": "repo",
  4451. "in": "path",
  4452. "required": true
  4453. },
  4454. {
  4455. "type": "integer",
  4456. "format": "int64",
  4457. "description": "index of the issue to add tracked time to",
  4458. "name": "index",
  4459. "in": "path",
  4460. "required": true
  4461. }
  4462. ],
  4463. "responses": {
  4464. "204": {
  4465. "$ref": "#/responses/empty"
  4466. },
  4467. "400": {
  4468. "$ref": "#/responses/error"
  4469. },
  4470. "403": {
  4471. "$ref": "#/responses/error"
  4472. }
  4473. }
  4474. }
  4475. },
  4476. "/repos/{owner}/{repo}/issues/{index}/times/{id}": {
  4477. "delete": {
  4478. "consumes": [
  4479. "application/json"
  4480. ],
  4481. "produces": [
  4482. "application/json"
  4483. ],
  4484. "tags": [
  4485. "issue"
  4486. ],
  4487. "summary": "Delete specific tracked time",
  4488. "operationId": "issueDeleteTime",
  4489. "parameters": [
  4490. {
  4491. "type": "string",
  4492. "description": "owner of the repo",
  4493. "name": "owner",
  4494. "in": "path",
  4495. "required": true
  4496. },
  4497. {
  4498. "type": "string",
  4499. "description": "name of the repo",
  4500. "name": "repo",
  4501. "in": "path",
  4502. "required": true
  4503. },
  4504. {
  4505. "type": "integer",
  4506. "format": "int64",
  4507. "description": "index of the issue",
  4508. "name": "index",
  4509. "in": "path",
  4510. "required": true
  4511. },
  4512. {
  4513. "type": "integer",
  4514. "format": "int64",
  4515. "description": "id of time to delete",
  4516. "name": "id",
  4517. "in": "path",
  4518. "required": true
  4519. }
  4520. ],
  4521. "responses": {
  4522. "204": {
  4523. "$ref": "#/responses/empty"
  4524. },
  4525. "400": {
  4526. "$ref": "#/responses/error"
  4527. },
  4528. "403": {
  4529. "$ref": "#/responses/error"
  4530. }
  4531. }
  4532. }
  4533. },
  4534. "/repos/{owner}/{repo}/keys": {
  4535. "get": {
  4536. "produces": [
  4537. "application/json"
  4538. ],
  4539. "tags": [
  4540. "repository"
  4541. ],
  4542. "summary": "List a repository's keys",
  4543. "operationId": "repoListKeys",
  4544. "parameters": [
  4545. {
  4546. "type": "string",
  4547. "description": "owner of the repo",
  4548. "name": "owner",
  4549. "in": "path",
  4550. "required": true
  4551. },
  4552. {
  4553. "type": "string",
  4554. "description": "name of the repo",
  4555. "name": "repo",
  4556. "in": "path",
  4557. "required": true
  4558. },
  4559. {
  4560. "type": "integer",
  4561. "description": "the key_id to search for",
  4562. "name": "key_id",
  4563. "in": "query"
  4564. },
  4565. {
  4566. "type": "string",
  4567. "description": "fingerprint of the key",
  4568. "name": "fingerprint",
  4569. "in": "query"
  4570. }
  4571. ],
  4572. "responses": {
  4573. "200": {
  4574. "$ref": "#/responses/DeployKeyList"
  4575. }
  4576. }
  4577. },
  4578. "post": {
  4579. "consumes": [
  4580. "application/json"
  4581. ],
  4582. "produces": [
  4583. "application/json"
  4584. ],
  4585. "tags": [
  4586. "repository"
  4587. ],
  4588. "summary": "Add a key to a repository",
  4589. "operationId": "repoCreateKey",
  4590. "parameters": [
  4591. {
  4592. "type": "string",
  4593. "description": "owner of the repo",
  4594. "name": "owner",
  4595. "in": "path",
  4596. "required": true
  4597. },
  4598. {
  4599. "type": "string",
  4600. "description": "name of the repo",
  4601. "name": "repo",
  4602. "in": "path",
  4603. "required": true
  4604. },
  4605. {
  4606. "name": "body",
  4607. "in": "body",
  4608. "schema": {
  4609. "$ref": "#/definitions/CreateKeyOption"
  4610. }
  4611. }
  4612. ],
  4613. "responses": {
  4614. "201": {
  4615. "$ref": "#/responses/DeployKey"
  4616. },
  4617. "422": {
  4618. "$ref": "#/responses/validationError"
  4619. }
  4620. }
  4621. }
  4622. },
  4623. "/repos/{owner}/{repo}/keys/{id}": {
  4624. "get": {
  4625. "produces": [
  4626. "application/json"
  4627. ],
  4628. "tags": [
  4629. "repository"
  4630. ],
  4631. "summary": "Get a repository's key by id",
  4632. "operationId": "repoGetKey",
  4633. "parameters": [
  4634. {
  4635. "type": "string",
  4636. "description": "owner of the repo",
  4637. "name": "owner",
  4638. "in": "path",
  4639. "required": true
  4640. },
  4641. {
  4642. "type": "string",
  4643. "description": "name of the repo",
  4644. "name": "repo",
  4645. "in": "path",
  4646. "required": true
  4647. },
  4648. {
  4649. "type": "integer",
  4650. "format": "int64",
  4651. "description": "id of the key to get",
  4652. "name": "id",
  4653. "in": "path",
  4654. "required": true
  4655. }
  4656. ],
  4657. "responses": {
  4658. "200": {
  4659. "$ref": "#/responses/DeployKey"
  4660. }
  4661. }
  4662. },
  4663. "delete": {
  4664. "tags": [
  4665. "repository"
  4666. ],
  4667. "summary": "Delete a key from a repository",
  4668. "operationId": "repoDeleteKey",
  4669. "parameters": [
  4670. {
  4671. "type": "string",
  4672. "description": "owner of the repo",
  4673. "name": "owner",
  4674. "in": "path",
  4675. "required": true
  4676. },
  4677. {
  4678. "type": "string",
  4679. "description": "name of the repo",
  4680. "name": "repo",
  4681. "in": "path",
  4682. "required": true
  4683. },
  4684. {
  4685. "type": "integer",
  4686. "format": "int64",
  4687. "description": "id of the key to delete",
  4688. "name": "id",
  4689. "in": "path",
  4690. "required": true
  4691. }
  4692. ],
  4693. "responses": {
  4694. "204": {
  4695. "$ref": "#/responses/empty"
  4696. },
  4697. "403": {
  4698. "$ref": "#/responses/forbidden"
  4699. }
  4700. }
  4701. }
  4702. },
  4703. "/repos/{owner}/{repo}/labels": {
  4704. "get": {
  4705. "produces": [
  4706. "application/json"
  4707. ],
  4708. "tags": [
  4709. "issue"
  4710. ],
  4711. "summary": "Get all of a repository's labels",
  4712. "operationId": "issueListLabels",
  4713. "parameters": [
  4714. {
  4715. "type": "string",
  4716. "description": "owner of the repo",
  4717. "name": "owner",
  4718. "in": "path",
  4719. "required": true
  4720. },
  4721. {
  4722. "type": "string",
  4723. "description": "name of the repo",
  4724. "name": "repo",
  4725. "in": "path",
  4726. "required": true
  4727. }
  4728. ],
  4729. "responses": {
  4730. "200": {
  4731. "$ref": "#/responses/LabelList"
  4732. }
  4733. }
  4734. },
  4735. "post": {
  4736. "consumes": [
  4737. "application/json"
  4738. ],
  4739. "produces": [
  4740. "application/json"
  4741. ],
  4742. "tags": [
  4743. "issue"
  4744. ],
  4745. "summary": "Create a label",
  4746. "operationId": "issueCreateLabel",
  4747. "parameters": [
  4748. {
  4749. "type": "string",
  4750. "description": "owner of the repo",
  4751. "name": "owner",
  4752. "in": "path",
  4753. "required": true
  4754. },
  4755. {
  4756. "type": "string",
  4757. "description": "name of the repo",
  4758. "name": "repo",
  4759. "in": "path",
  4760. "required": true
  4761. },
  4762. {
  4763. "name": "body",
  4764. "in": "body",
  4765. "schema": {
  4766. "$ref": "#/definitions/CreateLabelOption"
  4767. }
  4768. }
  4769. ],
  4770. "responses": {
  4771. "201": {
  4772. "$ref": "#/responses/Label"
  4773. }
  4774. }
  4775. }
  4776. },
  4777. "/repos/{owner}/{repo}/labels/{id}": {
  4778. "get": {
  4779. "produces": [
  4780. "application/json"
  4781. ],
  4782. "tags": [
  4783. "issue"
  4784. ],
  4785. "summary": "Get a single label",
  4786. "operationId": "issueGetLabel",
  4787. "parameters": [
  4788. {
  4789. "type": "string",
  4790. "description": "owner of the repo",
  4791. "name": "owner",
  4792. "in": "path",
  4793. "required": true
  4794. },
  4795. {
  4796. "type": "string",
  4797. "description": "name of the repo",
  4798. "name": "repo",
  4799. "in": "path",
  4800. "required": true
  4801. },
  4802. {
  4803. "type": "integer",
  4804. "format": "int64",
  4805. "description": "id of the label to get",
  4806. "name": "id",
  4807. "in": "path",
  4808. "required": true
  4809. }
  4810. ],
  4811. "responses": {
  4812. "200": {
  4813. "$ref": "#/responses/Label"
  4814. }
  4815. }
  4816. },
  4817. "delete": {
  4818. "tags": [
  4819. "issue"
  4820. ],
  4821. "summary": "Delete a label",
  4822. "operationId": "issueDeleteLabel",
  4823. "parameters": [
  4824. {
  4825. "type": "string",
  4826. "description": "owner of the repo",
  4827. "name": "owner",
  4828. "in": "path",
  4829. "required": true
  4830. },
  4831. {
  4832. "type": "string",
  4833. "description": "name of the repo",
  4834. "name": "repo",
  4835. "in": "path",
  4836. "required": true
  4837. },
  4838. {
  4839. "type": "integer",
  4840. "format": "int64",
  4841. "description": "id of the label to delete",
  4842. "name": "id",
  4843. "in": "path",
  4844. "required": true
  4845. }
  4846. ],
  4847. "responses": {
  4848. "204": {
  4849. "$ref": "#/responses/empty"
  4850. }
  4851. }
  4852. },
  4853. "patch": {
  4854. "consumes": [
  4855. "application/json"
  4856. ],
  4857. "produces": [
  4858. "application/json"
  4859. ],
  4860. "tags": [
  4861. "issue"
  4862. ],
  4863. "summary": "Update a label",
  4864. "operationId": "issueEditLabel",
  4865. "parameters": [
  4866. {
  4867. "type": "string",
  4868. "description": "owner of the repo",
  4869. "name": "owner",
  4870. "in": "path",
  4871. "required": true
  4872. },
  4873. {
  4874. "type": "string",
  4875. "description": "name of the repo",
  4876. "name": "repo",
  4877. "in": "path",
  4878. "required": true
  4879. },
  4880. {
  4881. "type": "integer",
  4882. "format": "int64",
  4883. "description": "id of the label to edit",
  4884. "name": "id",
  4885. "in": "path",
  4886. "required": true
  4887. },
  4888. {
  4889. "name": "body",
  4890. "in": "body",
  4891. "schema": {
  4892. "$ref": "#/definitions/EditLabelOption"
  4893. }
  4894. }
  4895. ],
  4896. "responses": {
  4897. "200": {
  4898. "$ref": "#/responses/Label"
  4899. }
  4900. }
  4901. }
  4902. },
  4903. "/repos/{owner}/{repo}/milestones": {
  4904. "get": {
  4905. "produces": [
  4906. "application/json"
  4907. ],
  4908. "tags": [
  4909. "issue"
  4910. ],
  4911. "summary": "Get all of a repository's opened milestones",
  4912. "operationId": "issueGetMilestonesList",
  4913. "parameters": [
  4914. {
  4915. "type": "string",
  4916. "description": "owner of the repo",
  4917. "name": "owner",
  4918. "in": "path",
  4919. "required": true
  4920. },
  4921. {
  4922. "type": "string",
  4923. "description": "name of the repo",
  4924. "name": "repo",
  4925. "in": "path",
  4926. "required": true
  4927. },
  4928. {
  4929. "type": "string",
  4930. "description": "Milestone state, Recognised values are open, closed and all. Defaults to \"open\"",
  4931. "name": "state",
  4932. "in": "query"
  4933. }
  4934. ],
  4935. "responses": {
  4936. "200": {
  4937. "$ref": "#/responses/MilestoneList"
  4938. }
  4939. }
  4940. },
  4941. "post": {
  4942. "consumes": [
  4943. "application/json"
  4944. ],
  4945. "produces": [
  4946. "application/json"
  4947. ],
  4948. "tags": [
  4949. "issue"
  4950. ],
  4951. "summary": "Create a milestone",
  4952. "operationId": "issueCreateMilestone",
  4953. "parameters": [
  4954. {
  4955. "type": "string",
  4956. "description": "owner of the repo",
  4957. "name": "owner",
  4958. "in": "path",
  4959. "required": true
  4960. },
  4961. {
  4962. "type": "string",
  4963. "description": "name of the repo",
  4964. "name": "repo",
  4965. "in": "path",
  4966. "required": true
  4967. },
  4968. {
  4969. "name": "body",
  4970. "in": "body",
  4971. "schema": {
  4972. "$ref": "#/definitions/CreateMilestoneOption"
  4973. }
  4974. }
  4975. ],
  4976. "responses": {
  4977. "201": {
  4978. "$ref": "#/responses/Milestone"
  4979. }
  4980. }
  4981. }
  4982. },
  4983. "/repos/{owner}/{repo}/milestones/{id}": {
  4984. "get": {
  4985. "produces": [
  4986. "application/json"
  4987. ],
  4988. "tags": [
  4989. "issue"
  4990. ],
  4991. "summary": "Get a milestone",
  4992. "operationId": "issueGetMilestone",
  4993. "parameters": [
  4994. {
  4995. "type": "string",
  4996. "description": "owner of the repo",
  4997. "name": "owner",
  4998. "in": "path",
  4999. "required": true
  5000. },
  5001. {
  5002. "type": "string",
  5003. "description": "name of the repo",
  5004. "name": "repo",
  5005. "in": "path",
  5006. "required": true
  5007. },
  5008. {
  5009. "type": "integer",
  5010. "format": "int64",
  5011. "description": "id of the milestone",
  5012. "name": "id",
  5013. "in": "path",
  5014. "required": true
  5015. }
  5016. ],
  5017. "responses": {
  5018. "200": {
  5019. "$ref": "#/responses/Milestone"
  5020. }
  5021. }
  5022. },
  5023. "delete": {
  5024. "tags": [
  5025. "issue"
  5026. ],
  5027. "summary": "Delete a milestone",
  5028. "operationId": "issueDeleteMilestone",
  5029. "parameters": [
  5030. {
  5031. "type": "string",
  5032. "description": "owner of the repo",
  5033. "name": "owner",
  5034. "in": "path",
  5035. "required": true
  5036. },
  5037. {
  5038. "type": "string",
  5039. "description": "name of the repo",
  5040. "name": "repo",
  5041. "in": "path",
  5042. "required": true
  5043. },
  5044. {
  5045. "type": "integer",
  5046. "format": "int64",
  5047. "description": "id of the milestone to delete",
  5048. "name": "id",
  5049. "in": "path",
  5050. "required": true
  5051. }
  5052. ],
  5053. "responses": {
  5054. "204": {
  5055. "$ref": "#/responses/empty"
  5056. }
  5057. }
  5058. },
  5059. "patch": {
  5060. "consumes": [
  5061. "application/json"
  5062. ],
  5063. "produces": [
  5064. "application/json"
  5065. ],
  5066. "tags": [
  5067. "issue"
  5068. ],
  5069. "summary": "Update a milestone",
  5070. "operationId": "issueEditMilestone",
  5071. "parameters": [
  5072. {
  5073. "type": "string",
  5074. "description": "owner of the repo",
  5075. "name": "owner",
  5076. "in": "path",
  5077. "required": true
  5078. },
  5079. {
  5080. "type": "string",
  5081. "description": "name of the repo",
  5082. "name": "repo",
  5083. "in": "path",
  5084. "required": true
  5085. },
  5086. {
  5087. "type": "integer",
  5088. "format": "int64",
  5089. "description": "id of the milestone",
  5090. "name": "id",
  5091. "in": "path",
  5092. "required": true
  5093. },
  5094. {
  5095. "name": "body",
  5096. "in": "body",
  5097. "schema": {
  5098. "$ref": "#/definitions/EditMilestoneOption"
  5099. }
  5100. }
  5101. ],
  5102. "responses": {
  5103. "200": {
  5104. "$ref": "#/responses/Milestone"
  5105. }
  5106. }
  5107. }
  5108. },
  5109. "/repos/{owner}/{repo}/mirror-sync": {
  5110. "post": {
  5111. "produces": [
  5112. "application/json"
  5113. ],
  5114. "tags": [
  5115. "repository"
  5116. ],
  5117. "summary": "Sync a mirrored repository",
  5118. "operationId": "repoMirrorSync",
  5119. "parameters": [
  5120. {
  5121. "type": "string",
  5122. "description": "owner of the repo to sync",
  5123. "name": "owner",
  5124. "in": "path",
  5125. "required": true
  5126. },
  5127. {
  5128. "type": "string",
  5129. "description": "name of the repo to sync",
  5130. "name": "repo",
  5131. "in": "path",
  5132. "required": true
  5133. }
  5134. ],
  5135. "responses": {
  5136. "200": {
  5137. "$ref": "#/responses/empty"
  5138. },
  5139. "403": {
  5140. "$ref": "#/responses/forbidden"
  5141. }
  5142. }
  5143. }
  5144. },
  5145. "/repos/{owner}/{repo}/pulls": {
  5146. "get": {
  5147. "produces": [
  5148. "application/json"
  5149. ],
  5150. "tags": [
  5151. "repository"
  5152. ],
  5153. "summary": "List a repo's pull requests",
  5154. "operationId": "repoListPullRequests",
  5155. "parameters": [
  5156. {
  5157. "type": "string",
  5158. "description": "owner of the repo",
  5159. "name": "owner",
  5160. "in": "path",
  5161. "required": true
  5162. },
  5163. {
  5164. "type": "string",
  5165. "description": "name of the repo",
  5166. "name": "repo",
  5167. "in": "path",
  5168. "required": true
  5169. },
  5170. {
  5171. "type": "integer",
  5172. "description": "Page number",
  5173. "name": "page",
  5174. "in": "query"
  5175. },
  5176. {
  5177. "enum": [
  5178. "closed",
  5179. "open",
  5180. "all"
  5181. ],
  5182. "type": "string",
  5183. "description": "State of pull request: open or closed (optional)",
  5184. "name": "state",
  5185. "in": "query"
  5186. },
  5187. {
  5188. "enum": [
  5189. "oldest",
  5190. "recentupdate",
  5191. "leastupdate",
  5192. "mostcomment",
  5193. "leastcomment",
  5194. "priority"
  5195. ],
  5196. "type": "string",
  5197. "description": "Type of sort",
  5198. "name": "sort",
  5199. "in": "query"
  5200. },
  5201. {
  5202. "type": "integer",
  5203. "format": "int64",
  5204. "description": "ID of the milestone",
  5205. "name": "milestone",
  5206. "in": "query"
  5207. },
  5208. {
  5209. "type": "array",
  5210. "items": {
  5211. "type": "integer",
  5212. "format": "int64"
  5213. },
  5214. "collectionFormat": "multi",
  5215. "description": "Label IDs",
  5216. "name": "labels",
  5217. "in": "query"
  5218. }
  5219. ],
  5220. "responses": {
  5221. "200": {
  5222. "$ref": "#/responses/PullRequestList"
  5223. }
  5224. }
  5225. },
  5226. "post": {
  5227. "consumes": [
  5228. "application/json"
  5229. ],
  5230. "produces": [
  5231. "application/json"
  5232. ],
  5233. "tags": [
  5234. "repository"
  5235. ],
  5236. "summary": "Create a pull request",
  5237. "operationId": "repoCreatePullRequest",
  5238. "parameters": [
  5239. {
  5240. "type": "string",
  5241. "description": "owner of the repo",
  5242. "name": "owner",
  5243. "in": "path",
  5244. "required": true
  5245. },
  5246. {
  5247. "type": "string",
  5248. "description": "name of the repo",
  5249. "name": "repo",
  5250. "in": "path",
  5251. "required": true
  5252. },
  5253. {
  5254. "name": "body",
  5255. "in": "body",
  5256. "schema": {
  5257. "$ref": "#/definitions/CreatePullRequestOption"
  5258. }
  5259. }
  5260. ],
  5261. "responses": {
  5262. "201": {
  5263. "$ref": "#/responses/PullRequest"
  5264. },
  5265. "409": {
  5266. "$ref": "#/responses/error"
  5267. },
  5268. "422": {
  5269. "$ref": "#/responses/validationError"
  5270. }
  5271. }
  5272. }
  5273. },
  5274. "/repos/{owner}/{repo}/pulls/{index}": {
  5275. "get": {
  5276. "produces": [
  5277. "application/json"
  5278. ],
  5279. "tags": [
  5280. "repository"
  5281. ],
  5282. "summary": "Get a pull request",
  5283. "operationId": "repoGetPullRequest",
  5284. "parameters": [
  5285. {
  5286. "type": "string",
  5287. "description": "owner of the repo",
  5288. "name": "owner",
  5289. "in": "path",
  5290. "required": true
  5291. },
  5292. {
  5293. "type": "string",
  5294. "description": "name of the repo",
  5295. "name": "repo",
  5296. "in": "path",
  5297. "required": true
  5298. },
  5299. {
  5300. "type": "integer",
  5301. "format": "int64",
  5302. "description": "index of the pull request to get",
  5303. "name": "index",
  5304. "in": "path",
  5305. "required": true
  5306. }
  5307. ],
  5308. "responses": {
  5309. "200": {
  5310. "$ref": "#/responses/PullRequest"
  5311. }
  5312. }
  5313. },
  5314. "patch": {
  5315. "consumes": [
  5316. "application/json"
  5317. ],
  5318. "produces": [
  5319. "application/json"
  5320. ],
  5321. "tags": [
  5322. "repository"
  5323. ],
  5324. "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.",
  5325. "operationId": "repoEditPullRequest",
  5326. "parameters": [
  5327. {
  5328. "type": "string",
  5329. "description": "owner of the repo",
  5330. "name": "owner",
  5331. "in": "path",
  5332. "required": true
  5333. },
  5334. {
  5335. "type": "string",
  5336. "description": "name of the repo",
  5337. "name": "repo",
  5338. "in": "path",
  5339. "required": true
  5340. },
  5341. {
  5342. "type": "integer",
  5343. "format": "int64",
  5344. "description": "index of the pull request to edit",
  5345. "name": "index",
  5346. "in": "path",
  5347. "required": true
  5348. },
  5349. {
  5350. "name": "body",
  5351. "in": "body",
  5352. "schema": {
  5353. "$ref": "#/definitions/EditPullRequestOption"
  5354. }
  5355. }
  5356. ],
  5357. "responses": {
  5358. "201": {
  5359. "$ref": "#/responses/PullRequest"
  5360. },
  5361. "403": {
  5362. "$ref": "#/responses/forbidden"
  5363. },
  5364. "412": {
  5365. "$ref": "#/responses/error"
  5366. },
  5367. "422": {
  5368. "$ref": "#/responses/validationError"
  5369. }
  5370. }
  5371. }
  5372. },
  5373. "/repos/{owner}/{repo}/pulls/{index}/merge": {
  5374. "get": {
  5375. "produces": [
  5376. "application/json"
  5377. ],
  5378. "tags": [
  5379. "repository"
  5380. ],
  5381. "summary": "Check if a pull request has been merged",
  5382. "operationId": "repoPullRequestIsMerged",
  5383. "parameters": [
  5384. {
  5385. "type": "string",
  5386. "description": "owner of the repo",
  5387. "name": "owner",
  5388. "in": "path",
  5389. "required": true
  5390. },
  5391. {
  5392. "type": "string",
  5393. "description": "name of the repo",
  5394. "name": "repo",
  5395. "in": "path",
  5396. "required": true
  5397. },
  5398. {
  5399. "type": "integer",
  5400. "format": "int64",
  5401. "description": "index of the pull request",
  5402. "name": "index",
  5403. "in": "path",
  5404. "required": true
  5405. }
  5406. ],
  5407. "responses": {
  5408. "204": {
  5409. "description": "pull request has been merged"
  5410. },
  5411. "404": {
  5412. "description": "pull request has not been merged"
  5413. }
  5414. }
  5415. },
  5416. "post": {
  5417. "produces": [
  5418. "application/json"
  5419. ],
  5420. "tags": [
  5421. "repository"
  5422. ],
  5423. "summary": "Merge a pull request",
  5424. "operationId": "repoMergePullRequest",
  5425. "parameters": [
  5426. {
  5427. "type": "string",
  5428. "description": "owner of the repo",
  5429. "name": "owner",
  5430. "in": "path",
  5431. "required": true
  5432. },
  5433. {
  5434. "type": "string",
  5435. "description": "name of the repo",
  5436. "name": "repo",
  5437. "in": "path",
  5438. "required": true
  5439. },
  5440. {
  5441. "type": "integer",
  5442. "format": "int64",
  5443. "description": "index of the pull request to merge",
  5444. "name": "index",
  5445. "in": "path",
  5446. "required": true
  5447. },
  5448. {
  5449. "name": "body",
  5450. "in": "body",
  5451. "schema": {
  5452. "$ref": "#/definitions/MergePullRequestOption"
  5453. }
  5454. }
  5455. ],
  5456. "responses": {
  5457. "200": {
  5458. "$ref": "#/responses/empty"
  5459. },
  5460. "405": {
  5461. "$ref": "#/responses/empty"
  5462. },
  5463. "409": {
  5464. "$ref": "#/responses/error"
  5465. }
  5466. }
  5467. }
  5468. },
  5469. "/repos/{owner}/{repo}/raw/{filepath}": {
  5470. "get": {
  5471. "produces": [
  5472. "application/json"
  5473. ],
  5474. "tags": [
  5475. "repository"
  5476. ],
  5477. "summary": "Get a file from a repository",
  5478. "operationId": "repoGetRawFile",
  5479. "parameters": [
  5480. {
  5481. "type": "string",
  5482. "description": "owner of the repo",
  5483. "name": "owner",
  5484. "in": "path",
  5485. "required": true
  5486. },
  5487. {
  5488. "type": "string",
  5489. "description": "name of the repo",
  5490. "name": "repo",
  5491. "in": "path",
  5492. "required": true
  5493. },
  5494. {
  5495. "type": "string",
  5496. "description": "filepath of the file to get",
  5497. "name": "filepath",
  5498. "in": "path",
  5499. "required": true
  5500. }
  5501. ],
  5502. "responses": {
  5503. "200": {
  5504. "description": "success"
  5505. },
  5506. "404": {
  5507. "$ref": "#/responses/notFound"
  5508. }
  5509. }
  5510. }
  5511. },
  5512. "/repos/{owner}/{repo}/releases": {
  5513. "get": {
  5514. "produces": [
  5515. "application/json"
  5516. ],
  5517. "tags": [
  5518. "repository"
  5519. ],
  5520. "summary": "List a repo's releases",
  5521. "operationId": "repoListReleases",
  5522. "parameters": [
  5523. {
  5524. "type": "string",
  5525. "description": "owner of the repo",
  5526. "name": "owner",
  5527. "in": "path",
  5528. "required": true
  5529. },
  5530. {
  5531. "type": "string",
  5532. "description": "name of the repo",
  5533. "name": "repo",
  5534. "in": "path",
  5535. "required": true
  5536. },
  5537. {
  5538. "type": "integer",
  5539. "description": "page wants to load",
  5540. "name": "page",
  5541. "in": "query"
  5542. },
  5543. {
  5544. "type": "integer",
  5545. "description": "items count every page wants to load",
  5546. "name": "per_page",
  5547. "in": "query"
  5548. }
  5549. ],
  5550. "responses": {
  5551. "200": {
  5552. "$ref": "#/responses/ReleaseList"
  5553. }
  5554. }
  5555. },
  5556. "post": {
  5557. "consumes": [
  5558. "application/json"
  5559. ],
  5560. "produces": [
  5561. "application/json"
  5562. ],
  5563. "tags": [
  5564. "repository"
  5565. ],
  5566. "summary": "Create a release",
  5567. "operationId": "repoCreateRelease",
  5568. "parameters": [
  5569. {
  5570. "type": "string",
  5571. "description": "owner of the repo",
  5572. "name": "owner",
  5573. "in": "path",
  5574. "required": true
  5575. },
  5576. {
  5577. "type": "string",
  5578. "description": "name of the repo",
  5579. "name": "repo",
  5580. "in": "path",
  5581. "required": true
  5582. },
  5583. {
  5584. "name": "body",
  5585. "in": "body",
  5586. "schema": {
  5587. "$ref": "#/definitions/CreateReleaseOption"
  5588. }
  5589. }
  5590. ],
  5591. "responses": {
  5592. "201": {
  5593. "$ref": "#/responses/Release"
  5594. },
  5595. "409": {
  5596. "$ref": "#/responses/error"
  5597. }
  5598. }
  5599. }
  5600. },
  5601. "/repos/{owner}/{repo}/releases/{id}": {
  5602. "get": {
  5603. "produces": [
  5604. "application/json"
  5605. ],
  5606. "tags": [
  5607. "repository"
  5608. ],
  5609. "summary": "Get a release",
  5610. "operationId": "repoGetRelease",
  5611. "parameters": [
  5612. {
  5613. "type": "string",
  5614. "description": "owner of the repo",
  5615. "name": "owner",
  5616. "in": "path",
  5617. "required": true
  5618. },
  5619. {
  5620. "type": "string",
  5621. "description": "name of the repo",
  5622. "name": "repo",
  5623. "in": "path",
  5624. "required": true
  5625. },
  5626. {
  5627. "type": "integer",
  5628. "format": "int64",
  5629. "description": "id of the release to get",
  5630. "name": "id",
  5631. "in": "path",
  5632. "required": true
  5633. }
  5634. ],
  5635. "responses": {
  5636. "200": {
  5637. "$ref": "#/responses/Release"
  5638. }
  5639. }
  5640. },
  5641. "delete": {
  5642. "tags": [
  5643. "repository"
  5644. ],
  5645. "summary": "Delete a release",
  5646. "operationId": "repoDeleteRelease",
  5647. "parameters": [
  5648. {
  5649. "type": "string",
  5650. "description": "owner of the repo",
  5651. "name": "owner",
  5652. "in": "path",
  5653. "required": true
  5654. },
  5655. {
  5656. "type": "string",
  5657. "description": "name of the repo",
  5658. "name": "repo",
  5659. "in": "path",
  5660. "required": true
  5661. },
  5662. {
  5663. "type": "integer",
  5664. "format": "int64",
  5665. "description": "id of the release to delete",
  5666. "name": "id",
  5667. "in": "path",
  5668. "required": true
  5669. }
  5670. ],
  5671. "responses": {
  5672. "204": {
  5673. "$ref": "#/responses/empty"
  5674. }
  5675. }
  5676. },
  5677. "patch": {
  5678. "consumes": [
  5679. "application/json"
  5680. ],
  5681. "produces": [
  5682. "application/json"
  5683. ],
  5684. "tags": [
  5685. "repository"
  5686. ],
  5687. "summary": "Update a release",
  5688. "operationId": "repoEditRelease",
  5689. "parameters": [
  5690. {
  5691. "type": "string",
  5692. "description": "owner of the repo",
  5693. "name": "owner",
  5694. "in": "path",
  5695. "required": true
  5696. },
  5697. {
  5698. "type": "string",
  5699. "description": "name of the repo",
  5700. "name": "repo",
  5701. "in": "path",
  5702. "required": true
  5703. },
  5704. {
  5705. "type": "integer",
  5706. "format": "int64",
  5707. "description": "id of the release to edit",
  5708. "name": "id",
  5709. "in": "path",
  5710. "required": true
  5711. },
  5712. {
  5713. "name": "body",
  5714. "in": "body",
  5715. "schema": {
  5716. "$ref": "#/definitions/EditReleaseOption"
  5717. }
  5718. }
  5719. ],
  5720. "responses": {
  5721. "200": {
  5722. "$ref": "#/responses/Release"
  5723. }
  5724. }
  5725. }
  5726. },
  5727. "/repos/{owner}/{repo}/releases/{id}/assets": {
  5728. "get": {
  5729. "produces": [
  5730. "application/json"
  5731. ],
  5732. "tags": [
  5733. "repository"
  5734. ],
  5735. "summary": "List release's attachments",
  5736. "operationId": "repoListReleaseAttachments",
  5737. "parameters": [
  5738. {
  5739. "type": "string",
  5740. "description": "owner of the repo",
  5741. "name": "owner",
  5742. "in": "path",
  5743. "required": true
  5744. },
  5745. {
  5746. "type": "string",
  5747. "description": "name of the repo",
  5748. "name": "repo",
  5749. "in": "path",
  5750. "required": true
  5751. },
  5752. {
  5753. "type": "integer",
  5754. "format": "int64",
  5755. "description": "id of the release",
  5756. "name": "id",
  5757. "in": "path",
  5758. "required": true
  5759. }
  5760. ],
  5761. "responses": {
  5762. "200": {
  5763. "$ref": "#/responses/AttachmentList"
  5764. }
  5765. }
  5766. },
  5767. "post": {
  5768. "consumes": [
  5769. "multipart/form-data"
  5770. ],
  5771. "produces": [
  5772. "application/json"
  5773. ],
  5774. "tags": [
  5775. "repository"
  5776. ],
  5777. "summary": "Create a release attachment",
  5778. "operationId": "repoCreateReleaseAttachment",
  5779. "parameters": [
  5780. {
  5781. "type": "string",
  5782. "description": "owner of the repo",
  5783. "name": "owner",
  5784. "in": "path",
  5785. "required": true
  5786. },
  5787. {
  5788. "type": "string",
  5789. "description": "name of the repo",
  5790. "name": "repo",
  5791. "in": "path",
  5792. "required": true
  5793. },
  5794. {
  5795. "type": "integer",
  5796. "format": "int64",
  5797. "description": "id of the release",
  5798. "name": "id",
  5799. "in": "path",
  5800. "required": true
  5801. },
  5802. {
  5803. "type": "string",
  5804. "description": "name of the attachment",
  5805. "name": "name",
  5806. "in": "query"
  5807. },
  5808. {
  5809. "type": "file",
  5810. "description": "attachment to upload",
  5811. "name": "attachment",
  5812. "in": "formData",
  5813. "required": true
  5814. }
  5815. ],
  5816. "responses": {
  5817. "201": {
  5818. "$ref": "#/responses/Attachment"
  5819. },
  5820. "400": {
  5821. "$ref": "#/responses/error"
  5822. }
  5823. }
  5824. }
  5825. },
  5826. "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": {
  5827. "get": {
  5828. "produces": [
  5829. "application/json"
  5830. ],
  5831. "tags": [
  5832. "repository"
  5833. ],
  5834. "summary": "Get a release attachment",
  5835. "operationId": "repoGetReleaseAttachment",
  5836. "parameters": [
  5837. {
  5838. "type": "string",
  5839. "description": "owner of the repo",
  5840. "name": "owner",
  5841. "in": "path",
  5842. "required": true
  5843. },
  5844. {
  5845. "type": "string",
  5846. "description": "name of the repo",
  5847. "name": "repo",
  5848. "in": "path",
  5849. "required": true
  5850. },
  5851. {
  5852. "type": "integer",
  5853. "format": "int64",
  5854. "description": "id of the release",
  5855. "name": "id",
  5856. "in": "path",
  5857. "required": true
  5858. },
  5859. {
  5860. "type": "integer",
  5861. "format": "int64",
  5862. "description": "id of the attachment to get",
  5863. "name": "attachment_id",
  5864. "in": "path",
  5865. "required": true
  5866. }
  5867. ],
  5868. "responses": {
  5869. "200": {
  5870. "$ref": "#/responses/Attachment"
  5871. }
  5872. }
  5873. },
  5874. "delete": {
  5875. "produces": [
  5876. "application/json"
  5877. ],
  5878. "tags": [
  5879. "repository"
  5880. ],
  5881. "summary": "Delete a release attachment",
  5882. "operationId": "repoDeleteReleaseAttachment",
  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. "type": "integer",
  5900. "format": "int64",
  5901. "description": "id of the release",
  5902. "name": "id",
  5903. "in": "path",
  5904. "required": true
  5905. },
  5906. {
  5907. "type": "integer",
  5908. "format": "int64",
  5909. "description": "id of the attachment to delete",
  5910. "name": "attachment_id",
  5911. "in": "path",
  5912. "required": true
  5913. }
  5914. ],
  5915. "responses": {
  5916. "204": {
  5917. "$ref": "#/responses/empty"
  5918. }
  5919. }
  5920. },
  5921. "patch": {
  5922. "consumes": [
  5923. "application/json"
  5924. ],
  5925. "produces": [
  5926. "application/json"
  5927. ],
  5928. "tags": [
  5929. "repository"
  5930. ],
  5931. "summary": "Edit a release attachment",
  5932. "operationId": "repoEditReleaseAttachment",
  5933. "parameters": [
  5934. {
  5935. "type": "string",
  5936. "description": "owner of the repo",
  5937. "name": "owner",
  5938. "in": "path",
  5939. "required": true
  5940. },
  5941. {
  5942. "type": "string",
  5943. "description": "name of the repo",
  5944. "name": "repo",
  5945. "in": "path",
  5946. "required": true
  5947. },
  5948. {
  5949. "type": "integer",
  5950. "format": "int64",
  5951. "description": "id of the release",
  5952. "name": "id",
  5953. "in": "path",
  5954. "required": true
  5955. },
  5956. {
  5957. "type": "integer",
  5958. "format": "int64",
  5959. "description": "id of the attachment to edit",
  5960. "name": "attachment_id",
  5961. "in": "path",
  5962. "required": true
  5963. },
  5964. {
  5965. "name": "body",
  5966. "in": "body",
  5967. "schema": {
  5968. "$ref": "#/definitions/EditAttachmentOptions"
  5969. }
  5970. }
  5971. ],
  5972. "responses": {
  5973. "201": {
  5974. "$ref": "#/responses/Attachment"
  5975. }
  5976. }
  5977. }
  5978. },
  5979. "/repos/{owner}/{repo}/signing-key.gpg": {
  5980. "get": {
  5981. "produces": [
  5982. "text/plain"
  5983. ],
  5984. "tags": [
  5985. "repository"
  5986. ],
  5987. "summary": "Get signing-key.gpg for given repository",
  5988. "operationId": "repoSigningKey",
  5989. "parameters": [
  5990. {
  5991. "type": "string",
  5992. "description": "owner of the repo",
  5993. "name": "owner",
  5994. "in": "path",
  5995. "required": true
  5996. },
  5997. {
  5998. "type": "string",
  5999. "description": "name of the repo",
  6000. "name": "repo",
  6001. "in": "path",
  6002. "required": true
  6003. }
  6004. ],
  6005. "responses": {
  6006. "200": {
  6007. "description": "GPG armored public key",
  6008. "schema": {
  6009. "type": "string"
  6010. }
  6011. }
  6012. }
  6013. }
  6014. },
  6015. "/repos/{owner}/{repo}/stargazers": {
  6016. "get": {
  6017. "produces": [
  6018. "application/json"
  6019. ],
  6020. "tags": [
  6021. "repository"
  6022. ],
  6023. "summary": "List a repo's stargazers",
  6024. "operationId": "repoListStargazers",
  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. "responses": {
  6042. "200": {
  6043. "$ref": "#/responses/UserList"
  6044. }
  6045. }
  6046. }
  6047. },
  6048. "/repos/{owner}/{repo}/statuses/{sha}": {
  6049. "get": {
  6050. "produces": [
  6051. "application/json"
  6052. ],
  6053. "tags": [
  6054. "repository"
  6055. ],
  6056. "summary": "Get a commit's statuses",
  6057. "operationId": "repoListStatuses",
  6058. "parameters": [
  6059. {
  6060. "type": "string",
  6061. "description": "owner of the repo",
  6062. "name": "owner",
  6063. "in": "path",
  6064. "required": true
  6065. },
  6066. {
  6067. "type": "string",
  6068. "description": "name of the repo",
  6069. "name": "repo",
  6070. "in": "path",
  6071. "required": true
  6072. },
  6073. {
  6074. "type": "string",
  6075. "description": "sha of the commit",
  6076. "name": "sha",
  6077. "in": "path",
  6078. "required": true
  6079. },
  6080. {
  6081. "type": "integer",
  6082. "description": "page number of results",
  6083. "name": "page",
  6084. "in": "query"
  6085. },
  6086. {
  6087. "enum": [
  6088. "oldest",
  6089. "recentupdate",
  6090. "leastupdate",
  6091. "leastindex",
  6092. "highestindex"
  6093. ],
  6094. "type": "string",
  6095. "description": "type of sort",
  6096. "name": "sort",
  6097. "in": "query"
  6098. },
  6099. {
  6100. "enum": [
  6101. "pending",
  6102. "success",
  6103. "error",
  6104. "failure",
  6105. "warning"
  6106. ],
  6107. "type": "string",
  6108. "description": "type of state",
  6109. "name": "state",
  6110. "in": "query"
  6111. }
  6112. ],
  6113. "responses": {
  6114. "200": {
  6115. "$ref": "#/responses/StatusList"
  6116. },
  6117. "400": {
  6118. "$ref": "#/responses/error"
  6119. }
  6120. }
  6121. },
  6122. "post": {
  6123. "produces": [
  6124. "application/json"
  6125. ],
  6126. "tags": [
  6127. "repository"
  6128. ],
  6129. "summary": "Create a commit status",
  6130. "operationId": "repoCreateStatus",
  6131. "parameters": [
  6132. {
  6133. "type": "string",
  6134. "description": "owner of the repo",
  6135. "name": "owner",
  6136. "in": "path",
  6137. "required": true
  6138. },
  6139. {
  6140. "type": "string",
  6141. "description": "name of the repo",
  6142. "name": "repo",
  6143. "in": "path",
  6144. "required": true
  6145. },
  6146. {
  6147. "type": "string",
  6148. "description": "sha of the commit",
  6149. "name": "sha",
  6150. "in": "path",
  6151. "required": true
  6152. },
  6153. {
  6154. "name": "body",
  6155. "in": "body",
  6156. "schema": {
  6157. "$ref": "#/definitions/CreateStatusOption"
  6158. }
  6159. }
  6160. ],
  6161. "responses": {
  6162. "201": {
  6163. "$ref": "#/responses/Status"
  6164. },
  6165. "400": {
  6166. "$ref": "#/responses/error"
  6167. }
  6168. }
  6169. }
  6170. },
  6171. "/repos/{owner}/{repo}/subscribers": {
  6172. "get": {
  6173. "produces": [
  6174. "application/json"
  6175. ],
  6176. "tags": [
  6177. "repository"
  6178. ],
  6179. "summary": "List a repo's watchers",
  6180. "operationId": "repoListSubscribers",
  6181. "parameters": [
  6182. {
  6183. "type": "string",
  6184. "description": "owner of the repo",
  6185. "name": "owner",
  6186. "in": "path",
  6187. "required": true
  6188. },
  6189. {
  6190. "type": "string",
  6191. "description": "name of the repo",
  6192. "name": "repo",
  6193. "in": "path",
  6194. "required": true
  6195. }
  6196. ],
  6197. "responses": {
  6198. "200": {
  6199. "$ref": "#/responses/UserList"
  6200. }
  6201. }
  6202. }
  6203. },
  6204. "/repos/{owner}/{repo}/subscription": {
  6205. "get": {
  6206. "tags": [
  6207. "repository"
  6208. ],
  6209. "summary": "Check if the current user is watching a repo",
  6210. "operationId": "userCurrentCheckSubscription",
  6211. "parameters": [
  6212. {
  6213. "type": "string",
  6214. "description": "owner of the repo",
  6215. "name": "owner",
  6216. "in": "path",
  6217. "required": true
  6218. },
  6219. {
  6220. "type": "string",
  6221. "description": "name of the repo",
  6222. "name": "repo",
  6223. "in": "path",
  6224. "required": true
  6225. }
  6226. ],
  6227. "responses": {
  6228. "200": {
  6229. "$ref": "#/responses/WatchInfo"
  6230. }
  6231. }
  6232. },
  6233. "put": {
  6234. "tags": [
  6235. "repository"
  6236. ],
  6237. "summary": "Watch a repo",
  6238. "operationId": "userCurrentPutSubscription",
  6239. "parameters": [
  6240. {
  6241. "type": "string",
  6242. "description": "owner of the repo",
  6243. "name": "owner",
  6244. "in": "path",
  6245. "required": true
  6246. },
  6247. {
  6248. "type": "string",
  6249. "description": "name of the repo",
  6250. "name": "repo",
  6251. "in": "path",
  6252. "required": true
  6253. }
  6254. ],
  6255. "responses": {
  6256. "200": {
  6257. "$ref": "#/responses/WatchInfo"
  6258. }
  6259. }
  6260. },
  6261. "delete": {
  6262. "tags": [
  6263. "repository"
  6264. ],
  6265. "summary": "Unwatch a repo",
  6266. "operationId": "userCurrentDeleteSubscription",
  6267. "parameters": [
  6268. {
  6269. "type": "string",
  6270. "description": "owner of the repo",
  6271. "name": "owner",
  6272. "in": "path",
  6273. "required": true
  6274. },
  6275. {
  6276. "type": "string",
  6277. "description": "name of the repo",
  6278. "name": "repo",
  6279. "in": "path",
  6280. "required": true
  6281. }
  6282. ],
  6283. "responses": {
  6284. "204": {
  6285. "$ref": "#/responses/empty"
  6286. }
  6287. }
  6288. }
  6289. },
  6290. "/repos/{owner}/{repo}/tags": {
  6291. "get": {
  6292. "produces": [
  6293. "application/json"
  6294. ],
  6295. "tags": [
  6296. "repository"
  6297. ],
  6298. "summary": "List a repository's tags",
  6299. "operationId": "repoListTags",
  6300. "parameters": [
  6301. {
  6302. "type": "string",
  6303. "description": "owner of the repo",
  6304. "name": "owner",
  6305. "in": "path",
  6306. "required": true
  6307. },
  6308. {
  6309. "type": "string",
  6310. "description": "name of the repo",
  6311. "name": "repo",
  6312. "in": "path",
  6313. "required": true
  6314. }
  6315. ],
  6316. "responses": {
  6317. "200": {
  6318. "$ref": "#/responses/TagList"
  6319. }
  6320. }
  6321. }
  6322. },
  6323. "/repos/{owner}/{repo}/times": {
  6324. "get": {
  6325. "produces": [
  6326. "application/json"
  6327. ],
  6328. "tags": [
  6329. "repository"
  6330. ],
  6331. "summary": "List a repo's tracked times",
  6332. "operationId": "repoTrackedTimes",
  6333. "parameters": [
  6334. {
  6335. "type": "string",
  6336. "description": "owner of the repo",
  6337. "name": "owner",
  6338. "in": "path",
  6339. "required": true
  6340. },
  6341. {
  6342. "type": "string",
  6343. "description": "name of the repo",
  6344. "name": "repo",
  6345. "in": "path",
  6346. "required": true
  6347. }
  6348. ],
  6349. "responses": {
  6350. "200": {
  6351. "$ref": "#/responses/TrackedTimeList"
  6352. },
  6353. "400": {
  6354. "$ref": "#/responses/error"
  6355. }
  6356. }
  6357. }
  6358. },
  6359. "/repos/{owner}/{repo}/times/{user}": {
  6360. "get": {
  6361. "produces": [
  6362. "application/json"
  6363. ],
  6364. "tags": [
  6365. "user"
  6366. ],
  6367. "summary": "List a user's tracked times in a repo",
  6368. "operationId": "userTrackedTimes",
  6369. "parameters": [
  6370. {
  6371. "type": "string",
  6372. "description": "owner of the repo",
  6373. "name": "owner",
  6374. "in": "path",
  6375. "required": true
  6376. },
  6377. {
  6378. "type": "string",
  6379. "description": "name of the repo",
  6380. "name": "repo",
  6381. "in": "path",
  6382. "required": true
  6383. },
  6384. {
  6385. "type": "string",
  6386. "description": "username of user",
  6387. "name": "user",
  6388. "in": "path",
  6389. "required": true
  6390. }
  6391. ],
  6392. "responses": {
  6393. "200": {
  6394. "$ref": "#/responses/TrackedTimeList"
  6395. },
  6396. "400": {
  6397. "$ref": "#/responses/error"
  6398. }
  6399. }
  6400. }
  6401. },
  6402. "/repos/{owner}/{repo}/topics": {
  6403. "get": {
  6404. "produces": [
  6405. "application/json"
  6406. ],
  6407. "tags": [
  6408. "repository"
  6409. ],
  6410. "summary": "Get list of topics that a repository has",
  6411. "operationId": "repoListTopics",
  6412. "parameters": [
  6413. {
  6414. "type": "string",
  6415. "description": "owner of the repo",
  6416. "name": "owner",
  6417. "in": "path",
  6418. "required": true
  6419. },
  6420. {
  6421. "type": "string",
  6422. "description": "name of the repo",
  6423. "name": "repo",
  6424. "in": "path",
  6425. "required": true
  6426. }
  6427. ],
  6428. "responses": {
  6429. "200": {
  6430. "$ref": "#/responses/TopicNames"
  6431. }
  6432. }
  6433. },
  6434. "put": {
  6435. "produces": [
  6436. "application/json"
  6437. ],
  6438. "tags": [
  6439. "repository"
  6440. ],
  6441. "summary": "Replace list of topics for a repository",
  6442. "operationId": "repoUpdateTopics",
  6443. "parameters": [
  6444. {
  6445. "type": "string",
  6446. "description": "owner of the repo",
  6447. "name": "owner",
  6448. "in": "path",
  6449. "required": true
  6450. },
  6451. {
  6452. "type": "string",
  6453. "description": "name of the repo",
  6454. "name": "repo",
  6455. "in": "path",
  6456. "required": true
  6457. },
  6458. {
  6459. "name": "body",
  6460. "in": "body",
  6461. "schema": {
  6462. "$ref": "#/definitions/RepoTopicOptions"
  6463. }
  6464. }
  6465. ],
  6466. "responses": {
  6467. "204": {
  6468. "$ref": "#/responses/empty"
  6469. },
  6470. "422": {
  6471. "$ref": "#/responses/invalidTopicsError"
  6472. }
  6473. }
  6474. }
  6475. },
  6476. "/repos/{owner}/{repo}/topics/{topic}": {
  6477. "put": {
  6478. "produces": [
  6479. "application/json"
  6480. ],
  6481. "tags": [
  6482. "repository"
  6483. ],
  6484. "summary": "Add a topic to a repository",
  6485. "operationId": "repoAddTopíc",
  6486. "parameters": [
  6487. {
  6488. "type": "string",
  6489. "description": "owner of the repo",
  6490. "name": "owner",
  6491. "in": "path",
  6492. "required": true
  6493. },
  6494. {
  6495. "type": "string",
  6496. "description": "name of the repo",
  6497. "name": "repo",
  6498. "in": "path",
  6499. "required": true
  6500. },
  6501. {
  6502. "type": "string",
  6503. "description": "name of the topic to add",
  6504. "name": "topic",
  6505. "in": "path",
  6506. "required": true
  6507. }
  6508. ],
  6509. "responses": {
  6510. "204": {
  6511. "$ref": "#/responses/empty"
  6512. },
  6513. "422": {
  6514. "$ref": "#/responses/invalidTopicsError"
  6515. }
  6516. }
  6517. },
  6518. "delete": {
  6519. "produces": [
  6520. "application/json"
  6521. ],
  6522. "tags": [
  6523. "repository"
  6524. ],
  6525. "summary": "Delete a topic from a repository",
  6526. "operationId": "repoDeleteTopic",
  6527. "parameters": [
  6528. {
  6529. "type": "string",
  6530. "description": "owner of the repo",
  6531. "name": "owner",
  6532. "in": "path",
  6533. "required": true
  6534. },
  6535. {
  6536. "type": "string",
  6537. "description": "name of the repo",
  6538. "name": "repo",
  6539. "in": "path",
  6540. "required": true
  6541. },
  6542. {
  6543. "type": "string",
  6544. "description": "name of the topic to delete",
  6545. "name": "topic",
  6546. "in": "path",
  6547. "required": true
  6548. }
  6549. ],
  6550. "responses": {
  6551. "204": {
  6552. "$ref": "#/responses/empty"
  6553. },
  6554. "422": {
  6555. "$ref": "#/responses/invalidTopicsError"
  6556. }
  6557. }
  6558. }
  6559. },
  6560. "/repositories/{id}": {
  6561. "get": {
  6562. "produces": [
  6563. "application/json"
  6564. ],
  6565. "tags": [
  6566. "repository"
  6567. ],
  6568. "summary": "Get a repository by id",
  6569. "operationId": "repoGetByID",
  6570. "parameters": [
  6571. {
  6572. "type": "integer",
  6573. "format": "int64",
  6574. "description": "id of the repo to get",
  6575. "name": "id",
  6576. "in": "path",
  6577. "required": true
  6578. }
  6579. ],
  6580. "responses": {
  6581. "200": {
  6582. "$ref": "#/responses/Repository"
  6583. }
  6584. }
  6585. }
  6586. },
  6587. "/signing-key.gpg": {
  6588. "get": {
  6589. "produces": [
  6590. "text/plain"
  6591. ],
  6592. "tags": [
  6593. "miscellaneous"
  6594. ],
  6595. "summary": "Get default signing-key.gpg",
  6596. "operationId": "getSigningKey",
  6597. "responses": {
  6598. "200": {
  6599. "description": "GPG armored public key",
  6600. "schema": {
  6601. "type": "string"
  6602. }
  6603. }
  6604. }
  6605. }
  6606. },
  6607. "/teams/{id}": {
  6608. "get": {
  6609. "produces": [
  6610. "application/json"
  6611. ],
  6612. "tags": [
  6613. "organization"
  6614. ],
  6615. "summary": "Get a team",
  6616. "operationId": "orgGetTeam",
  6617. "parameters": [
  6618. {
  6619. "type": "integer",
  6620. "format": "int64",
  6621. "description": "id of the team to get",
  6622. "name": "id",
  6623. "in": "path",
  6624. "required": true
  6625. }
  6626. ],
  6627. "responses": {
  6628. "200": {
  6629. "$ref": "#/responses/Team"
  6630. }
  6631. }
  6632. },
  6633. "delete": {
  6634. "tags": [
  6635. "organization"
  6636. ],
  6637. "summary": "Delete a team",
  6638. "operationId": "orgDeleteTeam",
  6639. "parameters": [
  6640. {
  6641. "type": "integer",
  6642. "format": "int64",
  6643. "description": "id of the team to delete",
  6644. "name": "id",
  6645. "in": "path",
  6646. "required": true
  6647. }
  6648. ],
  6649. "responses": {
  6650. "204": {
  6651. "description": "team deleted"
  6652. }
  6653. }
  6654. },
  6655. "patch": {
  6656. "consumes": [
  6657. "application/json"
  6658. ],
  6659. "produces": [
  6660. "application/json"
  6661. ],
  6662. "tags": [
  6663. "organization"
  6664. ],
  6665. "summary": "Edit a team",
  6666. "operationId": "orgEditTeam",
  6667. "parameters": [
  6668. {
  6669. "type": "integer",
  6670. "description": "id of the team to edit",
  6671. "name": "id",
  6672. "in": "path",
  6673. "required": true
  6674. },
  6675. {
  6676. "name": "body",
  6677. "in": "body",
  6678. "schema": {
  6679. "$ref": "#/definitions/EditTeamOption"
  6680. }
  6681. }
  6682. ],
  6683. "responses": {
  6684. "200": {
  6685. "$ref": "#/responses/Team"
  6686. }
  6687. }
  6688. }
  6689. },
  6690. "/teams/{id}/members": {
  6691. "get": {
  6692. "produces": [
  6693. "application/json"
  6694. ],
  6695. "tags": [
  6696. "organization"
  6697. ],
  6698. "summary": "List a team's members",
  6699. "operationId": "orgListTeamMembers",
  6700. "parameters": [
  6701. {
  6702. "type": "integer",
  6703. "format": "int64",
  6704. "description": "id of the team",
  6705. "name": "id",
  6706. "in": "path",
  6707. "required": true
  6708. }
  6709. ],
  6710. "responses": {
  6711. "200": {
  6712. "$ref": "#/responses/UserList"
  6713. }
  6714. }
  6715. }
  6716. },
  6717. "/teams/{id}/members/{username}": {
  6718. "get": {
  6719. "produces": [
  6720. "application/json"
  6721. ],
  6722. "tags": [
  6723. "organization"
  6724. ],
  6725. "summary": "List a particular member of team",
  6726. "operationId": "orgListTeamMember",
  6727. "parameters": [
  6728. {
  6729. "type": "integer",
  6730. "format": "int64",
  6731. "description": "id of the team",
  6732. "name": "id",
  6733. "in": "path",
  6734. "required": true
  6735. },
  6736. {
  6737. "type": "string",
  6738. "description": "username of the member to list",
  6739. "name": "username",
  6740. "in": "path",
  6741. "required": true
  6742. }
  6743. ],
  6744. "responses": {
  6745. "200": {
  6746. "$ref": "#/responses/User"
  6747. },
  6748. "404": {
  6749. "$ref": "#/responses/notFound"
  6750. }
  6751. }
  6752. },
  6753. "put": {
  6754. "produces": [
  6755. "application/json"
  6756. ],
  6757. "tags": [
  6758. "organization"
  6759. ],
  6760. "summary": "Add a team member",
  6761. "operationId": "orgAddTeamMember",
  6762. "parameters": [
  6763. {
  6764. "type": "integer",
  6765. "format": "int64",
  6766. "description": "id of the team",
  6767. "name": "id",
  6768. "in": "path",
  6769. "required": true
  6770. },
  6771. {
  6772. "type": "string",
  6773. "description": "username of the user to add",
  6774. "name": "username",
  6775. "in": "path",
  6776. "required": true
  6777. }
  6778. ],
  6779. "responses": {
  6780. "204": {
  6781. "$ref": "#/responses/empty"
  6782. },
  6783. "404": {
  6784. "$ref": "#/responses/notFound"
  6785. }
  6786. }
  6787. },
  6788. "delete": {
  6789. "produces": [
  6790. "application/json"
  6791. ],
  6792. "tags": [
  6793. "organization"
  6794. ],
  6795. "summary": "Remove a team member",
  6796. "operationId": "orgRemoveTeamMember",
  6797. "parameters": [
  6798. {
  6799. "type": "integer",
  6800. "format": "int64",
  6801. "description": "id of the team",
  6802. "name": "id",
  6803. "in": "path",
  6804. "required": true
  6805. },
  6806. {
  6807. "type": "string",
  6808. "description": "username of the user to remove",
  6809. "name": "username",
  6810. "in": "path",
  6811. "required": true
  6812. }
  6813. ],
  6814. "responses": {
  6815. "204": {
  6816. "$ref": "#/responses/empty"
  6817. },
  6818. "404": {
  6819. "$ref": "#/responses/notFound"
  6820. }
  6821. }
  6822. }
  6823. },
  6824. "/teams/{id}/repos": {
  6825. "get": {
  6826. "produces": [
  6827. "application/json"
  6828. ],
  6829. "tags": [
  6830. "organization"
  6831. ],
  6832. "summary": "List a team's repos",
  6833. "operationId": "orgListTeamRepos",
  6834. "parameters": [
  6835. {
  6836. "type": "integer",
  6837. "format": "int64",
  6838. "description": "id of the team",
  6839. "name": "id",
  6840. "in": "path",
  6841. "required": true
  6842. }
  6843. ],
  6844. "responses": {
  6845. "200": {
  6846. "$ref": "#/responses/RepositoryList"
  6847. }
  6848. }
  6849. }
  6850. },
  6851. "/teams/{id}/repos/{org}/{repo}": {
  6852. "put": {
  6853. "produces": [
  6854. "application/json"
  6855. ],
  6856. "tags": [
  6857. "organization"
  6858. ],
  6859. "summary": "Add a repository to a team",
  6860. "operationId": "orgAddTeamRepository",
  6861. "parameters": [
  6862. {
  6863. "type": "integer",
  6864. "format": "int64",
  6865. "description": "id of the team",
  6866. "name": "id",
  6867. "in": "path",
  6868. "required": true
  6869. },
  6870. {
  6871. "type": "string",
  6872. "description": "organization that owns the repo to add",
  6873. "name": "org",
  6874. "in": "path",
  6875. "required": true
  6876. },
  6877. {
  6878. "type": "string",
  6879. "description": "name of the repo to add",
  6880. "name": "repo",
  6881. "in": "path",
  6882. "required": true
  6883. }
  6884. ],
  6885. "responses": {
  6886. "204": {
  6887. "$ref": "#/responses/empty"
  6888. },
  6889. "403": {
  6890. "$ref": "#/responses/forbidden"
  6891. }
  6892. }
  6893. },
  6894. "delete": {
  6895. "description": "This does not delete the repository, it only removes the repository from the team.",
  6896. "produces": [
  6897. "application/json"
  6898. ],
  6899. "tags": [
  6900. "organization"
  6901. ],
  6902. "summary": "Remove a repository from a team",
  6903. "operationId": "orgRemoveTeamRepository",
  6904. "parameters": [
  6905. {
  6906. "type": "integer",
  6907. "format": "int64",
  6908. "description": "id of the team",
  6909. "name": "id",
  6910. "in": "path",
  6911. "required": true
  6912. },
  6913. {
  6914. "type": "string",
  6915. "description": "organization that owns the repo to remove",
  6916. "name": "org",
  6917. "in": "path",
  6918. "required": true
  6919. },
  6920. {
  6921. "type": "string",
  6922. "description": "name of the repo to remove",
  6923. "name": "repo",
  6924. "in": "path",
  6925. "required": true
  6926. }
  6927. ],
  6928. "responses": {
  6929. "204": {
  6930. "$ref": "#/responses/empty"
  6931. },
  6932. "403": {
  6933. "$ref": "#/responses/forbidden"
  6934. }
  6935. }
  6936. }
  6937. },
  6938. "/topics/search": {
  6939. "get": {
  6940. "produces": [
  6941. "application/json"
  6942. ],
  6943. "tags": [
  6944. "repository"
  6945. ],
  6946. "summary": "search topics via keyword",
  6947. "operationId": "topicSearch",
  6948. "parameters": [
  6949. {
  6950. "type": "string",
  6951. "description": "keywords to search",
  6952. "name": "q",
  6953. "in": "query",
  6954. "required": true
  6955. }
  6956. ],
  6957. "responses": {
  6958. "200": {
  6959. "$ref": "#/responses/TopicListResponse"
  6960. },
  6961. "403": {
  6962. "$ref": "#/responses/forbidden"
  6963. }
  6964. }
  6965. }
  6966. },
  6967. "/user": {
  6968. "get": {
  6969. "produces": [
  6970. "application/json"
  6971. ],
  6972. "tags": [
  6973. "user"
  6974. ],
  6975. "summary": "Get the authenticated user",
  6976. "operationId": "userGetCurrent",
  6977. "responses": {
  6978. "200": {
  6979. "$ref": "#/responses/User"
  6980. }
  6981. }
  6982. }
  6983. },
  6984. "/user/emails": {
  6985. "get": {
  6986. "produces": [
  6987. "application/json"
  6988. ],
  6989. "tags": [
  6990. "user"
  6991. ],
  6992. "summary": "List the authenticated user's email addresses",
  6993. "operationId": "userListEmails",
  6994. "responses": {
  6995. "200": {
  6996. "$ref": "#/responses/EmailList"
  6997. }
  6998. }
  6999. },
  7000. "post": {
  7001. "produces": [
  7002. "application/json"
  7003. ],
  7004. "tags": [
  7005. "user"
  7006. ],
  7007. "summary": "Add email addresses",
  7008. "operationId": "userAddEmail",
  7009. "parameters": [
  7010. {
  7011. "name": "body",
  7012. "in": "body",
  7013. "schema": {
  7014. "$ref": "#/definitions/CreateEmailOption"
  7015. }
  7016. }
  7017. ],
  7018. "responses": {
  7019. "201": {
  7020. "$ref": "#/responses/EmailList"
  7021. },
  7022. "422": {
  7023. "$ref": "#/responses/validationError"
  7024. }
  7025. }
  7026. },
  7027. "delete": {
  7028. "produces": [
  7029. "application/json"
  7030. ],
  7031. "tags": [
  7032. "user"
  7033. ],
  7034. "summary": "Delete email addresses",
  7035. "operationId": "userDeleteEmail",
  7036. "parameters": [
  7037. {
  7038. "name": "body",
  7039. "in": "body",
  7040. "schema": {
  7041. "$ref": "#/definitions/DeleteEmailOption"
  7042. }
  7043. }
  7044. ],
  7045. "responses": {
  7046. "204": {
  7047. "$ref": "#/responses/empty"
  7048. }
  7049. }
  7050. }
  7051. },
  7052. "/user/followers": {
  7053. "get": {
  7054. "produces": [
  7055. "application/json"
  7056. ],
  7057. "tags": [
  7058. "user"
  7059. ],
  7060. "summary": "List the authenticated user's followers",
  7061. "operationId": "userCurrentListFollowers",
  7062. "responses": {
  7063. "200": {
  7064. "$ref": "#/responses/UserList"
  7065. }
  7066. }
  7067. }
  7068. },
  7069. "/user/following": {
  7070. "get": {
  7071. "produces": [
  7072. "application/json"
  7073. ],
  7074. "tags": [
  7075. "user"
  7076. ],
  7077. "summary": "List the users that the authenticated user is following",
  7078. "operationId": "userCurrentListFollowing",
  7079. "responses": {
  7080. "200": {
  7081. "$ref": "#/responses/UserList"
  7082. }
  7083. }
  7084. }
  7085. },
  7086. "/user/following/{username}": {
  7087. "get": {
  7088. "tags": [
  7089. "user"
  7090. ],
  7091. "summary": "Check whether a user is followed by the authenticated user",
  7092. "operationId": "userCurrentCheckFollowing",
  7093. "parameters": [
  7094. {
  7095. "type": "string",
  7096. "description": "username of followed user",
  7097. "name": "username",
  7098. "in": "path",
  7099. "required": true
  7100. }
  7101. ],
  7102. "responses": {
  7103. "204": {
  7104. "$ref": "#/responses/empty"
  7105. },
  7106. "404": {
  7107. "$ref": "#/responses/notFound"
  7108. }
  7109. }
  7110. },
  7111. "put": {
  7112. "tags": [
  7113. "user"
  7114. ],
  7115. "summary": "Follow a user",
  7116. "operationId": "userCurrentPutFollow",
  7117. "parameters": [
  7118. {
  7119. "type": "string",
  7120. "description": "username of user to follow",
  7121. "name": "username",
  7122. "in": "path",
  7123. "required": true
  7124. }
  7125. ],
  7126. "responses": {
  7127. "204": {
  7128. "$ref": "#/responses/empty"
  7129. }
  7130. }
  7131. },
  7132. "delete": {
  7133. "tags": [
  7134. "user"
  7135. ],
  7136. "summary": "Unfollow a user",
  7137. "operationId": "userCurrentDeleteFollow",
  7138. "parameters": [
  7139. {
  7140. "type": "string",
  7141. "description": "username of user to unfollow",
  7142. "name": "username",
  7143. "in": "path",
  7144. "required": true
  7145. }
  7146. ],
  7147. "responses": {
  7148. "204": {
  7149. "$ref": "#/responses/empty"
  7150. }
  7151. }
  7152. }
  7153. },
  7154. "/user/gpg_keys": {
  7155. "get": {
  7156. "produces": [
  7157. "application/json"
  7158. ],
  7159. "tags": [
  7160. "user"
  7161. ],
  7162. "summary": "List the authenticated user's GPG keys",
  7163. "operationId": "userCurrentListGPGKeys",
  7164. "responses": {
  7165. "200": {
  7166. "$ref": "#/responses/GPGKeyList"
  7167. }
  7168. }
  7169. },
  7170. "post": {
  7171. "consumes": [
  7172. "application/json"
  7173. ],
  7174. "produces": [
  7175. "application/json"
  7176. ],
  7177. "tags": [
  7178. "user"
  7179. ],
  7180. "summary": "Create a GPG key",
  7181. "operationId": "userCurrentPostGPGKey",
  7182. "parameters": [
  7183. {
  7184. "name": "Form",
  7185. "in": "body",
  7186. "schema": {
  7187. "$ref": "#/definitions/CreateGPGKeyOption"
  7188. }
  7189. }
  7190. ],
  7191. "responses": {
  7192. "201": {
  7193. "$ref": "#/responses/GPGKey"
  7194. },
  7195. "422": {
  7196. "$ref": "#/responses/validationError"
  7197. }
  7198. }
  7199. }
  7200. },
  7201. "/user/gpg_keys/{id}": {
  7202. "get": {
  7203. "produces": [
  7204. "application/json"
  7205. ],
  7206. "tags": [
  7207. "user"
  7208. ],
  7209. "summary": "Get a GPG key",
  7210. "operationId": "userCurrentGetGPGKey",
  7211. "parameters": [
  7212. {
  7213. "type": "integer",
  7214. "format": "int64",
  7215. "description": "id of key to get",
  7216. "name": "id",
  7217. "in": "path",
  7218. "required": true
  7219. }
  7220. ],
  7221. "responses": {
  7222. "200": {
  7223. "$ref": "#/responses/GPGKey"
  7224. },
  7225. "404": {
  7226. "$ref": "#/responses/notFound"
  7227. }
  7228. }
  7229. },
  7230. "delete": {
  7231. "produces": [
  7232. "application/json"
  7233. ],
  7234. "tags": [
  7235. "user"
  7236. ],
  7237. "summary": "Remove a GPG key",
  7238. "operationId": "userCurrentDeleteGPGKey",
  7239. "parameters": [
  7240. {
  7241. "type": "integer",
  7242. "format": "int64",
  7243. "description": "id of key to delete",
  7244. "name": "id",
  7245. "in": "path",
  7246. "required": true
  7247. }
  7248. ],
  7249. "responses": {
  7250. "204": {
  7251. "$ref": "#/responses/empty"
  7252. },
  7253. "403": {
  7254. "$ref": "#/responses/forbidden"
  7255. }
  7256. }
  7257. }
  7258. },
  7259. "/user/keys": {
  7260. "get": {
  7261. "produces": [
  7262. "application/json"
  7263. ],
  7264. "tags": [
  7265. "user"
  7266. ],
  7267. "summary": "List the authenticated user's public keys",
  7268. "operationId": "userCurrentListKeys",
  7269. "parameters": [
  7270. {
  7271. "type": "string",
  7272. "description": "fingerprint of the key",
  7273. "name": "fingerprint",
  7274. "in": "query"
  7275. }
  7276. ],
  7277. "responses": {
  7278. "200": {
  7279. "$ref": "#/responses/PublicKeyList"
  7280. }
  7281. }
  7282. },
  7283. "post": {
  7284. "consumes": [
  7285. "application/json"
  7286. ],
  7287. "produces": [
  7288. "application/json"
  7289. ],
  7290. "tags": [
  7291. "user"
  7292. ],
  7293. "summary": "Create a public key",
  7294. "operationId": "userCurrentPostKey",
  7295. "parameters": [
  7296. {
  7297. "name": "body",
  7298. "in": "body",
  7299. "schema": {
  7300. "$ref": "#/definitions/CreateKeyOption"
  7301. }
  7302. }
  7303. ],
  7304. "responses": {
  7305. "201": {
  7306. "$ref": "#/responses/PublicKey"
  7307. },
  7308. "422": {
  7309. "$ref": "#/responses/validationError"
  7310. }
  7311. }
  7312. }
  7313. },
  7314. "/user/keys/{id}": {
  7315. "get": {
  7316. "produces": [
  7317. "application/json"
  7318. ],
  7319. "tags": [
  7320. "user"
  7321. ],
  7322. "summary": "Get a public key",
  7323. "operationId": "userCurrentGetKey",
  7324. "parameters": [
  7325. {
  7326. "type": "integer",
  7327. "format": "int64",
  7328. "description": "id of key to get",
  7329. "name": "id",
  7330. "in": "path",
  7331. "required": true
  7332. }
  7333. ],
  7334. "responses": {
  7335. "200": {
  7336. "$ref": "#/responses/PublicKey"
  7337. },
  7338. "404": {
  7339. "$ref": "#/responses/notFound"
  7340. }
  7341. }
  7342. },
  7343. "delete": {
  7344. "produces": [
  7345. "application/json"
  7346. ],
  7347. "tags": [
  7348. "user"
  7349. ],
  7350. "summary": "Delete a public key",
  7351. "operationId": "userCurrentDeleteKey",
  7352. "parameters": [
  7353. {
  7354. "type": "integer",
  7355. "format": "int64",
  7356. "description": "id of key to delete",
  7357. "name": "id",
  7358. "in": "path",
  7359. "required": true
  7360. }
  7361. ],
  7362. "responses": {
  7363. "204": {
  7364. "$ref": "#/responses/empty"
  7365. },
  7366. "403": {
  7367. "$ref": "#/responses/forbidden"
  7368. },
  7369. "404": {
  7370. "$ref": "#/responses/notFound"
  7371. }
  7372. }
  7373. }
  7374. },
  7375. "/user/orgs": {
  7376. "get": {
  7377. "produces": [
  7378. "application/json"
  7379. ],
  7380. "tags": [
  7381. "organization"
  7382. ],
  7383. "summary": "List the current user's organizations",
  7384. "operationId": "orgListCurrentUserOrgs",
  7385. "responses": {
  7386. "200": {
  7387. "$ref": "#/responses/OrganizationList"
  7388. }
  7389. }
  7390. }
  7391. },
  7392. "/user/repos": {
  7393. "get": {
  7394. "produces": [
  7395. "application/json"
  7396. ],
  7397. "tags": [
  7398. "user"
  7399. ],
  7400. "summary": "List the repos that the authenticated user owns or has access to",
  7401. "operationId": "userCurrentListRepos",
  7402. "responses": {
  7403. "200": {
  7404. "$ref": "#/responses/RepositoryList"
  7405. }
  7406. }
  7407. },
  7408. "post": {
  7409. "consumes": [
  7410. "application/json"
  7411. ],
  7412. "produces": [
  7413. "application/json"
  7414. ],
  7415. "tags": [
  7416. "repository",
  7417. "user"
  7418. ],
  7419. "summary": "Create a repository",
  7420. "operationId": "createCurrentUserRepo",
  7421. "parameters": [
  7422. {
  7423. "name": "body",
  7424. "in": "body",
  7425. "schema": {
  7426. "$ref": "#/definitions/CreateRepoOption"
  7427. }
  7428. }
  7429. ],
  7430. "responses": {
  7431. "201": {
  7432. "$ref": "#/responses/Repository"
  7433. },
  7434. "409": {
  7435. "description": "The repository with the same name already exists."
  7436. },
  7437. "422": {
  7438. "$ref": "#/responses/validationError"
  7439. }
  7440. }
  7441. }
  7442. },
  7443. "/user/starred": {
  7444. "get": {
  7445. "produces": [
  7446. "application/json"
  7447. ],
  7448. "tags": [
  7449. "user"
  7450. ],
  7451. "summary": "The repos that the authenticated user has starred",
  7452. "operationId": "userCurrentListStarred",
  7453. "responses": {
  7454. "200": {
  7455. "$ref": "#/responses/RepositoryList"
  7456. }
  7457. }
  7458. }
  7459. },
  7460. "/user/starred/{owner}/{repo}": {
  7461. "get": {
  7462. "tags": [
  7463. "user"
  7464. ],
  7465. "summary": "Whether the authenticated is starring the repo",
  7466. "operationId": "userCurrentCheckStarring",
  7467. "parameters": [
  7468. {
  7469. "type": "string",
  7470. "description": "owner of the repo",
  7471. "name": "owner",
  7472. "in": "path",
  7473. "required": true
  7474. },
  7475. {
  7476. "type": "string",
  7477. "description": "name of the repo",
  7478. "name": "repo",
  7479. "in": "path",
  7480. "required": true
  7481. }
  7482. ],
  7483. "responses": {
  7484. "204": {
  7485. "$ref": "#/responses/empty"
  7486. },
  7487. "404": {
  7488. "$ref": "#/responses/notFound"
  7489. }
  7490. }
  7491. },
  7492. "put": {
  7493. "tags": [
  7494. "user"
  7495. ],
  7496. "summary": "Star the given repo",
  7497. "operationId": "userCurrentPutStar",
  7498. "parameters": [
  7499. {
  7500. "type": "string",
  7501. "description": "owner of the repo to star",
  7502. "name": "owner",
  7503. "in": "path",
  7504. "required": true
  7505. },
  7506. {
  7507. "type": "string",
  7508. "description": "name of the repo to star",
  7509. "name": "repo",
  7510. "in": "path",
  7511. "required": true
  7512. }
  7513. ],
  7514. "responses": {
  7515. "204": {
  7516. "$ref": "#/responses/empty"
  7517. }
  7518. }
  7519. },
  7520. "delete": {
  7521. "tags": [
  7522. "user"
  7523. ],
  7524. "summary": "Unstar the given repo",
  7525. "operationId": "userCurrentDeleteStar",
  7526. "parameters": [
  7527. {
  7528. "type": "string",
  7529. "description": "owner of the repo to unstar",
  7530. "name": "owner",
  7531. "in": "path",
  7532. "required": true
  7533. },
  7534. {
  7535. "type": "string",
  7536. "description": "name of the repo to unstar",
  7537. "name": "repo",
  7538. "in": "path",
  7539. "required": true
  7540. }
  7541. ],
  7542. "responses": {
  7543. "204": {
  7544. "$ref": "#/responses/empty"
  7545. }
  7546. }
  7547. }
  7548. },
  7549. "/user/stopwatches": {
  7550. "get": {
  7551. "consumes": [
  7552. "application/json"
  7553. ],
  7554. "produces": [
  7555. "application/json"
  7556. ],
  7557. "tags": [
  7558. "user"
  7559. ],
  7560. "summary": "Get list of all existing stopwatches",
  7561. "operationId": "userGetStopWatches",
  7562. "responses": {
  7563. "200": {
  7564. "$ref": "#/responses/StopWatchList"
  7565. }
  7566. }
  7567. }
  7568. },
  7569. "/user/subscriptions": {
  7570. "get": {
  7571. "produces": [
  7572. "application/json"
  7573. ],
  7574. "tags": [
  7575. "user"
  7576. ],
  7577. "summary": "List repositories watched by the authenticated user",
  7578. "operationId": "userCurrentListSubscriptions",
  7579. "responses": {
  7580. "200": {
  7581. "$ref": "#/responses/RepositoryList"
  7582. }
  7583. }
  7584. }
  7585. },
  7586. "/user/teams": {
  7587. "get": {
  7588. "produces": [
  7589. "application/json"
  7590. ],
  7591. "tags": [
  7592. "user"
  7593. ],
  7594. "summary": "List all the teams a user belongs to",
  7595. "operationId": "userListTeams",
  7596. "responses": {
  7597. "200": {
  7598. "$ref": "#/responses/TeamList"
  7599. }
  7600. }
  7601. }
  7602. },
  7603. "/user/times": {
  7604. "get": {
  7605. "produces": [
  7606. "application/json"
  7607. ],
  7608. "tags": [
  7609. "user"
  7610. ],
  7611. "summary": "List the current user's tracked times",
  7612. "operationId": "userCurrentTrackedTimes",
  7613. "responses": {
  7614. "200": {
  7615. "$ref": "#/responses/TrackedTimeList"
  7616. }
  7617. }
  7618. }
  7619. },
  7620. "/users/search": {
  7621. "get": {
  7622. "produces": [
  7623. "application/json"
  7624. ],
  7625. "tags": [
  7626. "user"
  7627. ],
  7628. "summary": "Search for users",
  7629. "operationId": "userSearch",
  7630. "parameters": [
  7631. {
  7632. "type": "string",
  7633. "description": "keyword",
  7634. "name": "q",
  7635. "in": "query"
  7636. },
  7637. {
  7638. "type": "integer",
  7639. "format": "int64",
  7640. "description": "ID of the user to search for",
  7641. "name": "uid",
  7642. "in": "query"
  7643. },
  7644. {
  7645. "type": "integer",
  7646. "description": "maximum number of users to return",
  7647. "name": "limit",
  7648. "in": "query"
  7649. }
  7650. ],
  7651. "responses": {
  7652. "200": {
  7653. "description": "SearchResults of a successful search",
  7654. "schema": {
  7655. "type": "object",
  7656. "properties": {
  7657. "data": {
  7658. "type": "array",
  7659. "items": {
  7660. "$ref": "#/definitions/User"
  7661. }
  7662. },
  7663. "ok": {
  7664. "type": "boolean"
  7665. }
  7666. }
  7667. }
  7668. }
  7669. }
  7670. }
  7671. },
  7672. "/users/{follower}/following/{followee}": {
  7673. "get": {
  7674. "tags": [
  7675. "user"
  7676. ],
  7677. "summary": "Check if one user is following another user",
  7678. "operationId": "userCheckFollowing",
  7679. "parameters": [
  7680. {
  7681. "type": "string",
  7682. "description": "username of following user",
  7683. "name": "follower",
  7684. "in": "path",
  7685. "required": true
  7686. },
  7687. {
  7688. "type": "string",
  7689. "description": "username of followed user",
  7690. "name": "followee",
  7691. "in": "path",
  7692. "required": true
  7693. }
  7694. ],
  7695. "responses": {
  7696. "204": {
  7697. "$ref": "#/responses/empty"
  7698. },
  7699. "404": {
  7700. "$ref": "#/responses/notFound"
  7701. }
  7702. }
  7703. }
  7704. },
  7705. "/users/{username}": {
  7706. "get": {
  7707. "produces": [
  7708. "application/json"
  7709. ],
  7710. "tags": [
  7711. "user"
  7712. ],
  7713. "summary": "Get a user",
  7714. "operationId": "userGet",
  7715. "parameters": [
  7716. {
  7717. "type": "string",
  7718. "description": "username of user to get",
  7719. "name": "username",
  7720. "in": "path",
  7721. "required": true
  7722. }
  7723. ],
  7724. "responses": {
  7725. "200": {
  7726. "$ref": "#/responses/User"
  7727. },
  7728. "404": {
  7729. "$ref": "#/responses/notFound"
  7730. }
  7731. }
  7732. }
  7733. },
  7734. "/users/{username}/followers": {
  7735. "get": {
  7736. "produces": [
  7737. "application/json"
  7738. ],
  7739. "tags": [
  7740. "user"
  7741. ],
  7742. "summary": "List the given user's followers",
  7743. "operationId": "userListFollowers",
  7744. "parameters": [
  7745. {
  7746. "type": "string",
  7747. "description": "username of user",
  7748. "name": "username",
  7749. "in": "path",
  7750. "required": true
  7751. }
  7752. ],
  7753. "responses": {
  7754. "200": {
  7755. "$ref": "#/responses/UserList"
  7756. }
  7757. }
  7758. }
  7759. },
  7760. "/users/{username}/following": {
  7761. "get": {
  7762. "produces": [
  7763. "application/json"
  7764. ],
  7765. "tags": [
  7766. "user"
  7767. ],
  7768. "summary": "List the users that the given user is following",
  7769. "operationId": "userListFollowing",
  7770. "parameters": [
  7771. {
  7772. "type": "string",
  7773. "description": "username of user",
  7774. "name": "username",
  7775. "in": "path",
  7776. "required": true
  7777. }
  7778. ],
  7779. "responses": {
  7780. "200": {
  7781. "$ref": "#/responses/UserList"
  7782. }
  7783. }
  7784. }
  7785. },
  7786. "/users/{username}/gpg_keys": {
  7787. "get": {
  7788. "produces": [
  7789. "application/json"
  7790. ],
  7791. "tags": [
  7792. "user"
  7793. ],
  7794. "summary": "List the given user's GPG keys",
  7795. "operationId": "userListGPGKeys",
  7796. "parameters": [
  7797. {
  7798. "type": "string",
  7799. "description": "username of user",
  7800. "name": "username",
  7801. "in": "path",
  7802. "required": true
  7803. }
  7804. ],
  7805. "responses": {
  7806. "200": {
  7807. "$ref": "#/responses/GPGKeyList"
  7808. }
  7809. }
  7810. }
  7811. },
  7812. "/users/{username}/heatmap": {
  7813. "get": {
  7814. "produces": [
  7815. "application/json"
  7816. ],
  7817. "tags": [
  7818. "user"
  7819. ],
  7820. "summary": "Get a user's heatmap",
  7821. "operationId": "userGetHeatmapData",
  7822. "parameters": [
  7823. {
  7824. "type": "string",
  7825. "description": "username of user to get",
  7826. "name": "username",
  7827. "in": "path",
  7828. "required": true
  7829. }
  7830. ],
  7831. "responses": {
  7832. "200": {
  7833. "$ref": "#/responses/UserHeatmapData"
  7834. },
  7835. "404": {
  7836. "$ref": "#/responses/notFound"
  7837. }
  7838. }
  7839. }
  7840. },
  7841. "/users/{username}/keys": {
  7842. "get": {
  7843. "produces": [
  7844. "application/json"
  7845. ],
  7846. "tags": [
  7847. "user"
  7848. ],
  7849. "summary": "List the given user's public keys",
  7850. "operationId": "userListKeys",
  7851. "parameters": [
  7852. {
  7853. "type": "string",
  7854. "description": "username of user",
  7855. "name": "username",
  7856. "in": "path",
  7857. "required": true
  7858. },
  7859. {
  7860. "type": "string",
  7861. "description": "fingerprint of the key",
  7862. "name": "fingerprint",
  7863. "in": "query"
  7864. }
  7865. ],
  7866. "responses": {
  7867. "200": {
  7868. "$ref": "#/responses/PublicKeyList"
  7869. }
  7870. }
  7871. }
  7872. },
  7873. "/users/{username}/orgs": {
  7874. "get": {
  7875. "produces": [
  7876. "application/json"
  7877. ],
  7878. "tags": [
  7879. "organization"
  7880. ],
  7881. "summary": "List a user's organizations",
  7882. "operationId": "orgListUserOrgs",
  7883. "parameters": [
  7884. {
  7885. "type": "string",
  7886. "description": "username of user",
  7887. "name": "username",
  7888. "in": "path",
  7889. "required": true
  7890. }
  7891. ],
  7892. "responses": {
  7893. "200": {
  7894. "$ref": "#/responses/OrganizationList"
  7895. }
  7896. }
  7897. }
  7898. },
  7899. "/users/{username}/repos": {
  7900. "get": {
  7901. "produces": [
  7902. "application/json"
  7903. ],
  7904. "tags": [
  7905. "user"
  7906. ],
  7907. "summary": "List the repos owned by the given user",
  7908. "operationId": "userListRepos",
  7909. "parameters": [
  7910. {
  7911. "type": "string",
  7912. "description": "username of user",
  7913. "name": "username",
  7914. "in": "path",
  7915. "required": true
  7916. }
  7917. ],
  7918. "responses": {
  7919. "200": {
  7920. "$ref": "#/responses/RepositoryList"
  7921. }
  7922. }
  7923. }
  7924. },
  7925. "/users/{username}/starred": {
  7926. "get": {
  7927. "produces": [
  7928. "application/json"
  7929. ],
  7930. "tags": [
  7931. "user"
  7932. ],
  7933. "summary": "The repos that the given user has starred",
  7934. "operationId": "userListStarred",
  7935. "parameters": [
  7936. {
  7937. "type": "string",
  7938. "description": "username of user",
  7939. "name": "username",
  7940. "in": "path",
  7941. "required": true
  7942. }
  7943. ],
  7944. "responses": {
  7945. "200": {
  7946. "$ref": "#/responses/RepositoryList"
  7947. }
  7948. }
  7949. }
  7950. },
  7951. "/users/{username}/subscriptions": {
  7952. "get": {
  7953. "produces": [
  7954. "application/json"
  7955. ],
  7956. "tags": [
  7957. "user"
  7958. ],
  7959. "summary": "List the repositories watched by a user",
  7960. "operationId": "userListSubscriptions",
  7961. "parameters": [
  7962. {
  7963. "type": "string",
  7964. "description": "username of the user",
  7965. "name": "username",
  7966. "in": "path",
  7967. "required": true
  7968. }
  7969. ],
  7970. "responses": {
  7971. "200": {
  7972. "$ref": "#/responses/RepositoryList"
  7973. }
  7974. }
  7975. }
  7976. },
  7977. "/users/{username}/tokens": {
  7978. "get": {
  7979. "produces": [
  7980. "application/json"
  7981. ],
  7982. "tags": [
  7983. "user"
  7984. ],
  7985. "summary": "List the authenticated user's access tokens",
  7986. "operationId": "userGetTokens",
  7987. "parameters": [
  7988. {
  7989. "type": "string",
  7990. "description": "username of user",
  7991. "name": "username",
  7992. "in": "path",
  7993. "required": true
  7994. }
  7995. ],
  7996. "responses": {
  7997. "200": {
  7998. "$ref": "#/responses/AccessTokenList"
  7999. }
  8000. }
  8001. },
  8002. "post": {
  8003. "consumes": [
  8004. "application/json"
  8005. ],
  8006. "produces": [
  8007. "application/json"
  8008. ],
  8009. "tags": [
  8010. "user"
  8011. ],
  8012. "summary": "Create an access token",
  8013. "operationId": "userCreateToken",
  8014. "parameters": [
  8015. {
  8016. "type": "string",
  8017. "x-go-name": "Name",
  8018. "description": "username of user",
  8019. "name": "username",
  8020. "in": "path",
  8021. "required": true
  8022. },
  8023. {
  8024. "name": "accessToken",
  8025. "in": "body",
  8026. "schema": {
  8027. "type": "object",
  8028. "required": [
  8029. "name"
  8030. ],
  8031. "properties": {
  8032. "name": {
  8033. "type": "string"
  8034. }
  8035. }
  8036. }
  8037. }
  8038. ],
  8039. "responses": {
  8040. "200": {
  8041. "$ref": "#/responses/AccessToken"
  8042. }
  8043. }
  8044. }
  8045. },
  8046. "/users/{username}/tokens/{token}": {
  8047. "delete": {
  8048. "produces": [
  8049. "application/json"
  8050. ],
  8051. "tags": [
  8052. "user"
  8053. ],
  8054. "summary": "delete an access token",
  8055. "operationId": "userDeleteAccessToken",
  8056. "parameters": [
  8057. {
  8058. "type": "string",
  8059. "description": "username of user",
  8060. "name": "username",
  8061. "in": "path",
  8062. "required": true
  8063. },
  8064. {
  8065. "type": "integer",
  8066. "format": "int64",
  8067. "description": "token to be deleted",
  8068. "name": "token",
  8069. "in": "path",
  8070. "required": true
  8071. }
  8072. ],
  8073. "responses": {
  8074. "204": {
  8075. "$ref": "#/responses/empty"
  8076. }
  8077. }
  8078. }
  8079. },
  8080. "/version": {
  8081. "get": {
  8082. "produces": [
  8083. "application/json"
  8084. ],
  8085. "tags": [
  8086. "miscellaneous"
  8087. ],
  8088. "summary": "Returns the version of the Gitea application",
  8089. "operationId": "getVersion",
  8090. "responses": {
  8091. "200": {
  8092. "$ref": "#/responses/ServerVersion"
  8093. }
  8094. }
  8095. }
  8096. }
  8097. },
  8098. "definitions": {
  8099. "APIError": {
  8100. "description": "APIError is an api error with a message",
  8101. "type": "object",
  8102. "properties": {
  8103. "message": {
  8104. "type": "string",
  8105. "x-go-name": "Message"
  8106. },
  8107. "url": {
  8108. "type": "string",
  8109. "x-go-name": "URL"
  8110. }
  8111. },
  8112. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8113. },
  8114. "AccessToken": {
  8115. "type": "object",
  8116. "title": "AccessToken represents an API access token.",
  8117. "properties": {
  8118. "id": {
  8119. "type": "integer",
  8120. "format": "int64",
  8121. "x-go-name": "ID"
  8122. },
  8123. "name": {
  8124. "type": "string",
  8125. "x-go-name": "Name"
  8126. },
  8127. "sha1": {
  8128. "type": "string",
  8129. "x-go-name": "Token"
  8130. },
  8131. "token_last_eight": {
  8132. "type": "string",
  8133. "x-go-name": "TokenLastEight"
  8134. }
  8135. },
  8136. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8137. },
  8138. "AddCollaboratorOption": {
  8139. "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository",
  8140. "type": "object",
  8141. "properties": {
  8142. "permission": {
  8143. "type": "string",
  8144. "x-go-name": "Permission"
  8145. }
  8146. },
  8147. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8148. },
  8149. "AddTimeOption": {
  8150. "description": "AddTimeOption options for adding time to an issue",
  8151. "type": "object",
  8152. "required": [
  8153. "time"
  8154. ],
  8155. "properties": {
  8156. "created": {
  8157. "type": "string",
  8158. "format": "date-time",
  8159. "x-go-name": "Created"
  8160. },
  8161. "time": {
  8162. "description": "time in seconds",
  8163. "type": "integer",
  8164. "format": "int64",
  8165. "x-go-name": "Time"
  8166. },
  8167. "user_name": {
  8168. "description": "User who spent the time (optional)",
  8169. "type": "string",
  8170. "x-go-name": "User"
  8171. }
  8172. },
  8173. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8174. },
  8175. "AnnotatedTag": {
  8176. "description": "AnnotatedTag represents an annotated tag",
  8177. "type": "object",
  8178. "properties": {
  8179. "message": {
  8180. "type": "string",
  8181. "x-go-name": "Message"
  8182. },
  8183. "object": {
  8184. "$ref": "#/definitions/AnnotatedTagObject"
  8185. },
  8186. "sha": {
  8187. "type": "string",
  8188. "x-go-name": "SHA"
  8189. },
  8190. "tag": {
  8191. "type": "string",
  8192. "x-go-name": "Tag"
  8193. },
  8194. "tagger": {
  8195. "$ref": "#/definitions/CommitUser"
  8196. },
  8197. "url": {
  8198. "type": "string",
  8199. "x-go-name": "URL"
  8200. },
  8201. "verification": {
  8202. "$ref": "#/definitions/PayloadCommitVerification"
  8203. }
  8204. },
  8205. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8206. },
  8207. "AnnotatedTagObject": {
  8208. "description": "AnnotatedTagObject contains meta information of the tag object",
  8209. "type": "object",
  8210. "properties": {
  8211. "sha": {
  8212. "type": "string",
  8213. "x-go-name": "SHA"
  8214. },
  8215. "type": {
  8216. "type": "string",
  8217. "x-go-name": "Type"
  8218. },
  8219. "url": {
  8220. "type": "string",
  8221. "x-go-name": "URL"
  8222. }
  8223. },
  8224. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8225. },
  8226. "Attachment": {
  8227. "description": "Attachment a generic attachment",
  8228. "type": "object",
  8229. "properties": {
  8230. "browser_download_url": {
  8231. "type": "string",
  8232. "x-go-name": "DownloadURL"
  8233. },
  8234. "created_at": {
  8235. "type": "string",
  8236. "format": "date-time",
  8237. "x-go-name": "Created"
  8238. },
  8239. "download_count": {
  8240. "type": "integer",
  8241. "format": "int64",
  8242. "x-go-name": "DownloadCount"
  8243. },
  8244. "id": {
  8245. "type": "integer",
  8246. "format": "int64",
  8247. "x-go-name": "ID"
  8248. },
  8249. "name": {
  8250. "type": "string",
  8251. "x-go-name": "Name"
  8252. },
  8253. "size": {
  8254. "type": "integer",
  8255. "format": "int64",
  8256. "x-go-name": "Size"
  8257. },
  8258. "uuid": {
  8259. "type": "string",
  8260. "x-go-name": "UUID"
  8261. }
  8262. },
  8263. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8264. },
  8265. "Branch": {
  8266. "description": "Branch represents a repository branch",
  8267. "type": "object",
  8268. "properties": {
  8269. "commit": {
  8270. "$ref": "#/definitions/PayloadCommit"
  8271. },
  8272. "enable_status_check": {
  8273. "type": "boolean",
  8274. "x-go-name": "EnableStatusCheck"
  8275. },
  8276. "name": {
  8277. "type": "string",
  8278. "x-go-name": "Name"
  8279. },
  8280. "protected": {
  8281. "type": "boolean",
  8282. "x-go-name": "Protected"
  8283. },
  8284. "required_approvals": {
  8285. "type": "integer",
  8286. "format": "int64",
  8287. "x-go-name": "RequiredApprovals"
  8288. },
  8289. "status_check_contexts": {
  8290. "type": "array",
  8291. "items": {
  8292. "type": "string"
  8293. },
  8294. "x-go-name": "StatusCheckContexts"
  8295. },
  8296. "user_can_merge": {
  8297. "type": "boolean",
  8298. "x-go-name": "UserCanMerge"
  8299. },
  8300. "user_can_push": {
  8301. "type": "boolean",
  8302. "x-go-name": "UserCanPush"
  8303. }
  8304. },
  8305. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8306. },
  8307. "Comment": {
  8308. "description": "Comment represents a comment on a commit or issue",
  8309. "type": "object",
  8310. "properties": {
  8311. "body": {
  8312. "type": "string",
  8313. "x-go-name": "Body"
  8314. },
  8315. "created_at": {
  8316. "type": "string",
  8317. "format": "date-time",
  8318. "x-go-name": "Created"
  8319. },
  8320. "html_url": {
  8321. "type": "string",
  8322. "x-go-name": "HTMLURL"
  8323. },
  8324. "id": {
  8325. "type": "integer",
  8326. "format": "int64",
  8327. "x-go-name": "ID"
  8328. },
  8329. "issue_url": {
  8330. "type": "string",
  8331. "x-go-name": "IssueURL"
  8332. },
  8333. "original_author": {
  8334. "type": "string",
  8335. "x-go-name": "OriginalAuthor"
  8336. },
  8337. "original_author_id": {
  8338. "type": "integer",
  8339. "format": "int64",
  8340. "x-go-name": "OriginalAuthorID"
  8341. },
  8342. "pull_request_url": {
  8343. "type": "string",
  8344. "x-go-name": "PRURL"
  8345. },
  8346. "updated_at": {
  8347. "type": "string",
  8348. "format": "date-time",
  8349. "x-go-name": "Updated"
  8350. },
  8351. "user": {
  8352. "$ref": "#/definitions/User"
  8353. }
  8354. },
  8355. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8356. },
  8357. "Commit": {
  8358. "type": "object",
  8359. "title": "Commit contains information generated from a Git commit.",
  8360. "properties": {
  8361. "author": {
  8362. "$ref": "#/definitions/User"
  8363. },
  8364. "commit": {
  8365. "$ref": "#/definitions/RepoCommit"
  8366. },
  8367. "committer": {
  8368. "$ref": "#/definitions/User"
  8369. },
  8370. "html_url": {
  8371. "type": "string",
  8372. "x-go-name": "HTMLURL"
  8373. },
  8374. "parents": {
  8375. "type": "array",
  8376. "items": {
  8377. "$ref": "#/definitions/CommitMeta"
  8378. },
  8379. "x-go-name": "Parents"
  8380. },
  8381. "sha": {
  8382. "type": "string",
  8383. "x-go-name": "SHA"
  8384. },
  8385. "url": {
  8386. "type": "string",
  8387. "x-go-name": "URL"
  8388. }
  8389. },
  8390. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8391. },
  8392. "CommitDateOptions": {
  8393. "description": "CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE",
  8394. "type": "object",
  8395. "properties": {
  8396. "author": {
  8397. "type": "string",
  8398. "format": "date-time",
  8399. "x-go-name": "Author"
  8400. },
  8401. "committer": {
  8402. "type": "string",
  8403. "format": "date-time",
  8404. "x-go-name": "Committer"
  8405. }
  8406. },
  8407. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8408. },
  8409. "CommitMeta": {
  8410. "type": "object",
  8411. "title": "CommitMeta contains meta information of a commit in terms of API.",
  8412. "properties": {
  8413. "sha": {
  8414. "type": "string",
  8415. "x-go-name": "SHA"
  8416. },
  8417. "url": {
  8418. "type": "string",
  8419. "x-go-name": "URL"
  8420. }
  8421. },
  8422. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8423. },
  8424. "CommitUser": {
  8425. "type": "object",
  8426. "title": "CommitUser contains information of a user in the context of a commit.",
  8427. "properties": {
  8428. "date": {
  8429. "type": "string",
  8430. "x-go-name": "Date"
  8431. },
  8432. "email": {
  8433. "type": "string",
  8434. "format": "email",
  8435. "x-go-name": "Email"
  8436. },
  8437. "name": {
  8438. "type": "string",
  8439. "x-go-name": "Name"
  8440. }
  8441. },
  8442. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8443. },
  8444. "ContentsResponse": {
  8445. "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content",
  8446. "type": "object",
  8447. "properties": {
  8448. "_links": {
  8449. "$ref": "#/definitions/FileLinksResponse"
  8450. },
  8451. "content": {
  8452. "description": "`content` is populated when `type` is `file`, otherwise null",
  8453. "type": "string",
  8454. "x-go-name": "Content"
  8455. },
  8456. "download_url": {
  8457. "type": "string",
  8458. "x-go-name": "DownloadURL"
  8459. },
  8460. "encoding": {
  8461. "description": "`encoding` is populated when `type` is `file`, otherwise null",
  8462. "type": "string",
  8463. "x-go-name": "Encoding"
  8464. },
  8465. "git_url": {
  8466. "type": "string",
  8467. "x-go-name": "GitURL"
  8468. },
  8469. "html_url": {
  8470. "type": "string",
  8471. "x-go-name": "HTMLURL"
  8472. },
  8473. "name": {
  8474. "type": "string",
  8475. "x-go-name": "Name"
  8476. },
  8477. "path": {
  8478. "type": "string",
  8479. "x-go-name": "Path"
  8480. },
  8481. "sha": {
  8482. "type": "string",
  8483. "x-go-name": "SHA"
  8484. },
  8485. "size": {
  8486. "type": "integer",
  8487. "format": "int64",
  8488. "x-go-name": "Size"
  8489. },
  8490. "submodule_git_url": {
  8491. "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null",
  8492. "type": "string",
  8493. "x-go-name": "SubmoduleGitURL"
  8494. },
  8495. "target": {
  8496. "description": "`target` is populated when `type` is `symlink`, otherwise null",
  8497. "type": "string",
  8498. "x-go-name": "Target"
  8499. },
  8500. "type": {
  8501. "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`",
  8502. "type": "string",
  8503. "x-go-name": "Type"
  8504. },
  8505. "url": {
  8506. "type": "string",
  8507. "x-go-name": "URL"
  8508. }
  8509. },
  8510. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8511. },
  8512. "CreateEmailOption": {
  8513. "description": "CreateEmailOption options when creating email addresses",
  8514. "type": "object",
  8515. "properties": {
  8516. "emails": {
  8517. "description": "email addresses to add",
  8518. "type": "array",
  8519. "items": {
  8520. "type": "string"
  8521. },
  8522. "x-go-name": "Emails"
  8523. }
  8524. },
  8525. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8526. },
  8527. "CreateFileOptions": {
  8528. "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)",
  8529. "type": "object",
  8530. "required": [
  8531. "content"
  8532. ],
  8533. "properties": {
  8534. "author": {
  8535. "$ref": "#/definitions/Identity"
  8536. },
  8537. "branch": {
  8538. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  8539. "type": "string",
  8540. "x-go-name": "BranchName"
  8541. },
  8542. "committer": {
  8543. "$ref": "#/definitions/Identity"
  8544. },
  8545. "content": {
  8546. "description": "content must be base64 encoded",
  8547. "type": "string",
  8548. "x-go-name": "Content"
  8549. },
  8550. "dates": {
  8551. "$ref": "#/definitions/CommitDateOptions"
  8552. },
  8553. "message": {
  8554. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  8555. "type": "string",
  8556. "x-go-name": "Message"
  8557. },
  8558. "new_branch": {
  8559. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  8560. "type": "string",
  8561. "x-go-name": "NewBranchName"
  8562. }
  8563. },
  8564. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8565. },
  8566. "CreateForkOption": {
  8567. "description": "CreateForkOption options for creating a fork",
  8568. "type": "object",
  8569. "properties": {
  8570. "organization": {
  8571. "description": "organization name, if forking into an organization",
  8572. "type": "string",
  8573. "x-go-name": "Organization"
  8574. }
  8575. },
  8576. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8577. },
  8578. "CreateGPGKeyOption": {
  8579. "description": "CreateGPGKeyOption options create user GPG key",
  8580. "type": "object",
  8581. "required": [
  8582. "armored_public_key"
  8583. ],
  8584. "properties": {
  8585. "armored_public_key": {
  8586. "description": "An armored GPG key to add",
  8587. "type": "string",
  8588. "uniqueItems": true,
  8589. "x-go-name": "ArmoredKey"
  8590. }
  8591. },
  8592. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8593. },
  8594. "CreateHookOption": {
  8595. "description": "CreateHookOption options when create a hook",
  8596. "type": "object",
  8597. "required": [
  8598. "type",
  8599. "config"
  8600. ],
  8601. "properties": {
  8602. "active": {
  8603. "type": "boolean",
  8604. "default": false,
  8605. "x-go-name": "Active"
  8606. },
  8607. "branch_filter": {
  8608. "type": "string",
  8609. "x-go-name": "BranchFilter"
  8610. },
  8611. "config": {
  8612. "$ref": "#/definitions/CreateHookOptionConfig"
  8613. },
  8614. "events": {
  8615. "type": "array",
  8616. "items": {
  8617. "type": "string"
  8618. },
  8619. "x-go-name": "Events"
  8620. },
  8621. "type": {
  8622. "type": "string",
  8623. "enum": [
  8624. "dingtalk",
  8625. "discord",
  8626. "gitea",
  8627. "gogs",
  8628. "msteams",
  8629. "slack",
  8630. "telegram"
  8631. ],
  8632. "x-go-name": "Type"
  8633. }
  8634. },
  8635. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8636. },
  8637. "CreateHookOptionConfig": {
  8638. "description": "CreateHookOptionConfig has all config options in it\nrequired are \"content_type\" and \"url\" Required",
  8639. "type": "object",
  8640. "additionalProperties": {
  8641. "type": "string"
  8642. },
  8643. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8644. },
  8645. "CreateIssueCommentOption": {
  8646. "description": "CreateIssueCommentOption options for creating a comment on an issue",
  8647. "type": "object",
  8648. "required": [
  8649. "body"
  8650. ],
  8651. "properties": {
  8652. "body": {
  8653. "type": "string",
  8654. "x-go-name": "Body"
  8655. }
  8656. },
  8657. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8658. },
  8659. "CreateIssueOption": {
  8660. "description": "CreateIssueOption options to create one issue",
  8661. "type": "object",
  8662. "required": [
  8663. "title"
  8664. ],
  8665. "properties": {
  8666. "assignee": {
  8667. "description": "username of assignee",
  8668. "type": "string",
  8669. "x-go-name": "Assignee"
  8670. },
  8671. "assignees": {
  8672. "type": "array",
  8673. "items": {
  8674. "type": "string"
  8675. },
  8676. "x-go-name": "Assignees"
  8677. },
  8678. "body": {
  8679. "type": "string",
  8680. "x-go-name": "Body"
  8681. },
  8682. "closed": {
  8683. "type": "boolean",
  8684. "x-go-name": "Closed"
  8685. },
  8686. "due_date": {
  8687. "type": "string",
  8688. "format": "date-time",
  8689. "x-go-name": "Deadline"
  8690. },
  8691. "labels": {
  8692. "description": "list of label ids",
  8693. "type": "array",
  8694. "items": {
  8695. "type": "integer",
  8696. "format": "int64"
  8697. },
  8698. "x-go-name": "Labels"
  8699. },
  8700. "milestone": {
  8701. "description": "milestone id",
  8702. "type": "integer",
  8703. "format": "int64",
  8704. "x-go-name": "Milestone"
  8705. },
  8706. "title": {
  8707. "type": "string",
  8708. "x-go-name": "Title"
  8709. }
  8710. },
  8711. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8712. },
  8713. "CreateKeyOption": {
  8714. "description": "CreateKeyOption options when creating a key",
  8715. "type": "object",
  8716. "required": [
  8717. "title",
  8718. "key"
  8719. ],
  8720. "properties": {
  8721. "key": {
  8722. "description": "An armored SSH key to add",
  8723. "type": "string",
  8724. "uniqueItems": true,
  8725. "x-go-name": "Key"
  8726. },
  8727. "read_only": {
  8728. "description": "Describe if the key has only read access or read/write",
  8729. "type": "boolean",
  8730. "x-go-name": "ReadOnly"
  8731. },
  8732. "title": {
  8733. "description": "Title of the key to add",
  8734. "type": "string",
  8735. "uniqueItems": true,
  8736. "x-go-name": "Title"
  8737. }
  8738. },
  8739. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8740. },
  8741. "CreateLabelOption": {
  8742. "description": "CreateLabelOption options for creating a label",
  8743. "type": "object",
  8744. "required": [
  8745. "name",
  8746. "color"
  8747. ],
  8748. "properties": {
  8749. "color": {
  8750. "type": "string",
  8751. "x-go-name": "Color",
  8752. "example": "#00aabb"
  8753. },
  8754. "description": {
  8755. "type": "string",
  8756. "x-go-name": "Description"
  8757. },
  8758. "name": {
  8759. "type": "string",
  8760. "x-go-name": "Name"
  8761. }
  8762. },
  8763. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8764. },
  8765. "CreateMilestoneOption": {
  8766. "description": "CreateMilestoneOption options for creating a milestone",
  8767. "type": "object",
  8768. "properties": {
  8769. "description": {
  8770. "type": "string",
  8771. "x-go-name": "Description"
  8772. },
  8773. "due_on": {
  8774. "type": "string",
  8775. "format": "date-time",
  8776. "x-go-name": "Deadline"
  8777. },
  8778. "title": {
  8779. "type": "string",
  8780. "x-go-name": "Title"
  8781. }
  8782. },
  8783. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8784. },
  8785. "CreateOrgOption": {
  8786. "description": "CreateOrgOption options for creating an organization",
  8787. "type": "object",
  8788. "required": [
  8789. "username"
  8790. ],
  8791. "properties": {
  8792. "description": {
  8793. "type": "string",
  8794. "x-go-name": "Description"
  8795. },
  8796. "full_name": {
  8797. "type": "string",
  8798. "x-go-name": "FullName"
  8799. },
  8800. "location": {
  8801. "type": "string",
  8802. "x-go-name": "Location"
  8803. },
  8804. "repo_admin_change_team_access": {
  8805. "type": "boolean",
  8806. "x-go-name": "RepoAdminChangeTeamAccess"
  8807. },
  8808. "username": {
  8809. "type": "string",
  8810. "x-go-name": "UserName"
  8811. },
  8812. "visibility": {
  8813. "description": "possible values are `public` (default), `limited` or `private`",
  8814. "type": "string",
  8815. "enum": [
  8816. "public",
  8817. "limited",
  8818. "private"
  8819. ],
  8820. "x-go-name": "Visibility"
  8821. },
  8822. "website": {
  8823. "type": "string",
  8824. "x-go-name": "Website"
  8825. }
  8826. },
  8827. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8828. },
  8829. "CreatePullRequestOption": {
  8830. "description": "CreatePullRequestOption options when creating a pull request",
  8831. "type": "object",
  8832. "properties": {
  8833. "assignee": {
  8834. "type": "string",
  8835. "x-go-name": "Assignee"
  8836. },
  8837. "assignees": {
  8838. "type": "array",
  8839. "items": {
  8840. "type": "string"
  8841. },
  8842. "x-go-name": "Assignees"
  8843. },
  8844. "base": {
  8845. "type": "string",
  8846. "x-go-name": "Base"
  8847. },
  8848. "body": {
  8849. "type": "string",
  8850. "x-go-name": "Body"
  8851. },
  8852. "due_date": {
  8853. "type": "string",
  8854. "format": "date-time",
  8855. "x-go-name": "Deadline"
  8856. },
  8857. "head": {
  8858. "type": "string",
  8859. "x-go-name": "Head"
  8860. },
  8861. "labels": {
  8862. "type": "array",
  8863. "items": {
  8864. "type": "integer",
  8865. "format": "int64"
  8866. },
  8867. "x-go-name": "Labels"
  8868. },
  8869. "milestone": {
  8870. "type": "integer",
  8871. "format": "int64",
  8872. "x-go-name": "Milestone"
  8873. },
  8874. "title": {
  8875. "type": "string",
  8876. "x-go-name": "Title"
  8877. }
  8878. },
  8879. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8880. },
  8881. "CreateReleaseOption": {
  8882. "description": "CreateReleaseOption options when creating a release",
  8883. "type": "object",
  8884. "required": [
  8885. "tag_name"
  8886. ],
  8887. "properties": {
  8888. "body": {
  8889. "type": "string",
  8890. "x-go-name": "Note"
  8891. },
  8892. "draft": {
  8893. "type": "boolean",
  8894. "x-go-name": "IsDraft"
  8895. },
  8896. "name": {
  8897. "type": "string",
  8898. "x-go-name": "Title"
  8899. },
  8900. "prerelease": {
  8901. "type": "boolean",
  8902. "x-go-name": "IsPrerelease"
  8903. },
  8904. "tag_name": {
  8905. "type": "string",
  8906. "x-go-name": "TagName"
  8907. },
  8908. "target_commitish": {
  8909. "type": "string",
  8910. "x-go-name": "Target"
  8911. }
  8912. },
  8913. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8914. },
  8915. "CreateRepoOption": {
  8916. "description": "CreateRepoOption options when creating repository",
  8917. "type": "object",
  8918. "required": [
  8919. "name"
  8920. ],
  8921. "properties": {
  8922. "auto_init": {
  8923. "description": "Whether the repository should be auto-intialized?",
  8924. "type": "boolean",
  8925. "x-go-name": "AutoInit"
  8926. },
  8927. "description": {
  8928. "description": "Description of the repository to create",
  8929. "type": "string",
  8930. "x-go-name": "Description"
  8931. },
  8932. "gitignores": {
  8933. "description": "Gitignores to use",
  8934. "type": "string",
  8935. "x-go-name": "Gitignores"
  8936. },
  8937. "issue_labels": {
  8938. "description": "Issue Label set to use",
  8939. "type": "string",
  8940. "x-go-name": "IssueLabels"
  8941. },
  8942. "license": {
  8943. "description": "License to use",
  8944. "type": "string",
  8945. "x-go-name": "License"
  8946. },
  8947. "name": {
  8948. "description": "Name of the repository to create",
  8949. "type": "string",
  8950. "uniqueItems": true,
  8951. "x-go-name": "Name"
  8952. },
  8953. "private": {
  8954. "description": "Whether the repository is private",
  8955. "type": "boolean",
  8956. "x-go-name": "Private"
  8957. },
  8958. "readme": {
  8959. "description": "Readme of the repository to create",
  8960. "type": "string",
  8961. "x-go-name": "Readme"
  8962. }
  8963. },
  8964. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8965. },
  8966. "CreateStatusOption": {
  8967. "description": "CreateStatusOption holds the information needed to create a new Status for a Commit",
  8968. "type": "object",
  8969. "properties": {
  8970. "context": {
  8971. "type": "string",
  8972. "x-go-name": "Context"
  8973. },
  8974. "description": {
  8975. "type": "string",
  8976. "x-go-name": "Description"
  8977. },
  8978. "state": {
  8979. "$ref": "#/definitions/StatusState"
  8980. },
  8981. "target_url": {
  8982. "type": "string",
  8983. "x-go-name": "TargetURL"
  8984. }
  8985. },
  8986. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8987. },
  8988. "CreateTeamOption": {
  8989. "description": "CreateTeamOption options for creating a team",
  8990. "type": "object",
  8991. "required": [
  8992. "name"
  8993. ],
  8994. "properties": {
  8995. "can_create_org_repo": {
  8996. "type": "boolean",
  8997. "x-go-name": "CanCreateOrgRepo"
  8998. },
  8999. "description": {
  9000. "type": "string",
  9001. "x-go-name": "Description"
  9002. },
  9003. "includes_all_repositories": {
  9004. "type": "boolean",
  9005. "x-go-name": "IncludesAllRepositories"
  9006. },
  9007. "name": {
  9008. "type": "string",
  9009. "x-go-name": "Name"
  9010. },
  9011. "permission": {
  9012. "type": "string",
  9013. "enum": [
  9014. "read",
  9015. "write",
  9016. "admin"
  9017. ],
  9018. "x-go-name": "Permission"
  9019. },
  9020. "units": {
  9021. "type": "array",
  9022. "items": {
  9023. "type": "string"
  9024. },
  9025. "x-go-name": "Units",
  9026. "example": [
  9027. "repo.code",
  9028. "repo.issues",
  9029. "repo.ext_issues",
  9030. "repo.wiki",
  9031. "repo.pulls",
  9032. "repo.releases",
  9033. "repo.ext_wiki"
  9034. ]
  9035. }
  9036. },
  9037. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9038. },
  9039. "CreateUserOption": {
  9040. "description": "CreateUserOption create user options",
  9041. "type": "object",
  9042. "required": [
  9043. "username",
  9044. "email",
  9045. "password"
  9046. ],
  9047. "properties": {
  9048. "email": {
  9049. "type": "string",
  9050. "format": "email",
  9051. "x-go-name": "Email"
  9052. },
  9053. "full_name": {
  9054. "type": "string",
  9055. "x-go-name": "FullName"
  9056. },
  9057. "login_name": {
  9058. "type": "string",
  9059. "x-go-name": "LoginName"
  9060. },
  9061. "must_change_password": {
  9062. "type": "boolean",
  9063. "x-go-name": "MustChangePassword"
  9064. },
  9065. "password": {
  9066. "type": "string",
  9067. "x-go-name": "Password"
  9068. },
  9069. "send_notify": {
  9070. "type": "boolean",
  9071. "x-go-name": "SendNotify"
  9072. },
  9073. "source_id": {
  9074. "type": "integer",
  9075. "format": "int64",
  9076. "x-go-name": "SourceID"
  9077. },
  9078. "username": {
  9079. "type": "string",
  9080. "x-go-name": "Username"
  9081. }
  9082. },
  9083. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9084. },
  9085. "DeleteEmailOption": {
  9086. "description": "DeleteEmailOption options when deleting email addresses",
  9087. "type": "object",
  9088. "properties": {
  9089. "emails": {
  9090. "description": "email addresses to delete",
  9091. "type": "array",
  9092. "items": {
  9093. "type": "string"
  9094. },
  9095. "x-go-name": "Emails"
  9096. }
  9097. },
  9098. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9099. },
  9100. "DeleteFileOptions": {
  9101. "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)",
  9102. "type": "object",
  9103. "required": [
  9104. "sha"
  9105. ],
  9106. "properties": {
  9107. "author": {
  9108. "$ref": "#/definitions/Identity"
  9109. },
  9110. "branch": {
  9111. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  9112. "type": "string",
  9113. "x-go-name": "BranchName"
  9114. },
  9115. "committer": {
  9116. "$ref": "#/definitions/Identity"
  9117. },
  9118. "dates": {
  9119. "$ref": "#/definitions/CommitDateOptions"
  9120. },
  9121. "message": {
  9122. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  9123. "type": "string",
  9124. "x-go-name": "Message"
  9125. },
  9126. "new_branch": {
  9127. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  9128. "type": "string",
  9129. "x-go-name": "NewBranchName"
  9130. },
  9131. "sha": {
  9132. "description": "sha is the SHA for the file that already exists",
  9133. "type": "string",
  9134. "x-go-name": "SHA"
  9135. }
  9136. },
  9137. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9138. },
  9139. "DeployKey": {
  9140. "description": "DeployKey a deploy key",
  9141. "type": "object",
  9142. "properties": {
  9143. "created_at": {
  9144. "type": "string",
  9145. "format": "date-time",
  9146. "x-go-name": "Created"
  9147. },
  9148. "fingerprint": {
  9149. "type": "string",
  9150. "x-go-name": "Fingerprint"
  9151. },
  9152. "id": {
  9153. "type": "integer",
  9154. "format": "int64",
  9155. "x-go-name": "ID"
  9156. },
  9157. "key": {
  9158. "type": "string",
  9159. "x-go-name": "Key"
  9160. },
  9161. "key_id": {
  9162. "type": "integer",
  9163. "format": "int64",
  9164. "x-go-name": "KeyID"
  9165. },
  9166. "read_only": {
  9167. "type": "boolean",
  9168. "x-go-name": "ReadOnly"
  9169. },
  9170. "repository": {
  9171. "$ref": "#/definitions/Repository"
  9172. },
  9173. "title": {
  9174. "type": "string",
  9175. "x-go-name": "Title"
  9176. },
  9177. "url": {
  9178. "type": "string",
  9179. "x-go-name": "URL"
  9180. }
  9181. },
  9182. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9183. },
  9184. "EditAttachmentOptions": {
  9185. "description": "EditAttachmentOptions options for editing attachments",
  9186. "type": "object",
  9187. "properties": {
  9188. "name": {
  9189. "type": "string",
  9190. "x-go-name": "Name"
  9191. }
  9192. },
  9193. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9194. },
  9195. "EditDeadlineOption": {
  9196. "description": "EditDeadlineOption options for creating a deadline",
  9197. "type": "object",
  9198. "required": [
  9199. "due_date"
  9200. ],
  9201. "properties": {
  9202. "due_date": {
  9203. "type": "string",
  9204. "format": "date-time",
  9205. "x-go-name": "Deadline"
  9206. }
  9207. },
  9208. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9209. },
  9210. "EditGitHookOption": {
  9211. "description": "EditGitHookOption options when modifying one Git hook",
  9212. "type": "object",
  9213. "properties": {
  9214. "content": {
  9215. "type": "string",
  9216. "x-go-name": "Content"
  9217. }
  9218. },
  9219. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9220. },
  9221. "EditHookOption": {
  9222. "description": "EditHookOption options when modify one hook",
  9223. "type": "object",
  9224. "properties": {
  9225. "active": {
  9226. "type": "boolean",
  9227. "x-go-name": "Active"
  9228. },
  9229. "branch_filter": {
  9230. "type": "string",
  9231. "x-go-name": "BranchFilter"
  9232. },
  9233. "config": {
  9234. "type": "object",
  9235. "additionalProperties": {
  9236. "type": "string"
  9237. },
  9238. "x-go-name": "Config"
  9239. },
  9240. "events": {
  9241. "type": "array",
  9242. "items": {
  9243. "type": "string"
  9244. },
  9245. "x-go-name": "Events"
  9246. }
  9247. },
  9248. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9249. },
  9250. "EditIssueCommentOption": {
  9251. "description": "EditIssueCommentOption options for editing a comment",
  9252. "type": "object",
  9253. "required": [
  9254. "body"
  9255. ],
  9256. "properties": {
  9257. "body": {
  9258. "type": "string",
  9259. "x-go-name": "Body"
  9260. }
  9261. },
  9262. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9263. },
  9264. "EditIssueOption": {
  9265. "description": "EditIssueOption options for editing an issue",
  9266. "type": "object",
  9267. "properties": {
  9268. "assignee": {
  9269. "type": "string",
  9270. "x-go-name": "Assignee"
  9271. },
  9272. "assignees": {
  9273. "type": "array",
  9274. "items": {
  9275. "type": "string"
  9276. },
  9277. "x-go-name": "Assignees"
  9278. },
  9279. "body": {
  9280. "type": "string",
  9281. "x-go-name": "Body"
  9282. },
  9283. "due_date": {
  9284. "type": "string",
  9285. "format": "date-time",
  9286. "x-go-name": "Deadline"
  9287. },
  9288. "milestone": {
  9289. "type": "integer",
  9290. "format": "int64",
  9291. "x-go-name": "Milestone"
  9292. },
  9293. "state": {
  9294. "type": "string",
  9295. "x-go-name": "State"
  9296. },
  9297. "title": {
  9298. "type": "string",
  9299. "x-go-name": "Title"
  9300. },
  9301. "unset_due_date": {
  9302. "type": "boolean",
  9303. "x-go-name": "RemoveDeadline"
  9304. }
  9305. },
  9306. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9307. },
  9308. "EditLabelOption": {
  9309. "description": "EditLabelOption options for editing a label",
  9310. "type": "object",
  9311. "properties": {
  9312. "color": {
  9313. "type": "string",
  9314. "x-go-name": "Color"
  9315. },
  9316. "description": {
  9317. "type": "string",
  9318. "x-go-name": "Description"
  9319. },
  9320. "name": {
  9321. "type": "string",
  9322. "x-go-name": "Name"
  9323. }
  9324. },
  9325. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9326. },
  9327. "EditMilestoneOption": {
  9328. "description": "EditMilestoneOption options for editing a milestone",
  9329. "type": "object",
  9330. "properties": {
  9331. "description": {
  9332. "type": "string",
  9333. "x-go-name": "Description"
  9334. },
  9335. "due_on": {
  9336. "type": "string",
  9337. "format": "date-time",
  9338. "x-go-name": "Deadline"
  9339. },
  9340. "state": {
  9341. "type": "string",
  9342. "x-go-name": "State"
  9343. },
  9344. "title": {
  9345. "type": "string",
  9346. "x-go-name": "Title"
  9347. }
  9348. },
  9349. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9350. },
  9351. "EditOrgOption": {
  9352. "description": "EditOrgOption options for editing an organization",
  9353. "type": "object",
  9354. "properties": {
  9355. "description": {
  9356. "type": "string",
  9357. "x-go-name": "Description"
  9358. },
  9359. "full_name": {
  9360. "type": "string",
  9361. "x-go-name": "FullName"
  9362. },
  9363. "location": {
  9364. "type": "string",
  9365. "x-go-name": "Location"
  9366. },
  9367. "repo_admin_change_team_access": {
  9368. "type": "boolean",
  9369. "x-go-name": "RepoAdminChangeTeamAccess"
  9370. },
  9371. "visibility": {
  9372. "description": "possible values are `public`, `limited` or `private`",
  9373. "type": "string",
  9374. "enum": [
  9375. "public",
  9376. "limited",
  9377. "private"
  9378. ],
  9379. "x-go-name": "Visibility"
  9380. },
  9381. "website": {
  9382. "type": "string",
  9383. "x-go-name": "Website"
  9384. }
  9385. },
  9386. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9387. },
  9388. "EditPullRequestOption": {
  9389. "description": "EditPullRequestOption options when modify pull request",
  9390. "type": "object",
  9391. "properties": {
  9392. "assignee": {
  9393. "type": "string",
  9394. "x-go-name": "Assignee"
  9395. },
  9396. "assignees": {
  9397. "type": "array",
  9398. "items": {
  9399. "type": "string"
  9400. },
  9401. "x-go-name": "Assignees"
  9402. },
  9403. "body": {
  9404. "type": "string",
  9405. "x-go-name": "Body"
  9406. },
  9407. "due_date": {
  9408. "type": "string",
  9409. "format": "date-time",
  9410. "x-go-name": "Deadline"
  9411. },
  9412. "labels": {
  9413. "type": "array",
  9414. "items": {
  9415. "type": "integer",
  9416. "format": "int64"
  9417. },
  9418. "x-go-name": "Labels"
  9419. },
  9420. "milestone": {
  9421. "type": "integer",
  9422. "format": "int64",
  9423. "x-go-name": "Milestone"
  9424. },
  9425. "state": {
  9426. "type": "string",
  9427. "x-go-name": "State"
  9428. },
  9429. "title": {
  9430. "type": "string",
  9431. "x-go-name": "Title"
  9432. },
  9433. "unset_due_date": {
  9434. "type": "boolean",
  9435. "x-go-name": "RemoveDeadline"
  9436. }
  9437. },
  9438. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9439. },
  9440. "EditReactionOption": {
  9441. "description": "EditReactionOption contain the reaction type",
  9442. "type": "object",
  9443. "properties": {
  9444. "content": {
  9445. "type": "string",
  9446. "x-go-name": "Reaction"
  9447. }
  9448. },
  9449. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9450. },
  9451. "EditReleaseOption": {
  9452. "description": "EditReleaseOption options when editing a release",
  9453. "type": "object",
  9454. "properties": {
  9455. "body": {
  9456. "type": "string",
  9457. "x-go-name": "Note"
  9458. },
  9459. "draft": {
  9460. "type": "boolean",
  9461. "x-go-name": "IsDraft"
  9462. },
  9463. "name": {
  9464. "type": "string",
  9465. "x-go-name": "Title"
  9466. },
  9467. "prerelease": {
  9468. "type": "boolean",
  9469. "x-go-name": "IsPrerelease"
  9470. },
  9471. "tag_name": {
  9472. "type": "string",
  9473. "x-go-name": "TagName"
  9474. },
  9475. "target_commitish": {
  9476. "type": "string",
  9477. "x-go-name": "Target"
  9478. }
  9479. },
  9480. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9481. },
  9482. "EditRepoOption": {
  9483. "description": "EditRepoOption options when editing a repository's properties",
  9484. "type": "object",
  9485. "properties": {
  9486. "allow_merge_commits": {
  9487. "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`.",
  9488. "type": "boolean",
  9489. "x-go-name": "AllowMerge"
  9490. },
  9491. "allow_rebase": {
  9492. "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.",
  9493. "type": "boolean",
  9494. "x-go-name": "AllowRebase"
  9495. },
  9496. "allow_rebase_explicit": {
  9497. "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`.",
  9498. "type": "boolean",
  9499. "x-go-name": "AllowRebaseMerge"
  9500. },
  9501. "allow_squash_merge": {
  9502. "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.",
  9503. "type": "boolean",
  9504. "x-go-name": "AllowSquash"
  9505. },
  9506. "archived": {
  9507. "description": "set to `true` to archive this repository.",
  9508. "type": "boolean",
  9509. "x-go-name": "Archived"
  9510. },
  9511. "default_branch": {
  9512. "description": "sets the default branch for this repository.",
  9513. "type": "string",
  9514. "x-go-name": "DefaultBranch"
  9515. },
  9516. "description": {
  9517. "description": "a short description of the repository.",
  9518. "type": "string",
  9519. "x-go-name": "Description"
  9520. },
  9521. "external_tracker": {
  9522. "$ref": "#/definitions/ExternalTracker"
  9523. },
  9524. "external_wiki": {
  9525. "$ref": "#/definitions/ExternalWiki"
  9526. },
  9527. "has_issues": {
  9528. "description": "either `true` to enable issues for this repository or `false` to disable them.",
  9529. "type": "boolean",
  9530. "x-go-name": "HasIssues"
  9531. },
  9532. "has_pull_requests": {
  9533. "description": "either `true` to allow pull requests, or `false` to prevent pull request.",
  9534. "type": "boolean",
  9535. "x-go-name": "HasPullRequests"
  9536. },
  9537. "has_wiki": {
  9538. "description": "either `true` to enable the wiki for this repository or `false` to disable it.",
  9539. "type": "boolean",
  9540. "x-go-name": "HasWiki"
  9541. },
  9542. "ignore_whitespace_conflicts": {
  9543. "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.",
  9544. "type": "boolean",
  9545. "x-go-name": "IgnoreWhitespaceConflicts"
  9546. },
  9547. "internal_tracker": {
  9548. "$ref": "#/definitions/InternalTracker"
  9549. },
  9550. "name": {
  9551. "description": "name of the repository",
  9552. "type": "string",
  9553. "uniqueItems": true,
  9554. "x-go-name": "Name"
  9555. },
  9556. "private": {
  9557. "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.",
  9558. "type": "boolean",
  9559. "x-go-name": "Private"
  9560. },
  9561. "template": {
  9562. "description": "either `true` to make this repository a template or `false` to make it a normal repository",
  9563. "type": "boolean",
  9564. "x-go-name": "Template"
  9565. },
  9566. "website": {
  9567. "description": "a URL with more information about the repository.",
  9568. "type": "string",
  9569. "x-go-name": "Website"
  9570. }
  9571. },
  9572. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9573. },
  9574. "EditTeamOption": {
  9575. "description": "EditTeamOption options for editing a team",
  9576. "type": "object",
  9577. "required": [
  9578. "name"
  9579. ],
  9580. "properties": {
  9581. "can_create_org_repo": {
  9582. "type": "boolean",
  9583. "x-go-name": "CanCreateOrgRepo"
  9584. },
  9585. "description": {
  9586. "type": "string",
  9587. "x-go-name": "Description"
  9588. },
  9589. "includes_all_repositories": {
  9590. "type": "boolean",
  9591. "x-go-name": "IncludesAllRepositories"
  9592. },
  9593. "name": {
  9594. "type": "string",
  9595. "x-go-name": "Name"
  9596. },
  9597. "permission": {
  9598. "type": "string",
  9599. "enum": [
  9600. "read",
  9601. "write",
  9602. "admin"
  9603. ],
  9604. "x-go-name": "Permission"
  9605. },
  9606. "units": {
  9607. "type": "array",
  9608. "items": {
  9609. "type": "string"
  9610. },
  9611. "x-go-name": "Units",
  9612. "example": [
  9613. "repo.code",
  9614. "repo.issues",
  9615. "repo.ext_issues",
  9616. "repo.wiki",
  9617. "repo.pulls",
  9618. "repo.releases",
  9619. "repo.ext_wiki"
  9620. ]
  9621. }
  9622. },
  9623. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9624. },
  9625. "EditUserOption": {
  9626. "description": "EditUserOption edit user options",
  9627. "type": "object",
  9628. "required": [
  9629. "email"
  9630. ],
  9631. "properties": {
  9632. "active": {
  9633. "type": "boolean",
  9634. "x-go-name": "Active"
  9635. },
  9636. "admin": {
  9637. "type": "boolean",
  9638. "x-go-name": "Admin"
  9639. },
  9640. "allow_create_organization": {
  9641. "type": "boolean",
  9642. "x-go-name": "AllowCreateOrganization"
  9643. },
  9644. "allow_git_hook": {
  9645. "type": "boolean",
  9646. "x-go-name": "AllowGitHook"
  9647. },
  9648. "allow_import_local": {
  9649. "type": "boolean",
  9650. "x-go-name": "AllowImportLocal"
  9651. },
  9652. "email": {
  9653. "type": "string",
  9654. "format": "email",
  9655. "x-go-name": "Email"
  9656. },
  9657. "full_name": {
  9658. "type": "string",
  9659. "x-go-name": "FullName"
  9660. },
  9661. "location": {
  9662. "type": "string",
  9663. "x-go-name": "Location"
  9664. },
  9665. "login_name": {
  9666. "type": "string",
  9667. "x-go-name": "LoginName"
  9668. },
  9669. "max_repo_creation": {
  9670. "type": "integer",
  9671. "format": "int64",
  9672. "x-go-name": "MaxRepoCreation"
  9673. },
  9674. "must_change_password": {
  9675. "type": "boolean",
  9676. "x-go-name": "MustChangePassword"
  9677. },
  9678. "password": {
  9679. "type": "string",
  9680. "x-go-name": "Password"
  9681. },
  9682. "prohibit_login": {
  9683. "type": "boolean",
  9684. "x-go-name": "ProhibitLogin"
  9685. },
  9686. "source_id": {
  9687. "type": "integer",
  9688. "format": "int64",
  9689. "x-go-name": "SourceID"
  9690. },
  9691. "website": {
  9692. "type": "string",
  9693. "x-go-name": "Website"
  9694. }
  9695. },
  9696. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9697. },
  9698. "Email": {
  9699. "description": "Email an email address belonging to a user",
  9700. "type": "object",
  9701. "properties": {
  9702. "email": {
  9703. "type": "string",
  9704. "format": "email",
  9705. "x-go-name": "Email"
  9706. },
  9707. "primary": {
  9708. "type": "boolean",
  9709. "x-go-name": "Primary"
  9710. },
  9711. "verified": {
  9712. "type": "boolean",
  9713. "x-go-name": "Verified"
  9714. }
  9715. },
  9716. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9717. },
  9718. "ExternalTracker": {
  9719. "description": "ExternalTracker represents settings for external tracker",
  9720. "type": "object",
  9721. "properties": {
  9722. "external_tracker_format": {
  9723. "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.",
  9724. "type": "string",
  9725. "x-go-name": "ExternalTrackerFormat"
  9726. },
  9727. "external_tracker_style": {
  9728. "description": "External Issue Tracker Number Format, either `numeric` or `alphanumeric`",
  9729. "type": "string",
  9730. "x-go-name": "ExternalTrackerStyle"
  9731. },
  9732. "external_tracker_url": {
  9733. "description": "URL of external issue tracker.",
  9734. "type": "string",
  9735. "x-go-name": "ExternalTrackerURL"
  9736. }
  9737. },
  9738. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9739. },
  9740. "ExternalWiki": {
  9741. "description": "ExternalWiki represents setting for external wiki",
  9742. "type": "object",
  9743. "properties": {
  9744. "external_wiki_url": {
  9745. "description": "URL of external wiki.",
  9746. "type": "string",
  9747. "x-go-name": "ExternalWikiURL"
  9748. }
  9749. },
  9750. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9751. },
  9752. "FileCommitResponse": {
  9753. "type": "object",
  9754. "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.",
  9755. "properties": {
  9756. "author": {
  9757. "$ref": "#/definitions/CommitUser"
  9758. },
  9759. "committer": {
  9760. "$ref": "#/definitions/CommitUser"
  9761. },
  9762. "html_url": {
  9763. "type": "string",
  9764. "x-go-name": "HTMLURL"
  9765. },
  9766. "message": {
  9767. "type": "string",
  9768. "x-go-name": "Message"
  9769. },
  9770. "parents": {
  9771. "type": "array",
  9772. "items": {
  9773. "$ref": "#/definitions/CommitMeta"
  9774. },
  9775. "x-go-name": "Parents"
  9776. },
  9777. "sha": {
  9778. "type": "string",
  9779. "x-go-name": "SHA"
  9780. },
  9781. "tree": {
  9782. "$ref": "#/definitions/CommitMeta"
  9783. },
  9784. "url": {
  9785. "type": "string",
  9786. "x-go-name": "URL"
  9787. }
  9788. },
  9789. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9790. },
  9791. "FileDeleteResponse": {
  9792. "description": "FileDeleteResponse contains information about a repo's file that was deleted",
  9793. "type": "object",
  9794. "properties": {
  9795. "commit": {
  9796. "$ref": "#/definitions/FileCommitResponse"
  9797. },
  9798. "content": {
  9799. "type": "object",
  9800. "x-go-name": "Content"
  9801. },
  9802. "verification": {
  9803. "$ref": "#/definitions/PayloadCommitVerification"
  9804. }
  9805. },
  9806. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9807. },
  9808. "FileLinksResponse": {
  9809. "description": "FileLinksResponse contains the links for a repo's file",
  9810. "type": "object",
  9811. "properties": {
  9812. "git": {
  9813. "type": "string",
  9814. "x-go-name": "GitURL"
  9815. },
  9816. "html": {
  9817. "type": "string",
  9818. "x-go-name": "HTMLURL"
  9819. },
  9820. "self": {
  9821. "type": "string",
  9822. "x-go-name": "Self"
  9823. }
  9824. },
  9825. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9826. },
  9827. "FileResponse": {
  9828. "description": "FileResponse contains information about a repo's file",
  9829. "type": "object",
  9830. "properties": {
  9831. "commit": {
  9832. "$ref": "#/definitions/FileCommitResponse"
  9833. },
  9834. "content": {
  9835. "$ref": "#/definitions/ContentsResponse"
  9836. },
  9837. "verification": {
  9838. "$ref": "#/definitions/PayloadCommitVerification"
  9839. }
  9840. },
  9841. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9842. },
  9843. "GPGKey": {
  9844. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  9845. "type": "object",
  9846. "properties": {
  9847. "can_certify": {
  9848. "type": "boolean",
  9849. "x-go-name": "CanCertify"
  9850. },
  9851. "can_encrypt_comms": {
  9852. "type": "boolean",
  9853. "x-go-name": "CanEncryptComms"
  9854. },
  9855. "can_encrypt_storage": {
  9856. "type": "boolean",
  9857. "x-go-name": "CanEncryptStorage"
  9858. },
  9859. "can_sign": {
  9860. "type": "boolean",
  9861. "x-go-name": "CanSign"
  9862. },
  9863. "created_at": {
  9864. "type": "string",
  9865. "format": "date-time",
  9866. "x-go-name": "Created"
  9867. },
  9868. "emails": {
  9869. "type": "array",
  9870. "items": {
  9871. "$ref": "#/definitions/GPGKeyEmail"
  9872. },
  9873. "x-go-name": "Emails"
  9874. },
  9875. "expires_at": {
  9876. "type": "string",
  9877. "format": "date-time",
  9878. "x-go-name": "Expires"
  9879. },
  9880. "id": {
  9881. "type": "integer",
  9882. "format": "int64",
  9883. "x-go-name": "ID"
  9884. },
  9885. "key_id": {
  9886. "type": "string",
  9887. "x-go-name": "KeyID"
  9888. },
  9889. "primary_key_id": {
  9890. "type": "string",
  9891. "x-go-name": "PrimaryKeyID"
  9892. },
  9893. "public_key": {
  9894. "type": "string",
  9895. "x-go-name": "PublicKey"
  9896. },
  9897. "subkeys": {
  9898. "type": "array",
  9899. "items": {
  9900. "$ref": "#/definitions/GPGKey"
  9901. },
  9902. "x-go-name": "SubsKey"
  9903. }
  9904. },
  9905. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9906. },
  9907. "GPGKeyEmail": {
  9908. "description": "GPGKeyEmail an email attached to a GPGKey",
  9909. "type": "object",
  9910. "properties": {
  9911. "email": {
  9912. "type": "string",
  9913. "x-go-name": "Email"
  9914. },
  9915. "verified": {
  9916. "type": "boolean",
  9917. "x-go-name": "Verified"
  9918. }
  9919. },
  9920. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9921. },
  9922. "GitBlobResponse": {
  9923. "description": "GitBlobResponse represents a git blob",
  9924. "type": "object",
  9925. "properties": {
  9926. "content": {
  9927. "type": "string",
  9928. "x-go-name": "Content"
  9929. },
  9930. "encoding": {
  9931. "type": "string",
  9932. "x-go-name": "Encoding"
  9933. },
  9934. "sha": {
  9935. "type": "string",
  9936. "x-go-name": "SHA"
  9937. },
  9938. "size": {
  9939. "type": "integer",
  9940. "format": "int64",
  9941. "x-go-name": "Size"
  9942. },
  9943. "url": {
  9944. "type": "string",
  9945. "x-go-name": "URL"
  9946. }
  9947. },
  9948. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9949. },
  9950. "GitEntry": {
  9951. "description": "GitEntry represents a git tree",
  9952. "type": "object",
  9953. "properties": {
  9954. "mode": {
  9955. "type": "string",
  9956. "x-go-name": "Mode"
  9957. },
  9958. "path": {
  9959. "type": "string",
  9960. "x-go-name": "Path"
  9961. },
  9962. "sha": {
  9963. "type": "string",
  9964. "x-go-name": "SHA"
  9965. },
  9966. "size": {
  9967. "type": "integer",
  9968. "format": "int64",
  9969. "x-go-name": "Size"
  9970. },
  9971. "type": {
  9972. "type": "string",
  9973. "x-go-name": "Type"
  9974. },
  9975. "url": {
  9976. "type": "string",
  9977. "x-go-name": "URL"
  9978. }
  9979. },
  9980. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9981. },
  9982. "GitHook": {
  9983. "description": "GitHook represents a Git repository hook",
  9984. "type": "object",
  9985. "properties": {
  9986. "content": {
  9987. "type": "string",
  9988. "x-go-name": "Content"
  9989. },
  9990. "is_active": {
  9991. "type": "boolean",
  9992. "x-go-name": "IsActive"
  9993. },
  9994. "name": {
  9995. "type": "string",
  9996. "x-go-name": "Name"
  9997. }
  9998. },
  9999. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10000. },
  10001. "GitObject": {
  10002. "type": "object",
  10003. "title": "GitObject represents a Git object.",
  10004. "properties": {
  10005. "sha": {
  10006. "type": "string",
  10007. "x-go-name": "SHA"
  10008. },
  10009. "type": {
  10010. "type": "string",
  10011. "x-go-name": "Type"
  10012. },
  10013. "url": {
  10014. "type": "string",
  10015. "x-go-name": "URL"
  10016. }
  10017. },
  10018. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10019. },
  10020. "GitTreeResponse": {
  10021. "description": "GitTreeResponse returns a git tree",
  10022. "type": "object",
  10023. "properties": {
  10024. "page": {
  10025. "type": "integer",
  10026. "format": "int64",
  10027. "x-go-name": "Page"
  10028. },
  10029. "sha": {
  10030. "type": "string",
  10031. "x-go-name": "SHA"
  10032. },
  10033. "total_count": {
  10034. "type": "integer",
  10035. "format": "int64",
  10036. "x-go-name": "TotalCount"
  10037. },
  10038. "tree": {
  10039. "type": "array",
  10040. "items": {
  10041. "$ref": "#/definitions/GitEntry"
  10042. },
  10043. "x-go-name": "Entries"
  10044. },
  10045. "truncated": {
  10046. "type": "boolean",
  10047. "x-go-name": "Truncated"
  10048. },
  10049. "url": {
  10050. "type": "string",
  10051. "x-go-name": "URL"
  10052. }
  10053. },
  10054. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10055. },
  10056. "Hook": {
  10057. "description": "Hook a hook is a web hook when one repository changed",
  10058. "type": "object",
  10059. "properties": {
  10060. "active": {
  10061. "type": "boolean",
  10062. "x-go-name": "Active"
  10063. },
  10064. "config": {
  10065. "type": "object",
  10066. "additionalProperties": {
  10067. "type": "string"
  10068. },
  10069. "x-go-name": "Config"
  10070. },
  10071. "created_at": {
  10072. "type": "string",
  10073. "format": "date-time",
  10074. "x-go-name": "Created"
  10075. },
  10076. "events": {
  10077. "type": "array",
  10078. "items": {
  10079. "type": "string"
  10080. },
  10081. "x-go-name": "Events"
  10082. },
  10083. "id": {
  10084. "type": "integer",
  10085. "format": "int64",
  10086. "x-go-name": "ID"
  10087. },
  10088. "type": {
  10089. "type": "string",
  10090. "x-go-name": "Type"
  10091. },
  10092. "updated_at": {
  10093. "type": "string",
  10094. "format": "date-time",
  10095. "x-go-name": "Updated"
  10096. }
  10097. },
  10098. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10099. },
  10100. "Identity": {
  10101. "description": "Identity for a person's identity like an author or committer",
  10102. "type": "object",
  10103. "properties": {
  10104. "email": {
  10105. "type": "string",
  10106. "format": "email",
  10107. "x-go-name": "Email"
  10108. },
  10109. "name": {
  10110. "type": "string",
  10111. "x-go-name": "Name"
  10112. }
  10113. },
  10114. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10115. },
  10116. "InternalTracker": {
  10117. "description": "InternalTracker represents settings for internal tracker",
  10118. "type": "object",
  10119. "properties": {
  10120. "allow_only_contributors_to_track_time": {
  10121. "description": "Let only contributors track time (Built-in issue tracker)",
  10122. "type": "boolean",
  10123. "x-go-name": "AllowOnlyContributorsToTrackTime"
  10124. },
  10125. "enable_issue_dependencies": {
  10126. "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)",
  10127. "type": "boolean",
  10128. "x-go-name": "EnableIssueDependencies"
  10129. },
  10130. "enable_time_tracker": {
  10131. "description": "Enable time tracking (Built-in issue tracker)",
  10132. "type": "boolean",
  10133. "x-go-name": "EnableTimeTracker"
  10134. }
  10135. },
  10136. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10137. },
  10138. "Issue": {
  10139. "description": "Issue represents an issue in a repository",
  10140. "type": "object",
  10141. "properties": {
  10142. "assignee": {
  10143. "$ref": "#/definitions/User"
  10144. },
  10145. "assignees": {
  10146. "type": "array",
  10147. "items": {
  10148. "$ref": "#/definitions/User"
  10149. },
  10150. "x-go-name": "Assignees"
  10151. },
  10152. "body": {
  10153. "type": "string",
  10154. "x-go-name": "Body"
  10155. },
  10156. "closed_at": {
  10157. "type": "string",
  10158. "format": "date-time",
  10159. "x-go-name": "Closed"
  10160. },
  10161. "comments": {
  10162. "type": "integer",
  10163. "format": "int64",
  10164. "x-go-name": "Comments"
  10165. },
  10166. "created_at": {
  10167. "type": "string",
  10168. "format": "date-time",
  10169. "x-go-name": "Created"
  10170. },
  10171. "due_date": {
  10172. "type": "string",
  10173. "format": "date-time",
  10174. "x-go-name": "Deadline"
  10175. },
  10176. "id": {
  10177. "type": "integer",
  10178. "format": "int64",
  10179. "x-go-name": "ID"
  10180. },
  10181. "labels": {
  10182. "type": "array",
  10183. "items": {
  10184. "$ref": "#/definitions/Label"
  10185. },
  10186. "x-go-name": "Labels"
  10187. },
  10188. "milestone": {
  10189. "$ref": "#/definitions/Milestone"
  10190. },
  10191. "number": {
  10192. "type": "integer",
  10193. "format": "int64",
  10194. "x-go-name": "Index"
  10195. },
  10196. "original_author": {
  10197. "type": "string",
  10198. "x-go-name": "OriginalAuthor"
  10199. },
  10200. "original_author_id": {
  10201. "type": "integer",
  10202. "format": "int64",
  10203. "x-go-name": "OriginalAuthorID"
  10204. },
  10205. "pull_request": {
  10206. "$ref": "#/definitions/PullRequestMeta"
  10207. },
  10208. "repository": {
  10209. "$ref": "#/definitions/RepositoryMeta"
  10210. },
  10211. "state": {
  10212. "$ref": "#/definitions/StateType"
  10213. },
  10214. "title": {
  10215. "type": "string",
  10216. "x-go-name": "Title"
  10217. },
  10218. "updated_at": {
  10219. "type": "string",
  10220. "format": "date-time",
  10221. "x-go-name": "Updated"
  10222. },
  10223. "url": {
  10224. "type": "string",
  10225. "x-go-name": "URL"
  10226. },
  10227. "user": {
  10228. "$ref": "#/definitions/User"
  10229. }
  10230. },
  10231. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10232. },
  10233. "IssueDeadline": {
  10234. "description": "IssueDeadline represents an issue deadline",
  10235. "type": "object",
  10236. "properties": {
  10237. "due_date": {
  10238. "type": "string",
  10239. "format": "date-time",
  10240. "x-go-name": "Deadline"
  10241. }
  10242. },
  10243. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10244. },
  10245. "IssueLabelsOption": {
  10246. "description": "IssueLabelsOption a collection of labels",
  10247. "type": "object",
  10248. "properties": {
  10249. "labels": {
  10250. "description": "list of label IDs",
  10251. "type": "array",
  10252. "items": {
  10253. "type": "integer",
  10254. "format": "int64"
  10255. },
  10256. "x-go-name": "Labels"
  10257. }
  10258. },
  10259. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10260. },
  10261. "Label": {
  10262. "description": "Label a label to an issue or a pr",
  10263. "type": "object",
  10264. "properties": {
  10265. "color": {
  10266. "type": "string",
  10267. "x-go-name": "Color",
  10268. "example": "00aabb"
  10269. },
  10270. "description": {
  10271. "type": "string",
  10272. "x-go-name": "Description"
  10273. },
  10274. "id": {
  10275. "type": "integer",
  10276. "format": "int64",
  10277. "x-go-name": "ID"
  10278. },
  10279. "name": {
  10280. "type": "string",
  10281. "x-go-name": "Name"
  10282. },
  10283. "url": {
  10284. "type": "string",
  10285. "x-go-name": "URL"
  10286. }
  10287. },
  10288. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10289. },
  10290. "MarkdownOption": {
  10291. "description": "MarkdownOption markdown options",
  10292. "type": "object",
  10293. "properties": {
  10294. "Context": {
  10295. "description": "Context to render\n\nin: body",
  10296. "type": "string"
  10297. },
  10298. "Mode": {
  10299. "description": "Mode to render\n\nin: body",
  10300. "type": "string"
  10301. },
  10302. "Text": {
  10303. "description": "Text markdown to render\n\nin: body",
  10304. "type": "string"
  10305. },
  10306. "Wiki": {
  10307. "description": "Is it a wiki page ?\n\nin: body",
  10308. "type": "boolean"
  10309. }
  10310. },
  10311. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10312. },
  10313. "MergePullRequestOption": {
  10314. "description": "MergePullRequestForm form for merging Pull Request",
  10315. "type": "object",
  10316. "required": [
  10317. "Do"
  10318. ],
  10319. "properties": {
  10320. "Do": {
  10321. "type": "string",
  10322. "enum": [
  10323. "merge",
  10324. "rebase",
  10325. "rebase-merge",
  10326. "squash"
  10327. ]
  10328. },
  10329. "MergeMessageField": {
  10330. "type": "string"
  10331. },
  10332. "MergeTitleField": {
  10333. "type": "string"
  10334. }
  10335. },
  10336. "x-go-name": "MergePullRequestForm",
  10337. "x-go-package": "code.gitea.io/gitea/modules/auth"
  10338. },
  10339. "MigrateRepoForm": {
  10340. "description": "MigrateRepoForm form for migrating repository",
  10341. "type": "object",
  10342. "required": [
  10343. "clone_addr",
  10344. "uid",
  10345. "repo_name"
  10346. ],
  10347. "properties": {
  10348. "auth_password": {
  10349. "type": "string",
  10350. "x-go-name": "AuthPassword"
  10351. },
  10352. "auth_username": {
  10353. "type": "string",
  10354. "x-go-name": "AuthUsername"
  10355. },
  10356. "clone_addr": {
  10357. "type": "string",
  10358. "x-go-name": "CloneAddr"
  10359. },
  10360. "description": {
  10361. "type": "string",
  10362. "x-go-name": "Description"
  10363. },
  10364. "issues": {
  10365. "type": "boolean",
  10366. "x-go-name": "Issues"
  10367. },
  10368. "labels": {
  10369. "type": "boolean",
  10370. "x-go-name": "Labels"
  10371. },
  10372. "milestones": {
  10373. "type": "boolean",
  10374. "x-go-name": "Milestones"
  10375. },
  10376. "mirror": {
  10377. "type": "boolean",
  10378. "x-go-name": "Mirror"
  10379. },
  10380. "private": {
  10381. "type": "boolean",
  10382. "x-go-name": "Private"
  10383. },
  10384. "pull_requests": {
  10385. "type": "boolean",
  10386. "x-go-name": "PullRequests"
  10387. },
  10388. "releases": {
  10389. "type": "boolean",
  10390. "x-go-name": "Releases"
  10391. },
  10392. "repo_name": {
  10393. "type": "string",
  10394. "x-go-name": "RepoName"
  10395. },
  10396. "uid": {
  10397. "type": "integer",
  10398. "format": "int64",
  10399. "x-go-name": "UID"
  10400. },
  10401. "wiki": {
  10402. "type": "boolean",
  10403. "x-go-name": "Wiki"
  10404. }
  10405. },
  10406. "x-go-package": "code.gitea.io/gitea/modules/auth"
  10407. },
  10408. "Milestone": {
  10409. "description": "Milestone milestone is a collection of issues on one repository",
  10410. "type": "object",
  10411. "properties": {
  10412. "closed_at": {
  10413. "type": "string",
  10414. "format": "date-time",
  10415. "x-go-name": "Closed"
  10416. },
  10417. "closed_issues": {
  10418. "type": "integer",
  10419. "format": "int64",
  10420. "x-go-name": "ClosedIssues"
  10421. },
  10422. "description": {
  10423. "type": "string",
  10424. "x-go-name": "Description"
  10425. },
  10426. "due_on": {
  10427. "type": "string",
  10428. "format": "date-time",
  10429. "x-go-name": "Deadline"
  10430. },
  10431. "id": {
  10432. "type": "integer",
  10433. "format": "int64",
  10434. "x-go-name": "ID"
  10435. },
  10436. "open_issues": {
  10437. "type": "integer",
  10438. "format": "int64",
  10439. "x-go-name": "OpenIssues"
  10440. },
  10441. "state": {
  10442. "$ref": "#/definitions/StateType"
  10443. },
  10444. "title": {
  10445. "type": "string",
  10446. "x-go-name": "Title"
  10447. }
  10448. },
  10449. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10450. },
  10451. "Organization": {
  10452. "description": "Organization represents an organization",
  10453. "type": "object",
  10454. "properties": {
  10455. "avatar_url": {
  10456. "type": "string",
  10457. "x-go-name": "AvatarURL"
  10458. },
  10459. "description": {
  10460. "type": "string",
  10461. "x-go-name": "Description"
  10462. },
  10463. "full_name": {
  10464. "type": "string",
  10465. "x-go-name": "FullName"
  10466. },
  10467. "id": {
  10468. "type": "integer",
  10469. "format": "int64",
  10470. "x-go-name": "ID"
  10471. },
  10472. "location": {
  10473. "type": "string",
  10474. "x-go-name": "Location"
  10475. },
  10476. "repo_admin_change_team_access": {
  10477. "type": "boolean",
  10478. "x-go-name": "RepoAdminChangeTeamAccess"
  10479. },
  10480. "username": {
  10481. "type": "string",
  10482. "x-go-name": "UserName"
  10483. },
  10484. "visibility": {
  10485. "type": "string",
  10486. "x-go-name": "Visibility"
  10487. },
  10488. "website": {
  10489. "type": "string",
  10490. "x-go-name": "Website"
  10491. }
  10492. },
  10493. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10494. },
  10495. "PRBranchInfo": {
  10496. "description": "PRBranchInfo information about a branch",
  10497. "type": "object",
  10498. "properties": {
  10499. "label": {
  10500. "type": "string",
  10501. "x-go-name": "Name"
  10502. },
  10503. "ref": {
  10504. "type": "string",
  10505. "x-go-name": "Ref"
  10506. },
  10507. "repo": {
  10508. "$ref": "#/definitions/Repository"
  10509. },
  10510. "repo_id": {
  10511. "type": "integer",
  10512. "format": "int64",
  10513. "x-go-name": "RepoID"
  10514. },
  10515. "sha": {
  10516. "type": "string",
  10517. "x-go-name": "Sha"
  10518. }
  10519. },
  10520. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10521. },
  10522. "PayloadCommit": {
  10523. "description": "PayloadCommit represents a commit",
  10524. "type": "object",
  10525. "properties": {
  10526. "added": {
  10527. "type": "array",
  10528. "items": {
  10529. "type": "string"
  10530. },
  10531. "x-go-name": "Added"
  10532. },
  10533. "author": {
  10534. "$ref": "#/definitions/PayloadUser"
  10535. },
  10536. "committer": {
  10537. "$ref": "#/definitions/PayloadUser"
  10538. },
  10539. "id": {
  10540. "description": "sha1 hash of the commit",
  10541. "type": "string",
  10542. "x-go-name": "ID"
  10543. },
  10544. "message": {
  10545. "type": "string",
  10546. "x-go-name": "Message"
  10547. },
  10548. "modified": {
  10549. "type": "array",
  10550. "items": {
  10551. "type": "string"
  10552. },
  10553. "x-go-name": "Modified"
  10554. },
  10555. "removed": {
  10556. "type": "array",
  10557. "items": {
  10558. "type": "string"
  10559. },
  10560. "x-go-name": "Removed"
  10561. },
  10562. "timestamp": {
  10563. "type": "string",
  10564. "format": "date-time",
  10565. "x-go-name": "Timestamp"
  10566. },
  10567. "url": {
  10568. "type": "string",
  10569. "x-go-name": "URL"
  10570. },
  10571. "verification": {
  10572. "$ref": "#/definitions/PayloadCommitVerification"
  10573. }
  10574. },
  10575. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10576. },
  10577. "PayloadCommitVerification": {
  10578. "description": "PayloadCommitVerification represents the GPG verification of a commit",
  10579. "type": "object",
  10580. "properties": {
  10581. "payload": {
  10582. "type": "string",
  10583. "x-go-name": "Payload"
  10584. },
  10585. "reason": {
  10586. "type": "string",
  10587. "x-go-name": "Reason"
  10588. },
  10589. "signature": {
  10590. "type": "string",
  10591. "x-go-name": "Signature"
  10592. },
  10593. "signer": {
  10594. "$ref": "#/definitions/PayloadUser"
  10595. },
  10596. "verified": {
  10597. "type": "boolean",
  10598. "x-go-name": "Verified"
  10599. }
  10600. },
  10601. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10602. },
  10603. "PayloadUser": {
  10604. "description": "PayloadUser represents the author or committer of a commit",
  10605. "type": "object",
  10606. "properties": {
  10607. "email": {
  10608. "type": "string",
  10609. "format": "email",
  10610. "x-go-name": "Email"
  10611. },
  10612. "name": {
  10613. "description": "Full name of the commit author",
  10614. "type": "string",
  10615. "x-go-name": "Name"
  10616. },
  10617. "username": {
  10618. "type": "string",
  10619. "x-go-name": "UserName"
  10620. }
  10621. },
  10622. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10623. },
  10624. "Permission": {
  10625. "description": "Permission represents a set of permissions",
  10626. "type": "object",
  10627. "properties": {
  10628. "admin": {
  10629. "type": "boolean",
  10630. "x-go-name": "Admin"
  10631. },
  10632. "pull": {
  10633. "type": "boolean",
  10634. "x-go-name": "Pull"
  10635. },
  10636. "push": {
  10637. "type": "boolean",
  10638. "x-go-name": "Push"
  10639. }
  10640. },
  10641. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10642. },
  10643. "PublicKey": {
  10644. "description": "PublicKey publickey is a user key to push code to repository",
  10645. "type": "object",
  10646. "properties": {
  10647. "created_at": {
  10648. "type": "string",
  10649. "format": "date-time",
  10650. "x-go-name": "Created"
  10651. },
  10652. "fingerprint": {
  10653. "type": "string",
  10654. "x-go-name": "Fingerprint"
  10655. },
  10656. "id": {
  10657. "type": "integer",
  10658. "format": "int64",
  10659. "x-go-name": "ID"
  10660. },
  10661. "key": {
  10662. "type": "string",
  10663. "x-go-name": "Key"
  10664. },
  10665. "key_type": {
  10666. "type": "string",
  10667. "x-go-name": "KeyType"
  10668. },
  10669. "read_only": {
  10670. "type": "boolean",
  10671. "x-go-name": "ReadOnly"
  10672. },
  10673. "title": {
  10674. "type": "string",
  10675. "x-go-name": "Title"
  10676. },
  10677. "url": {
  10678. "type": "string",
  10679. "x-go-name": "URL"
  10680. },
  10681. "user": {
  10682. "$ref": "#/definitions/User"
  10683. }
  10684. },
  10685. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10686. },
  10687. "PullRequest": {
  10688. "description": "PullRequest represents a pull request",
  10689. "type": "object",
  10690. "properties": {
  10691. "assignee": {
  10692. "$ref": "#/definitions/User"
  10693. },
  10694. "assignees": {
  10695. "type": "array",
  10696. "items": {
  10697. "$ref": "#/definitions/User"
  10698. },
  10699. "x-go-name": "Assignees"
  10700. },
  10701. "base": {
  10702. "$ref": "#/definitions/PRBranchInfo"
  10703. },
  10704. "body": {
  10705. "type": "string",
  10706. "x-go-name": "Body"
  10707. },
  10708. "closed_at": {
  10709. "type": "string",
  10710. "format": "date-time",
  10711. "x-go-name": "Closed"
  10712. },
  10713. "comments": {
  10714. "type": "integer",
  10715. "format": "int64",
  10716. "x-go-name": "Comments"
  10717. },
  10718. "created_at": {
  10719. "type": "string",
  10720. "format": "date-time",
  10721. "x-go-name": "Created"
  10722. },
  10723. "diff_url": {
  10724. "type": "string",
  10725. "x-go-name": "DiffURL"
  10726. },
  10727. "due_date": {
  10728. "type": "string",
  10729. "format": "date-time",
  10730. "x-go-name": "Deadline"
  10731. },
  10732. "head": {
  10733. "$ref": "#/definitions/PRBranchInfo"
  10734. },
  10735. "html_url": {
  10736. "type": "string",
  10737. "x-go-name": "HTMLURL"
  10738. },
  10739. "id": {
  10740. "type": "integer",
  10741. "format": "int64",
  10742. "x-go-name": "ID"
  10743. },
  10744. "labels": {
  10745. "type": "array",
  10746. "items": {
  10747. "$ref": "#/definitions/Label"
  10748. },
  10749. "x-go-name": "Labels"
  10750. },
  10751. "merge_base": {
  10752. "type": "string",
  10753. "x-go-name": "MergeBase"
  10754. },
  10755. "merge_commit_sha": {
  10756. "type": "string",
  10757. "x-go-name": "MergedCommitID"
  10758. },
  10759. "mergeable": {
  10760. "type": "boolean",
  10761. "x-go-name": "Mergeable"
  10762. },
  10763. "merged": {
  10764. "type": "boolean",
  10765. "x-go-name": "HasMerged"
  10766. },
  10767. "merged_at": {
  10768. "type": "string",
  10769. "format": "date-time",
  10770. "x-go-name": "Merged"
  10771. },
  10772. "merged_by": {
  10773. "$ref": "#/definitions/User"
  10774. },
  10775. "milestone": {
  10776. "$ref": "#/definitions/Milestone"
  10777. },
  10778. "number": {
  10779. "type": "integer",
  10780. "format": "int64",
  10781. "x-go-name": "Index"
  10782. },
  10783. "patch_url": {
  10784. "type": "string",
  10785. "x-go-name": "PatchURL"
  10786. },
  10787. "state": {
  10788. "$ref": "#/definitions/StateType"
  10789. },
  10790. "title": {
  10791. "type": "string",
  10792. "x-go-name": "Title"
  10793. },
  10794. "updated_at": {
  10795. "type": "string",
  10796. "format": "date-time",
  10797. "x-go-name": "Updated"
  10798. },
  10799. "url": {
  10800. "type": "string",
  10801. "x-go-name": "URL"
  10802. },
  10803. "user": {
  10804. "$ref": "#/definitions/User"
  10805. }
  10806. },
  10807. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10808. },
  10809. "PullRequestMeta": {
  10810. "description": "PullRequestMeta PR info if an issue is a PR",
  10811. "type": "object",
  10812. "properties": {
  10813. "merged": {
  10814. "type": "boolean",
  10815. "x-go-name": "HasMerged"
  10816. },
  10817. "merged_at": {
  10818. "type": "string",
  10819. "format": "date-time",
  10820. "x-go-name": "Merged"
  10821. }
  10822. },
  10823. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10824. },
  10825. "ReactionResponse": {
  10826. "description": "ReactionResponse contain one reaction",
  10827. "type": "object",
  10828. "properties": {
  10829. "content": {
  10830. "type": "string",
  10831. "x-go-name": "Reaction"
  10832. },
  10833. "created_at": {
  10834. "type": "string",
  10835. "format": "date-time",
  10836. "x-go-name": "Created"
  10837. },
  10838. "user": {
  10839. "$ref": "#/definitions/User"
  10840. }
  10841. },
  10842. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10843. },
  10844. "Reference": {
  10845. "type": "object",
  10846. "title": "Reference represents a Git reference.",
  10847. "properties": {
  10848. "object": {
  10849. "$ref": "#/definitions/GitObject"
  10850. },
  10851. "ref": {
  10852. "type": "string",
  10853. "x-go-name": "Ref"
  10854. },
  10855. "url": {
  10856. "type": "string",
  10857. "x-go-name": "URL"
  10858. }
  10859. },
  10860. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10861. },
  10862. "Release": {
  10863. "description": "Release represents a repository release",
  10864. "type": "object",
  10865. "properties": {
  10866. "assets": {
  10867. "type": "array",
  10868. "items": {
  10869. "$ref": "#/definitions/Attachment"
  10870. },
  10871. "x-go-name": "Attachments"
  10872. },
  10873. "author": {
  10874. "$ref": "#/definitions/User"
  10875. },
  10876. "body": {
  10877. "type": "string",
  10878. "x-go-name": "Note"
  10879. },
  10880. "created_at": {
  10881. "type": "string",
  10882. "format": "date-time",
  10883. "x-go-name": "CreatedAt"
  10884. },
  10885. "draft": {
  10886. "type": "boolean",
  10887. "x-go-name": "IsDraft"
  10888. },
  10889. "id": {
  10890. "type": "integer",
  10891. "format": "int64",
  10892. "x-go-name": "ID"
  10893. },
  10894. "name": {
  10895. "type": "string",
  10896. "x-go-name": "Title"
  10897. },
  10898. "prerelease": {
  10899. "type": "boolean",
  10900. "x-go-name": "IsPrerelease"
  10901. },
  10902. "published_at": {
  10903. "type": "string",
  10904. "format": "date-time",
  10905. "x-go-name": "PublishedAt"
  10906. },
  10907. "tag_name": {
  10908. "type": "string",
  10909. "x-go-name": "TagName"
  10910. },
  10911. "tarball_url": {
  10912. "type": "string",
  10913. "x-go-name": "TarURL"
  10914. },
  10915. "target_commitish": {
  10916. "type": "string",
  10917. "x-go-name": "Target"
  10918. },
  10919. "url": {
  10920. "type": "string",
  10921. "x-go-name": "URL"
  10922. },
  10923. "zipball_url": {
  10924. "type": "string",
  10925. "x-go-name": "ZipURL"
  10926. }
  10927. },
  10928. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10929. },
  10930. "RepoCommit": {
  10931. "type": "object",
  10932. "title": "RepoCommit contains information of a commit in the context of a repository.",
  10933. "properties": {
  10934. "author": {
  10935. "$ref": "#/definitions/CommitUser"
  10936. },
  10937. "committer": {
  10938. "$ref": "#/definitions/CommitUser"
  10939. },
  10940. "message": {
  10941. "type": "string",
  10942. "x-go-name": "Message"
  10943. },
  10944. "tree": {
  10945. "$ref": "#/definitions/CommitMeta"
  10946. },
  10947. "url": {
  10948. "type": "string",
  10949. "x-go-name": "URL"
  10950. }
  10951. },
  10952. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10953. },
  10954. "RepoTopicOptions": {
  10955. "description": "RepoTopicOptions a collection of repo topic names",
  10956. "type": "object",
  10957. "properties": {
  10958. "topics": {
  10959. "description": "list of topic names",
  10960. "type": "array",
  10961. "items": {
  10962. "type": "string"
  10963. },
  10964. "x-go-name": "Topics"
  10965. }
  10966. },
  10967. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10968. },
  10969. "Repository": {
  10970. "description": "Repository represents a repository",
  10971. "type": "object",
  10972. "properties": {
  10973. "allow_merge_commits": {
  10974. "type": "boolean",
  10975. "x-go-name": "AllowMerge"
  10976. },
  10977. "allow_rebase": {
  10978. "type": "boolean",
  10979. "x-go-name": "AllowRebase"
  10980. },
  10981. "allow_rebase_explicit": {
  10982. "type": "boolean",
  10983. "x-go-name": "AllowRebaseMerge"
  10984. },
  10985. "allow_squash_merge": {
  10986. "type": "boolean",
  10987. "x-go-name": "AllowSquash"
  10988. },
  10989. "archived": {
  10990. "type": "boolean",
  10991. "x-go-name": "Archived"
  10992. },
  10993. "avatar_url": {
  10994. "type": "string",
  10995. "x-go-name": "AvatarURL"
  10996. },
  10997. "clone_url": {
  10998. "type": "string",
  10999. "x-go-name": "CloneURL"
  11000. },
  11001. "created_at": {
  11002. "type": "string",
  11003. "format": "date-time",
  11004. "x-go-name": "Created"
  11005. },
  11006. "default_branch": {
  11007. "type": "string",
  11008. "x-go-name": "DefaultBranch"
  11009. },
  11010. "description": {
  11011. "type": "string",
  11012. "x-go-name": "Description"
  11013. },
  11014. "empty": {
  11015. "type": "boolean",
  11016. "x-go-name": "Empty"
  11017. },
  11018. "external_tracker": {
  11019. "$ref": "#/definitions/ExternalTracker"
  11020. },
  11021. "external_wiki": {
  11022. "$ref": "#/definitions/ExternalWiki"
  11023. },
  11024. "fork": {
  11025. "type": "boolean",
  11026. "x-go-name": "Fork"
  11027. },
  11028. "forks_count": {
  11029. "type": "integer",
  11030. "format": "int64",
  11031. "x-go-name": "Forks"
  11032. },
  11033. "full_name": {
  11034. "type": "string",
  11035. "x-go-name": "FullName"
  11036. },
  11037. "has_issues": {
  11038. "type": "boolean",
  11039. "x-go-name": "HasIssues"
  11040. },
  11041. "has_pull_requests": {
  11042. "type": "boolean",
  11043. "x-go-name": "HasPullRequests"
  11044. },
  11045. "has_wiki": {
  11046. "type": "boolean",
  11047. "x-go-name": "HasWiki"
  11048. },
  11049. "html_url": {
  11050. "type": "string",
  11051. "x-go-name": "HTMLURL"
  11052. },
  11053. "id": {
  11054. "type": "integer",
  11055. "format": "int64",
  11056. "x-go-name": "ID"
  11057. },
  11058. "ignore_whitespace_conflicts": {
  11059. "type": "boolean",
  11060. "x-go-name": "IgnoreWhitespaceConflicts"
  11061. },
  11062. "internal_tracker": {
  11063. "$ref": "#/definitions/InternalTracker"
  11064. },
  11065. "mirror": {
  11066. "type": "boolean",
  11067. "x-go-name": "Mirror"
  11068. },
  11069. "name": {
  11070. "type": "string",
  11071. "x-go-name": "Name"
  11072. },
  11073. "open_issues_count": {
  11074. "type": "integer",
  11075. "format": "int64",
  11076. "x-go-name": "OpenIssues"
  11077. },
  11078. "open_pr_counter": {
  11079. "type": "integer",
  11080. "format": "int64",
  11081. "x-go-name": "OpenPulls"
  11082. },
  11083. "original_url": {
  11084. "type": "string",
  11085. "x-go-name": "OriginalURL"
  11086. },
  11087. "owner": {
  11088. "$ref": "#/definitions/User"
  11089. },
  11090. "parent": {
  11091. "$ref": "#/definitions/Repository"
  11092. },
  11093. "permissions": {
  11094. "$ref": "#/definitions/Permission"
  11095. },
  11096. "private": {
  11097. "type": "boolean",
  11098. "x-go-name": "Private"
  11099. },
  11100. "release_counter": {
  11101. "type": "integer",
  11102. "format": "int64",
  11103. "x-go-name": "Releases"
  11104. },
  11105. "size": {
  11106. "type": "integer",
  11107. "format": "int64",
  11108. "x-go-name": "Size"
  11109. },
  11110. "ssh_url": {
  11111. "type": "string",
  11112. "x-go-name": "SSHURL"
  11113. },
  11114. "stars_count": {
  11115. "type": "integer",
  11116. "format": "int64",
  11117. "x-go-name": "Stars"
  11118. },
  11119. "template": {
  11120. "type": "boolean",
  11121. "x-go-name": "Template"
  11122. },
  11123. "updated_at": {
  11124. "type": "string",
  11125. "format": "date-time",
  11126. "x-go-name": "Updated"
  11127. },
  11128. "watchers_count": {
  11129. "type": "integer",
  11130. "format": "int64",
  11131. "x-go-name": "Watchers"
  11132. },
  11133. "website": {
  11134. "type": "string",
  11135. "x-go-name": "Website"
  11136. }
  11137. },
  11138. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11139. },
  11140. "RepositoryMeta": {
  11141. "description": "RepositoryMeta basic repository information",
  11142. "type": "object",
  11143. "properties": {
  11144. "full_name": {
  11145. "type": "string",
  11146. "x-go-name": "FullName"
  11147. },
  11148. "id": {
  11149. "type": "integer",
  11150. "format": "int64",
  11151. "x-go-name": "ID"
  11152. },
  11153. "name": {
  11154. "type": "string",
  11155. "x-go-name": "Name"
  11156. }
  11157. },
  11158. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11159. },
  11160. "SearchResults": {
  11161. "description": "SearchResults results of a successful search",
  11162. "type": "object",
  11163. "properties": {
  11164. "data": {
  11165. "type": "array",
  11166. "items": {
  11167. "$ref": "#/definitions/Repository"
  11168. },
  11169. "x-go-name": "Data"
  11170. },
  11171. "ok": {
  11172. "type": "boolean",
  11173. "x-go-name": "OK"
  11174. }
  11175. },
  11176. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11177. },
  11178. "ServerVersion": {
  11179. "description": "ServerVersion wraps the version of the server",
  11180. "type": "object",
  11181. "properties": {
  11182. "version": {
  11183. "type": "string",
  11184. "x-go-name": "Version"
  11185. }
  11186. },
  11187. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11188. },
  11189. "StateType": {
  11190. "description": "StateType issue state type",
  11191. "type": "string",
  11192. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11193. },
  11194. "Status": {
  11195. "description": "Status holds a single Status of a single Commit",
  11196. "type": "object",
  11197. "properties": {
  11198. "context": {
  11199. "type": "string",
  11200. "x-go-name": "Context"
  11201. },
  11202. "created_at": {
  11203. "type": "string",
  11204. "format": "date-time",
  11205. "x-go-name": "Created"
  11206. },
  11207. "creator": {
  11208. "$ref": "#/definitions/User"
  11209. },
  11210. "description": {
  11211. "type": "string",
  11212. "x-go-name": "Description"
  11213. },
  11214. "id": {
  11215. "type": "integer",
  11216. "format": "int64",
  11217. "x-go-name": "ID"
  11218. },
  11219. "status": {
  11220. "$ref": "#/definitions/StatusState"
  11221. },
  11222. "target_url": {
  11223. "type": "string",
  11224. "x-go-name": "TargetURL"
  11225. },
  11226. "updated_at": {
  11227. "type": "string",
  11228. "format": "date-time",
  11229. "x-go-name": "Updated"
  11230. },
  11231. "url": {
  11232. "type": "string",
  11233. "x-go-name": "URL"
  11234. }
  11235. },
  11236. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11237. },
  11238. "StatusState": {
  11239. "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"",
  11240. "type": "string",
  11241. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11242. },
  11243. "StopWatch": {
  11244. "description": "StopWatch represent a running stopwatch",
  11245. "type": "object",
  11246. "properties": {
  11247. "created": {
  11248. "type": "string",
  11249. "format": "date-time",
  11250. "x-go-name": "Created"
  11251. },
  11252. "issue_index": {
  11253. "type": "integer",
  11254. "format": "int64",
  11255. "x-go-name": "IssueIndex"
  11256. }
  11257. },
  11258. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11259. },
  11260. "Tag": {
  11261. "description": "Tag represents a repository tag",
  11262. "type": "object",
  11263. "properties": {
  11264. "commit": {
  11265. "$ref": "#/definitions/CommitMeta"
  11266. },
  11267. "id": {
  11268. "type": "string",
  11269. "x-go-name": "ID"
  11270. },
  11271. "name": {
  11272. "type": "string",
  11273. "x-go-name": "Name"
  11274. },
  11275. "tarball_url": {
  11276. "type": "string",
  11277. "x-go-name": "TarballURL"
  11278. },
  11279. "zipball_url": {
  11280. "type": "string",
  11281. "x-go-name": "ZipballURL"
  11282. }
  11283. },
  11284. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11285. },
  11286. "Team": {
  11287. "description": "Team represents a team in an organization",
  11288. "type": "object",
  11289. "properties": {
  11290. "can_create_org_repo": {
  11291. "type": "boolean",
  11292. "x-go-name": "CanCreateOrgRepo"
  11293. },
  11294. "description": {
  11295. "type": "string",
  11296. "x-go-name": "Description"
  11297. },
  11298. "id": {
  11299. "type": "integer",
  11300. "format": "int64",
  11301. "x-go-name": "ID"
  11302. },
  11303. "includes_all_repositories": {
  11304. "type": "boolean",
  11305. "x-go-name": "IncludesAllRepositories"
  11306. },
  11307. "name": {
  11308. "type": "string",
  11309. "x-go-name": "Name"
  11310. },
  11311. "organization": {
  11312. "$ref": "#/definitions/Organization"
  11313. },
  11314. "permission": {
  11315. "type": "string",
  11316. "enum": [
  11317. "none",
  11318. "read",
  11319. "write",
  11320. "admin",
  11321. "owner"
  11322. ],
  11323. "x-go-name": "Permission"
  11324. },
  11325. "units": {
  11326. "type": "array",
  11327. "items": {
  11328. "type": "string"
  11329. },
  11330. "x-go-name": "Units",
  11331. "example": [
  11332. "repo.code",
  11333. "repo.issues",
  11334. "repo.ext_issues",
  11335. "repo.wiki",
  11336. "repo.pulls",
  11337. "repo.releases",
  11338. "repo.ext_wiki"
  11339. ]
  11340. }
  11341. },
  11342. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11343. },
  11344. "TimeStamp": {
  11345. "description": "TimeStamp defines a timestamp",
  11346. "type": "integer",
  11347. "format": "int64",
  11348. "x-go-package": "code.gitea.io/gitea/modules/timeutil"
  11349. },
  11350. "TopicName": {
  11351. "description": "TopicName a list of repo topic names",
  11352. "type": "object",
  11353. "properties": {
  11354. "topics": {
  11355. "type": "array",
  11356. "items": {
  11357. "type": "string"
  11358. },
  11359. "x-go-name": "TopicNames"
  11360. }
  11361. },
  11362. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11363. },
  11364. "TopicResponse": {
  11365. "description": "TopicResponse for returning topics",
  11366. "type": "object",
  11367. "properties": {
  11368. "created": {
  11369. "type": "string",
  11370. "format": "date-time",
  11371. "x-go-name": "Created"
  11372. },
  11373. "id": {
  11374. "type": "integer",
  11375. "format": "int64",
  11376. "x-go-name": "ID"
  11377. },
  11378. "repo_count": {
  11379. "type": "integer",
  11380. "format": "int64",
  11381. "x-go-name": "RepoCount"
  11382. },
  11383. "topic_name": {
  11384. "type": "string",
  11385. "x-go-name": "Name"
  11386. },
  11387. "updated": {
  11388. "type": "string",
  11389. "format": "date-time",
  11390. "x-go-name": "Updated"
  11391. }
  11392. },
  11393. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11394. },
  11395. "TrackedTime": {
  11396. "description": "TrackedTime worked time for an issue / pr",
  11397. "type": "object",
  11398. "properties": {
  11399. "created": {
  11400. "type": "string",
  11401. "format": "date-time",
  11402. "x-go-name": "Created"
  11403. },
  11404. "id": {
  11405. "type": "integer",
  11406. "format": "int64",
  11407. "x-go-name": "ID"
  11408. },
  11409. "issue": {
  11410. "$ref": "#/definitions/Issue"
  11411. },
  11412. "issue_id": {
  11413. "description": "deprecated (only for backwards compatibility)",
  11414. "type": "integer",
  11415. "format": "int64",
  11416. "x-go-name": "IssueID"
  11417. },
  11418. "time": {
  11419. "description": "Time in seconds",
  11420. "type": "integer",
  11421. "format": "int64",
  11422. "x-go-name": "Time"
  11423. },
  11424. "user_id": {
  11425. "description": "deprecated (only for backwards compatibility)",
  11426. "type": "integer",
  11427. "format": "int64",
  11428. "x-go-name": "UserID"
  11429. },
  11430. "user_name": {
  11431. "type": "string",
  11432. "x-go-name": "UserName"
  11433. }
  11434. },
  11435. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11436. },
  11437. "UpdateFileOptions": {
  11438. "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)",
  11439. "type": "object",
  11440. "required": [
  11441. "sha",
  11442. "content"
  11443. ],
  11444. "properties": {
  11445. "author": {
  11446. "$ref": "#/definitions/Identity"
  11447. },
  11448. "branch": {
  11449. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  11450. "type": "string",
  11451. "x-go-name": "BranchName"
  11452. },
  11453. "committer": {
  11454. "$ref": "#/definitions/Identity"
  11455. },
  11456. "content": {
  11457. "description": "content must be base64 encoded",
  11458. "type": "string",
  11459. "x-go-name": "Content"
  11460. },
  11461. "dates": {
  11462. "$ref": "#/definitions/CommitDateOptions"
  11463. },
  11464. "from_path": {
  11465. "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL",
  11466. "type": "string",
  11467. "x-go-name": "FromPath"
  11468. },
  11469. "message": {
  11470. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  11471. "type": "string",
  11472. "x-go-name": "Message"
  11473. },
  11474. "new_branch": {
  11475. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  11476. "type": "string",
  11477. "x-go-name": "NewBranchName"
  11478. },
  11479. "sha": {
  11480. "description": "sha is the SHA for the file that already exists",
  11481. "type": "string",
  11482. "x-go-name": "SHA"
  11483. }
  11484. },
  11485. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11486. },
  11487. "User": {
  11488. "description": "User represents a user",
  11489. "type": "object",
  11490. "properties": {
  11491. "avatar_url": {
  11492. "description": "URL to the user's avatar",
  11493. "type": "string",
  11494. "x-go-name": "AvatarURL"
  11495. },
  11496. "created": {
  11497. "type": "string",
  11498. "format": "date-time",
  11499. "x-go-name": "Created"
  11500. },
  11501. "email": {
  11502. "type": "string",
  11503. "format": "email",
  11504. "x-go-name": "Email"
  11505. },
  11506. "full_name": {
  11507. "description": "the user's full name",
  11508. "type": "string",
  11509. "x-go-name": "FullName"
  11510. },
  11511. "id": {
  11512. "description": "the user's id",
  11513. "type": "integer",
  11514. "format": "int64",
  11515. "x-go-name": "ID"
  11516. },
  11517. "is_admin": {
  11518. "description": "Is the user an administrator",
  11519. "type": "boolean",
  11520. "x-go-name": "IsAdmin"
  11521. },
  11522. "language": {
  11523. "description": "User locale",
  11524. "type": "string",
  11525. "x-go-name": "Language"
  11526. },
  11527. "last_login": {
  11528. "type": "string",
  11529. "format": "date-time",
  11530. "x-go-name": "LastLogin"
  11531. },
  11532. "login": {
  11533. "description": "the user's username",
  11534. "type": "string",
  11535. "x-go-name": "UserName"
  11536. }
  11537. },
  11538. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11539. },
  11540. "UserHeatmapData": {
  11541. "description": "UserHeatmapData represents the data needed to create a heatmap",
  11542. "type": "object",
  11543. "properties": {
  11544. "contributions": {
  11545. "type": "integer",
  11546. "format": "int64",
  11547. "x-go-name": "Contributions"
  11548. },
  11549. "timestamp": {
  11550. "$ref": "#/definitions/TimeStamp"
  11551. }
  11552. },
  11553. "x-go-package": "code.gitea.io/gitea/models"
  11554. },
  11555. "WatchInfo": {
  11556. "description": "WatchInfo represents an API watch status of one repository",
  11557. "type": "object",
  11558. "properties": {
  11559. "created_at": {
  11560. "type": "string",
  11561. "format": "date-time",
  11562. "x-go-name": "CreatedAt"
  11563. },
  11564. "ignored": {
  11565. "type": "boolean",
  11566. "x-go-name": "Ignored"
  11567. },
  11568. "reason": {
  11569. "type": "object",
  11570. "x-go-name": "Reason"
  11571. },
  11572. "repository_url": {
  11573. "type": "string",
  11574. "x-go-name": "RepositoryURL"
  11575. },
  11576. "subscribed": {
  11577. "type": "boolean",
  11578. "x-go-name": "Subscribed"
  11579. },
  11580. "url": {
  11581. "type": "string",
  11582. "x-go-name": "URL"
  11583. }
  11584. },
  11585. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11586. }
  11587. },
  11588. "responses": {
  11589. "AccessToken": {
  11590. "description": "AccessToken represents an API access token.",
  11591. "headers": {
  11592. "id": {
  11593. "type": "integer",
  11594. "format": "int64"
  11595. },
  11596. "name": {
  11597. "type": "string"
  11598. },
  11599. "sha1": {
  11600. "type": "string"
  11601. },
  11602. "token_last_eight": {
  11603. "type": "string"
  11604. }
  11605. }
  11606. },
  11607. "AccessTokenList": {
  11608. "description": "AccessTokenList represents a list of API access token.",
  11609. "schema": {
  11610. "type": "array",
  11611. "items": {
  11612. "$ref": "#/definitions/AccessToken"
  11613. }
  11614. }
  11615. },
  11616. "AnnotatedTag": {
  11617. "description": "AnnotatedTag",
  11618. "schema": {
  11619. "$ref": "#/definitions/AnnotatedTag"
  11620. }
  11621. },
  11622. "Attachment": {
  11623. "description": "Attachment",
  11624. "schema": {
  11625. "$ref": "#/definitions/Attachment"
  11626. }
  11627. },
  11628. "AttachmentList": {
  11629. "description": "AttachmentList",
  11630. "schema": {
  11631. "type": "array",
  11632. "items": {
  11633. "$ref": "#/definitions/Attachment"
  11634. }
  11635. }
  11636. },
  11637. "Branch": {
  11638. "description": "Branch",
  11639. "schema": {
  11640. "$ref": "#/definitions/Branch"
  11641. }
  11642. },
  11643. "BranchList": {
  11644. "description": "BranchList",
  11645. "schema": {
  11646. "type": "array",
  11647. "items": {
  11648. "$ref": "#/definitions/Branch"
  11649. }
  11650. }
  11651. },
  11652. "Comment": {
  11653. "description": "Comment",
  11654. "schema": {
  11655. "$ref": "#/definitions/Comment"
  11656. }
  11657. },
  11658. "CommentList": {
  11659. "description": "CommentList",
  11660. "schema": {
  11661. "type": "array",
  11662. "items": {
  11663. "$ref": "#/definitions/Comment"
  11664. }
  11665. }
  11666. },
  11667. "Commit": {
  11668. "description": "Commit",
  11669. "schema": {
  11670. "$ref": "#/definitions/Commit"
  11671. }
  11672. },
  11673. "CommitList": {
  11674. "description": "CommitList",
  11675. "schema": {
  11676. "type": "array",
  11677. "items": {
  11678. "$ref": "#/definitions/Commit"
  11679. }
  11680. },
  11681. "headers": {
  11682. "X-HasMore": {
  11683. "type": "boolean",
  11684. "description": "True if there is another page"
  11685. },
  11686. "X-Page": {
  11687. "type": "integer",
  11688. "format": "int64",
  11689. "description": "The current page"
  11690. },
  11691. "X-PageCount": {
  11692. "type": "integer",
  11693. "format": "int64",
  11694. "description": "Total number of pages"
  11695. },
  11696. "X-PerPage": {
  11697. "type": "integer",
  11698. "format": "int64",
  11699. "description": "Commits per page"
  11700. },
  11701. "X-Total": {
  11702. "type": "integer",
  11703. "format": "int64",
  11704. "description": "Total commit count"
  11705. }
  11706. }
  11707. },
  11708. "ContentsListResponse": {
  11709. "description": "ContentsListResponse",
  11710. "schema": {
  11711. "type": "array",
  11712. "items": {
  11713. "$ref": "#/definitions/ContentsResponse"
  11714. }
  11715. }
  11716. },
  11717. "ContentsResponse": {
  11718. "description": "ContentsResponse",
  11719. "schema": {
  11720. "$ref": "#/definitions/ContentsResponse"
  11721. }
  11722. },
  11723. "DeployKey": {
  11724. "description": "DeployKey",
  11725. "schema": {
  11726. "$ref": "#/definitions/DeployKey"
  11727. }
  11728. },
  11729. "DeployKeyList": {
  11730. "description": "DeployKeyList",
  11731. "schema": {
  11732. "type": "array",
  11733. "items": {
  11734. "$ref": "#/definitions/DeployKey"
  11735. }
  11736. }
  11737. },
  11738. "EditReactionOption": {
  11739. "description": "EditReactionOption",
  11740. "schema": {
  11741. "$ref": "#/definitions/EditReactionOption"
  11742. }
  11743. },
  11744. "EmailList": {
  11745. "description": "EmailList",
  11746. "schema": {
  11747. "type": "array",
  11748. "items": {
  11749. "$ref": "#/definitions/Email"
  11750. }
  11751. }
  11752. },
  11753. "EmptyRepository": {
  11754. "description": "EmptyRepository",
  11755. "schema": {
  11756. "$ref": "#/definitions/APIError"
  11757. }
  11758. },
  11759. "FileDeleteResponse": {
  11760. "description": "FileDeleteResponse",
  11761. "schema": {
  11762. "$ref": "#/definitions/FileDeleteResponse"
  11763. }
  11764. },
  11765. "FileResponse": {
  11766. "description": "FileResponse",
  11767. "schema": {
  11768. "$ref": "#/definitions/FileResponse"
  11769. }
  11770. },
  11771. "GPGKey": {
  11772. "description": "GPGKey",
  11773. "schema": {
  11774. "$ref": "#/definitions/GPGKey"
  11775. }
  11776. },
  11777. "GPGKeyList": {
  11778. "description": "GPGKeyList",
  11779. "schema": {
  11780. "type": "array",
  11781. "items": {
  11782. "$ref": "#/definitions/GPGKey"
  11783. }
  11784. }
  11785. },
  11786. "GitBlobResponse": {
  11787. "description": "GitBlobResponse",
  11788. "schema": {
  11789. "$ref": "#/definitions/GitBlobResponse"
  11790. }
  11791. },
  11792. "GitHook": {
  11793. "description": "GitHook",
  11794. "schema": {
  11795. "$ref": "#/definitions/GitHook"
  11796. }
  11797. },
  11798. "GitHookList": {
  11799. "description": "GitHookList",
  11800. "schema": {
  11801. "type": "array",
  11802. "items": {
  11803. "$ref": "#/definitions/GitHook"
  11804. }
  11805. }
  11806. },
  11807. "GitTreeResponse": {
  11808. "description": "GitTreeResponse",
  11809. "schema": {
  11810. "$ref": "#/definitions/GitTreeResponse"
  11811. }
  11812. },
  11813. "Hook": {
  11814. "description": "Hook",
  11815. "schema": {
  11816. "$ref": "#/definitions/Hook"
  11817. }
  11818. },
  11819. "HookList": {
  11820. "description": "HookList",
  11821. "schema": {
  11822. "type": "array",
  11823. "items": {
  11824. "$ref": "#/definitions/Hook"
  11825. }
  11826. }
  11827. },
  11828. "Issue": {
  11829. "description": "Issue",
  11830. "schema": {
  11831. "$ref": "#/definitions/Issue"
  11832. }
  11833. },
  11834. "IssueDeadline": {
  11835. "description": "IssueDeadline",
  11836. "schema": {
  11837. "$ref": "#/definitions/IssueDeadline"
  11838. }
  11839. },
  11840. "IssueList": {
  11841. "description": "IssueList",
  11842. "schema": {
  11843. "type": "array",
  11844. "items": {
  11845. "$ref": "#/definitions/Issue"
  11846. }
  11847. }
  11848. },
  11849. "Label": {
  11850. "description": "Label",
  11851. "schema": {
  11852. "$ref": "#/definitions/Label"
  11853. }
  11854. },
  11855. "LabelList": {
  11856. "description": "LabelList",
  11857. "schema": {
  11858. "type": "array",
  11859. "items": {
  11860. "$ref": "#/definitions/Label"
  11861. }
  11862. }
  11863. },
  11864. "MarkdownRender": {
  11865. "description": "MarkdownRender is a rendered markdown document",
  11866. "schema": {
  11867. "type": "string"
  11868. }
  11869. },
  11870. "Milestone": {
  11871. "description": "Milestone",
  11872. "schema": {
  11873. "$ref": "#/definitions/Milestone"
  11874. }
  11875. },
  11876. "MilestoneList": {
  11877. "description": "MilestoneList",
  11878. "schema": {
  11879. "type": "array",
  11880. "items": {
  11881. "$ref": "#/definitions/Milestone"
  11882. }
  11883. }
  11884. },
  11885. "Organization": {
  11886. "description": "Organization",
  11887. "schema": {
  11888. "$ref": "#/definitions/Organization"
  11889. }
  11890. },
  11891. "OrganizationList": {
  11892. "description": "OrganizationList",
  11893. "schema": {
  11894. "type": "array",
  11895. "items": {
  11896. "$ref": "#/definitions/Organization"
  11897. }
  11898. }
  11899. },
  11900. "PublicKey": {
  11901. "description": "PublicKey",
  11902. "schema": {
  11903. "$ref": "#/definitions/PublicKey"
  11904. }
  11905. },
  11906. "PublicKeyList": {
  11907. "description": "PublicKeyList",
  11908. "schema": {
  11909. "type": "array",
  11910. "items": {
  11911. "$ref": "#/definitions/PublicKey"
  11912. }
  11913. }
  11914. },
  11915. "PullRequest": {
  11916. "description": "PullRequest",
  11917. "schema": {
  11918. "$ref": "#/definitions/PullRequest"
  11919. }
  11920. },
  11921. "PullRequestList": {
  11922. "description": "PullRequestList",
  11923. "schema": {
  11924. "type": "array",
  11925. "items": {
  11926. "$ref": "#/definitions/PullRequest"
  11927. }
  11928. }
  11929. },
  11930. "ReactionResponse": {
  11931. "description": "ReactionResponse",
  11932. "schema": {
  11933. "$ref": "#/definitions/ReactionResponse"
  11934. }
  11935. },
  11936. "ReactionResponseList": {
  11937. "description": "ReactionResponseList",
  11938. "schema": {
  11939. "type": "array",
  11940. "items": {
  11941. "$ref": "#/definitions/ReactionResponse"
  11942. }
  11943. }
  11944. },
  11945. "Reference": {
  11946. "description": "Reference",
  11947. "schema": {
  11948. "$ref": "#/definitions/Reference"
  11949. }
  11950. },
  11951. "ReferenceList": {
  11952. "description": "ReferenceList",
  11953. "schema": {
  11954. "type": "array",
  11955. "items": {
  11956. "$ref": "#/definitions/Reference"
  11957. }
  11958. }
  11959. },
  11960. "Release": {
  11961. "description": "Release",
  11962. "schema": {
  11963. "$ref": "#/definitions/Release"
  11964. }
  11965. },
  11966. "ReleaseList": {
  11967. "description": "ReleaseList",
  11968. "schema": {
  11969. "type": "array",
  11970. "items": {
  11971. "$ref": "#/definitions/Release"
  11972. }
  11973. }
  11974. },
  11975. "Repository": {
  11976. "description": "Repository",
  11977. "schema": {
  11978. "$ref": "#/definitions/Repository"
  11979. }
  11980. },
  11981. "RepositoryList": {
  11982. "description": "RepositoryList",
  11983. "schema": {
  11984. "type": "array",
  11985. "items": {
  11986. "$ref": "#/definitions/Repository"
  11987. }
  11988. }
  11989. },
  11990. "SearchResults": {
  11991. "description": "SearchResults",
  11992. "schema": {
  11993. "$ref": "#/definitions/SearchResults"
  11994. }
  11995. },
  11996. "ServerVersion": {
  11997. "description": "ServerVersion",
  11998. "schema": {
  11999. "$ref": "#/definitions/ServerVersion"
  12000. }
  12001. },
  12002. "Status": {
  12003. "description": "Status",
  12004. "schema": {
  12005. "$ref": "#/definitions/Status"
  12006. }
  12007. },
  12008. "StatusList": {
  12009. "description": "StatusList",
  12010. "schema": {
  12011. "type": "array",
  12012. "items": {
  12013. "$ref": "#/definitions/Status"
  12014. }
  12015. }
  12016. },
  12017. "StopWatch": {
  12018. "description": "StopWatch",
  12019. "schema": {
  12020. "$ref": "#/definitions/StopWatch"
  12021. }
  12022. },
  12023. "StopWatchList": {
  12024. "description": "StopWatchList",
  12025. "schema": {
  12026. "type": "array",
  12027. "items": {
  12028. "$ref": "#/definitions/StopWatch"
  12029. }
  12030. }
  12031. },
  12032. "Tag": {
  12033. "description": "Tag",
  12034. "schema": {
  12035. "$ref": "#/definitions/Tag"
  12036. }
  12037. },
  12038. "TagList": {
  12039. "description": "TagList",
  12040. "schema": {
  12041. "type": "array",
  12042. "items": {
  12043. "$ref": "#/definitions/Tag"
  12044. }
  12045. }
  12046. },
  12047. "Team": {
  12048. "description": "Team",
  12049. "schema": {
  12050. "$ref": "#/definitions/Team"
  12051. }
  12052. },
  12053. "TeamList": {
  12054. "description": "TeamList",
  12055. "schema": {
  12056. "type": "array",
  12057. "items": {
  12058. "$ref": "#/definitions/Team"
  12059. }
  12060. }
  12061. },
  12062. "TopicListResponse": {
  12063. "description": "TopicListResponse",
  12064. "schema": {
  12065. "type": "array",
  12066. "items": {
  12067. "$ref": "#/definitions/TopicResponse"
  12068. }
  12069. }
  12070. },
  12071. "TopicNames": {
  12072. "description": "TopicNames",
  12073. "schema": {
  12074. "$ref": "#/definitions/TopicName"
  12075. }
  12076. },
  12077. "TrackedTime": {
  12078. "description": "TrackedTime",
  12079. "schema": {
  12080. "$ref": "#/definitions/TrackedTime"
  12081. }
  12082. },
  12083. "TrackedTimeList": {
  12084. "description": "TrackedTimeList",
  12085. "schema": {
  12086. "type": "array",
  12087. "items": {
  12088. "$ref": "#/definitions/TrackedTime"
  12089. }
  12090. }
  12091. },
  12092. "User": {
  12093. "description": "User",
  12094. "schema": {
  12095. "$ref": "#/definitions/User"
  12096. }
  12097. },
  12098. "UserHeatmapData": {
  12099. "description": "UserHeatmapData",
  12100. "schema": {
  12101. "type": "array",
  12102. "items": {
  12103. "$ref": "#/definitions/UserHeatmapData"
  12104. }
  12105. }
  12106. },
  12107. "UserList": {
  12108. "description": "UserList",
  12109. "schema": {
  12110. "type": "array",
  12111. "items": {
  12112. "$ref": "#/definitions/User"
  12113. }
  12114. }
  12115. },
  12116. "WatchInfo": {
  12117. "description": "WatchInfo",
  12118. "schema": {
  12119. "$ref": "#/definitions/WatchInfo"
  12120. }
  12121. },
  12122. "empty": {
  12123. "description": "APIEmpty is an empty response"
  12124. },
  12125. "error": {
  12126. "description": "APIError is error format response",
  12127. "headers": {
  12128. "message": {
  12129. "type": "string"
  12130. },
  12131. "url": {
  12132. "type": "string"
  12133. }
  12134. }
  12135. },
  12136. "forbidden": {
  12137. "description": "APIForbiddenError is a forbidden error response",
  12138. "headers": {
  12139. "message": {
  12140. "type": "string"
  12141. },
  12142. "url": {
  12143. "type": "string"
  12144. }
  12145. }
  12146. },
  12147. "invalidTopicsError": {
  12148. "description": "APIInvalidTopicsError is error format response to invalid topics",
  12149. "headers": {
  12150. "invalidTopics": {
  12151. "type": "array",
  12152. "items": {
  12153. "type": "string"
  12154. }
  12155. },
  12156. "message": {
  12157. "type": "string"
  12158. }
  12159. }
  12160. },
  12161. "notFound": {
  12162. "description": "APINotFound is a not found empty response"
  12163. },
  12164. "parameterBodies": {
  12165. "description": "parameterBodies",
  12166. "schema": {
  12167. "$ref": "#/definitions/RepoTopicOptions"
  12168. }
  12169. },
  12170. "redirect": {
  12171. "description": "APIRedirect is a redirect response"
  12172. },
  12173. "validationError": {
  12174. "description": "APIValidationError is error format response related to input validation",
  12175. "headers": {
  12176. "message": {
  12177. "type": "string"
  12178. },
  12179. "url": {
  12180. "type": "string"
  12181. }
  12182. }
  12183. }
  12184. },
  12185. "securityDefinitions": {
  12186. "AccessToken": {
  12187. "type": "apiKey",
  12188. "name": "access_token",
  12189. "in": "query"
  12190. },
  12191. "AuthorizationHeaderToken": {
  12192. "description": "API tokens must be prepended with \"token\" followed by a space.",
  12193. "type": "apiKey",
  12194. "name": "Authorization",
  12195. "in": "header"
  12196. },
  12197. "BasicAuth": {
  12198. "type": "basic"
  12199. },
  12200. "SudoHeader": {
  12201. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  12202. "type": "apiKey",
  12203. "name": "Sudo",
  12204. "in": "header"
  12205. },
  12206. "SudoParam": {
  12207. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  12208. "type": "apiKey",
  12209. "name": "sudo",
  12210. "in": "query"
  12211. },
  12212. "Token": {
  12213. "type": "apiKey",
  12214. "name": "token",
  12215. "in": "query"
  12216. }
  12217. },
  12218. "security": [
  12219. {
  12220. "BasicAuth": []
  12221. },
  12222. {
  12223. "Token": []
  12224. },
  12225. {
  12226. "AccessToken": []
  12227. },
  12228. {
  12229. "AuthorizationHeaderToken": []
  12230. },
  12231. {
  12232. "SudoParam": []
  12233. },
  12234. {
  12235. "SudoHeader": []
  12236. }
  12237. ]
  12238. }