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 286 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
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.
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>
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.
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>
5 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
7 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
5 years ago
Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
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
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>
5 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>
5 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add 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>
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>
5 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363
  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. "403": {
  105. "$ref": "#/responses/forbidden"
  106. },
  107. "422": {
  108. "$ref": "#/responses/validationError"
  109. }
  110. }
  111. }
  112. },
  113. "/admin/users/{username}": {
  114. "delete": {
  115. "produces": [
  116. "application/json"
  117. ],
  118. "tags": [
  119. "admin"
  120. ],
  121. "summary": "Delete a user",
  122. "operationId": "adminDeleteUser",
  123. "parameters": [
  124. {
  125. "type": "string",
  126. "description": "username of user to delete",
  127. "name": "username",
  128. "in": "path",
  129. "required": true
  130. }
  131. ],
  132. "responses": {
  133. "204": {
  134. "$ref": "#/responses/empty"
  135. },
  136. "403": {
  137. "$ref": "#/responses/forbidden"
  138. },
  139. "422": {
  140. "$ref": "#/responses/validationError"
  141. }
  142. }
  143. },
  144. "patch": {
  145. "consumes": [
  146. "application/json"
  147. ],
  148. "produces": [
  149. "application/json"
  150. ],
  151. "tags": [
  152. "admin"
  153. ],
  154. "summary": "Edit an existing user",
  155. "operationId": "adminEditUser",
  156. "parameters": [
  157. {
  158. "type": "string",
  159. "description": "username of user to edit",
  160. "name": "username",
  161. "in": "path",
  162. "required": true
  163. },
  164. {
  165. "name": "body",
  166. "in": "body",
  167. "schema": {
  168. "$ref": "#/definitions/EditUserOption"
  169. }
  170. }
  171. ],
  172. "responses": {
  173. "200": {
  174. "$ref": "#/responses/User"
  175. },
  176. "403": {
  177. "$ref": "#/responses/forbidden"
  178. },
  179. "422": {
  180. "$ref": "#/responses/validationError"
  181. }
  182. }
  183. }
  184. },
  185. "/admin/users/{username}/keys": {
  186. "post": {
  187. "consumes": [
  188. "application/json"
  189. ],
  190. "produces": [
  191. "application/json"
  192. ],
  193. "tags": [
  194. "admin"
  195. ],
  196. "summary": "Add a public key on behalf of a user",
  197. "operationId": "adminCreatePublicKey",
  198. "parameters": [
  199. {
  200. "type": "string",
  201. "description": "username of the user",
  202. "name": "username",
  203. "in": "path",
  204. "required": true
  205. },
  206. {
  207. "name": "key",
  208. "in": "body",
  209. "schema": {
  210. "$ref": "#/definitions/CreateKeyOption"
  211. }
  212. }
  213. ],
  214. "responses": {
  215. "201": {
  216. "$ref": "#/responses/PublicKey"
  217. },
  218. "403": {
  219. "$ref": "#/responses/forbidden"
  220. },
  221. "422": {
  222. "$ref": "#/responses/validationError"
  223. }
  224. }
  225. }
  226. },
  227. "/admin/users/{username}/keys/{id}": {
  228. "delete": {
  229. "produces": [
  230. "application/json"
  231. ],
  232. "tags": [
  233. "admin"
  234. ],
  235. "summary": "Delete a user's public key",
  236. "operationId": "adminDeleteUserPublicKey",
  237. "parameters": [
  238. {
  239. "type": "string",
  240. "description": "username of user",
  241. "name": "username",
  242. "in": "path",
  243. "required": true
  244. },
  245. {
  246. "type": "integer",
  247. "format": "int64",
  248. "description": "id of the key to delete",
  249. "name": "id",
  250. "in": "path",
  251. "required": true
  252. }
  253. ],
  254. "responses": {
  255. "204": {
  256. "$ref": "#/responses/empty"
  257. },
  258. "403": {
  259. "$ref": "#/responses/forbidden"
  260. },
  261. "404": {
  262. "$ref": "#/responses/notFound"
  263. }
  264. }
  265. }
  266. },
  267. "/admin/users/{username}/orgs": {
  268. "post": {
  269. "consumes": [
  270. "application/json"
  271. ],
  272. "produces": [
  273. "application/json"
  274. ],
  275. "tags": [
  276. "admin"
  277. ],
  278. "summary": "Create an organization",
  279. "operationId": "adminCreateOrg",
  280. "parameters": [
  281. {
  282. "type": "string",
  283. "description": "username of the user that will own the created organization",
  284. "name": "username",
  285. "in": "path",
  286. "required": true
  287. },
  288. {
  289. "name": "organization",
  290. "in": "body",
  291. "required": true,
  292. "schema": {
  293. "$ref": "#/definitions/CreateOrgOption"
  294. }
  295. }
  296. ],
  297. "responses": {
  298. "201": {
  299. "$ref": "#/responses/Organization"
  300. },
  301. "403": {
  302. "$ref": "#/responses/forbidden"
  303. },
  304. "422": {
  305. "$ref": "#/responses/validationError"
  306. }
  307. }
  308. }
  309. },
  310. "/admin/users/{username}/repos": {
  311. "post": {
  312. "consumes": [
  313. "application/json"
  314. ],
  315. "produces": [
  316. "application/json"
  317. ],
  318. "tags": [
  319. "admin"
  320. ],
  321. "summary": "Create a repository on behalf a user",
  322. "operationId": "adminCreateRepo",
  323. "parameters": [
  324. {
  325. "type": "string",
  326. "description": "username of the user. This user will own the created repository",
  327. "name": "username",
  328. "in": "path",
  329. "required": true
  330. },
  331. {
  332. "name": "repository",
  333. "in": "body",
  334. "required": true,
  335. "schema": {
  336. "$ref": "#/definitions/CreateRepoOption"
  337. }
  338. }
  339. ],
  340. "responses": {
  341. "201": {
  342. "$ref": "#/responses/Repository"
  343. },
  344. "403": {
  345. "$ref": "#/responses/forbidden"
  346. },
  347. "422": {
  348. "$ref": "#/responses/validationError"
  349. }
  350. }
  351. }
  352. },
  353. "/markdown": {
  354. "post": {
  355. "consumes": [
  356. "application/json"
  357. ],
  358. "produces": [
  359. "text/html"
  360. ],
  361. "tags": [
  362. "miscellaneous"
  363. ],
  364. "summary": "Render a markdown document as HTML",
  365. "operationId": "renderMarkdown",
  366. "parameters": [
  367. {
  368. "name": "body",
  369. "in": "body",
  370. "schema": {
  371. "$ref": "#/definitions/MarkdownOption"
  372. }
  373. }
  374. ],
  375. "responses": {
  376. "200": {
  377. "$ref": "#/responses/MarkdownRender"
  378. },
  379. "422": {
  380. "$ref": "#/responses/validationError"
  381. }
  382. }
  383. }
  384. },
  385. "/markdown/raw": {
  386. "post": {
  387. "consumes": [
  388. "text/plain"
  389. ],
  390. "produces": [
  391. "text/html"
  392. ],
  393. "tags": [
  394. "miscellaneous"
  395. ],
  396. "summary": "Render raw markdown as HTML",
  397. "operationId": "renderMarkdownRaw",
  398. "parameters": [
  399. {
  400. "description": "Request body to render",
  401. "name": "body",
  402. "in": "body",
  403. "required": true,
  404. "schema": {
  405. "type": "string"
  406. }
  407. }
  408. ],
  409. "responses": {
  410. "200": {
  411. "$ref": "#/responses/MarkdownRender"
  412. },
  413. "422": {
  414. "$ref": "#/responses/validationError"
  415. }
  416. }
  417. }
  418. },
  419. "/org/{org}/repos": {
  420. "post": {
  421. "consumes": [
  422. "application/json"
  423. ],
  424. "produces": [
  425. "application/json"
  426. ],
  427. "tags": [
  428. "organization"
  429. ],
  430. "summary": "Create a repository in an organization",
  431. "operationId": "createOrgRepo",
  432. "parameters": [
  433. {
  434. "type": "string",
  435. "description": "name of organization",
  436. "name": "org",
  437. "in": "path",
  438. "required": true
  439. },
  440. {
  441. "name": "body",
  442. "in": "body",
  443. "schema": {
  444. "$ref": "#/definitions/CreateRepoOption"
  445. }
  446. }
  447. ],
  448. "responses": {
  449. "201": {
  450. "$ref": "#/responses/Repository"
  451. },
  452. "403": {
  453. "$ref": "#/responses/forbidden"
  454. },
  455. "422": {
  456. "$ref": "#/responses/validationError"
  457. }
  458. }
  459. }
  460. },
  461. "/orgs": {
  462. "post": {
  463. "consumes": [
  464. "application/json"
  465. ],
  466. "produces": [
  467. "application/json"
  468. ],
  469. "tags": [
  470. "organization"
  471. ],
  472. "summary": "Create an organization",
  473. "operationId": "orgCreate",
  474. "parameters": [
  475. {
  476. "name": "organization",
  477. "in": "body",
  478. "required": true,
  479. "schema": {
  480. "$ref": "#/definitions/CreateOrgOption"
  481. }
  482. }
  483. ],
  484. "responses": {
  485. "201": {
  486. "$ref": "#/responses/Organization"
  487. },
  488. "403": {
  489. "$ref": "#/responses/forbidden"
  490. },
  491. "422": {
  492. "$ref": "#/responses/validationError"
  493. }
  494. }
  495. }
  496. },
  497. "/orgs/{org}": {
  498. "get": {
  499. "produces": [
  500. "application/json"
  501. ],
  502. "tags": [
  503. "organization"
  504. ],
  505. "summary": "Get an organization",
  506. "operationId": "orgGet",
  507. "parameters": [
  508. {
  509. "type": "string",
  510. "description": "name of the organization to get",
  511. "name": "org",
  512. "in": "path",
  513. "required": true
  514. }
  515. ],
  516. "responses": {
  517. "200": {
  518. "$ref": "#/responses/Organization"
  519. }
  520. }
  521. },
  522. "delete": {
  523. "produces": [
  524. "application/json"
  525. ],
  526. "tags": [
  527. "organization"
  528. ],
  529. "summary": "Delete an organization",
  530. "operationId": "orgDelete",
  531. "parameters": [
  532. {
  533. "type": "string",
  534. "description": "organization that is to be deleted",
  535. "name": "org",
  536. "in": "path",
  537. "required": true
  538. }
  539. ],
  540. "responses": {
  541. "204": {
  542. "$ref": "#/responses/empty"
  543. }
  544. }
  545. },
  546. "patch": {
  547. "consumes": [
  548. "application/json"
  549. ],
  550. "produces": [
  551. "application/json"
  552. ],
  553. "tags": [
  554. "organization"
  555. ],
  556. "summary": "Edit an organization",
  557. "operationId": "orgEdit",
  558. "parameters": [
  559. {
  560. "type": "string",
  561. "description": "name of the organization to edit",
  562. "name": "org",
  563. "in": "path",
  564. "required": true
  565. },
  566. {
  567. "name": "body",
  568. "in": "body",
  569. "required": true,
  570. "schema": {
  571. "$ref": "#/definitions/EditOrgOption"
  572. }
  573. }
  574. ],
  575. "responses": {
  576. "200": {
  577. "$ref": "#/responses/Organization"
  578. }
  579. }
  580. }
  581. },
  582. "/orgs/{org}/hooks": {
  583. "get": {
  584. "produces": [
  585. "application/json"
  586. ],
  587. "tags": [
  588. "organization"
  589. ],
  590. "summary": "List an organization's webhooks",
  591. "operationId": "orgListHooks",
  592. "parameters": [
  593. {
  594. "type": "string",
  595. "description": "name of the organization",
  596. "name": "org",
  597. "in": "path",
  598. "required": true
  599. }
  600. ],
  601. "responses": {
  602. "200": {
  603. "$ref": "#/responses/HookList"
  604. }
  605. }
  606. }
  607. },
  608. "/orgs/{org}/hooks/": {
  609. "post": {
  610. "consumes": [
  611. "application/json"
  612. ],
  613. "produces": [
  614. "application/json"
  615. ],
  616. "tags": [
  617. "organization"
  618. ],
  619. "summary": "Create a hook",
  620. "operationId": "orgCreateHook",
  621. "parameters": [
  622. {
  623. "type": "string",
  624. "description": "name of the organization",
  625. "name": "org",
  626. "in": "path",
  627. "required": true
  628. },
  629. {
  630. "name": "body",
  631. "in": "body",
  632. "required": true,
  633. "schema": {
  634. "$ref": "#/definitions/CreateHookOption"
  635. }
  636. }
  637. ],
  638. "responses": {
  639. "201": {
  640. "$ref": "#/responses/Hook"
  641. }
  642. }
  643. }
  644. },
  645. "/orgs/{org}/hooks/{id}": {
  646. "get": {
  647. "produces": [
  648. "application/json"
  649. ],
  650. "tags": [
  651. "organization"
  652. ],
  653. "summary": "Get a hook",
  654. "operationId": "orgGetHook",
  655. "parameters": [
  656. {
  657. "type": "string",
  658. "description": "name of the organization",
  659. "name": "org",
  660. "in": "path",
  661. "required": true
  662. },
  663. {
  664. "type": "integer",
  665. "format": "int64",
  666. "description": "id of the hook to get",
  667. "name": "id",
  668. "in": "path",
  669. "required": true
  670. }
  671. ],
  672. "responses": {
  673. "200": {
  674. "$ref": "#/responses/Hook"
  675. }
  676. }
  677. },
  678. "delete": {
  679. "produces": [
  680. "application/json"
  681. ],
  682. "tags": [
  683. "organization"
  684. ],
  685. "summary": "Delete a hook",
  686. "operationId": "orgDeleteHook",
  687. "parameters": [
  688. {
  689. "type": "string",
  690. "description": "name of the organization",
  691. "name": "org",
  692. "in": "path",
  693. "required": true
  694. },
  695. {
  696. "type": "integer",
  697. "format": "int64",
  698. "description": "id of the hook to delete",
  699. "name": "id",
  700. "in": "path",
  701. "required": true
  702. }
  703. ],
  704. "responses": {
  705. "204": {
  706. "$ref": "#/responses/empty"
  707. }
  708. }
  709. },
  710. "patch": {
  711. "consumes": [
  712. "application/json"
  713. ],
  714. "produces": [
  715. "application/json"
  716. ],
  717. "tags": [
  718. "organization"
  719. ],
  720. "summary": "Update a hook",
  721. "operationId": "orgEditHook",
  722. "parameters": [
  723. {
  724. "type": "string",
  725. "description": "name of the organization",
  726. "name": "org",
  727. "in": "path",
  728. "required": true
  729. },
  730. {
  731. "type": "integer",
  732. "format": "int64",
  733. "description": "id of the hook to update",
  734. "name": "id",
  735. "in": "path",
  736. "required": true
  737. },
  738. {
  739. "name": "body",
  740. "in": "body",
  741. "schema": {
  742. "$ref": "#/definitions/EditHookOption"
  743. }
  744. }
  745. ],
  746. "responses": {
  747. "200": {
  748. "$ref": "#/responses/Hook"
  749. }
  750. }
  751. }
  752. },
  753. "/orgs/{org}/members": {
  754. "get": {
  755. "produces": [
  756. "application/json"
  757. ],
  758. "tags": [
  759. "organization"
  760. ],
  761. "summary": "List an organization's members",
  762. "operationId": "orgListMembers",
  763. "parameters": [
  764. {
  765. "type": "string",
  766. "description": "name of the organization",
  767. "name": "org",
  768. "in": "path",
  769. "required": true
  770. }
  771. ],
  772. "responses": {
  773. "200": {
  774. "$ref": "#/responses/UserList"
  775. }
  776. }
  777. }
  778. },
  779. "/orgs/{org}/members/{username}": {
  780. "get": {
  781. "tags": [
  782. "organization"
  783. ],
  784. "summary": "Check if a user is a member of an organization",
  785. "operationId": "orgIsMember",
  786. "parameters": [
  787. {
  788. "type": "string",
  789. "description": "name of the organization",
  790. "name": "org",
  791. "in": "path",
  792. "required": true
  793. },
  794. {
  795. "type": "string",
  796. "description": "username of the user",
  797. "name": "username",
  798. "in": "path",
  799. "required": true
  800. }
  801. ],
  802. "responses": {
  803. "204": {
  804. "description": "user is a member"
  805. },
  806. "404": {
  807. "description": "user is not a member"
  808. }
  809. }
  810. },
  811. "delete": {
  812. "produces": [
  813. "application/json"
  814. ],
  815. "tags": [
  816. "organization"
  817. ],
  818. "summary": "Remove a member from an organization",
  819. "operationId": "orgDeleteMember",
  820. "parameters": [
  821. {
  822. "type": "string",
  823. "description": "name of the organization",
  824. "name": "org",
  825. "in": "path",
  826. "required": true
  827. },
  828. {
  829. "type": "string",
  830. "description": "username of the user",
  831. "name": "username",
  832. "in": "path",
  833. "required": true
  834. }
  835. ],
  836. "responses": {
  837. "204": {
  838. "description": "member removed"
  839. }
  840. }
  841. }
  842. },
  843. "/orgs/{org}/public_members": {
  844. "get": {
  845. "produces": [
  846. "application/json"
  847. ],
  848. "tags": [
  849. "organization"
  850. ],
  851. "summary": "List an organization's public members",
  852. "operationId": "orgListPublicMembers",
  853. "parameters": [
  854. {
  855. "type": "string",
  856. "description": "name of the organization",
  857. "name": "org",
  858. "in": "path",
  859. "required": true
  860. }
  861. ],
  862. "responses": {
  863. "200": {
  864. "$ref": "#/responses/UserList"
  865. }
  866. }
  867. }
  868. },
  869. "/orgs/{org}/public_members/{username}": {
  870. "get": {
  871. "tags": [
  872. "organization"
  873. ],
  874. "summary": "Check if a user is a public member of an organization",
  875. "operationId": "orgIsPublicMember",
  876. "parameters": [
  877. {
  878. "type": "string",
  879. "description": "name of the organization",
  880. "name": "org",
  881. "in": "path",
  882. "required": true
  883. },
  884. {
  885. "type": "string",
  886. "description": "username of the user",
  887. "name": "username",
  888. "in": "path",
  889. "required": true
  890. }
  891. ],
  892. "responses": {
  893. "204": {
  894. "description": "user is a public member"
  895. },
  896. "404": {
  897. "description": "user is not a public member"
  898. }
  899. }
  900. },
  901. "put": {
  902. "produces": [
  903. "application/json"
  904. ],
  905. "tags": [
  906. "organization"
  907. ],
  908. "summary": "Publicize a user's membership",
  909. "operationId": "orgPublicizeMember",
  910. "parameters": [
  911. {
  912. "type": "string",
  913. "description": "name of the organization",
  914. "name": "org",
  915. "in": "path",
  916. "required": true
  917. },
  918. {
  919. "type": "string",
  920. "description": "username of the user",
  921. "name": "username",
  922. "in": "path",
  923. "required": true
  924. }
  925. ],
  926. "responses": {
  927. "204": {
  928. "description": "membership publicized"
  929. }
  930. }
  931. },
  932. "delete": {
  933. "produces": [
  934. "application/json"
  935. ],
  936. "tags": [
  937. "organization"
  938. ],
  939. "summary": "Conceal a user's membership",
  940. "operationId": "orgConcealMember",
  941. "parameters": [
  942. {
  943. "type": "string",
  944. "description": "name of the organization",
  945. "name": "org",
  946. "in": "path",
  947. "required": true
  948. },
  949. {
  950. "type": "string",
  951. "description": "username of the user",
  952. "name": "username",
  953. "in": "path",
  954. "required": true
  955. }
  956. ],
  957. "responses": {
  958. "204": {
  959. "$ref": "#/responses/empty"
  960. }
  961. }
  962. }
  963. },
  964. "/orgs/{org}/repos": {
  965. "get": {
  966. "produces": [
  967. "application/json"
  968. ],
  969. "tags": [
  970. "organization"
  971. ],
  972. "summary": "List an organization's repos",
  973. "operationId": "orgListRepos",
  974. "parameters": [
  975. {
  976. "type": "string",
  977. "description": "name of the organization",
  978. "name": "org",
  979. "in": "path",
  980. "required": true
  981. }
  982. ],
  983. "responses": {
  984. "200": {
  985. "$ref": "#/responses/RepositoryList"
  986. }
  987. }
  988. }
  989. },
  990. "/orgs/{org}/teams": {
  991. "get": {
  992. "produces": [
  993. "application/json"
  994. ],
  995. "tags": [
  996. "organization"
  997. ],
  998. "summary": "List an organization's teams",
  999. "operationId": "orgListTeams",
  1000. "parameters": [
  1001. {
  1002. "type": "string",
  1003. "description": "name of the organization",
  1004. "name": "org",
  1005. "in": "path",
  1006. "required": true
  1007. }
  1008. ],
  1009. "responses": {
  1010. "200": {
  1011. "$ref": "#/responses/TeamList"
  1012. }
  1013. }
  1014. },
  1015. "post": {
  1016. "consumes": [
  1017. "application/json"
  1018. ],
  1019. "produces": [
  1020. "application/json"
  1021. ],
  1022. "tags": [
  1023. "organization"
  1024. ],
  1025. "summary": "Create a team",
  1026. "operationId": "orgCreateTeam",
  1027. "parameters": [
  1028. {
  1029. "type": "string",
  1030. "description": "name of the organization",
  1031. "name": "org",
  1032. "in": "path",
  1033. "required": true
  1034. },
  1035. {
  1036. "name": "body",
  1037. "in": "body",
  1038. "schema": {
  1039. "$ref": "#/definitions/CreateTeamOption"
  1040. }
  1041. }
  1042. ],
  1043. "responses": {
  1044. "201": {
  1045. "$ref": "#/responses/Team"
  1046. }
  1047. }
  1048. }
  1049. },
  1050. "/orgs/{org}/teams/search": {
  1051. "get": {
  1052. "produces": [
  1053. "application/json"
  1054. ],
  1055. "tags": [
  1056. "organization"
  1057. ],
  1058. "summary": "Search for teams within an organization",
  1059. "operationId": "teamSearch",
  1060. "parameters": [
  1061. {
  1062. "type": "string",
  1063. "description": "name of the organization",
  1064. "name": "org",
  1065. "in": "path",
  1066. "required": true
  1067. },
  1068. {
  1069. "type": "string",
  1070. "description": "keywords to search",
  1071. "name": "q",
  1072. "in": "query"
  1073. },
  1074. {
  1075. "type": "boolean",
  1076. "description": "include search within team description (defaults to true)",
  1077. "name": "include_desc",
  1078. "in": "query"
  1079. },
  1080. {
  1081. "type": "integer",
  1082. "description": "limit size of results",
  1083. "name": "limit",
  1084. "in": "query"
  1085. },
  1086. {
  1087. "type": "integer",
  1088. "description": "page number of results to return (1-based)",
  1089. "name": "page",
  1090. "in": "query"
  1091. }
  1092. ],
  1093. "responses": {
  1094. "200": {
  1095. "description": "SearchResults of a successful search",
  1096. "schema": {
  1097. "type": "object",
  1098. "properties": {
  1099. "data": {
  1100. "type": "array",
  1101. "items": {
  1102. "$ref": "#/definitions/Team"
  1103. }
  1104. },
  1105. "ok": {
  1106. "type": "boolean"
  1107. }
  1108. }
  1109. }
  1110. }
  1111. }
  1112. }
  1113. },
  1114. "/repos/issues/search": {
  1115. "get": {
  1116. "produces": [
  1117. "application/json"
  1118. ],
  1119. "tags": [
  1120. "issue"
  1121. ],
  1122. "summary": "Search for issues across the repositories that the user has access to",
  1123. "operationId": "issueSearchIssues",
  1124. "parameters": [
  1125. {
  1126. "type": "string",
  1127. "description": "whether issue is open or closed",
  1128. "name": "state",
  1129. "in": "query"
  1130. },
  1131. {
  1132. "type": "string",
  1133. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  1134. "name": "labels",
  1135. "in": "query"
  1136. },
  1137. {
  1138. "type": "integer",
  1139. "description": "page number of requested issues",
  1140. "name": "page",
  1141. "in": "query"
  1142. },
  1143. {
  1144. "type": "string",
  1145. "description": "search string",
  1146. "name": "q",
  1147. "in": "query"
  1148. },
  1149. {
  1150. "type": "integer",
  1151. "format": "int64",
  1152. "description": "repository to prioritize in the results",
  1153. "name": "priority_repo_id",
  1154. "in": "query"
  1155. }
  1156. ],
  1157. "responses": {
  1158. "200": {
  1159. "$ref": "#/responses/IssueList"
  1160. }
  1161. }
  1162. }
  1163. },
  1164. "/repos/migrate": {
  1165. "post": {
  1166. "consumes": [
  1167. "application/json"
  1168. ],
  1169. "produces": [
  1170. "application/json"
  1171. ],
  1172. "tags": [
  1173. "repository"
  1174. ],
  1175. "summary": "Migrate a remote git repository",
  1176. "operationId": "repoMigrate",
  1177. "parameters": [
  1178. {
  1179. "name": "body",
  1180. "in": "body",
  1181. "schema": {
  1182. "$ref": "#/definitions/MigrateRepoForm"
  1183. }
  1184. }
  1185. ],
  1186. "responses": {
  1187. "201": {
  1188. "$ref": "#/responses/Repository"
  1189. }
  1190. }
  1191. }
  1192. },
  1193. "/repos/search": {
  1194. "get": {
  1195. "produces": [
  1196. "application/json"
  1197. ],
  1198. "tags": [
  1199. "repository"
  1200. ],
  1201. "summary": "Search for repositories",
  1202. "operationId": "repoSearch",
  1203. "parameters": [
  1204. {
  1205. "type": "string",
  1206. "description": "keyword",
  1207. "name": "q",
  1208. "in": "query"
  1209. },
  1210. {
  1211. "type": "boolean",
  1212. "description": "Limit search to repositories with keyword as topic",
  1213. "name": "topic",
  1214. "in": "query"
  1215. },
  1216. {
  1217. "type": "boolean",
  1218. "description": "include search of keyword within repository description",
  1219. "name": "includeDesc",
  1220. "in": "query"
  1221. },
  1222. {
  1223. "type": "integer",
  1224. "format": "int64",
  1225. "description": "search only for repos that the user with the given id owns or contributes to",
  1226. "name": "uid",
  1227. "in": "query"
  1228. },
  1229. {
  1230. "type": "integer",
  1231. "format": "int64",
  1232. "description": "repo owner to prioritize in the results",
  1233. "name": "priority_owner_id",
  1234. "in": "query"
  1235. },
  1236. {
  1237. "type": "integer",
  1238. "format": "int64",
  1239. "description": "search only for repos that the user with the given id has starred",
  1240. "name": "starredBy",
  1241. "in": "query"
  1242. },
  1243. {
  1244. "type": "boolean",
  1245. "description": "include private repositories this user has access to (defaults to true)",
  1246. "name": "private",
  1247. "in": "query"
  1248. },
  1249. {
  1250. "type": "boolean",
  1251. "description": "include template repositories this user has access to (defaults to true)",
  1252. "name": "template",
  1253. "in": "query"
  1254. },
  1255. {
  1256. "type": "integer",
  1257. "description": "page number of results to return (1-based)",
  1258. "name": "page",
  1259. "in": "query"
  1260. },
  1261. {
  1262. "type": "integer",
  1263. "description": "page size of results, maximum page size is 50",
  1264. "name": "limit",
  1265. "in": "query"
  1266. },
  1267. {
  1268. "type": "string",
  1269. "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"",
  1270. "name": "mode",
  1271. "in": "query"
  1272. },
  1273. {
  1274. "type": "boolean",
  1275. "description": "if `uid` is given, search only for repos that the user owns",
  1276. "name": "exclusive",
  1277. "in": "query"
  1278. },
  1279. {
  1280. "type": "string",
  1281. "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"",
  1282. "name": "sort",
  1283. "in": "query"
  1284. },
  1285. {
  1286. "type": "string",
  1287. "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.",
  1288. "name": "order",
  1289. "in": "query"
  1290. }
  1291. ],
  1292. "responses": {
  1293. "200": {
  1294. "$ref": "#/responses/SearchResults"
  1295. },
  1296. "422": {
  1297. "$ref": "#/responses/validationError"
  1298. }
  1299. }
  1300. }
  1301. },
  1302. "/repos/{owner}/{repo}": {
  1303. "get": {
  1304. "produces": [
  1305. "application/json"
  1306. ],
  1307. "tags": [
  1308. "repository"
  1309. ],
  1310. "summary": "Get a repository",
  1311. "operationId": "repoGet",
  1312. "parameters": [
  1313. {
  1314. "type": "string",
  1315. "description": "owner of the repo",
  1316. "name": "owner",
  1317. "in": "path",
  1318. "required": true
  1319. },
  1320. {
  1321. "type": "string",
  1322. "description": "name of the repo",
  1323. "name": "repo",
  1324. "in": "path",
  1325. "required": true
  1326. }
  1327. ],
  1328. "responses": {
  1329. "200": {
  1330. "$ref": "#/responses/Repository"
  1331. }
  1332. }
  1333. },
  1334. "delete": {
  1335. "produces": [
  1336. "application/json"
  1337. ],
  1338. "tags": [
  1339. "repository"
  1340. ],
  1341. "summary": "Delete a repository",
  1342. "operationId": "repoDelete",
  1343. "parameters": [
  1344. {
  1345. "type": "string",
  1346. "description": "owner of the repo to delete",
  1347. "name": "owner",
  1348. "in": "path",
  1349. "required": true
  1350. },
  1351. {
  1352. "type": "string",
  1353. "description": "name of the repo to delete",
  1354. "name": "repo",
  1355. "in": "path",
  1356. "required": true
  1357. }
  1358. ],
  1359. "responses": {
  1360. "204": {
  1361. "$ref": "#/responses/empty"
  1362. },
  1363. "403": {
  1364. "$ref": "#/responses/forbidden"
  1365. }
  1366. }
  1367. },
  1368. "patch": {
  1369. "produces": [
  1370. "application/json"
  1371. ],
  1372. "tags": [
  1373. "repository"
  1374. ],
  1375. "summary": "Edit a repository's properties. Only fields that are set will be changed.",
  1376. "operationId": "repoEdit",
  1377. "parameters": [
  1378. {
  1379. "type": "string",
  1380. "description": "owner of the repo to edit",
  1381. "name": "owner",
  1382. "in": "path",
  1383. "required": true
  1384. },
  1385. {
  1386. "type": "string",
  1387. "description": "name of the repo to edit",
  1388. "name": "repo",
  1389. "in": "path",
  1390. "required": true
  1391. },
  1392. {
  1393. "description": "Properties of a repo that you can edit",
  1394. "name": "body",
  1395. "in": "body",
  1396. "schema": {
  1397. "$ref": "#/definitions/EditRepoOption"
  1398. }
  1399. }
  1400. ],
  1401. "responses": {
  1402. "200": {
  1403. "$ref": "#/responses/Repository"
  1404. },
  1405. "403": {
  1406. "$ref": "#/responses/forbidden"
  1407. },
  1408. "422": {
  1409. "$ref": "#/responses/validationError"
  1410. }
  1411. }
  1412. }
  1413. },
  1414. "/repos/{owner}/{repo}/archive/{archive}": {
  1415. "get": {
  1416. "produces": [
  1417. "application/json"
  1418. ],
  1419. "tags": [
  1420. "repository"
  1421. ],
  1422. "summary": "Get an archive of a repository",
  1423. "operationId": "repoGetArchive",
  1424. "parameters": [
  1425. {
  1426. "type": "string",
  1427. "description": "owner of the repo",
  1428. "name": "owner",
  1429. "in": "path",
  1430. "required": true
  1431. },
  1432. {
  1433. "type": "string",
  1434. "description": "name of the repo",
  1435. "name": "repo",
  1436. "in": "path",
  1437. "required": true
  1438. },
  1439. {
  1440. "type": "string",
  1441. "description": "archive to download, consisting of a git reference and archive",
  1442. "name": "archive",
  1443. "in": "path",
  1444. "required": true
  1445. }
  1446. ],
  1447. "responses": {
  1448. "200": {
  1449. "description": "success"
  1450. }
  1451. }
  1452. }
  1453. },
  1454. "/repos/{owner}/{repo}/branches": {
  1455. "get": {
  1456. "produces": [
  1457. "application/json"
  1458. ],
  1459. "tags": [
  1460. "repository"
  1461. ],
  1462. "summary": "List a repository's branches",
  1463. "operationId": "repoListBranches",
  1464. "parameters": [
  1465. {
  1466. "type": "string",
  1467. "description": "owner of the repo",
  1468. "name": "owner",
  1469. "in": "path",
  1470. "required": true
  1471. },
  1472. {
  1473. "type": "string",
  1474. "description": "name of the repo",
  1475. "name": "repo",
  1476. "in": "path",
  1477. "required": true
  1478. }
  1479. ],
  1480. "responses": {
  1481. "200": {
  1482. "$ref": "#/responses/BranchList"
  1483. }
  1484. }
  1485. }
  1486. },
  1487. "/repos/{owner}/{repo}/branches/{branch}": {
  1488. "get": {
  1489. "produces": [
  1490. "application/json"
  1491. ],
  1492. "tags": [
  1493. "repository"
  1494. ],
  1495. "summary": "Retrieve a specific branch from a repository",
  1496. "operationId": "repoGetBranch",
  1497. "parameters": [
  1498. {
  1499. "type": "string",
  1500. "description": "owner of the repo",
  1501. "name": "owner",
  1502. "in": "path",
  1503. "required": true
  1504. },
  1505. {
  1506. "type": "string",
  1507. "description": "name of the repo",
  1508. "name": "repo",
  1509. "in": "path",
  1510. "required": true
  1511. },
  1512. {
  1513. "type": "string",
  1514. "description": "branch to get",
  1515. "name": "branch",
  1516. "in": "path",
  1517. "required": true
  1518. }
  1519. ],
  1520. "responses": {
  1521. "200": {
  1522. "$ref": "#/responses/Branch"
  1523. }
  1524. }
  1525. }
  1526. },
  1527. "/repos/{owner}/{repo}/collaborators": {
  1528. "get": {
  1529. "produces": [
  1530. "application/json"
  1531. ],
  1532. "tags": [
  1533. "repository"
  1534. ],
  1535. "summary": "List a repository's collaborators",
  1536. "operationId": "repoListCollaborators",
  1537. "parameters": [
  1538. {
  1539. "type": "string",
  1540. "description": "owner of the repo",
  1541. "name": "owner",
  1542. "in": "path",
  1543. "required": true
  1544. },
  1545. {
  1546. "type": "string",
  1547. "description": "name of the repo",
  1548. "name": "repo",
  1549. "in": "path",
  1550. "required": true
  1551. }
  1552. ],
  1553. "responses": {
  1554. "200": {
  1555. "$ref": "#/responses/UserList"
  1556. }
  1557. }
  1558. }
  1559. },
  1560. "/repos/{owner}/{repo}/collaborators/{collaborator}": {
  1561. "get": {
  1562. "produces": [
  1563. "application/json"
  1564. ],
  1565. "tags": [
  1566. "repository"
  1567. ],
  1568. "summary": "Check if a user is a collaborator of a repository",
  1569. "operationId": "repoCheckCollaborator",
  1570. "parameters": [
  1571. {
  1572. "type": "string",
  1573. "description": "owner of the repo",
  1574. "name": "owner",
  1575. "in": "path",
  1576. "required": true
  1577. },
  1578. {
  1579. "type": "string",
  1580. "description": "name of the repo",
  1581. "name": "repo",
  1582. "in": "path",
  1583. "required": true
  1584. },
  1585. {
  1586. "type": "string",
  1587. "description": "username of the collaborator",
  1588. "name": "collaborator",
  1589. "in": "path",
  1590. "required": true
  1591. }
  1592. ],
  1593. "responses": {
  1594. "204": {
  1595. "$ref": "#/responses/empty"
  1596. },
  1597. "404": {
  1598. "$ref": "#/responses/empty"
  1599. }
  1600. }
  1601. },
  1602. "put": {
  1603. "produces": [
  1604. "application/json"
  1605. ],
  1606. "tags": [
  1607. "repository"
  1608. ],
  1609. "summary": "Add a collaborator to a repository",
  1610. "operationId": "repoAddCollaborator",
  1611. "parameters": [
  1612. {
  1613. "type": "string",
  1614. "description": "owner of the repo",
  1615. "name": "owner",
  1616. "in": "path",
  1617. "required": true
  1618. },
  1619. {
  1620. "type": "string",
  1621. "description": "name of the repo",
  1622. "name": "repo",
  1623. "in": "path",
  1624. "required": true
  1625. },
  1626. {
  1627. "type": "string",
  1628. "description": "username of the collaborator to add",
  1629. "name": "collaborator",
  1630. "in": "path",
  1631. "required": true
  1632. },
  1633. {
  1634. "name": "body",
  1635. "in": "body",
  1636. "schema": {
  1637. "$ref": "#/definitions/AddCollaboratorOption"
  1638. }
  1639. }
  1640. ],
  1641. "responses": {
  1642. "204": {
  1643. "$ref": "#/responses/empty"
  1644. }
  1645. }
  1646. },
  1647. "delete": {
  1648. "produces": [
  1649. "application/json"
  1650. ],
  1651. "tags": [
  1652. "repository"
  1653. ],
  1654. "summary": "Delete a collaborator from a repository",
  1655. "operationId": "repoDeleteCollaborator",
  1656. "parameters": [
  1657. {
  1658. "type": "string",
  1659. "description": "owner of the repo",
  1660. "name": "owner",
  1661. "in": "path",
  1662. "required": true
  1663. },
  1664. {
  1665. "type": "string",
  1666. "description": "name of the repo",
  1667. "name": "repo",
  1668. "in": "path",
  1669. "required": true
  1670. },
  1671. {
  1672. "type": "string",
  1673. "description": "username of the collaborator to delete",
  1674. "name": "collaborator",
  1675. "in": "path",
  1676. "required": true
  1677. }
  1678. ],
  1679. "responses": {
  1680. "204": {
  1681. "$ref": "#/responses/empty"
  1682. }
  1683. }
  1684. }
  1685. },
  1686. "/repos/{owner}/{repo}/commits": {
  1687. "get": {
  1688. "produces": [
  1689. "application/json"
  1690. ],
  1691. "tags": [
  1692. "repository"
  1693. ],
  1694. "summary": "Get a list of all commits from a repository",
  1695. "operationId": "repoGetAllCommits",
  1696. "parameters": [
  1697. {
  1698. "type": "string",
  1699. "description": "owner of the repo",
  1700. "name": "owner",
  1701. "in": "path",
  1702. "required": true
  1703. },
  1704. {
  1705. "type": "string",
  1706. "description": "name of the repo",
  1707. "name": "repo",
  1708. "in": "path",
  1709. "required": true
  1710. },
  1711. {
  1712. "type": "string",
  1713. "description": "SHA or branch to start listing commits from (usually 'master')",
  1714. "name": "sha",
  1715. "in": "query"
  1716. },
  1717. {
  1718. "type": "integer",
  1719. "description": "page number of requested commits",
  1720. "name": "page",
  1721. "in": "query"
  1722. }
  1723. ],
  1724. "responses": {
  1725. "200": {
  1726. "$ref": "#/responses/CommitList"
  1727. },
  1728. "404": {
  1729. "$ref": "#/responses/notFound"
  1730. },
  1731. "409": {
  1732. "$ref": "#/responses/EmptyRepository"
  1733. }
  1734. }
  1735. }
  1736. },
  1737. "/repos/{owner}/{repo}/commits/{ref}/statuses": {
  1738. "get": {
  1739. "produces": [
  1740. "application/json"
  1741. ],
  1742. "tags": [
  1743. "repository"
  1744. ],
  1745. "summary": "Get a commit's combined status, by branch/tag/commit reference",
  1746. "operationId": "repoGetCombinedStatusByRef",
  1747. "parameters": [
  1748. {
  1749. "type": "string",
  1750. "description": "owner of the repo",
  1751. "name": "owner",
  1752. "in": "path",
  1753. "required": true
  1754. },
  1755. {
  1756. "type": "string",
  1757. "description": "name of the repo",
  1758. "name": "repo",
  1759. "in": "path",
  1760. "required": true
  1761. },
  1762. {
  1763. "type": "string",
  1764. "description": "name of branch/tag/commit",
  1765. "name": "ref",
  1766. "in": "path",
  1767. "required": true
  1768. },
  1769. {
  1770. "type": "integer",
  1771. "description": "page number of results",
  1772. "name": "page",
  1773. "in": "query"
  1774. }
  1775. ],
  1776. "responses": {
  1777. "200": {
  1778. "$ref": "#/responses/Status"
  1779. }
  1780. }
  1781. }
  1782. },
  1783. "/repos/{owner}/{repo}/contents": {
  1784. "get": {
  1785. "produces": [
  1786. "application/json"
  1787. ],
  1788. "tags": [
  1789. "repository"
  1790. ],
  1791. "summary": "Gets the metadata of all the entries of the root dir",
  1792. "operationId": "repoGetContentsList",
  1793. "parameters": [
  1794. {
  1795. "type": "string",
  1796. "description": "owner of the repo",
  1797. "name": "owner",
  1798. "in": "path",
  1799. "required": true
  1800. },
  1801. {
  1802. "type": "string",
  1803. "description": "name of the repo",
  1804. "name": "repo",
  1805. "in": "path",
  1806. "required": true
  1807. },
  1808. {
  1809. "type": "string",
  1810. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  1811. "name": "ref",
  1812. "in": "query"
  1813. }
  1814. ],
  1815. "responses": {
  1816. "200": {
  1817. "$ref": "#/responses/ContentsListResponse"
  1818. }
  1819. }
  1820. }
  1821. },
  1822. "/repos/{owner}/{repo}/contents/{filepath}": {
  1823. "get": {
  1824. "produces": [
  1825. "application/json"
  1826. ],
  1827. "tags": [
  1828. "repository"
  1829. ],
  1830. "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir",
  1831. "operationId": "repoGetContents",
  1832. "parameters": [
  1833. {
  1834. "type": "string",
  1835. "description": "owner of the repo",
  1836. "name": "owner",
  1837. "in": "path",
  1838. "required": true
  1839. },
  1840. {
  1841. "type": "string",
  1842. "description": "name of the repo",
  1843. "name": "repo",
  1844. "in": "path",
  1845. "required": true
  1846. },
  1847. {
  1848. "type": "string",
  1849. "description": "path of the dir, file, symlink or submodule in the repo",
  1850. "name": "filepath",
  1851. "in": "path",
  1852. "required": true
  1853. },
  1854. {
  1855. "type": "string",
  1856. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  1857. "name": "ref",
  1858. "in": "query"
  1859. }
  1860. ],
  1861. "responses": {
  1862. "200": {
  1863. "$ref": "#/responses/ContentsResponse"
  1864. }
  1865. }
  1866. },
  1867. "put": {
  1868. "consumes": [
  1869. "application/json"
  1870. ],
  1871. "produces": [
  1872. "application/json"
  1873. ],
  1874. "tags": [
  1875. "repository"
  1876. ],
  1877. "summary": "Update a file in a repository",
  1878. "operationId": "repoUpdateFile",
  1879. "parameters": [
  1880. {
  1881. "type": "string",
  1882. "description": "owner of the repo",
  1883. "name": "owner",
  1884. "in": "path",
  1885. "required": true
  1886. },
  1887. {
  1888. "type": "string",
  1889. "description": "name of the repo",
  1890. "name": "repo",
  1891. "in": "path",
  1892. "required": true
  1893. },
  1894. {
  1895. "type": "string",
  1896. "description": "path of the file to update",
  1897. "name": "filepath",
  1898. "in": "path",
  1899. "required": true
  1900. },
  1901. {
  1902. "name": "body",
  1903. "in": "body",
  1904. "required": true,
  1905. "schema": {
  1906. "$ref": "#/definitions/UpdateFileOptions"
  1907. }
  1908. }
  1909. ],
  1910. "responses": {
  1911. "200": {
  1912. "$ref": "#/responses/FileResponse"
  1913. }
  1914. }
  1915. },
  1916. "post": {
  1917. "consumes": [
  1918. "application/json"
  1919. ],
  1920. "produces": [
  1921. "application/json"
  1922. ],
  1923. "tags": [
  1924. "repository"
  1925. ],
  1926. "summary": "Create a file in a repository",
  1927. "operationId": "repoCreateFile",
  1928. "parameters": [
  1929. {
  1930. "type": "string",
  1931. "description": "owner of the repo",
  1932. "name": "owner",
  1933. "in": "path",
  1934. "required": true
  1935. },
  1936. {
  1937. "type": "string",
  1938. "description": "name of the repo",
  1939. "name": "repo",
  1940. "in": "path",
  1941. "required": true
  1942. },
  1943. {
  1944. "type": "string",
  1945. "description": "path of the file to create",
  1946. "name": "filepath",
  1947. "in": "path",
  1948. "required": true
  1949. },
  1950. {
  1951. "name": "body",
  1952. "in": "body",
  1953. "required": true,
  1954. "schema": {
  1955. "$ref": "#/definitions/CreateFileOptions"
  1956. }
  1957. }
  1958. ],
  1959. "responses": {
  1960. "201": {
  1961. "$ref": "#/responses/FileResponse"
  1962. }
  1963. }
  1964. },
  1965. "delete": {
  1966. "consumes": [
  1967. "application/json"
  1968. ],
  1969. "produces": [
  1970. "application/json"
  1971. ],
  1972. "tags": [
  1973. "repository"
  1974. ],
  1975. "summary": "Delete a file in a repository",
  1976. "operationId": "repoDeleteFile",
  1977. "parameters": [
  1978. {
  1979. "type": "string",
  1980. "description": "owner of the repo",
  1981. "name": "owner",
  1982. "in": "path",
  1983. "required": true
  1984. },
  1985. {
  1986. "type": "string",
  1987. "description": "name of the repo",
  1988. "name": "repo",
  1989. "in": "path",
  1990. "required": true
  1991. },
  1992. {
  1993. "type": "string",
  1994. "description": "path of the file to delete",
  1995. "name": "filepath",
  1996. "in": "path",
  1997. "required": true
  1998. },
  1999. {
  2000. "name": "body",
  2001. "in": "body",
  2002. "required": true,
  2003. "schema": {
  2004. "$ref": "#/definitions/DeleteFileOptions"
  2005. }
  2006. }
  2007. ],
  2008. "responses": {
  2009. "200": {
  2010. "$ref": "#/responses/FileDeleteResponse"
  2011. }
  2012. }
  2013. }
  2014. },
  2015. "/repos/{owner}/{repo}/editorconfig/{filepath}": {
  2016. "get": {
  2017. "produces": [
  2018. "application/json"
  2019. ],
  2020. "tags": [
  2021. "repository"
  2022. ],
  2023. "summary": "Get the EditorConfig definitions of a file in a repository",
  2024. "operationId": "repoGetEditorConfig",
  2025. "parameters": [
  2026. {
  2027. "type": "string",
  2028. "description": "owner of the repo",
  2029. "name": "owner",
  2030. "in": "path",
  2031. "required": true
  2032. },
  2033. {
  2034. "type": "string",
  2035. "description": "name of the repo",
  2036. "name": "repo",
  2037. "in": "path",
  2038. "required": true
  2039. },
  2040. {
  2041. "type": "string",
  2042. "description": "filepath of file to get",
  2043. "name": "filepath",
  2044. "in": "path",
  2045. "required": true
  2046. }
  2047. ],
  2048. "responses": {
  2049. "200": {
  2050. "description": "success"
  2051. }
  2052. }
  2053. }
  2054. },
  2055. "/repos/{owner}/{repo}/forks": {
  2056. "get": {
  2057. "produces": [
  2058. "application/json"
  2059. ],
  2060. "tags": [
  2061. "repository"
  2062. ],
  2063. "summary": "List a repository's forks",
  2064. "operationId": "listForks",
  2065. "parameters": [
  2066. {
  2067. "type": "string",
  2068. "description": "owner of the repo",
  2069. "name": "owner",
  2070. "in": "path",
  2071. "required": true
  2072. },
  2073. {
  2074. "type": "string",
  2075. "description": "name of the repo",
  2076. "name": "repo",
  2077. "in": "path",
  2078. "required": true
  2079. }
  2080. ],
  2081. "responses": {
  2082. "200": {
  2083. "$ref": "#/responses/RepositoryList"
  2084. }
  2085. }
  2086. },
  2087. "post": {
  2088. "produces": [
  2089. "application/json"
  2090. ],
  2091. "tags": [
  2092. "repository"
  2093. ],
  2094. "summary": "Fork a repository",
  2095. "operationId": "createFork",
  2096. "parameters": [
  2097. {
  2098. "type": "string",
  2099. "description": "owner of the repo to fork",
  2100. "name": "owner",
  2101. "in": "path",
  2102. "required": true
  2103. },
  2104. {
  2105. "type": "string",
  2106. "description": "name of the repo to fork",
  2107. "name": "repo",
  2108. "in": "path",
  2109. "required": true
  2110. },
  2111. {
  2112. "name": "body",
  2113. "in": "body",
  2114. "schema": {
  2115. "$ref": "#/definitions/CreateForkOption"
  2116. }
  2117. }
  2118. ],
  2119. "responses": {
  2120. "202": {
  2121. "$ref": "#/responses/Repository"
  2122. }
  2123. }
  2124. }
  2125. },
  2126. "/repos/{owner}/{repo}/git/blobs/{sha}": {
  2127. "get": {
  2128. "produces": [
  2129. "application/json"
  2130. ],
  2131. "tags": [
  2132. "repository"
  2133. ],
  2134. "summary": "Gets the blob of a repository.",
  2135. "operationId": "GetBlob",
  2136. "parameters": [
  2137. {
  2138. "type": "string",
  2139. "description": "owner of the repo",
  2140. "name": "owner",
  2141. "in": "path",
  2142. "required": true
  2143. },
  2144. {
  2145. "type": "string",
  2146. "description": "name of the repo",
  2147. "name": "repo",
  2148. "in": "path",
  2149. "required": true
  2150. },
  2151. {
  2152. "type": "string",
  2153. "description": "sha of the commit",
  2154. "name": "sha",
  2155. "in": "path",
  2156. "required": true
  2157. }
  2158. ],
  2159. "responses": {
  2160. "200": {
  2161. "$ref": "#/responses/GitBlobResponse"
  2162. }
  2163. }
  2164. }
  2165. },
  2166. "/repos/{owner}/{repo}/git/commits/{sha}": {
  2167. "get": {
  2168. "produces": [
  2169. "application/json"
  2170. ],
  2171. "tags": [
  2172. "repository"
  2173. ],
  2174. "summary": "Get a single commit from a repository",
  2175. "operationId": "repoGetSingleCommit",
  2176. "parameters": [
  2177. {
  2178. "type": "string",
  2179. "description": "owner of the repo",
  2180. "name": "owner",
  2181. "in": "path",
  2182. "required": true
  2183. },
  2184. {
  2185. "type": "string",
  2186. "description": "name of the repo",
  2187. "name": "repo",
  2188. "in": "path",
  2189. "required": true
  2190. },
  2191. {
  2192. "type": "string",
  2193. "description": "the commit hash",
  2194. "name": "sha",
  2195. "in": "path",
  2196. "required": true
  2197. }
  2198. ],
  2199. "responses": {
  2200. "200": {
  2201. "$ref": "#/responses/Commit"
  2202. },
  2203. "404": {
  2204. "$ref": "#/responses/notFound"
  2205. }
  2206. }
  2207. }
  2208. },
  2209. "/repos/{owner}/{repo}/git/refs": {
  2210. "get": {
  2211. "produces": [
  2212. "application/json"
  2213. ],
  2214. "tags": [
  2215. "repository"
  2216. ],
  2217. "summary": "Get specified ref or filtered repository's refs",
  2218. "operationId": "repoListAllGitRefs",
  2219. "parameters": [
  2220. {
  2221. "type": "string",
  2222. "description": "owner of the repo",
  2223. "name": "owner",
  2224. "in": "path",
  2225. "required": true
  2226. },
  2227. {
  2228. "type": "string",
  2229. "description": "name of the repo",
  2230. "name": "repo",
  2231. "in": "path",
  2232. "required": true
  2233. }
  2234. ],
  2235. "responses": {
  2236. "200": {
  2237. "$ref": "#/responses/ReferenceList"
  2238. },
  2239. "404": {
  2240. "$ref": "#/responses/notFound"
  2241. }
  2242. }
  2243. }
  2244. },
  2245. "/repos/{owner}/{repo}/git/refs/{ref}": {
  2246. "get": {
  2247. "produces": [
  2248. "application/json"
  2249. ],
  2250. "tags": [
  2251. "repository"
  2252. ],
  2253. "summary": "Get specified ref or filtered repository's refs",
  2254. "operationId": "repoListGitRefs",
  2255. "parameters": [
  2256. {
  2257. "type": "string",
  2258. "description": "owner of the repo",
  2259. "name": "owner",
  2260. "in": "path",
  2261. "required": true
  2262. },
  2263. {
  2264. "type": "string",
  2265. "description": "name of the repo",
  2266. "name": "repo",
  2267. "in": "path",
  2268. "required": true
  2269. },
  2270. {
  2271. "type": "string",
  2272. "description": "part or full name of the ref",
  2273. "name": "ref",
  2274. "in": "path",
  2275. "required": true
  2276. }
  2277. ],
  2278. "responses": {
  2279. "200": {
  2280. "$ref": "#/responses/ReferenceList"
  2281. },
  2282. "404": {
  2283. "$ref": "#/responses/notFound"
  2284. }
  2285. }
  2286. }
  2287. },
  2288. "/repos/{owner}/{repo}/git/tags/{sha}": {
  2289. "get": {
  2290. "produces": [
  2291. "application/json"
  2292. ],
  2293. "tags": [
  2294. "repository"
  2295. ],
  2296. "summary": "Gets the tag object of an annotated tag (not lightweight tags)",
  2297. "operationId": "GetTag",
  2298. "parameters": [
  2299. {
  2300. "type": "string",
  2301. "description": "owner of the repo",
  2302. "name": "owner",
  2303. "in": "path",
  2304. "required": true
  2305. },
  2306. {
  2307. "type": "string",
  2308. "description": "name of the repo",
  2309. "name": "repo",
  2310. "in": "path",
  2311. "required": true
  2312. },
  2313. {
  2314. "type": "string",
  2315. "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.",
  2316. "name": "sha",
  2317. "in": "path",
  2318. "required": true
  2319. }
  2320. ],
  2321. "responses": {
  2322. "200": {
  2323. "$ref": "#/responses/AnnotatedTag"
  2324. }
  2325. }
  2326. }
  2327. },
  2328. "/repos/{owner}/{repo}/git/trees/{sha}": {
  2329. "get": {
  2330. "produces": [
  2331. "application/json"
  2332. ],
  2333. "tags": [
  2334. "repository"
  2335. ],
  2336. "summary": "Gets the tree of a repository.",
  2337. "operationId": "GetTree",
  2338. "parameters": [
  2339. {
  2340. "type": "string",
  2341. "description": "owner of the repo",
  2342. "name": "owner",
  2343. "in": "path",
  2344. "required": true
  2345. },
  2346. {
  2347. "type": "string",
  2348. "description": "name of the repo",
  2349. "name": "repo",
  2350. "in": "path",
  2351. "required": true
  2352. },
  2353. {
  2354. "type": "string",
  2355. "description": "sha of the commit",
  2356. "name": "sha",
  2357. "in": "path",
  2358. "required": true
  2359. },
  2360. {
  2361. "type": "boolean",
  2362. "description": "show all directories and files",
  2363. "name": "recursive",
  2364. "in": "query"
  2365. },
  2366. {
  2367. "type": "integer",
  2368. "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",
  2369. "name": "page",
  2370. "in": "query"
  2371. },
  2372. {
  2373. "type": "integer",
  2374. "description": "number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE",
  2375. "name": "per_page",
  2376. "in": "query"
  2377. }
  2378. ],
  2379. "responses": {
  2380. "200": {
  2381. "$ref": "#/responses/GitTreeResponse"
  2382. }
  2383. }
  2384. }
  2385. },
  2386. "/repos/{owner}/{repo}/hooks": {
  2387. "get": {
  2388. "produces": [
  2389. "application/json"
  2390. ],
  2391. "tags": [
  2392. "repository"
  2393. ],
  2394. "summary": "List the hooks in a repository",
  2395. "operationId": "repoListHooks",
  2396. "parameters": [
  2397. {
  2398. "type": "string",
  2399. "description": "owner of the repo",
  2400. "name": "owner",
  2401. "in": "path",
  2402. "required": true
  2403. },
  2404. {
  2405. "type": "string",
  2406. "description": "name of the repo",
  2407. "name": "repo",
  2408. "in": "path",
  2409. "required": true
  2410. }
  2411. ],
  2412. "responses": {
  2413. "200": {
  2414. "$ref": "#/responses/HookList"
  2415. }
  2416. }
  2417. },
  2418. "post": {
  2419. "consumes": [
  2420. "application/json"
  2421. ],
  2422. "produces": [
  2423. "application/json"
  2424. ],
  2425. "tags": [
  2426. "repository"
  2427. ],
  2428. "summary": "Create a hook",
  2429. "operationId": "repoCreateHook",
  2430. "parameters": [
  2431. {
  2432. "type": "string",
  2433. "description": "owner of the repo",
  2434. "name": "owner",
  2435. "in": "path",
  2436. "required": true
  2437. },
  2438. {
  2439. "type": "string",
  2440. "description": "name of the repo",
  2441. "name": "repo",
  2442. "in": "path",
  2443. "required": true
  2444. },
  2445. {
  2446. "name": "body",
  2447. "in": "body",
  2448. "schema": {
  2449. "$ref": "#/definitions/CreateHookOption"
  2450. }
  2451. }
  2452. ],
  2453. "responses": {
  2454. "201": {
  2455. "$ref": "#/responses/Hook"
  2456. }
  2457. }
  2458. }
  2459. },
  2460. "/repos/{owner}/{repo}/hooks/git": {
  2461. "get": {
  2462. "produces": [
  2463. "application/json"
  2464. ],
  2465. "tags": [
  2466. "repository"
  2467. ],
  2468. "summary": "List the Git hooks in a repository",
  2469. "operationId": "repoListGitHooks",
  2470. "parameters": [
  2471. {
  2472. "type": "string",
  2473. "description": "owner of the repo",
  2474. "name": "owner",
  2475. "in": "path",
  2476. "required": true
  2477. },
  2478. {
  2479. "type": "string",
  2480. "description": "name of the repo",
  2481. "name": "repo",
  2482. "in": "path",
  2483. "required": true
  2484. }
  2485. ],
  2486. "responses": {
  2487. "200": {
  2488. "$ref": "#/responses/GitHookList"
  2489. }
  2490. }
  2491. }
  2492. },
  2493. "/repos/{owner}/{repo}/hooks/git/{id}": {
  2494. "get": {
  2495. "produces": [
  2496. "application/json"
  2497. ],
  2498. "tags": [
  2499. "repository"
  2500. ],
  2501. "summary": "Get a Git hook",
  2502. "operationId": "repoGetGitHook",
  2503. "parameters": [
  2504. {
  2505. "type": "string",
  2506. "description": "owner of the repo",
  2507. "name": "owner",
  2508. "in": "path",
  2509. "required": true
  2510. },
  2511. {
  2512. "type": "string",
  2513. "description": "name of the repo",
  2514. "name": "repo",
  2515. "in": "path",
  2516. "required": true
  2517. },
  2518. {
  2519. "type": "string",
  2520. "description": "id of the hook to get",
  2521. "name": "id",
  2522. "in": "path",
  2523. "required": true
  2524. }
  2525. ],
  2526. "responses": {
  2527. "200": {
  2528. "$ref": "#/responses/GitHook"
  2529. },
  2530. "404": {
  2531. "$ref": "#/responses/notFound"
  2532. }
  2533. }
  2534. },
  2535. "delete": {
  2536. "produces": [
  2537. "application/json"
  2538. ],
  2539. "tags": [
  2540. "repository"
  2541. ],
  2542. "summary": "Delete a Git hook in a repository",
  2543. "operationId": "repoDeleteGitHook",
  2544. "parameters": [
  2545. {
  2546. "type": "string",
  2547. "description": "owner of the repo",
  2548. "name": "owner",
  2549. "in": "path",
  2550. "required": true
  2551. },
  2552. {
  2553. "type": "string",
  2554. "description": "name of the repo",
  2555. "name": "repo",
  2556. "in": "path",
  2557. "required": true
  2558. },
  2559. {
  2560. "type": "string",
  2561. "description": "id of the hook to get",
  2562. "name": "id",
  2563. "in": "path",
  2564. "required": true
  2565. }
  2566. ],
  2567. "responses": {
  2568. "204": {
  2569. "$ref": "#/responses/empty"
  2570. },
  2571. "404": {
  2572. "$ref": "#/responses/notFound"
  2573. }
  2574. }
  2575. },
  2576. "patch": {
  2577. "produces": [
  2578. "application/json"
  2579. ],
  2580. "tags": [
  2581. "repository"
  2582. ],
  2583. "summary": "Edit a Git hook in a repository",
  2584. "operationId": "repoEditGitHook",
  2585. "parameters": [
  2586. {
  2587. "type": "string",
  2588. "description": "owner of the repo",
  2589. "name": "owner",
  2590. "in": "path",
  2591. "required": true
  2592. },
  2593. {
  2594. "type": "string",
  2595. "description": "name of the repo",
  2596. "name": "repo",
  2597. "in": "path",
  2598. "required": true
  2599. },
  2600. {
  2601. "type": "string",
  2602. "description": "id of the hook to get",
  2603. "name": "id",
  2604. "in": "path",
  2605. "required": true
  2606. },
  2607. {
  2608. "name": "body",
  2609. "in": "body",
  2610. "schema": {
  2611. "$ref": "#/definitions/EditGitHookOption"
  2612. }
  2613. }
  2614. ],
  2615. "responses": {
  2616. "200": {
  2617. "$ref": "#/responses/GitHook"
  2618. },
  2619. "404": {
  2620. "$ref": "#/responses/notFound"
  2621. }
  2622. }
  2623. }
  2624. },
  2625. "/repos/{owner}/{repo}/hooks/{id}": {
  2626. "get": {
  2627. "produces": [
  2628. "application/json"
  2629. ],
  2630. "tags": [
  2631. "repository"
  2632. ],
  2633. "summary": "Get a hook",
  2634. "operationId": "repoGetHook",
  2635. "parameters": [
  2636. {
  2637. "type": "string",
  2638. "description": "owner of the repo",
  2639. "name": "owner",
  2640. "in": "path",
  2641. "required": true
  2642. },
  2643. {
  2644. "type": "string",
  2645. "description": "name of the repo",
  2646. "name": "repo",
  2647. "in": "path",
  2648. "required": true
  2649. },
  2650. {
  2651. "type": "integer",
  2652. "format": "int64",
  2653. "description": "id of the hook to get",
  2654. "name": "id",
  2655. "in": "path",
  2656. "required": true
  2657. }
  2658. ],
  2659. "responses": {
  2660. "200": {
  2661. "$ref": "#/responses/Hook"
  2662. }
  2663. }
  2664. },
  2665. "delete": {
  2666. "produces": [
  2667. "application/json"
  2668. ],
  2669. "tags": [
  2670. "repository"
  2671. ],
  2672. "summary": "Delete a hook in a repository",
  2673. "operationId": "repoDeleteHook",
  2674. "parameters": [
  2675. {
  2676. "type": "string",
  2677. "description": "owner of the repo",
  2678. "name": "owner",
  2679. "in": "path",
  2680. "required": true
  2681. },
  2682. {
  2683. "type": "string",
  2684. "description": "name of the repo",
  2685. "name": "repo",
  2686. "in": "path",
  2687. "required": true
  2688. },
  2689. {
  2690. "type": "integer",
  2691. "format": "int64",
  2692. "description": "id of the hook to delete",
  2693. "name": "id",
  2694. "in": "path",
  2695. "required": true
  2696. }
  2697. ],
  2698. "responses": {
  2699. "204": {
  2700. "$ref": "#/responses/empty"
  2701. },
  2702. "404": {
  2703. "$ref": "#/responses/notFound"
  2704. }
  2705. }
  2706. },
  2707. "patch": {
  2708. "produces": [
  2709. "application/json"
  2710. ],
  2711. "tags": [
  2712. "repository"
  2713. ],
  2714. "summary": "Edit a hook in a repository",
  2715. "operationId": "repoEditHook",
  2716. "parameters": [
  2717. {
  2718. "type": "string",
  2719. "description": "owner of the repo",
  2720. "name": "owner",
  2721. "in": "path",
  2722. "required": true
  2723. },
  2724. {
  2725. "type": "string",
  2726. "description": "name of the repo",
  2727. "name": "repo",
  2728. "in": "path",
  2729. "required": true
  2730. },
  2731. {
  2732. "type": "integer",
  2733. "format": "int64",
  2734. "description": "index of the hook",
  2735. "name": "id",
  2736. "in": "path",
  2737. "required": true
  2738. },
  2739. {
  2740. "name": "body",
  2741. "in": "body",
  2742. "schema": {
  2743. "$ref": "#/definitions/EditHookOption"
  2744. }
  2745. }
  2746. ],
  2747. "responses": {
  2748. "200": {
  2749. "$ref": "#/responses/Hook"
  2750. }
  2751. }
  2752. }
  2753. },
  2754. "/repos/{owner}/{repo}/hooks/{id}/tests": {
  2755. "post": {
  2756. "produces": [
  2757. "application/json"
  2758. ],
  2759. "tags": [
  2760. "repository"
  2761. ],
  2762. "summary": "Test a push webhook",
  2763. "operationId": "repoTestHook",
  2764. "parameters": [
  2765. {
  2766. "type": "string",
  2767. "description": "owner of the repo",
  2768. "name": "owner",
  2769. "in": "path",
  2770. "required": true
  2771. },
  2772. {
  2773. "type": "string",
  2774. "description": "name of the repo",
  2775. "name": "repo",
  2776. "in": "path",
  2777. "required": true
  2778. },
  2779. {
  2780. "type": "integer",
  2781. "format": "int64",
  2782. "description": "id of the hook to test",
  2783. "name": "id",
  2784. "in": "path",
  2785. "required": true
  2786. }
  2787. ],
  2788. "responses": {
  2789. "204": {
  2790. "$ref": "#/responses/empty"
  2791. }
  2792. }
  2793. }
  2794. },
  2795. "/repos/{owner}/{repo}/issues": {
  2796. "get": {
  2797. "produces": [
  2798. "application/json"
  2799. ],
  2800. "tags": [
  2801. "issue"
  2802. ],
  2803. "summary": "List a repository's issues",
  2804. "operationId": "issueListIssues",
  2805. "parameters": [
  2806. {
  2807. "type": "string",
  2808. "description": "owner of the repo",
  2809. "name": "owner",
  2810. "in": "path",
  2811. "required": true
  2812. },
  2813. {
  2814. "type": "string",
  2815. "description": "name of the repo",
  2816. "name": "repo",
  2817. "in": "path",
  2818. "required": true
  2819. },
  2820. {
  2821. "type": "string",
  2822. "description": "whether issue is open or closed",
  2823. "name": "state",
  2824. "in": "query"
  2825. },
  2826. {
  2827. "type": "string",
  2828. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  2829. "name": "labels",
  2830. "in": "query"
  2831. },
  2832. {
  2833. "type": "integer",
  2834. "description": "page number of requested issues",
  2835. "name": "page",
  2836. "in": "query"
  2837. },
  2838. {
  2839. "type": "string",
  2840. "description": "search string",
  2841. "name": "q",
  2842. "in": "query"
  2843. }
  2844. ],
  2845. "responses": {
  2846. "200": {
  2847. "$ref": "#/responses/IssueList"
  2848. }
  2849. }
  2850. },
  2851. "post": {
  2852. "consumes": [
  2853. "application/json"
  2854. ],
  2855. "produces": [
  2856. "application/json"
  2857. ],
  2858. "tags": [
  2859. "issue"
  2860. ],
  2861. "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  2862. "operationId": "issueCreateIssue",
  2863. "parameters": [
  2864. {
  2865. "type": "string",
  2866. "description": "owner of the repo",
  2867. "name": "owner",
  2868. "in": "path",
  2869. "required": true
  2870. },
  2871. {
  2872. "type": "string",
  2873. "description": "name of the repo",
  2874. "name": "repo",
  2875. "in": "path",
  2876. "required": true
  2877. },
  2878. {
  2879. "name": "body",
  2880. "in": "body",
  2881. "schema": {
  2882. "$ref": "#/definitions/CreateIssueOption"
  2883. }
  2884. }
  2885. ],
  2886. "responses": {
  2887. "201": {
  2888. "$ref": "#/responses/Issue"
  2889. }
  2890. }
  2891. }
  2892. },
  2893. "/repos/{owner}/{repo}/issues/comments": {
  2894. "get": {
  2895. "produces": [
  2896. "application/json"
  2897. ],
  2898. "tags": [
  2899. "issue"
  2900. ],
  2901. "summary": "List all comments in a repository",
  2902. "operationId": "issueGetRepoComments",
  2903. "parameters": [
  2904. {
  2905. "type": "string",
  2906. "description": "owner of the repo",
  2907. "name": "owner",
  2908. "in": "path",
  2909. "required": true
  2910. },
  2911. {
  2912. "type": "string",
  2913. "description": "name of the repo",
  2914. "name": "repo",
  2915. "in": "path",
  2916. "required": true
  2917. },
  2918. {
  2919. "type": "string",
  2920. "description": "if provided, only comments updated since the provided time are returned.",
  2921. "name": "since",
  2922. "in": "query"
  2923. }
  2924. ],
  2925. "responses": {
  2926. "200": {
  2927. "$ref": "#/responses/CommentList"
  2928. }
  2929. }
  2930. }
  2931. },
  2932. "/repos/{owner}/{repo}/issues/comments/{id}": {
  2933. "delete": {
  2934. "tags": [
  2935. "issue"
  2936. ],
  2937. "summary": "Delete a comment",
  2938. "operationId": "issueDeleteComment",
  2939. "parameters": [
  2940. {
  2941. "type": "string",
  2942. "description": "owner of the repo",
  2943. "name": "owner",
  2944. "in": "path",
  2945. "required": true
  2946. },
  2947. {
  2948. "type": "string",
  2949. "description": "name of the repo",
  2950. "name": "repo",
  2951. "in": "path",
  2952. "required": true
  2953. },
  2954. {
  2955. "type": "integer",
  2956. "format": "int64",
  2957. "description": "id of comment to delete",
  2958. "name": "id",
  2959. "in": "path",
  2960. "required": true
  2961. }
  2962. ],
  2963. "responses": {
  2964. "204": {
  2965. "$ref": "#/responses/empty"
  2966. }
  2967. }
  2968. },
  2969. "patch": {
  2970. "consumes": [
  2971. "application/json"
  2972. ],
  2973. "produces": [
  2974. "application/json"
  2975. ],
  2976. "tags": [
  2977. "issue"
  2978. ],
  2979. "summary": "Edit a comment",
  2980. "operationId": "issueEditComment",
  2981. "parameters": [
  2982. {
  2983. "type": "string",
  2984. "description": "owner of the repo",
  2985. "name": "owner",
  2986. "in": "path",
  2987. "required": true
  2988. },
  2989. {
  2990. "type": "string",
  2991. "description": "name of the repo",
  2992. "name": "repo",
  2993. "in": "path",
  2994. "required": true
  2995. },
  2996. {
  2997. "type": "integer",
  2998. "format": "int64",
  2999. "description": "id of the comment to edit",
  3000. "name": "id",
  3001. "in": "path",
  3002. "required": true
  3003. },
  3004. {
  3005. "name": "body",
  3006. "in": "body",
  3007. "schema": {
  3008. "$ref": "#/definitions/EditIssueCommentOption"
  3009. }
  3010. }
  3011. ],
  3012. "responses": {
  3013. "200": {
  3014. "$ref": "#/responses/Comment"
  3015. }
  3016. }
  3017. }
  3018. },
  3019. "/repos/{owner}/{repo}/issues/{id}/times": {
  3020. "get": {
  3021. "produces": [
  3022. "application/json"
  3023. ],
  3024. "tags": [
  3025. "issue"
  3026. ],
  3027. "summary": "List an issue's tracked times",
  3028. "operationId": "issueTrackedTimes",
  3029. "parameters": [
  3030. {
  3031. "type": "string",
  3032. "description": "owner of the repo",
  3033. "name": "owner",
  3034. "in": "path",
  3035. "required": true
  3036. },
  3037. {
  3038. "type": "string",
  3039. "description": "name of the repo",
  3040. "name": "repo",
  3041. "in": "path",
  3042. "required": true
  3043. },
  3044. {
  3045. "type": "integer",
  3046. "format": "int64",
  3047. "description": "index of the issue",
  3048. "name": "id",
  3049. "in": "path",
  3050. "required": true
  3051. }
  3052. ],
  3053. "responses": {
  3054. "200": {
  3055. "$ref": "#/responses/TrackedTimeList"
  3056. }
  3057. }
  3058. },
  3059. "post": {
  3060. "consumes": [
  3061. "application/json"
  3062. ],
  3063. "produces": [
  3064. "application/json"
  3065. ],
  3066. "tags": [
  3067. "issue"
  3068. ],
  3069. "summary": "Add a tracked time to a issue",
  3070. "operationId": "issueAddTime",
  3071. "parameters": [
  3072. {
  3073. "type": "string",
  3074. "description": "owner of the repo",
  3075. "name": "owner",
  3076. "in": "path",
  3077. "required": true
  3078. },
  3079. {
  3080. "type": "string",
  3081. "description": "name of the repo",
  3082. "name": "repo",
  3083. "in": "path",
  3084. "required": true
  3085. },
  3086. {
  3087. "type": "integer",
  3088. "format": "int64",
  3089. "description": "index of the issue to add tracked time to",
  3090. "name": "id",
  3091. "in": "path",
  3092. "required": true
  3093. },
  3094. {
  3095. "name": "body",
  3096. "in": "body",
  3097. "schema": {
  3098. "$ref": "#/definitions/AddTimeOption"
  3099. }
  3100. }
  3101. ],
  3102. "responses": {
  3103. "200": {
  3104. "$ref": "#/responses/TrackedTime"
  3105. },
  3106. "400": {
  3107. "$ref": "#/responses/error"
  3108. },
  3109. "403": {
  3110. "$ref": "#/responses/error"
  3111. }
  3112. }
  3113. }
  3114. },
  3115. "/repos/{owner}/{repo}/issues/{index}": {
  3116. "get": {
  3117. "produces": [
  3118. "application/json"
  3119. ],
  3120. "tags": [
  3121. "issue"
  3122. ],
  3123. "summary": "Get an issue",
  3124. "operationId": "issueGetIssue",
  3125. "parameters": [
  3126. {
  3127. "type": "string",
  3128. "description": "owner of the repo",
  3129. "name": "owner",
  3130. "in": "path",
  3131. "required": true
  3132. },
  3133. {
  3134. "type": "string",
  3135. "description": "name of the repo",
  3136. "name": "repo",
  3137. "in": "path",
  3138. "required": true
  3139. },
  3140. {
  3141. "type": "integer",
  3142. "format": "int64",
  3143. "description": "index of the issue to get",
  3144. "name": "index",
  3145. "in": "path",
  3146. "required": true
  3147. }
  3148. ],
  3149. "responses": {
  3150. "200": {
  3151. "$ref": "#/responses/Issue"
  3152. }
  3153. }
  3154. },
  3155. "patch": {
  3156. "consumes": [
  3157. "application/json"
  3158. ],
  3159. "produces": [
  3160. "application/json"
  3161. ],
  3162. "tags": [
  3163. "issue"
  3164. ],
  3165. "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  3166. "operationId": "issueEditIssue",
  3167. "parameters": [
  3168. {
  3169. "type": "string",
  3170. "description": "owner of the repo",
  3171. "name": "owner",
  3172. "in": "path",
  3173. "required": true
  3174. },
  3175. {
  3176. "type": "string",
  3177. "description": "name of the repo",
  3178. "name": "repo",
  3179. "in": "path",
  3180. "required": true
  3181. },
  3182. {
  3183. "type": "integer",
  3184. "format": "int64",
  3185. "description": "index of the issue to edit",
  3186. "name": "index",
  3187. "in": "path",
  3188. "required": true
  3189. },
  3190. {
  3191. "name": "body",
  3192. "in": "body",
  3193. "schema": {
  3194. "$ref": "#/definitions/EditIssueOption"
  3195. }
  3196. }
  3197. ],
  3198. "responses": {
  3199. "201": {
  3200. "$ref": "#/responses/Issue"
  3201. }
  3202. }
  3203. }
  3204. },
  3205. "/repos/{owner}/{repo}/issues/{index}/comments": {
  3206. "get": {
  3207. "produces": [
  3208. "application/json"
  3209. ],
  3210. "tags": [
  3211. "issue"
  3212. ],
  3213. "summary": "List all comments on an issue",
  3214. "operationId": "issueGetComments",
  3215. "parameters": [
  3216. {
  3217. "type": "string",
  3218. "description": "owner of the repo",
  3219. "name": "owner",
  3220. "in": "path",
  3221. "required": true
  3222. },
  3223. {
  3224. "type": "string",
  3225. "description": "name of the repo",
  3226. "name": "repo",
  3227. "in": "path",
  3228. "required": true
  3229. },
  3230. {
  3231. "type": "integer",
  3232. "format": "int64",
  3233. "description": "index of the issue",
  3234. "name": "index",
  3235. "in": "path",
  3236. "required": true
  3237. },
  3238. {
  3239. "type": "string",
  3240. "description": "if provided, only comments updated since the specified time are returned.",
  3241. "name": "since",
  3242. "in": "query"
  3243. }
  3244. ],
  3245. "responses": {
  3246. "200": {
  3247. "$ref": "#/responses/CommentList"
  3248. }
  3249. }
  3250. },
  3251. "post": {
  3252. "consumes": [
  3253. "application/json"
  3254. ],
  3255. "produces": [
  3256. "application/json"
  3257. ],
  3258. "tags": [
  3259. "issue"
  3260. ],
  3261. "summary": "Add a comment to an issue",
  3262. "operationId": "issueCreateComment",
  3263. "parameters": [
  3264. {
  3265. "type": "string",
  3266. "description": "owner of the repo",
  3267. "name": "owner",
  3268. "in": "path",
  3269. "required": true
  3270. },
  3271. {
  3272. "type": "string",
  3273. "description": "name of the repo",
  3274. "name": "repo",
  3275. "in": "path",
  3276. "required": true
  3277. },
  3278. {
  3279. "type": "integer",
  3280. "format": "int64",
  3281. "description": "index of the issue",
  3282. "name": "index",
  3283. "in": "path",
  3284. "required": true
  3285. },
  3286. {
  3287. "name": "body",
  3288. "in": "body",
  3289. "schema": {
  3290. "$ref": "#/definitions/CreateIssueCommentOption"
  3291. }
  3292. }
  3293. ],
  3294. "responses": {
  3295. "201": {
  3296. "$ref": "#/responses/Comment"
  3297. }
  3298. }
  3299. }
  3300. },
  3301. "/repos/{owner}/{repo}/issues/{index}/comments/{id}": {
  3302. "delete": {
  3303. "tags": [
  3304. "issue"
  3305. ],
  3306. "summary": "Delete a comment",
  3307. "operationId": "issueDeleteCommentDeprecated",
  3308. "deprecated": true,
  3309. "parameters": [
  3310. {
  3311. "type": "string",
  3312. "description": "owner of the repo",
  3313. "name": "owner",
  3314. "in": "path",
  3315. "required": true
  3316. },
  3317. {
  3318. "type": "string",
  3319. "description": "name of the repo",
  3320. "name": "repo",
  3321. "in": "path",
  3322. "required": true
  3323. },
  3324. {
  3325. "type": "integer",
  3326. "description": "this parameter is ignored",
  3327. "name": "index",
  3328. "in": "path",
  3329. "required": true
  3330. },
  3331. {
  3332. "type": "integer",
  3333. "format": "int64",
  3334. "description": "id of comment to delete",
  3335. "name": "id",
  3336. "in": "path",
  3337. "required": true
  3338. }
  3339. ],
  3340. "responses": {
  3341. "204": {
  3342. "$ref": "#/responses/empty"
  3343. }
  3344. }
  3345. },
  3346. "patch": {
  3347. "consumes": [
  3348. "application/json"
  3349. ],
  3350. "produces": [
  3351. "application/json"
  3352. ],
  3353. "tags": [
  3354. "issue"
  3355. ],
  3356. "summary": "Edit a comment",
  3357. "operationId": "issueEditCommentDeprecated",
  3358. "deprecated": true,
  3359. "parameters": [
  3360. {
  3361. "type": "string",
  3362. "description": "owner of the repo",
  3363. "name": "owner",
  3364. "in": "path",
  3365. "required": true
  3366. },
  3367. {
  3368. "type": "string",
  3369. "description": "name of the repo",
  3370. "name": "repo",
  3371. "in": "path",
  3372. "required": true
  3373. },
  3374. {
  3375. "type": "integer",
  3376. "description": "this parameter is ignored",
  3377. "name": "index",
  3378. "in": "path",
  3379. "required": true
  3380. },
  3381. {
  3382. "type": "integer",
  3383. "format": "int64",
  3384. "description": "id of the comment to edit",
  3385. "name": "id",
  3386. "in": "path",
  3387. "required": true
  3388. },
  3389. {
  3390. "name": "body",
  3391. "in": "body",
  3392. "schema": {
  3393. "$ref": "#/definitions/EditIssueCommentOption"
  3394. }
  3395. }
  3396. ],
  3397. "responses": {
  3398. "200": {
  3399. "$ref": "#/responses/Comment"
  3400. }
  3401. }
  3402. }
  3403. },
  3404. "/repos/{owner}/{repo}/issues/{index}/deadline": {
  3405. "post": {
  3406. "consumes": [
  3407. "application/json"
  3408. ],
  3409. "produces": [
  3410. "application/json"
  3411. ],
  3412. "tags": [
  3413. "issue"
  3414. ],
  3415. "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.",
  3416. "operationId": "issueEditIssueDeadline",
  3417. "parameters": [
  3418. {
  3419. "type": "string",
  3420. "description": "owner of the repo",
  3421. "name": "owner",
  3422. "in": "path",
  3423. "required": true
  3424. },
  3425. {
  3426. "type": "string",
  3427. "description": "name of the repo",
  3428. "name": "repo",
  3429. "in": "path",
  3430. "required": true
  3431. },
  3432. {
  3433. "type": "integer",
  3434. "format": "int64",
  3435. "description": "index of the issue to create or update a deadline on",
  3436. "name": "index",
  3437. "in": "path",
  3438. "required": true
  3439. },
  3440. {
  3441. "name": "body",
  3442. "in": "body",
  3443. "schema": {
  3444. "$ref": "#/definitions/EditDeadlineOption"
  3445. }
  3446. }
  3447. ],
  3448. "responses": {
  3449. "201": {
  3450. "$ref": "#/responses/IssueDeadline"
  3451. },
  3452. "403": {
  3453. "description": "Not repo writer"
  3454. },
  3455. "404": {
  3456. "description": "Issue not found"
  3457. }
  3458. }
  3459. }
  3460. },
  3461. "/repos/{owner}/{repo}/issues/{index}/labels": {
  3462. "get": {
  3463. "produces": [
  3464. "application/json"
  3465. ],
  3466. "tags": [
  3467. "issue"
  3468. ],
  3469. "summary": "Get an issue's labels",
  3470. "operationId": "issueGetLabels",
  3471. "parameters": [
  3472. {
  3473. "type": "string",
  3474. "description": "owner of the repo",
  3475. "name": "owner",
  3476. "in": "path",
  3477. "required": true
  3478. },
  3479. {
  3480. "type": "string",
  3481. "description": "name of the repo",
  3482. "name": "repo",
  3483. "in": "path",
  3484. "required": true
  3485. },
  3486. {
  3487. "type": "integer",
  3488. "format": "int64",
  3489. "description": "index of the issue",
  3490. "name": "index",
  3491. "in": "path",
  3492. "required": true
  3493. }
  3494. ],
  3495. "responses": {
  3496. "200": {
  3497. "$ref": "#/responses/LabelList"
  3498. },
  3499. "404": {
  3500. "$ref": "#/responses/notFound"
  3501. }
  3502. }
  3503. },
  3504. "put": {
  3505. "consumes": [
  3506. "application/json"
  3507. ],
  3508. "produces": [
  3509. "application/json"
  3510. ],
  3511. "tags": [
  3512. "issue"
  3513. ],
  3514. "summary": "Replace an issue's labels",
  3515. "operationId": "issueReplaceLabels",
  3516. "parameters": [
  3517. {
  3518. "type": "string",
  3519. "description": "owner of the repo",
  3520. "name": "owner",
  3521. "in": "path",
  3522. "required": true
  3523. },
  3524. {
  3525. "type": "string",
  3526. "description": "name of the repo",
  3527. "name": "repo",
  3528. "in": "path",
  3529. "required": true
  3530. },
  3531. {
  3532. "type": "integer",
  3533. "format": "int64",
  3534. "description": "index of the issue",
  3535. "name": "index",
  3536. "in": "path",
  3537. "required": true
  3538. },
  3539. {
  3540. "name": "body",
  3541. "in": "body",
  3542. "schema": {
  3543. "$ref": "#/definitions/IssueLabelsOption"
  3544. }
  3545. }
  3546. ],
  3547. "responses": {
  3548. "200": {
  3549. "$ref": "#/responses/LabelList"
  3550. }
  3551. }
  3552. },
  3553. "post": {
  3554. "consumes": [
  3555. "application/json"
  3556. ],
  3557. "produces": [
  3558. "application/json"
  3559. ],
  3560. "tags": [
  3561. "issue"
  3562. ],
  3563. "summary": "Add a label to an issue",
  3564. "operationId": "issueAddLabel",
  3565. "parameters": [
  3566. {
  3567. "type": "string",
  3568. "description": "owner of the repo",
  3569. "name": "owner",
  3570. "in": "path",
  3571. "required": true
  3572. },
  3573. {
  3574. "type": "string",
  3575. "description": "name of the repo",
  3576. "name": "repo",
  3577. "in": "path",
  3578. "required": true
  3579. },
  3580. {
  3581. "type": "integer",
  3582. "format": "int64",
  3583. "description": "index of the issue",
  3584. "name": "index",
  3585. "in": "path",
  3586. "required": true
  3587. },
  3588. {
  3589. "name": "body",
  3590. "in": "body",
  3591. "schema": {
  3592. "$ref": "#/definitions/IssueLabelsOption"
  3593. }
  3594. }
  3595. ],
  3596. "responses": {
  3597. "200": {
  3598. "$ref": "#/responses/LabelList"
  3599. }
  3600. }
  3601. },
  3602. "delete": {
  3603. "produces": [
  3604. "application/json"
  3605. ],
  3606. "tags": [
  3607. "issue"
  3608. ],
  3609. "summary": "Remove all labels from an issue",
  3610. "operationId": "issueClearLabels",
  3611. "parameters": [
  3612. {
  3613. "type": "string",
  3614. "description": "owner of the repo",
  3615. "name": "owner",
  3616. "in": "path",
  3617. "required": true
  3618. },
  3619. {
  3620. "type": "string",
  3621. "description": "name of the repo",
  3622. "name": "repo",
  3623. "in": "path",
  3624. "required": true
  3625. },
  3626. {
  3627. "type": "integer",
  3628. "format": "int64",
  3629. "description": "index of the issue",
  3630. "name": "index",
  3631. "in": "path",
  3632. "required": true
  3633. }
  3634. ],
  3635. "responses": {
  3636. "204": {
  3637. "$ref": "#/responses/empty"
  3638. }
  3639. }
  3640. }
  3641. },
  3642. "/repos/{owner}/{repo}/issues/{index}/labels/{id}": {
  3643. "delete": {
  3644. "produces": [
  3645. "application/json"
  3646. ],
  3647. "tags": [
  3648. "issue"
  3649. ],
  3650. "summary": "Remove a label from an issue",
  3651. "operationId": "issueRemoveLabel",
  3652. "parameters": [
  3653. {
  3654. "type": "string",
  3655. "description": "owner of the repo",
  3656. "name": "owner",
  3657. "in": "path",
  3658. "required": true
  3659. },
  3660. {
  3661. "type": "string",
  3662. "description": "name of the repo",
  3663. "name": "repo",
  3664. "in": "path",
  3665. "required": true
  3666. },
  3667. {
  3668. "type": "integer",
  3669. "format": "int64",
  3670. "description": "index of the issue",
  3671. "name": "index",
  3672. "in": "path",
  3673. "required": true
  3674. },
  3675. {
  3676. "type": "integer",
  3677. "format": "int64",
  3678. "description": "id of the label to remove",
  3679. "name": "id",
  3680. "in": "path",
  3681. "required": true
  3682. }
  3683. ],
  3684. "responses": {
  3685. "204": {
  3686. "$ref": "#/responses/empty"
  3687. }
  3688. }
  3689. }
  3690. },
  3691. "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": {
  3692. "post": {
  3693. "consumes": [
  3694. "application/json"
  3695. ],
  3696. "produces": [
  3697. "application/json"
  3698. ],
  3699. "tags": [
  3700. "issue"
  3701. ],
  3702. "summary": "Start stopwatch on an issue.",
  3703. "operationId": "issueStartStopWatch",
  3704. "parameters": [
  3705. {
  3706. "type": "string",
  3707. "description": "owner of the repo",
  3708. "name": "owner",
  3709. "in": "path",
  3710. "required": true
  3711. },
  3712. {
  3713. "type": "string",
  3714. "description": "name of the repo",
  3715. "name": "repo",
  3716. "in": "path",
  3717. "required": true
  3718. },
  3719. {
  3720. "type": "integer",
  3721. "format": "int64",
  3722. "description": "index of the issue to create the stopwatch on",
  3723. "name": "index",
  3724. "in": "path",
  3725. "required": true
  3726. }
  3727. ],
  3728. "responses": {
  3729. "201": {
  3730. "$ref": "#/responses/empty"
  3731. },
  3732. "403": {
  3733. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  3734. },
  3735. "404": {
  3736. "description": "Issue not found"
  3737. },
  3738. "409": {
  3739. "description": "Cannot start a stopwatch again if it already exists"
  3740. }
  3741. }
  3742. }
  3743. },
  3744. "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": {
  3745. "post": {
  3746. "consumes": [
  3747. "application/json"
  3748. ],
  3749. "produces": [
  3750. "application/json"
  3751. ],
  3752. "tags": [
  3753. "issue"
  3754. ],
  3755. "summary": "Stop an issue's existing stopwatch.",
  3756. "operationId": "issueStopWatch",
  3757. "parameters": [
  3758. {
  3759. "type": "string",
  3760. "description": "owner of the repo",
  3761. "name": "owner",
  3762. "in": "path",
  3763. "required": true
  3764. },
  3765. {
  3766. "type": "string",
  3767. "description": "name of the repo",
  3768. "name": "repo",
  3769. "in": "path",
  3770. "required": true
  3771. },
  3772. {
  3773. "type": "integer",
  3774. "format": "int64",
  3775. "description": "index of the issue to stop the stopwatch on",
  3776. "name": "index",
  3777. "in": "path",
  3778. "required": true
  3779. }
  3780. ],
  3781. "responses": {
  3782. "201": {
  3783. "$ref": "#/responses/empty"
  3784. },
  3785. "403": {
  3786. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  3787. },
  3788. "404": {
  3789. "description": "Issue not found"
  3790. },
  3791. "409": {
  3792. "description": "Cannot stop a non existent stopwatch"
  3793. }
  3794. }
  3795. }
  3796. },
  3797. "/repos/{owner}/{repo}/issues/{index}/subscriptions": {
  3798. "get": {
  3799. "consumes": [
  3800. "application/json"
  3801. ],
  3802. "produces": [
  3803. "application/json"
  3804. ],
  3805. "tags": [
  3806. "issue"
  3807. ],
  3808. "summary": "Get users who subscribed on an issue.",
  3809. "operationId": "issueSubscriptions",
  3810. "parameters": [
  3811. {
  3812. "type": "string",
  3813. "description": "owner of the repo",
  3814. "name": "owner",
  3815. "in": "path",
  3816. "required": true
  3817. },
  3818. {
  3819. "type": "string",
  3820. "description": "name of the repo",
  3821. "name": "repo",
  3822. "in": "path",
  3823. "required": true
  3824. },
  3825. {
  3826. "type": "integer",
  3827. "format": "int64",
  3828. "description": "index of the issue",
  3829. "name": "index",
  3830. "in": "path",
  3831. "required": true
  3832. }
  3833. ],
  3834. "responses": {
  3835. "201": {
  3836. "$ref": "#/responses/empty"
  3837. },
  3838. "404": {
  3839. "description": "Issue not found"
  3840. }
  3841. }
  3842. }
  3843. },
  3844. "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}": {
  3845. "put": {
  3846. "consumes": [
  3847. "application/json"
  3848. ],
  3849. "produces": [
  3850. "application/json"
  3851. ],
  3852. "tags": [
  3853. "issue"
  3854. ],
  3855. "summary": "Subscribe user to issue",
  3856. "operationId": "issueAddSubscription",
  3857. "parameters": [
  3858. {
  3859. "type": "string",
  3860. "description": "owner of the repo",
  3861. "name": "owner",
  3862. "in": "path",
  3863. "required": true
  3864. },
  3865. {
  3866. "type": "string",
  3867. "description": "name of the repo",
  3868. "name": "repo",
  3869. "in": "path",
  3870. "required": true
  3871. },
  3872. {
  3873. "type": "integer",
  3874. "format": "int64",
  3875. "description": "index of the issue",
  3876. "name": "index",
  3877. "in": "path",
  3878. "required": true
  3879. },
  3880. {
  3881. "type": "string",
  3882. "description": "user to subscribe",
  3883. "name": "user",
  3884. "in": "path",
  3885. "required": true
  3886. }
  3887. ],
  3888. "responses": {
  3889. "201": {
  3890. "$ref": "#/responses/empty"
  3891. },
  3892. "304": {
  3893. "description": "User can only subscribe itself if he is no admin"
  3894. },
  3895. "404": {
  3896. "description": "Issue not found"
  3897. }
  3898. }
  3899. },
  3900. "delete": {
  3901. "consumes": [
  3902. "application/json"
  3903. ],
  3904. "produces": [
  3905. "application/json"
  3906. ],
  3907. "tags": [
  3908. "issue"
  3909. ],
  3910. "summary": "Unsubscribe user from issue",
  3911. "operationId": "issueDeleteSubscription",
  3912. "parameters": [
  3913. {
  3914. "type": "string",
  3915. "description": "owner of the repo",
  3916. "name": "owner",
  3917. "in": "path",
  3918. "required": true
  3919. },
  3920. {
  3921. "type": "string",
  3922. "description": "name of the repo",
  3923. "name": "repo",
  3924. "in": "path",
  3925. "required": true
  3926. },
  3927. {
  3928. "type": "integer",
  3929. "format": "int64",
  3930. "description": "index of the issue",
  3931. "name": "index",
  3932. "in": "path",
  3933. "required": true
  3934. },
  3935. {
  3936. "type": "string",
  3937. "description": "user witch unsubscribe",
  3938. "name": "user",
  3939. "in": "path",
  3940. "required": true
  3941. }
  3942. ],
  3943. "responses": {
  3944. "201": {
  3945. "$ref": "#/responses/empty"
  3946. },
  3947. "304": {
  3948. "description": "User can only subscribe itself if he is no admin"
  3949. },
  3950. "404": {
  3951. "description": "Issue not found"
  3952. }
  3953. }
  3954. }
  3955. },
  3956. "/repos/{owner}/{repo}/keys": {
  3957. "get": {
  3958. "produces": [
  3959. "application/json"
  3960. ],
  3961. "tags": [
  3962. "repository"
  3963. ],
  3964. "summary": "List a repository's keys",
  3965. "operationId": "repoListKeys",
  3966. "parameters": [
  3967. {
  3968. "type": "string",
  3969. "description": "owner of the repo",
  3970. "name": "owner",
  3971. "in": "path",
  3972. "required": true
  3973. },
  3974. {
  3975. "type": "string",
  3976. "description": "name of the repo",
  3977. "name": "repo",
  3978. "in": "path",
  3979. "required": true
  3980. },
  3981. {
  3982. "type": "integer",
  3983. "description": "the key_id to search for",
  3984. "name": "key_id",
  3985. "in": "query"
  3986. },
  3987. {
  3988. "type": "string",
  3989. "description": "fingerprint of the key",
  3990. "name": "fingerprint",
  3991. "in": "query"
  3992. }
  3993. ],
  3994. "responses": {
  3995. "200": {
  3996. "$ref": "#/responses/DeployKeyList"
  3997. }
  3998. }
  3999. },
  4000. "post": {
  4001. "consumes": [
  4002. "application/json"
  4003. ],
  4004. "produces": [
  4005. "application/json"
  4006. ],
  4007. "tags": [
  4008. "repository"
  4009. ],
  4010. "summary": "Add a key to a repository",
  4011. "operationId": "repoCreateKey",
  4012. "parameters": [
  4013. {
  4014. "type": "string",
  4015. "description": "owner of the repo",
  4016. "name": "owner",
  4017. "in": "path",
  4018. "required": true
  4019. },
  4020. {
  4021. "type": "string",
  4022. "description": "name of the repo",
  4023. "name": "repo",
  4024. "in": "path",
  4025. "required": true
  4026. },
  4027. {
  4028. "name": "body",
  4029. "in": "body",
  4030. "schema": {
  4031. "$ref": "#/definitions/CreateKeyOption"
  4032. }
  4033. }
  4034. ],
  4035. "responses": {
  4036. "201": {
  4037. "$ref": "#/responses/DeployKey"
  4038. }
  4039. }
  4040. }
  4041. },
  4042. "/repos/{owner}/{repo}/keys/{id}": {
  4043. "get": {
  4044. "produces": [
  4045. "application/json"
  4046. ],
  4047. "tags": [
  4048. "repository"
  4049. ],
  4050. "summary": "Get a repository's key by id",
  4051. "operationId": "repoGetKey",
  4052. "parameters": [
  4053. {
  4054. "type": "string",
  4055. "description": "owner of the repo",
  4056. "name": "owner",
  4057. "in": "path",
  4058. "required": true
  4059. },
  4060. {
  4061. "type": "string",
  4062. "description": "name of the repo",
  4063. "name": "repo",
  4064. "in": "path",
  4065. "required": true
  4066. },
  4067. {
  4068. "type": "integer",
  4069. "format": "int64",
  4070. "description": "id of the key to get",
  4071. "name": "id",
  4072. "in": "path",
  4073. "required": true
  4074. }
  4075. ],
  4076. "responses": {
  4077. "200": {
  4078. "$ref": "#/responses/DeployKey"
  4079. }
  4080. }
  4081. },
  4082. "delete": {
  4083. "tags": [
  4084. "repository"
  4085. ],
  4086. "summary": "Delete a key from a repository",
  4087. "operationId": "repoDeleteKey",
  4088. "parameters": [
  4089. {
  4090. "type": "string",
  4091. "description": "owner of the repo",
  4092. "name": "owner",
  4093. "in": "path",
  4094. "required": true
  4095. },
  4096. {
  4097. "type": "string",
  4098. "description": "name of the repo",
  4099. "name": "repo",
  4100. "in": "path",
  4101. "required": true
  4102. },
  4103. {
  4104. "type": "integer",
  4105. "format": "int64",
  4106. "description": "id of the key to delete",
  4107. "name": "id",
  4108. "in": "path",
  4109. "required": true
  4110. }
  4111. ],
  4112. "responses": {
  4113. "204": {
  4114. "$ref": "#/responses/empty"
  4115. }
  4116. }
  4117. }
  4118. },
  4119. "/repos/{owner}/{repo}/labels": {
  4120. "get": {
  4121. "produces": [
  4122. "application/json"
  4123. ],
  4124. "tags": [
  4125. "issue"
  4126. ],
  4127. "summary": "Get all of a repository's labels",
  4128. "operationId": "issueListLabels",
  4129. "parameters": [
  4130. {
  4131. "type": "string",
  4132. "description": "owner of the repo",
  4133. "name": "owner",
  4134. "in": "path",
  4135. "required": true
  4136. },
  4137. {
  4138. "type": "string",
  4139. "description": "name of the repo",
  4140. "name": "repo",
  4141. "in": "path",
  4142. "required": true
  4143. }
  4144. ],
  4145. "responses": {
  4146. "200": {
  4147. "$ref": "#/responses/LabelList"
  4148. }
  4149. }
  4150. },
  4151. "post": {
  4152. "consumes": [
  4153. "application/json"
  4154. ],
  4155. "produces": [
  4156. "application/json"
  4157. ],
  4158. "tags": [
  4159. "issue"
  4160. ],
  4161. "summary": "Create a label",
  4162. "operationId": "issueCreateLabel",
  4163. "parameters": [
  4164. {
  4165. "type": "string",
  4166. "description": "owner of the repo",
  4167. "name": "owner",
  4168. "in": "path",
  4169. "required": true
  4170. },
  4171. {
  4172. "type": "string",
  4173. "description": "name of the repo",
  4174. "name": "repo",
  4175. "in": "path",
  4176. "required": true
  4177. },
  4178. {
  4179. "name": "body",
  4180. "in": "body",
  4181. "schema": {
  4182. "$ref": "#/definitions/CreateLabelOption"
  4183. }
  4184. }
  4185. ],
  4186. "responses": {
  4187. "201": {
  4188. "$ref": "#/responses/Label"
  4189. }
  4190. }
  4191. }
  4192. },
  4193. "/repos/{owner}/{repo}/labels/{id}": {
  4194. "get": {
  4195. "produces": [
  4196. "application/json"
  4197. ],
  4198. "tags": [
  4199. "issue"
  4200. ],
  4201. "summary": "Get a single label",
  4202. "operationId": "issueGetLabel",
  4203. "parameters": [
  4204. {
  4205. "type": "string",
  4206. "description": "owner of the repo",
  4207. "name": "owner",
  4208. "in": "path",
  4209. "required": true
  4210. },
  4211. {
  4212. "type": "string",
  4213. "description": "name of the repo",
  4214. "name": "repo",
  4215. "in": "path",
  4216. "required": true
  4217. },
  4218. {
  4219. "type": "integer",
  4220. "format": "int64",
  4221. "description": "id of the label to get",
  4222. "name": "id",
  4223. "in": "path",
  4224. "required": true
  4225. }
  4226. ],
  4227. "responses": {
  4228. "200": {
  4229. "$ref": "#/responses/Label"
  4230. }
  4231. }
  4232. },
  4233. "delete": {
  4234. "tags": [
  4235. "issue"
  4236. ],
  4237. "summary": "Delete a label",
  4238. "operationId": "issueDeleteLabel",
  4239. "parameters": [
  4240. {
  4241. "type": "string",
  4242. "description": "owner of the repo",
  4243. "name": "owner",
  4244. "in": "path",
  4245. "required": true
  4246. },
  4247. {
  4248. "type": "string",
  4249. "description": "name of the repo",
  4250. "name": "repo",
  4251. "in": "path",
  4252. "required": true
  4253. },
  4254. {
  4255. "type": "integer",
  4256. "format": "int64",
  4257. "description": "id of the label to delete",
  4258. "name": "id",
  4259. "in": "path",
  4260. "required": true
  4261. }
  4262. ],
  4263. "responses": {
  4264. "204": {
  4265. "$ref": "#/responses/empty"
  4266. }
  4267. }
  4268. },
  4269. "patch": {
  4270. "consumes": [
  4271. "application/json"
  4272. ],
  4273. "produces": [
  4274. "application/json"
  4275. ],
  4276. "tags": [
  4277. "issue"
  4278. ],
  4279. "summary": "Update a label",
  4280. "operationId": "issueEditLabel",
  4281. "parameters": [
  4282. {
  4283. "type": "string",
  4284. "description": "owner of the repo",
  4285. "name": "owner",
  4286. "in": "path",
  4287. "required": true
  4288. },
  4289. {
  4290. "type": "string",
  4291. "description": "name of the repo",
  4292. "name": "repo",
  4293. "in": "path",
  4294. "required": true
  4295. },
  4296. {
  4297. "type": "integer",
  4298. "format": "int64",
  4299. "description": "id of the label to edit",
  4300. "name": "id",
  4301. "in": "path",
  4302. "required": true
  4303. },
  4304. {
  4305. "name": "body",
  4306. "in": "body",
  4307. "schema": {
  4308. "$ref": "#/definitions/EditLabelOption"
  4309. }
  4310. }
  4311. ],
  4312. "responses": {
  4313. "200": {
  4314. "$ref": "#/responses/Label"
  4315. }
  4316. }
  4317. }
  4318. },
  4319. "/repos/{owner}/{repo}/milestones": {
  4320. "get": {
  4321. "produces": [
  4322. "application/json"
  4323. ],
  4324. "tags": [
  4325. "issue"
  4326. ],
  4327. "summary": "Get all of a repository's opened milestones",
  4328. "operationId": "issueGetMilestonesList",
  4329. "parameters": [
  4330. {
  4331. "type": "string",
  4332. "description": "owner of the repo",
  4333. "name": "owner",
  4334. "in": "path",
  4335. "required": true
  4336. },
  4337. {
  4338. "type": "string",
  4339. "description": "name of the repo",
  4340. "name": "repo",
  4341. "in": "path",
  4342. "required": true
  4343. },
  4344. {
  4345. "type": "string",
  4346. "description": "Milestone state, Recognised values are open, closed and all. Defaults to \"open\"",
  4347. "name": "state",
  4348. "in": "query"
  4349. }
  4350. ],
  4351. "responses": {
  4352. "200": {
  4353. "$ref": "#/responses/MilestoneList"
  4354. }
  4355. }
  4356. },
  4357. "post": {
  4358. "consumes": [
  4359. "application/json"
  4360. ],
  4361. "produces": [
  4362. "application/json"
  4363. ],
  4364. "tags": [
  4365. "issue"
  4366. ],
  4367. "summary": "Create a milestone",
  4368. "operationId": "issueCreateMilestone",
  4369. "parameters": [
  4370. {
  4371. "type": "string",
  4372. "description": "owner of the repo",
  4373. "name": "owner",
  4374. "in": "path",
  4375. "required": true
  4376. },
  4377. {
  4378. "type": "string",
  4379. "description": "name of the repo",
  4380. "name": "repo",
  4381. "in": "path",
  4382. "required": true
  4383. },
  4384. {
  4385. "name": "body",
  4386. "in": "body",
  4387. "schema": {
  4388. "$ref": "#/definitions/CreateMilestoneOption"
  4389. }
  4390. }
  4391. ],
  4392. "responses": {
  4393. "201": {
  4394. "$ref": "#/responses/Milestone"
  4395. }
  4396. }
  4397. }
  4398. },
  4399. "/repos/{owner}/{repo}/milestones/{id}": {
  4400. "get": {
  4401. "produces": [
  4402. "application/json"
  4403. ],
  4404. "tags": [
  4405. "issue"
  4406. ],
  4407. "summary": "Get a milestone",
  4408. "operationId": "issueGetMilestone",
  4409. "parameters": [
  4410. {
  4411. "type": "string",
  4412. "description": "owner of the repo",
  4413. "name": "owner",
  4414. "in": "path",
  4415. "required": true
  4416. },
  4417. {
  4418. "type": "string",
  4419. "description": "name of the repo",
  4420. "name": "repo",
  4421. "in": "path",
  4422. "required": true
  4423. },
  4424. {
  4425. "type": "integer",
  4426. "format": "int64",
  4427. "description": "id of the milestone",
  4428. "name": "id",
  4429. "in": "path",
  4430. "required": true
  4431. }
  4432. ],
  4433. "responses": {
  4434. "200": {
  4435. "$ref": "#/responses/Milestone"
  4436. }
  4437. }
  4438. },
  4439. "delete": {
  4440. "tags": [
  4441. "issue"
  4442. ],
  4443. "summary": "Delete a milestone",
  4444. "operationId": "issueDeleteMilestone",
  4445. "parameters": [
  4446. {
  4447. "type": "string",
  4448. "description": "owner of the repo",
  4449. "name": "owner",
  4450. "in": "path",
  4451. "required": true
  4452. },
  4453. {
  4454. "type": "string",
  4455. "description": "name of the repo",
  4456. "name": "repo",
  4457. "in": "path",
  4458. "required": true
  4459. },
  4460. {
  4461. "type": "integer",
  4462. "format": "int64",
  4463. "description": "id of the milestone to delete",
  4464. "name": "id",
  4465. "in": "path",
  4466. "required": true
  4467. }
  4468. ],
  4469. "responses": {
  4470. "204": {
  4471. "$ref": "#/responses/empty"
  4472. }
  4473. }
  4474. },
  4475. "patch": {
  4476. "consumes": [
  4477. "application/json"
  4478. ],
  4479. "produces": [
  4480. "application/json"
  4481. ],
  4482. "tags": [
  4483. "issue"
  4484. ],
  4485. "summary": "Update a milestone",
  4486. "operationId": "issueEditMilestone",
  4487. "parameters": [
  4488. {
  4489. "type": "string",
  4490. "description": "owner of the repo",
  4491. "name": "owner",
  4492. "in": "path",
  4493. "required": true
  4494. },
  4495. {
  4496. "type": "string",
  4497. "description": "name of the repo",
  4498. "name": "repo",
  4499. "in": "path",
  4500. "required": true
  4501. },
  4502. {
  4503. "type": "integer",
  4504. "format": "int64",
  4505. "description": "id of the milestone",
  4506. "name": "id",
  4507. "in": "path",
  4508. "required": true
  4509. },
  4510. {
  4511. "name": "body",
  4512. "in": "body",
  4513. "schema": {
  4514. "$ref": "#/definitions/EditMilestoneOption"
  4515. }
  4516. }
  4517. ],
  4518. "responses": {
  4519. "200": {
  4520. "$ref": "#/responses/Milestone"
  4521. }
  4522. }
  4523. }
  4524. },
  4525. "/repos/{owner}/{repo}/mirror-sync": {
  4526. "post": {
  4527. "produces": [
  4528. "application/json"
  4529. ],
  4530. "tags": [
  4531. "repository"
  4532. ],
  4533. "summary": "Sync a mirrored repository",
  4534. "operationId": "repoMirrorSync",
  4535. "parameters": [
  4536. {
  4537. "type": "string",
  4538. "description": "owner of the repo to sync",
  4539. "name": "owner",
  4540. "in": "path",
  4541. "required": true
  4542. },
  4543. {
  4544. "type": "string",
  4545. "description": "name of the repo to sync",
  4546. "name": "repo",
  4547. "in": "path",
  4548. "required": true
  4549. }
  4550. ],
  4551. "responses": {
  4552. "200": {
  4553. "$ref": "#/responses/empty"
  4554. }
  4555. }
  4556. }
  4557. },
  4558. "/repos/{owner}/{repo}/pulls": {
  4559. "get": {
  4560. "produces": [
  4561. "application/json"
  4562. ],
  4563. "tags": [
  4564. "repository"
  4565. ],
  4566. "summary": "List a repo's pull requests",
  4567. "operationId": "repoListPullRequests",
  4568. "parameters": [
  4569. {
  4570. "type": "string",
  4571. "description": "owner of the repo",
  4572. "name": "owner",
  4573. "in": "path",
  4574. "required": true
  4575. },
  4576. {
  4577. "type": "string",
  4578. "description": "name of the repo",
  4579. "name": "repo",
  4580. "in": "path",
  4581. "required": true
  4582. },
  4583. {
  4584. "type": "integer",
  4585. "description": "Page number",
  4586. "name": "page",
  4587. "in": "query"
  4588. },
  4589. {
  4590. "enum": [
  4591. "closed",
  4592. "open",
  4593. "all"
  4594. ],
  4595. "type": "string",
  4596. "description": "State of pull request: open or closed (optional)",
  4597. "name": "state",
  4598. "in": "query"
  4599. },
  4600. {
  4601. "enum": [
  4602. "oldest",
  4603. "recentupdate",
  4604. "leastupdate",
  4605. "mostcomment",
  4606. "leastcomment",
  4607. "priority"
  4608. ],
  4609. "type": "string",
  4610. "description": "Type of sort",
  4611. "name": "sort",
  4612. "in": "query"
  4613. },
  4614. {
  4615. "type": "integer",
  4616. "format": "int64",
  4617. "description": "ID of the milestone",
  4618. "name": "milestone",
  4619. "in": "query"
  4620. },
  4621. {
  4622. "type": "array",
  4623. "items": {
  4624. "type": "integer",
  4625. "format": "int64"
  4626. },
  4627. "collectionFormat": "multi",
  4628. "description": "Label IDs",
  4629. "name": "labels",
  4630. "in": "query"
  4631. }
  4632. ],
  4633. "responses": {
  4634. "200": {
  4635. "$ref": "#/responses/PullRequestList"
  4636. }
  4637. }
  4638. },
  4639. "post": {
  4640. "consumes": [
  4641. "application/json"
  4642. ],
  4643. "produces": [
  4644. "application/json"
  4645. ],
  4646. "tags": [
  4647. "repository"
  4648. ],
  4649. "summary": "Create a pull request",
  4650. "operationId": "repoCreatePullRequest",
  4651. "parameters": [
  4652. {
  4653. "type": "string",
  4654. "description": "owner of the repo",
  4655. "name": "owner",
  4656. "in": "path",
  4657. "required": true
  4658. },
  4659. {
  4660. "type": "string",
  4661. "description": "name of the repo",
  4662. "name": "repo",
  4663. "in": "path",
  4664. "required": true
  4665. },
  4666. {
  4667. "name": "body",
  4668. "in": "body",
  4669. "schema": {
  4670. "$ref": "#/definitions/CreatePullRequestOption"
  4671. }
  4672. }
  4673. ],
  4674. "responses": {
  4675. "201": {
  4676. "$ref": "#/responses/PullRequest"
  4677. }
  4678. }
  4679. }
  4680. },
  4681. "/repos/{owner}/{repo}/pulls/{index}": {
  4682. "get": {
  4683. "produces": [
  4684. "application/json"
  4685. ],
  4686. "tags": [
  4687. "repository"
  4688. ],
  4689. "summary": "Get a pull request",
  4690. "operationId": "repoGetPullRequest",
  4691. "parameters": [
  4692. {
  4693. "type": "string",
  4694. "description": "owner of the repo",
  4695. "name": "owner",
  4696. "in": "path",
  4697. "required": true
  4698. },
  4699. {
  4700. "type": "string",
  4701. "description": "name of the repo",
  4702. "name": "repo",
  4703. "in": "path",
  4704. "required": true
  4705. },
  4706. {
  4707. "type": "integer",
  4708. "format": "int64",
  4709. "description": "index of the pull request to get",
  4710. "name": "index",
  4711. "in": "path",
  4712. "required": true
  4713. }
  4714. ],
  4715. "responses": {
  4716. "200": {
  4717. "$ref": "#/responses/PullRequest"
  4718. }
  4719. }
  4720. },
  4721. "patch": {
  4722. "consumes": [
  4723. "application/json"
  4724. ],
  4725. "produces": [
  4726. "application/json"
  4727. ],
  4728. "tags": [
  4729. "repository"
  4730. ],
  4731. "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.",
  4732. "operationId": "repoEditPullRequest",
  4733. "parameters": [
  4734. {
  4735. "type": "string",
  4736. "description": "owner of the repo",
  4737. "name": "owner",
  4738. "in": "path",
  4739. "required": true
  4740. },
  4741. {
  4742. "type": "string",
  4743. "description": "name of the repo",
  4744. "name": "repo",
  4745. "in": "path",
  4746. "required": true
  4747. },
  4748. {
  4749. "type": "integer",
  4750. "format": "int64",
  4751. "description": "index of the pull request to edit",
  4752. "name": "index",
  4753. "in": "path",
  4754. "required": true
  4755. },
  4756. {
  4757. "name": "body",
  4758. "in": "body",
  4759. "schema": {
  4760. "$ref": "#/definitions/EditPullRequestOption"
  4761. }
  4762. }
  4763. ],
  4764. "responses": {
  4765. "201": {
  4766. "$ref": "#/responses/PullRequest"
  4767. }
  4768. }
  4769. }
  4770. },
  4771. "/repos/{owner}/{repo}/pulls/{index}/merge": {
  4772. "get": {
  4773. "produces": [
  4774. "application/json"
  4775. ],
  4776. "tags": [
  4777. "repository"
  4778. ],
  4779. "summary": "Check if a pull request has been merged",
  4780. "operationId": "repoPullRequestIsMerged",
  4781. "parameters": [
  4782. {
  4783. "type": "string",
  4784. "description": "owner of the repo",
  4785. "name": "owner",
  4786. "in": "path",
  4787. "required": true
  4788. },
  4789. {
  4790. "type": "string",
  4791. "description": "name of the repo",
  4792. "name": "repo",
  4793. "in": "path",
  4794. "required": true
  4795. },
  4796. {
  4797. "type": "integer",
  4798. "format": "int64",
  4799. "description": "index of the pull request",
  4800. "name": "index",
  4801. "in": "path",
  4802. "required": true
  4803. }
  4804. ],
  4805. "responses": {
  4806. "204": {
  4807. "description": "pull request has been merged"
  4808. },
  4809. "404": {
  4810. "description": "pull request has not been merged"
  4811. }
  4812. }
  4813. },
  4814. "post": {
  4815. "produces": [
  4816. "application/json"
  4817. ],
  4818. "tags": [
  4819. "repository"
  4820. ],
  4821. "summary": "Merge a pull request",
  4822. "operationId": "repoMergePullRequest",
  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": "index of the pull request to merge",
  4842. "name": "index",
  4843. "in": "path",
  4844. "required": true
  4845. },
  4846. {
  4847. "name": "body",
  4848. "in": "body",
  4849. "schema": {
  4850. "$ref": "#/definitions/MergePullRequestOption"
  4851. }
  4852. }
  4853. ],
  4854. "responses": {
  4855. "200": {
  4856. "$ref": "#/responses/empty"
  4857. },
  4858. "405": {
  4859. "$ref": "#/responses/empty"
  4860. }
  4861. }
  4862. }
  4863. },
  4864. "/repos/{owner}/{repo}/raw/{filepath}": {
  4865. "get": {
  4866. "produces": [
  4867. "application/json"
  4868. ],
  4869. "tags": [
  4870. "repository"
  4871. ],
  4872. "summary": "Get a file from a repository",
  4873. "operationId": "repoGetRawFile",
  4874. "parameters": [
  4875. {
  4876. "type": "string",
  4877. "description": "owner of the repo",
  4878. "name": "owner",
  4879. "in": "path",
  4880. "required": true
  4881. },
  4882. {
  4883. "type": "string",
  4884. "description": "name of the repo",
  4885. "name": "repo",
  4886. "in": "path",
  4887. "required": true
  4888. },
  4889. {
  4890. "type": "string",
  4891. "description": "filepath of the file to get",
  4892. "name": "filepath",
  4893. "in": "path",
  4894. "required": true
  4895. }
  4896. ],
  4897. "responses": {
  4898. "200": {
  4899. "description": "success"
  4900. }
  4901. }
  4902. }
  4903. },
  4904. "/repos/{owner}/{repo}/releases": {
  4905. "get": {
  4906. "produces": [
  4907. "application/json"
  4908. ],
  4909. "tags": [
  4910. "repository"
  4911. ],
  4912. "summary": "List a repo's releases",
  4913. "operationId": "repoListReleases",
  4914. "parameters": [
  4915. {
  4916. "type": "string",
  4917. "description": "owner of the repo",
  4918. "name": "owner",
  4919. "in": "path",
  4920. "required": true
  4921. },
  4922. {
  4923. "type": "string",
  4924. "description": "name of the repo",
  4925. "name": "repo",
  4926. "in": "path",
  4927. "required": true
  4928. },
  4929. {
  4930. "type": "integer",
  4931. "description": "page wants to load",
  4932. "name": "page",
  4933. "in": "query"
  4934. },
  4935. {
  4936. "type": "integer",
  4937. "description": "items count every page wants to load",
  4938. "name": "per_page",
  4939. "in": "query"
  4940. }
  4941. ],
  4942. "responses": {
  4943. "200": {
  4944. "$ref": "#/responses/ReleaseList"
  4945. }
  4946. }
  4947. },
  4948. "post": {
  4949. "consumes": [
  4950. "application/json"
  4951. ],
  4952. "produces": [
  4953. "application/json"
  4954. ],
  4955. "tags": [
  4956. "repository"
  4957. ],
  4958. "summary": "Create a release",
  4959. "operationId": "repoCreateRelease",
  4960. "parameters": [
  4961. {
  4962. "type": "string",
  4963. "description": "owner of the repo",
  4964. "name": "owner",
  4965. "in": "path",
  4966. "required": true
  4967. },
  4968. {
  4969. "type": "string",
  4970. "description": "name of the repo",
  4971. "name": "repo",
  4972. "in": "path",
  4973. "required": true
  4974. },
  4975. {
  4976. "name": "body",
  4977. "in": "body",
  4978. "schema": {
  4979. "$ref": "#/definitions/CreateReleaseOption"
  4980. }
  4981. }
  4982. ],
  4983. "responses": {
  4984. "201": {
  4985. "$ref": "#/responses/Release"
  4986. }
  4987. }
  4988. }
  4989. },
  4990. "/repos/{owner}/{repo}/releases/{id}": {
  4991. "get": {
  4992. "produces": [
  4993. "application/json"
  4994. ],
  4995. "tags": [
  4996. "repository"
  4997. ],
  4998. "summary": "Get a release",
  4999. "operationId": "repoGetRelease",
  5000. "parameters": [
  5001. {
  5002. "type": "string",
  5003. "description": "owner of the repo",
  5004. "name": "owner",
  5005. "in": "path",
  5006. "required": true
  5007. },
  5008. {
  5009. "type": "string",
  5010. "description": "name of the repo",
  5011. "name": "repo",
  5012. "in": "path",
  5013. "required": true
  5014. },
  5015. {
  5016. "type": "integer",
  5017. "format": "int64",
  5018. "description": "id of the release to get",
  5019. "name": "id",
  5020. "in": "path",
  5021. "required": true
  5022. }
  5023. ],
  5024. "responses": {
  5025. "200": {
  5026. "$ref": "#/responses/Release"
  5027. }
  5028. }
  5029. },
  5030. "delete": {
  5031. "tags": [
  5032. "repository"
  5033. ],
  5034. "summary": "Delete a release",
  5035. "operationId": "repoDeleteRelease",
  5036. "parameters": [
  5037. {
  5038. "type": "string",
  5039. "description": "owner of the repo",
  5040. "name": "owner",
  5041. "in": "path",
  5042. "required": true
  5043. },
  5044. {
  5045. "type": "string",
  5046. "description": "name of the repo",
  5047. "name": "repo",
  5048. "in": "path",
  5049. "required": true
  5050. },
  5051. {
  5052. "type": "integer",
  5053. "format": "int64",
  5054. "description": "id of the release to delete",
  5055. "name": "id",
  5056. "in": "path",
  5057. "required": true
  5058. }
  5059. ],
  5060. "responses": {
  5061. "204": {
  5062. "$ref": "#/responses/empty"
  5063. }
  5064. }
  5065. },
  5066. "patch": {
  5067. "consumes": [
  5068. "application/json"
  5069. ],
  5070. "produces": [
  5071. "application/json"
  5072. ],
  5073. "tags": [
  5074. "repository"
  5075. ],
  5076. "summary": "Update a release",
  5077. "operationId": "repoEditRelease",
  5078. "parameters": [
  5079. {
  5080. "type": "string",
  5081. "description": "owner of the repo",
  5082. "name": "owner",
  5083. "in": "path",
  5084. "required": true
  5085. },
  5086. {
  5087. "type": "string",
  5088. "description": "name of the repo",
  5089. "name": "repo",
  5090. "in": "path",
  5091. "required": true
  5092. },
  5093. {
  5094. "type": "integer",
  5095. "format": "int64",
  5096. "description": "id of the release to edit",
  5097. "name": "id",
  5098. "in": "path",
  5099. "required": true
  5100. },
  5101. {
  5102. "name": "body",
  5103. "in": "body",
  5104. "schema": {
  5105. "$ref": "#/definitions/EditReleaseOption"
  5106. }
  5107. }
  5108. ],
  5109. "responses": {
  5110. "200": {
  5111. "$ref": "#/responses/Release"
  5112. }
  5113. }
  5114. }
  5115. },
  5116. "/repos/{owner}/{repo}/releases/{id}/assets": {
  5117. "get": {
  5118. "produces": [
  5119. "application/json"
  5120. ],
  5121. "tags": [
  5122. "repository"
  5123. ],
  5124. "summary": "List release's attachments",
  5125. "operationId": "repoListReleaseAttachments",
  5126. "parameters": [
  5127. {
  5128. "type": "string",
  5129. "description": "owner of the repo",
  5130. "name": "owner",
  5131. "in": "path",
  5132. "required": true
  5133. },
  5134. {
  5135. "type": "string",
  5136. "description": "name of the repo",
  5137. "name": "repo",
  5138. "in": "path",
  5139. "required": true
  5140. },
  5141. {
  5142. "type": "integer",
  5143. "format": "int64",
  5144. "description": "id of the release",
  5145. "name": "id",
  5146. "in": "path",
  5147. "required": true
  5148. }
  5149. ],
  5150. "responses": {
  5151. "200": {
  5152. "$ref": "#/responses/AttachmentList"
  5153. }
  5154. }
  5155. },
  5156. "post": {
  5157. "consumes": [
  5158. "multipart/form-data"
  5159. ],
  5160. "produces": [
  5161. "application/json"
  5162. ],
  5163. "tags": [
  5164. "repository"
  5165. ],
  5166. "summary": "Create a release attachment",
  5167. "operationId": "repoCreateReleaseAttachment",
  5168. "parameters": [
  5169. {
  5170. "type": "string",
  5171. "description": "owner of the repo",
  5172. "name": "owner",
  5173. "in": "path",
  5174. "required": true
  5175. },
  5176. {
  5177. "type": "string",
  5178. "description": "name of the repo",
  5179. "name": "repo",
  5180. "in": "path",
  5181. "required": true
  5182. },
  5183. {
  5184. "type": "integer",
  5185. "format": "int64",
  5186. "description": "id of the release",
  5187. "name": "id",
  5188. "in": "path",
  5189. "required": true
  5190. },
  5191. {
  5192. "type": "string",
  5193. "description": "name of the attachment",
  5194. "name": "name",
  5195. "in": "query"
  5196. },
  5197. {
  5198. "type": "file",
  5199. "description": "attachment to upload",
  5200. "name": "attachment",
  5201. "in": "formData",
  5202. "required": true
  5203. }
  5204. ],
  5205. "responses": {
  5206. "201": {
  5207. "$ref": "#/responses/Attachment"
  5208. }
  5209. }
  5210. }
  5211. },
  5212. "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": {
  5213. "get": {
  5214. "produces": [
  5215. "application/json"
  5216. ],
  5217. "tags": [
  5218. "repository"
  5219. ],
  5220. "summary": "Get a release attachment",
  5221. "operationId": "repoGetReleaseAttachment",
  5222. "parameters": [
  5223. {
  5224. "type": "string",
  5225. "description": "owner of the repo",
  5226. "name": "owner",
  5227. "in": "path",
  5228. "required": true
  5229. },
  5230. {
  5231. "type": "string",
  5232. "description": "name of the repo",
  5233. "name": "repo",
  5234. "in": "path",
  5235. "required": true
  5236. },
  5237. {
  5238. "type": "integer",
  5239. "format": "int64",
  5240. "description": "id of the release",
  5241. "name": "id",
  5242. "in": "path",
  5243. "required": true
  5244. },
  5245. {
  5246. "type": "integer",
  5247. "format": "int64",
  5248. "description": "id of the attachment to get",
  5249. "name": "attachment_id",
  5250. "in": "path",
  5251. "required": true
  5252. }
  5253. ],
  5254. "responses": {
  5255. "200": {
  5256. "$ref": "#/responses/Attachment"
  5257. }
  5258. }
  5259. },
  5260. "delete": {
  5261. "produces": [
  5262. "application/json"
  5263. ],
  5264. "tags": [
  5265. "repository"
  5266. ],
  5267. "summary": "Delete a release attachment",
  5268. "operationId": "repoDeleteReleaseAttachment",
  5269. "parameters": [
  5270. {
  5271. "type": "string",
  5272. "description": "owner of the repo",
  5273. "name": "owner",
  5274. "in": "path",
  5275. "required": true
  5276. },
  5277. {
  5278. "type": "string",
  5279. "description": "name of the repo",
  5280. "name": "repo",
  5281. "in": "path",
  5282. "required": true
  5283. },
  5284. {
  5285. "type": "integer",
  5286. "format": "int64",
  5287. "description": "id of the release",
  5288. "name": "id",
  5289. "in": "path",
  5290. "required": true
  5291. },
  5292. {
  5293. "type": "integer",
  5294. "format": "int64",
  5295. "description": "id of the attachment to delete",
  5296. "name": "attachment_id",
  5297. "in": "path",
  5298. "required": true
  5299. }
  5300. ],
  5301. "responses": {
  5302. "204": {
  5303. "$ref": "#/responses/empty"
  5304. }
  5305. }
  5306. },
  5307. "patch": {
  5308. "consumes": [
  5309. "application/json"
  5310. ],
  5311. "produces": [
  5312. "application/json"
  5313. ],
  5314. "tags": [
  5315. "repository"
  5316. ],
  5317. "summary": "Edit a release attachment",
  5318. "operationId": "repoEditReleaseAttachment",
  5319. "parameters": [
  5320. {
  5321. "type": "string",
  5322. "description": "owner of the repo",
  5323. "name": "owner",
  5324. "in": "path",
  5325. "required": true
  5326. },
  5327. {
  5328. "type": "string",
  5329. "description": "name of the repo",
  5330. "name": "repo",
  5331. "in": "path",
  5332. "required": true
  5333. },
  5334. {
  5335. "type": "integer",
  5336. "format": "int64",
  5337. "description": "id of the release",
  5338. "name": "id",
  5339. "in": "path",
  5340. "required": true
  5341. },
  5342. {
  5343. "type": "integer",
  5344. "format": "int64",
  5345. "description": "id of the attachment to edit",
  5346. "name": "attachment_id",
  5347. "in": "path",
  5348. "required": true
  5349. },
  5350. {
  5351. "name": "body",
  5352. "in": "body",
  5353. "schema": {
  5354. "$ref": "#/definitions/EditAttachmentOptions"
  5355. }
  5356. }
  5357. ],
  5358. "responses": {
  5359. "201": {
  5360. "$ref": "#/responses/Attachment"
  5361. }
  5362. }
  5363. }
  5364. },
  5365. "/repos/{owner}/{repo}/signing-key.gpg": {
  5366. "get": {
  5367. "produces": [
  5368. "text/plain"
  5369. ],
  5370. "tags": [
  5371. "repository"
  5372. ],
  5373. "summary": "Get signing-key.gpg for given repository",
  5374. "operationId": "repoSigningKey",
  5375. "parameters": [
  5376. {
  5377. "type": "string",
  5378. "description": "owner of the repo",
  5379. "name": "owner",
  5380. "in": "path",
  5381. "required": true
  5382. },
  5383. {
  5384. "type": "string",
  5385. "description": "name of the repo",
  5386. "name": "repo",
  5387. "in": "path",
  5388. "required": true
  5389. }
  5390. ],
  5391. "responses": {
  5392. "200": {
  5393. "description": "GPG armored public key",
  5394. "schema": {
  5395. "type": "string"
  5396. }
  5397. }
  5398. }
  5399. }
  5400. },
  5401. "/repos/{owner}/{repo}/stargazers": {
  5402. "get": {
  5403. "produces": [
  5404. "application/json"
  5405. ],
  5406. "tags": [
  5407. "repository"
  5408. ],
  5409. "summary": "List a repo's stargazers",
  5410. "operationId": "repoListStargazers",
  5411. "parameters": [
  5412. {
  5413. "type": "string",
  5414. "description": "owner of the repo",
  5415. "name": "owner",
  5416. "in": "path",
  5417. "required": true
  5418. },
  5419. {
  5420. "type": "string",
  5421. "description": "name of the repo",
  5422. "name": "repo",
  5423. "in": "path",
  5424. "required": true
  5425. }
  5426. ],
  5427. "responses": {
  5428. "200": {
  5429. "$ref": "#/responses/UserList"
  5430. }
  5431. }
  5432. }
  5433. },
  5434. "/repos/{owner}/{repo}/statuses/{sha}": {
  5435. "get": {
  5436. "produces": [
  5437. "application/json"
  5438. ],
  5439. "tags": [
  5440. "repository"
  5441. ],
  5442. "summary": "Get a commit's statuses",
  5443. "operationId": "repoListStatuses",
  5444. "parameters": [
  5445. {
  5446. "type": "string",
  5447. "description": "owner of the repo",
  5448. "name": "owner",
  5449. "in": "path",
  5450. "required": true
  5451. },
  5452. {
  5453. "type": "string",
  5454. "description": "name of the repo",
  5455. "name": "repo",
  5456. "in": "path",
  5457. "required": true
  5458. },
  5459. {
  5460. "type": "string",
  5461. "description": "sha of the commit",
  5462. "name": "sha",
  5463. "in": "path",
  5464. "required": true
  5465. },
  5466. {
  5467. "type": "integer",
  5468. "description": "page number of results",
  5469. "name": "page",
  5470. "in": "query"
  5471. },
  5472. {
  5473. "enum": [
  5474. "oldest",
  5475. "recentupdate",
  5476. "leastupdate",
  5477. "leastindex",
  5478. "highestindex"
  5479. ],
  5480. "type": "string",
  5481. "description": "type of sort",
  5482. "name": "sort",
  5483. "in": "query"
  5484. },
  5485. {
  5486. "enum": [
  5487. "pending",
  5488. "success",
  5489. "error",
  5490. "failure",
  5491. "warning"
  5492. ],
  5493. "type": "string",
  5494. "description": "type of state",
  5495. "name": "state",
  5496. "in": "query"
  5497. }
  5498. ],
  5499. "responses": {
  5500. "200": {
  5501. "$ref": "#/responses/StatusList"
  5502. }
  5503. }
  5504. },
  5505. "post": {
  5506. "produces": [
  5507. "application/json"
  5508. ],
  5509. "tags": [
  5510. "repository"
  5511. ],
  5512. "summary": "Create a commit status",
  5513. "operationId": "repoCreateStatus",
  5514. "parameters": [
  5515. {
  5516. "type": "string",
  5517. "description": "owner of the repo",
  5518. "name": "owner",
  5519. "in": "path",
  5520. "required": true
  5521. },
  5522. {
  5523. "type": "string",
  5524. "description": "name of the repo",
  5525. "name": "repo",
  5526. "in": "path",
  5527. "required": true
  5528. },
  5529. {
  5530. "type": "string",
  5531. "description": "sha of the commit",
  5532. "name": "sha",
  5533. "in": "path",
  5534. "required": true
  5535. },
  5536. {
  5537. "name": "body",
  5538. "in": "body",
  5539. "schema": {
  5540. "$ref": "#/definitions/CreateStatusOption"
  5541. }
  5542. }
  5543. ],
  5544. "responses": {
  5545. "200": {
  5546. "$ref": "#/responses/StatusList"
  5547. }
  5548. }
  5549. }
  5550. },
  5551. "/repos/{owner}/{repo}/subscribers": {
  5552. "get": {
  5553. "produces": [
  5554. "application/json"
  5555. ],
  5556. "tags": [
  5557. "repository"
  5558. ],
  5559. "summary": "List a repo's watchers",
  5560. "operationId": "repoListSubscribers",
  5561. "parameters": [
  5562. {
  5563. "type": "string",
  5564. "description": "owner of the repo",
  5565. "name": "owner",
  5566. "in": "path",
  5567. "required": true
  5568. },
  5569. {
  5570. "type": "string",
  5571. "description": "name of the repo",
  5572. "name": "repo",
  5573. "in": "path",
  5574. "required": true
  5575. }
  5576. ],
  5577. "responses": {
  5578. "200": {
  5579. "$ref": "#/responses/UserList"
  5580. }
  5581. }
  5582. }
  5583. },
  5584. "/repos/{owner}/{repo}/subscription": {
  5585. "get": {
  5586. "tags": [
  5587. "repository"
  5588. ],
  5589. "summary": "Check if the current user is watching a repo",
  5590. "operationId": "userCurrentCheckSubscription",
  5591. "parameters": [
  5592. {
  5593. "type": "string",
  5594. "description": "owner of the repo",
  5595. "name": "owner",
  5596. "in": "path",
  5597. "required": true
  5598. },
  5599. {
  5600. "type": "string",
  5601. "description": "name of the repo",
  5602. "name": "repo",
  5603. "in": "path",
  5604. "required": true
  5605. }
  5606. ],
  5607. "responses": {
  5608. "200": {
  5609. "$ref": "#/responses/WatchInfo"
  5610. }
  5611. }
  5612. },
  5613. "put": {
  5614. "tags": [
  5615. "repository"
  5616. ],
  5617. "summary": "Watch a repo",
  5618. "operationId": "userCurrentPutSubscription",
  5619. "parameters": [
  5620. {
  5621. "type": "string",
  5622. "description": "owner of the repo",
  5623. "name": "owner",
  5624. "in": "path",
  5625. "required": true
  5626. },
  5627. {
  5628. "type": "string",
  5629. "description": "name of the repo",
  5630. "name": "repo",
  5631. "in": "path",
  5632. "required": true
  5633. }
  5634. ],
  5635. "responses": {
  5636. "200": {
  5637. "$ref": "#/responses/WatchInfo"
  5638. }
  5639. }
  5640. },
  5641. "delete": {
  5642. "tags": [
  5643. "repository"
  5644. ],
  5645. "summary": "Unwatch a repo",
  5646. "operationId": "userCurrentDeleteSubscription",
  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. "responses": {
  5664. "204": {
  5665. "$ref": "#/responses/empty"
  5666. }
  5667. }
  5668. }
  5669. },
  5670. "/repos/{owner}/{repo}/tags": {
  5671. "get": {
  5672. "produces": [
  5673. "application/json"
  5674. ],
  5675. "tags": [
  5676. "repository"
  5677. ],
  5678. "summary": "List a repository's tags",
  5679. "operationId": "repoListTags",
  5680. "parameters": [
  5681. {
  5682. "type": "string",
  5683. "description": "owner of the repo",
  5684. "name": "owner",
  5685. "in": "path",
  5686. "required": true
  5687. },
  5688. {
  5689. "type": "string",
  5690. "description": "name of the repo",
  5691. "name": "repo",
  5692. "in": "path",
  5693. "required": true
  5694. }
  5695. ],
  5696. "responses": {
  5697. "200": {
  5698. "$ref": "#/responses/TagList"
  5699. }
  5700. }
  5701. }
  5702. },
  5703. "/repos/{owner}/{repo}/times": {
  5704. "get": {
  5705. "produces": [
  5706. "application/json"
  5707. ],
  5708. "tags": [
  5709. "repository"
  5710. ],
  5711. "summary": "List a repo's tracked times",
  5712. "operationId": "repoTrackedTimes",
  5713. "parameters": [
  5714. {
  5715. "type": "string",
  5716. "description": "owner of the repo",
  5717. "name": "owner",
  5718. "in": "path",
  5719. "required": true
  5720. },
  5721. {
  5722. "type": "string",
  5723. "description": "name of the repo",
  5724. "name": "repo",
  5725. "in": "path",
  5726. "required": true
  5727. }
  5728. ],
  5729. "responses": {
  5730. "200": {
  5731. "$ref": "#/responses/TrackedTimeList"
  5732. }
  5733. }
  5734. }
  5735. },
  5736. "/repos/{owner}/{repo}/times/{user}": {
  5737. "get": {
  5738. "produces": [
  5739. "application/json"
  5740. ],
  5741. "tags": [
  5742. "user"
  5743. ],
  5744. "summary": "List a user's tracked times in a repo",
  5745. "operationId": "userTrackedTimes",
  5746. "parameters": [
  5747. {
  5748. "type": "string",
  5749. "description": "owner of the repo",
  5750. "name": "owner",
  5751. "in": "path",
  5752. "required": true
  5753. },
  5754. {
  5755. "type": "string",
  5756. "description": "name of the repo",
  5757. "name": "repo",
  5758. "in": "path",
  5759. "required": true
  5760. },
  5761. {
  5762. "type": "string",
  5763. "description": "username of user",
  5764. "name": "user",
  5765. "in": "path",
  5766. "required": true
  5767. }
  5768. ],
  5769. "responses": {
  5770. "200": {
  5771. "$ref": "#/responses/TrackedTimeList"
  5772. }
  5773. }
  5774. }
  5775. },
  5776. "/repos/{owner}/{repo}/topics": {
  5777. "get": {
  5778. "produces": [
  5779. "application/json"
  5780. ],
  5781. "tags": [
  5782. "repository"
  5783. ],
  5784. "summary": "Get list of topics that a repository has",
  5785. "operationId": "repoListTopics",
  5786. "parameters": [
  5787. {
  5788. "type": "string",
  5789. "description": "owner of the repo",
  5790. "name": "owner",
  5791. "in": "path",
  5792. "required": true
  5793. },
  5794. {
  5795. "type": "string",
  5796. "description": "name of the repo",
  5797. "name": "repo",
  5798. "in": "path",
  5799. "required": true
  5800. }
  5801. ],
  5802. "responses": {
  5803. "200": {
  5804. "$ref": "#/responses/TopicNames"
  5805. }
  5806. }
  5807. },
  5808. "put": {
  5809. "produces": [
  5810. "application/json"
  5811. ],
  5812. "tags": [
  5813. "repository"
  5814. ],
  5815. "summary": "Replace list of topics for a repository",
  5816. "operationId": "repoUpdateTopics",
  5817. "parameters": [
  5818. {
  5819. "type": "string",
  5820. "description": "owner of the repo",
  5821. "name": "owner",
  5822. "in": "path",
  5823. "required": true
  5824. },
  5825. {
  5826. "type": "string",
  5827. "description": "name of the repo",
  5828. "name": "repo",
  5829. "in": "path",
  5830. "required": true
  5831. },
  5832. {
  5833. "name": "body",
  5834. "in": "body",
  5835. "schema": {
  5836. "$ref": "#/definitions/RepoTopicOptions"
  5837. }
  5838. }
  5839. ],
  5840. "responses": {
  5841. "204": {
  5842. "$ref": "#/responses/empty"
  5843. }
  5844. }
  5845. }
  5846. },
  5847. "/repos/{owner}/{repo}/topics/{topic}": {
  5848. "put": {
  5849. "produces": [
  5850. "application/json"
  5851. ],
  5852. "tags": [
  5853. "repository"
  5854. ],
  5855. "summary": "Add a topic to a repository",
  5856. "operationId": "repoAddTopíc",
  5857. "parameters": [
  5858. {
  5859. "type": "string",
  5860. "description": "owner of the repo",
  5861. "name": "owner",
  5862. "in": "path",
  5863. "required": true
  5864. },
  5865. {
  5866. "type": "string",
  5867. "description": "name of the repo",
  5868. "name": "repo",
  5869. "in": "path",
  5870. "required": true
  5871. },
  5872. {
  5873. "type": "string",
  5874. "description": "name of the topic to add",
  5875. "name": "topic",
  5876. "in": "path",
  5877. "required": true
  5878. }
  5879. ],
  5880. "responses": {
  5881. "204": {
  5882. "$ref": "#/responses/empty"
  5883. }
  5884. }
  5885. },
  5886. "delete": {
  5887. "produces": [
  5888. "application/json"
  5889. ],
  5890. "tags": [
  5891. "repository"
  5892. ],
  5893. "summary": "Delete a topic from a repository",
  5894. "operationId": "repoDeleteTopic",
  5895. "parameters": [
  5896. {
  5897. "type": "string",
  5898. "description": "owner of the repo",
  5899. "name": "owner",
  5900. "in": "path",
  5901. "required": true
  5902. },
  5903. {
  5904. "type": "string",
  5905. "description": "name of the repo",
  5906. "name": "repo",
  5907. "in": "path",
  5908. "required": true
  5909. },
  5910. {
  5911. "type": "string",
  5912. "description": "name of the topic to delete",
  5913. "name": "topic",
  5914. "in": "path",
  5915. "required": true
  5916. }
  5917. ],
  5918. "responses": {
  5919. "204": {
  5920. "$ref": "#/responses/empty"
  5921. }
  5922. }
  5923. }
  5924. },
  5925. "/repositories/{id}": {
  5926. "get": {
  5927. "produces": [
  5928. "application/json"
  5929. ],
  5930. "tags": [
  5931. "repository"
  5932. ],
  5933. "summary": "Get a repository by id",
  5934. "operationId": "repoGetByID",
  5935. "parameters": [
  5936. {
  5937. "type": "integer",
  5938. "format": "int64",
  5939. "description": "id of the repo to get",
  5940. "name": "id",
  5941. "in": "path",
  5942. "required": true
  5943. }
  5944. ],
  5945. "responses": {
  5946. "200": {
  5947. "$ref": "#/responses/Repository"
  5948. }
  5949. }
  5950. }
  5951. },
  5952. "/signing-key.gpg": {
  5953. "get": {
  5954. "produces": [
  5955. "text/plain"
  5956. ],
  5957. "tags": [
  5958. "miscellaneous"
  5959. ],
  5960. "summary": "Get default signing-key.gpg",
  5961. "operationId": "getSigningKey",
  5962. "responses": {
  5963. "200": {
  5964. "description": "GPG armored public key",
  5965. "schema": {
  5966. "type": "string"
  5967. }
  5968. }
  5969. }
  5970. }
  5971. },
  5972. "/teams/{id}": {
  5973. "get": {
  5974. "produces": [
  5975. "application/json"
  5976. ],
  5977. "tags": [
  5978. "organization"
  5979. ],
  5980. "summary": "Get a team",
  5981. "operationId": "orgGetTeam",
  5982. "parameters": [
  5983. {
  5984. "type": "integer",
  5985. "format": "int64",
  5986. "description": "id of the team to get",
  5987. "name": "id",
  5988. "in": "path",
  5989. "required": true
  5990. }
  5991. ],
  5992. "responses": {
  5993. "200": {
  5994. "$ref": "#/responses/Team"
  5995. }
  5996. }
  5997. },
  5998. "delete": {
  5999. "tags": [
  6000. "organization"
  6001. ],
  6002. "summary": "Delete a team",
  6003. "operationId": "orgDeleteTeam",
  6004. "parameters": [
  6005. {
  6006. "type": "integer",
  6007. "format": "int64",
  6008. "description": "id of the team to delete",
  6009. "name": "id",
  6010. "in": "path",
  6011. "required": true
  6012. }
  6013. ],
  6014. "responses": {
  6015. "204": {
  6016. "description": "team deleted"
  6017. }
  6018. }
  6019. },
  6020. "patch": {
  6021. "consumes": [
  6022. "application/json"
  6023. ],
  6024. "produces": [
  6025. "application/json"
  6026. ],
  6027. "tags": [
  6028. "organization"
  6029. ],
  6030. "summary": "Edit a team",
  6031. "operationId": "orgEditTeam",
  6032. "parameters": [
  6033. {
  6034. "type": "integer",
  6035. "description": "id of the team to edit",
  6036. "name": "id",
  6037. "in": "path",
  6038. "required": true
  6039. },
  6040. {
  6041. "name": "body",
  6042. "in": "body",
  6043. "schema": {
  6044. "$ref": "#/definitions/EditTeamOption"
  6045. }
  6046. }
  6047. ],
  6048. "responses": {
  6049. "200": {
  6050. "$ref": "#/responses/Team"
  6051. }
  6052. }
  6053. }
  6054. },
  6055. "/teams/{id}/members": {
  6056. "get": {
  6057. "produces": [
  6058. "application/json"
  6059. ],
  6060. "tags": [
  6061. "organization"
  6062. ],
  6063. "summary": "List a team's members",
  6064. "operationId": "orgListTeamMembers",
  6065. "parameters": [
  6066. {
  6067. "type": "integer",
  6068. "format": "int64",
  6069. "description": "id of the team",
  6070. "name": "id",
  6071. "in": "path",
  6072. "required": true
  6073. }
  6074. ],
  6075. "responses": {
  6076. "200": {
  6077. "$ref": "#/responses/UserList"
  6078. }
  6079. }
  6080. }
  6081. },
  6082. "/teams/{id}/members/{username}": {
  6083. "get": {
  6084. "produces": [
  6085. "application/json"
  6086. ],
  6087. "tags": [
  6088. "organization"
  6089. ],
  6090. "summary": "List a particular member of team",
  6091. "operationId": "orgListTeamMember",
  6092. "parameters": [
  6093. {
  6094. "type": "integer",
  6095. "format": "int64",
  6096. "description": "id of the team",
  6097. "name": "id",
  6098. "in": "path",
  6099. "required": true
  6100. },
  6101. {
  6102. "type": "string",
  6103. "description": "username of the member to list",
  6104. "name": "username",
  6105. "in": "path",
  6106. "required": true
  6107. }
  6108. ],
  6109. "responses": {
  6110. "200": {
  6111. "$ref": "#/responses/User"
  6112. }
  6113. }
  6114. },
  6115. "put": {
  6116. "produces": [
  6117. "application/json"
  6118. ],
  6119. "tags": [
  6120. "organization"
  6121. ],
  6122. "summary": "Add a team member",
  6123. "operationId": "orgAddTeamMember",
  6124. "parameters": [
  6125. {
  6126. "type": "integer",
  6127. "format": "int64",
  6128. "description": "id of the team",
  6129. "name": "id",
  6130. "in": "path",
  6131. "required": true
  6132. },
  6133. {
  6134. "type": "string",
  6135. "description": "username of the user to add",
  6136. "name": "username",
  6137. "in": "path",
  6138. "required": true
  6139. }
  6140. ],
  6141. "responses": {
  6142. "204": {
  6143. "$ref": "#/responses/empty"
  6144. }
  6145. }
  6146. },
  6147. "delete": {
  6148. "produces": [
  6149. "application/json"
  6150. ],
  6151. "tags": [
  6152. "organization"
  6153. ],
  6154. "summary": "Remove a team member",
  6155. "operationId": "orgRemoveTeamMember",
  6156. "parameters": [
  6157. {
  6158. "type": "integer",
  6159. "format": "int64",
  6160. "description": "id of the team",
  6161. "name": "id",
  6162. "in": "path",
  6163. "required": true
  6164. },
  6165. {
  6166. "type": "string",
  6167. "description": "username of the user to remove",
  6168. "name": "username",
  6169. "in": "path",
  6170. "required": true
  6171. }
  6172. ],
  6173. "responses": {
  6174. "204": {
  6175. "$ref": "#/responses/empty"
  6176. }
  6177. }
  6178. }
  6179. },
  6180. "/teams/{id}/repos": {
  6181. "get": {
  6182. "produces": [
  6183. "application/json"
  6184. ],
  6185. "tags": [
  6186. "organization"
  6187. ],
  6188. "summary": "List a team's repos",
  6189. "operationId": "orgListTeamRepos",
  6190. "parameters": [
  6191. {
  6192. "type": "integer",
  6193. "format": "int64",
  6194. "description": "id of the team",
  6195. "name": "id",
  6196. "in": "path",
  6197. "required": true
  6198. }
  6199. ],
  6200. "responses": {
  6201. "200": {
  6202. "$ref": "#/responses/RepositoryList"
  6203. }
  6204. }
  6205. }
  6206. },
  6207. "/teams/{id}/repos/{org}/{repo}": {
  6208. "put": {
  6209. "produces": [
  6210. "application/json"
  6211. ],
  6212. "tags": [
  6213. "organization"
  6214. ],
  6215. "summary": "Add a repository to a team",
  6216. "operationId": "orgAddTeamRepository",
  6217. "parameters": [
  6218. {
  6219. "type": "integer",
  6220. "format": "int64",
  6221. "description": "id of the team",
  6222. "name": "id",
  6223. "in": "path",
  6224. "required": true
  6225. },
  6226. {
  6227. "type": "string",
  6228. "description": "organization that owns the repo to add",
  6229. "name": "org",
  6230. "in": "path",
  6231. "required": true
  6232. },
  6233. {
  6234. "type": "string",
  6235. "description": "name of the repo to add",
  6236. "name": "repo",
  6237. "in": "path",
  6238. "required": true
  6239. }
  6240. ],
  6241. "responses": {
  6242. "204": {
  6243. "$ref": "#/responses/empty"
  6244. }
  6245. }
  6246. },
  6247. "delete": {
  6248. "description": "This does not delete the repository, it only removes the repository from the team.",
  6249. "produces": [
  6250. "application/json"
  6251. ],
  6252. "tags": [
  6253. "organization"
  6254. ],
  6255. "summary": "Remove a repository from a team",
  6256. "operationId": "orgRemoveTeamRepository",
  6257. "parameters": [
  6258. {
  6259. "type": "integer",
  6260. "format": "int64",
  6261. "description": "id of the team",
  6262. "name": "id",
  6263. "in": "path",
  6264. "required": true
  6265. },
  6266. {
  6267. "type": "string",
  6268. "description": "organization that owns the repo to remove",
  6269. "name": "org",
  6270. "in": "path",
  6271. "required": true
  6272. },
  6273. {
  6274. "type": "string",
  6275. "description": "name of the repo to remove",
  6276. "name": "repo",
  6277. "in": "path",
  6278. "required": true
  6279. }
  6280. ],
  6281. "responses": {
  6282. "204": {
  6283. "$ref": "#/responses/empty"
  6284. }
  6285. }
  6286. }
  6287. },
  6288. "/topics/search": {
  6289. "get": {
  6290. "produces": [
  6291. "application/json"
  6292. ],
  6293. "tags": [
  6294. "repository"
  6295. ],
  6296. "summary": "search topics via keyword",
  6297. "operationId": "topicSearch",
  6298. "parameters": [
  6299. {
  6300. "type": "string",
  6301. "description": "keywords to search",
  6302. "name": "q",
  6303. "in": "query",
  6304. "required": true
  6305. }
  6306. ],
  6307. "responses": {
  6308. "200": {
  6309. "$ref": "#/responses/TopicListResponse"
  6310. }
  6311. }
  6312. }
  6313. },
  6314. "/user": {
  6315. "get": {
  6316. "produces": [
  6317. "application/json"
  6318. ],
  6319. "tags": [
  6320. "user"
  6321. ],
  6322. "summary": "Get the authenticated user",
  6323. "operationId": "userGetCurrent",
  6324. "responses": {
  6325. "200": {
  6326. "$ref": "#/responses/User"
  6327. }
  6328. }
  6329. }
  6330. },
  6331. "/user/emails": {
  6332. "get": {
  6333. "produces": [
  6334. "application/json"
  6335. ],
  6336. "tags": [
  6337. "user"
  6338. ],
  6339. "summary": "List the authenticated user's email addresses",
  6340. "operationId": "userListEmails",
  6341. "responses": {
  6342. "200": {
  6343. "$ref": "#/responses/EmailList"
  6344. }
  6345. }
  6346. },
  6347. "post": {
  6348. "produces": [
  6349. "application/json"
  6350. ],
  6351. "tags": [
  6352. "user"
  6353. ],
  6354. "summary": "Add email addresses",
  6355. "operationId": "userAddEmail",
  6356. "parameters": [
  6357. {
  6358. "name": "body",
  6359. "in": "body",
  6360. "schema": {
  6361. "$ref": "#/definitions/CreateEmailOption"
  6362. }
  6363. }
  6364. ],
  6365. "responses": {
  6366. "201": {
  6367. "$ref": "#/responses/EmailList"
  6368. }
  6369. }
  6370. },
  6371. "delete": {
  6372. "produces": [
  6373. "application/json"
  6374. ],
  6375. "tags": [
  6376. "user"
  6377. ],
  6378. "summary": "Delete email addresses",
  6379. "operationId": "userDeleteEmail",
  6380. "parameters": [
  6381. {
  6382. "name": "body",
  6383. "in": "body",
  6384. "schema": {
  6385. "$ref": "#/definitions/DeleteEmailOption"
  6386. }
  6387. }
  6388. ],
  6389. "responses": {
  6390. "204": {
  6391. "$ref": "#/responses/empty"
  6392. }
  6393. }
  6394. }
  6395. },
  6396. "/user/followers": {
  6397. "get": {
  6398. "produces": [
  6399. "application/json"
  6400. ],
  6401. "tags": [
  6402. "user"
  6403. ],
  6404. "summary": "List the authenticated user's followers",
  6405. "operationId": "userCurrentListFollowers",
  6406. "responses": {
  6407. "200": {
  6408. "$ref": "#/responses/UserList"
  6409. }
  6410. }
  6411. }
  6412. },
  6413. "/user/following": {
  6414. "get": {
  6415. "produces": [
  6416. "application/json"
  6417. ],
  6418. "tags": [
  6419. "user"
  6420. ],
  6421. "summary": "List the users that the authenticated user is following",
  6422. "operationId": "userCurrentListFollowing",
  6423. "responses": {
  6424. "200": {
  6425. "$ref": "#/responses/UserList"
  6426. }
  6427. }
  6428. }
  6429. },
  6430. "/user/following/{username}": {
  6431. "get": {
  6432. "tags": [
  6433. "user"
  6434. ],
  6435. "summary": "Check whether a user is followed by the authenticated user",
  6436. "operationId": "userCurrentCheckFollowing",
  6437. "parameters": [
  6438. {
  6439. "type": "string",
  6440. "description": "username of followed user",
  6441. "name": "username",
  6442. "in": "path",
  6443. "required": true
  6444. }
  6445. ],
  6446. "responses": {
  6447. "204": {
  6448. "$ref": "#/responses/empty"
  6449. },
  6450. "404": {
  6451. "$ref": "#/responses/notFound"
  6452. }
  6453. }
  6454. },
  6455. "put": {
  6456. "tags": [
  6457. "user"
  6458. ],
  6459. "summary": "Follow a user",
  6460. "operationId": "userCurrentPutFollow",
  6461. "parameters": [
  6462. {
  6463. "type": "string",
  6464. "description": "username of user to follow",
  6465. "name": "username",
  6466. "in": "path",
  6467. "required": true
  6468. }
  6469. ],
  6470. "responses": {
  6471. "204": {
  6472. "$ref": "#/responses/empty"
  6473. }
  6474. }
  6475. },
  6476. "delete": {
  6477. "tags": [
  6478. "user"
  6479. ],
  6480. "summary": "Unfollow a user",
  6481. "operationId": "userCurrentDeleteFollow",
  6482. "parameters": [
  6483. {
  6484. "type": "string",
  6485. "description": "username of user to unfollow",
  6486. "name": "username",
  6487. "in": "path",
  6488. "required": true
  6489. }
  6490. ],
  6491. "responses": {
  6492. "204": {
  6493. "$ref": "#/responses/empty"
  6494. }
  6495. }
  6496. }
  6497. },
  6498. "/user/gpg_keys": {
  6499. "get": {
  6500. "produces": [
  6501. "application/json"
  6502. ],
  6503. "tags": [
  6504. "user"
  6505. ],
  6506. "summary": "List the authenticated user's GPG keys",
  6507. "operationId": "userCurrentListGPGKeys",
  6508. "responses": {
  6509. "200": {
  6510. "$ref": "#/responses/GPGKeyList"
  6511. }
  6512. }
  6513. },
  6514. "post": {
  6515. "consumes": [
  6516. "application/json"
  6517. ],
  6518. "produces": [
  6519. "application/json"
  6520. ],
  6521. "tags": [
  6522. "user"
  6523. ],
  6524. "summary": "Create a GPG key",
  6525. "operationId": "userCurrentPostGPGKey",
  6526. "parameters": [
  6527. {
  6528. "name": "Form",
  6529. "in": "body",
  6530. "schema": {
  6531. "$ref": "#/definitions/CreateGPGKeyOption"
  6532. }
  6533. }
  6534. ],
  6535. "responses": {
  6536. "201": {
  6537. "$ref": "#/responses/GPGKey"
  6538. },
  6539. "422": {
  6540. "$ref": "#/responses/validationError"
  6541. }
  6542. }
  6543. }
  6544. },
  6545. "/user/gpg_keys/{id}": {
  6546. "get": {
  6547. "produces": [
  6548. "application/json"
  6549. ],
  6550. "tags": [
  6551. "user"
  6552. ],
  6553. "summary": "Get a GPG key",
  6554. "operationId": "userCurrentGetGPGKey",
  6555. "parameters": [
  6556. {
  6557. "type": "integer",
  6558. "format": "int64",
  6559. "description": "id of key to get",
  6560. "name": "id",
  6561. "in": "path",
  6562. "required": true
  6563. }
  6564. ],
  6565. "responses": {
  6566. "200": {
  6567. "$ref": "#/responses/GPGKey"
  6568. },
  6569. "404": {
  6570. "$ref": "#/responses/notFound"
  6571. }
  6572. }
  6573. },
  6574. "delete": {
  6575. "produces": [
  6576. "application/json"
  6577. ],
  6578. "tags": [
  6579. "user"
  6580. ],
  6581. "summary": "Remove a GPG key",
  6582. "operationId": "userCurrentDeleteGPGKey",
  6583. "parameters": [
  6584. {
  6585. "type": "integer",
  6586. "format": "int64",
  6587. "description": "id of key to delete",
  6588. "name": "id",
  6589. "in": "path",
  6590. "required": true
  6591. }
  6592. ],
  6593. "responses": {
  6594. "204": {
  6595. "$ref": "#/responses/empty"
  6596. },
  6597. "403": {
  6598. "$ref": "#/responses/forbidden"
  6599. }
  6600. }
  6601. }
  6602. },
  6603. "/user/keys": {
  6604. "get": {
  6605. "produces": [
  6606. "application/json"
  6607. ],
  6608. "tags": [
  6609. "user"
  6610. ],
  6611. "summary": "List the authenticated user's public keys",
  6612. "operationId": "userCurrentListKeys",
  6613. "parameters": [
  6614. {
  6615. "type": "string",
  6616. "description": "fingerprint of the key",
  6617. "name": "fingerprint",
  6618. "in": "query"
  6619. }
  6620. ],
  6621. "responses": {
  6622. "200": {
  6623. "$ref": "#/responses/PublicKeyList"
  6624. }
  6625. }
  6626. },
  6627. "post": {
  6628. "consumes": [
  6629. "application/json"
  6630. ],
  6631. "produces": [
  6632. "application/json"
  6633. ],
  6634. "tags": [
  6635. "user"
  6636. ],
  6637. "summary": "Create a public key",
  6638. "operationId": "userCurrentPostKey",
  6639. "parameters": [
  6640. {
  6641. "name": "body",
  6642. "in": "body",
  6643. "schema": {
  6644. "$ref": "#/definitions/CreateKeyOption"
  6645. }
  6646. }
  6647. ],
  6648. "responses": {
  6649. "201": {
  6650. "$ref": "#/responses/PublicKey"
  6651. },
  6652. "422": {
  6653. "$ref": "#/responses/validationError"
  6654. }
  6655. }
  6656. }
  6657. },
  6658. "/user/keys/{id}": {
  6659. "get": {
  6660. "produces": [
  6661. "application/json"
  6662. ],
  6663. "tags": [
  6664. "user"
  6665. ],
  6666. "summary": "Get a public key",
  6667. "operationId": "userCurrentGetKey",
  6668. "parameters": [
  6669. {
  6670. "type": "integer",
  6671. "format": "int64",
  6672. "description": "id of key to get",
  6673. "name": "id",
  6674. "in": "path",
  6675. "required": true
  6676. }
  6677. ],
  6678. "responses": {
  6679. "200": {
  6680. "$ref": "#/responses/PublicKey"
  6681. },
  6682. "404": {
  6683. "$ref": "#/responses/notFound"
  6684. }
  6685. }
  6686. },
  6687. "delete": {
  6688. "produces": [
  6689. "application/json"
  6690. ],
  6691. "tags": [
  6692. "user"
  6693. ],
  6694. "summary": "Delete a public key",
  6695. "operationId": "userCurrentDeleteKey",
  6696. "parameters": [
  6697. {
  6698. "type": "integer",
  6699. "format": "int64",
  6700. "description": "id of key to delete",
  6701. "name": "id",
  6702. "in": "path",
  6703. "required": true
  6704. }
  6705. ],
  6706. "responses": {
  6707. "204": {
  6708. "$ref": "#/responses/empty"
  6709. },
  6710. "403": {
  6711. "$ref": "#/responses/forbidden"
  6712. },
  6713. "404": {
  6714. "$ref": "#/responses/notFound"
  6715. }
  6716. }
  6717. }
  6718. },
  6719. "/user/orgs": {
  6720. "get": {
  6721. "produces": [
  6722. "application/json"
  6723. ],
  6724. "tags": [
  6725. "organization"
  6726. ],
  6727. "summary": "List the current user's organizations",
  6728. "operationId": "orgListCurrentUserOrgs",
  6729. "responses": {
  6730. "200": {
  6731. "$ref": "#/responses/OrganizationList"
  6732. }
  6733. }
  6734. }
  6735. },
  6736. "/user/repos": {
  6737. "get": {
  6738. "produces": [
  6739. "application/json"
  6740. ],
  6741. "tags": [
  6742. "user"
  6743. ],
  6744. "summary": "List the repos that the authenticated user owns or has access to",
  6745. "operationId": "userCurrentListRepos",
  6746. "responses": {
  6747. "200": {
  6748. "$ref": "#/responses/RepositoryList"
  6749. }
  6750. }
  6751. },
  6752. "post": {
  6753. "consumes": [
  6754. "application/json"
  6755. ],
  6756. "produces": [
  6757. "application/json"
  6758. ],
  6759. "tags": [
  6760. "repository",
  6761. "user"
  6762. ],
  6763. "summary": "Create a repository",
  6764. "operationId": "createCurrentUserRepo",
  6765. "parameters": [
  6766. {
  6767. "name": "body",
  6768. "in": "body",
  6769. "schema": {
  6770. "$ref": "#/definitions/CreateRepoOption"
  6771. }
  6772. }
  6773. ],
  6774. "responses": {
  6775. "201": {
  6776. "$ref": "#/responses/Repository"
  6777. },
  6778. "409": {
  6779. "description": "The repository with the same name already exists."
  6780. },
  6781. "422": {
  6782. "$ref": "#/responses/validationError"
  6783. }
  6784. }
  6785. }
  6786. },
  6787. "/user/starred": {
  6788. "get": {
  6789. "produces": [
  6790. "application/json"
  6791. ],
  6792. "tags": [
  6793. "user"
  6794. ],
  6795. "summary": "The repos that the authenticated user has starred",
  6796. "operationId": "userCurrentListStarred",
  6797. "responses": {
  6798. "200": {
  6799. "$ref": "#/responses/RepositoryList"
  6800. }
  6801. }
  6802. }
  6803. },
  6804. "/user/starred/{owner}/{repo}": {
  6805. "get": {
  6806. "tags": [
  6807. "user"
  6808. ],
  6809. "summary": "Whether the authenticated is starring the repo",
  6810. "operationId": "userCurrentCheckStarring",
  6811. "parameters": [
  6812. {
  6813. "type": "string",
  6814. "description": "owner of the repo",
  6815. "name": "owner",
  6816. "in": "path",
  6817. "required": true
  6818. },
  6819. {
  6820. "type": "string",
  6821. "description": "name of the repo",
  6822. "name": "repo",
  6823. "in": "path",
  6824. "required": true
  6825. }
  6826. ],
  6827. "responses": {
  6828. "204": {
  6829. "$ref": "#/responses/empty"
  6830. },
  6831. "404": {
  6832. "$ref": "#/responses/notFound"
  6833. }
  6834. }
  6835. },
  6836. "put": {
  6837. "tags": [
  6838. "user"
  6839. ],
  6840. "summary": "Star the given repo",
  6841. "operationId": "userCurrentPutStar",
  6842. "parameters": [
  6843. {
  6844. "type": "string",
  6845. "description": "owner of the repo to star",
  6846. "name": "owner",
  6847. "in": "path",
  6848. "required": true
  6849. },
  6850. {
  6851. "type": "string",
  6852. "description": "name of the repo to star",
  6853. "name": "repo",
  6854. "in": "path",
  6855. "required": true
  6856. }
  6857. ],
  6858. "responses": {
  6859. "204": {
  6860. "$ref": "#/responses/empty"
  6861. }
  6862. }
  6863. },
  6864. "delete": {
  6865. "tags": [
  6866. "user"
  6867. ],
  6868. "summary": "Unstar the given repo",
  6869. "operationId": "userCurrentDeleteStar",
  6870. "parameters": [
  6871. {
  6872. "type": "string",
  6873. "description": "owner of the repo to unstar",
  6874. "name": "owner",
  6875. "in": "path",
  6876. "required": true
  6877. },
  6878. {
  6879. "type": "string",
  6880. "description": "name of the repo to unstar",
  6881. "name": "repo",
  6882. "in": "path",
  6883. "required": true
  6884. }
  6885. ],
  6886. "responses": {
  6887. "204": {
  6888. "$ref": "#/responses/empty"
  6889. }
  6890. }
  6891. }
  6892. },
  6893. "/user/subscriptions": {
  6894. "get": {
  6895. "produces": [
  6896. "application/json"
  6897. ],
  6898. "tags": [
  6899. "user"
  6900. ],
  6901. "summary": "List repositories watched by the authenticated user",
  6902. "operationId": "userCurrentListSubscriptions",
  6903. "responses": {
  6904. "200": {
  6905. "$ref": "#/responses/RepositoryList"
  6906. }
  6907. }
  6908. }
  6909. },
  6910. "/user/teams": {
  6911. "get": {
  6912. "produces": [
  6913. "application/json"
  6914. ],
  6915. "tags": [
  6916. "user"
  6917. ],
  6918. "summary": "List all the teams a user belongs to",
  6919. "operationId": "userListTeams",
  6920. "responses": {
  6921. "200": {
  6922. "$ref": "#/responses/TeamList"
  6923. }
  6924. }
  6925. }
  6926. },
  6927. "/user/times": {
  6928. "get": {
  6929. "produces": [
  6930. "application/json"
  6931. ],
  6932. "tags": [
  6933. "user"
  6934. ],
  6935. "summary": "List the current user's tracked times",
  6936. "operationId": "userCurrentTrackedTimes",
  6937. "responses": {
  6938. "200": {
  6939. "$ref": "#/responses/TrackedTimeList"
  6940. }
  6941. }
  6942. }
  6943. },
  6944. "/users/search": {
  6945. "get": {
  6946. "produces": [
  6947. "application/json"
  6948. ],
  6949. "tags": [
  6950. "user"
  6951. ],
  6952. "summary": "Search for users",
  6953. "operationId": "userSearch",
  6954. "parameters": [
  6955. {
  6956. "type": "string",
  6957. "description": "keyword",
  6958. "name": "q",
  6959. "in": "query"
  6960. },
  6961. {
  6962. "type": "integer",
  6963. "format": "int64",
  6964. "description": "ID of the user to search for",
  6965. "name": "uid",
  6966. "in": "query"
  6967. },
  6968. {
  6969. "type": "integer",
  6970. "description": "maximum number of users to return",
  6971. "name": "limit",
  6972. "in": "query"
  6973. }
  6974. ],
  6975. "responses": {
  6976. "200": {
  6977. "description": "SearchResults of a successful search",
  6978. "schema": {
  6979. "type": "object",
  6980. "properties": {
  6981. "data": {
  6982. "type": "array",
  6983. "items": {
  6984. "$ref": "#/definitions/User"
  6985. }
  6986. },
  6987. "ok": {
  6988. "type": "boolean"
  6989. }
  6990. }
  6991. }
  6992. }
  6993. }
  6994. }
  6995. },
  6996. "/users/{follower}/following/{followee}": {
  6997. "get": {
  6998. "tags": [
  6999. "user"
  7000. ],
  7001. "summary": "Check if one user is following another user",
  7002. "operationId": "userCheckFollowing",
  7003. "parameters": [
  7004. {
  7005. "type": "string",
  7006. "description": "username of following user",
  7007. "name": "follower",
  7008. "in": "path",
  7009. "required": true
  7010. },
  7011. {
  7012. "type": "string",
  7013. "description": "username of followed user",
  7014. "name": "followee",
  7015. "in": "path",
  7016. "required": true
  7017. }
  7018. ],
  7019. "responses": {
  7020. "204": {
  7021. "$ref": "#/responses/empty"
  7022. },
  7023. "404": {
  7024. "$ref": "#/responses/notFound"
  7025. }
  7026. }
  7027. }
  7028. },
  7029. "/users/{username}": {
  7030. "get": {
  7031. "produces": [
  7032. "application/json"
  7033. ],
  7034. "tags": [
  7035. "user"
  7036. ],
  7037. "summary": "Get a user",
  7038. "operationId": "userGet",
  7039. "parameters": [
  7040. {
  7041. "type": "string",
  7042. "description": "username of user to get",
  7043. "name": "username",
  7044. "in": "path",
  7045. "required": true
  7046. }
  7047. ],
  7048. "responses": {
  7049. "200": {
  7050. "$ref": "#/responses/User"
  7051. },
  7052. "404": {
  7053. "$ref": "#/responses/notFound"
  7054. }
  7055. }
  7056. }
  7057. },
  7058. "/users/{username}/followers": {
  7059. "get": {
  7060. "produces": [
  7061. "application/json"
  7062. ],
  7063. "tags": [
  7064. "user"
  7065. ],
  7066. "summary": "List the given user's followers",
  7067. "operationId": "userListFollowers",
  7068. "parameters": [
  7069. {
  7070. "type": "string",
  7071. "description": "username of user",
  7072. "name": "username",
  7073. "in": "path",
  7074. "required": true
  7075. }
  7076. ],
  7077. "responses": {
  7078. "200": {
  7079. "$ref": "#/responses/UserList"
  7080. }
  7081. }
  7082. }
  7083. },
  7084. "/users/{username}/following": {
  7085. "get": {
  7086. "produces": [
  7087. "application/json"
  7088. ],
  7089. "tags": [
  7090. "user"
  7091. ],
  7092. "summary": "List the users that the given user is following",
  7093. "operationId": "userListFollowing",
  7094. "parameters": [
  7095. {
  7096. "type": "string",
  7097. "description": "username of user",
  7098. "name": "username",
  7099. "in": "path",
  7100. "required": true
  7101. }
  7102. ],
  7103. "responses": {
  7104. "200": {
  7105. "$ref": "#/responses/UserList"
  7106. }
  7107. }
  7108. }
  7109. },
  7110. "/users/{username}/gpg_keys": {
  7111. "get": {
  7112. "produces": [
  7113. "application/json"
  7114. ],
  7115. "tags": [
  7116. "user"
  7117. ],
  7118. "summary": "List the given user's GPG keys",
  7119. "operationId": "userListGPGKeys",
  7120. "parameters": [
  7121. {
  7122. "type": "string",
  7123. "description": "username of user",
  7124. "name": "username",
  7125. "in": "path",
  7126. "required": true
  7127. }
  7128. ],
  7129. "responses": {
  7130. "200": {
  7131. "$ref": "#/responses/GPGKeyList"
  7132. }
  7133. }
  7134. }
  7135. },
  7136. "/users/{username}/heatmap": {
  7137. "get": {
  7138. "produces": [
  7139. "application/json"
  7140. ],
  7141. "tags": [
  7142. "user"
  7143. ],
  7144. "summary": "Get a user's heatmap",
  7145. "operationId": "userGetHeatmapData",
  7146. "parameters": [
  7147. {
  7148. "type": "string",
  7149. "description": "username of user to get",
  7150. "name": "username",
  7151. "in": "path",
  7152. "required": true
  7153. }
  7154. ],
  7155. "responses": {
  7156. "200": {
  7157. "$ref": "#/responses/UserHeatmapData"
  7158. },
  7159. "404": {
  7160. "$ref": "#/responses/notFound"
  7161. }
  7162. }
  7163. }
  7164. },
  7165. "/users/{username}/keys": {
  7166. "get": {
  7167. "produces": [
  7168. "application/json"
  7169. ],
  7170. "tags": [
  7171. "user"
  7172. ],
  7173. "summary": "List the given user's public keys",
  7174. "operationId": "userListKeys",
  7175. "parameters": [
  7176. {
  7177. "type": "string",
  7178. "description": "username of user",
  7179. "name": "username",
  7180. "in": "path",
  7181. "required": true
  7182. },
  7183. {
  7184. "type": "string",
  7185. "description": "fingerprint of the key",
  7186. "name": "fingerprint",
  7187. "in": "query"
  7188. }
  7189. ],
  7190. "responses": {
  7191. "200": {
  7192. "$ref": "#/responses/PublicKeyList"
  7193. }
  7194. }
  7195. }
  7196. },
  7197. "/users/{username}/orgs": {
  7198. "get": {
  7199. "produces": [
  7200. "application/json"
  7201. ],
  7202. "tags": [
  7203. "organization"
  7204. ],
  7205. "summary": "List a user's organizations",
  7206. "operationId": "orgListUserOrgs",
  7207. "parameters": [
  7208. {
  7209. "type": "string",
  7210. "description": "username of user",
  7211. "name": "username",
  7212. "in": "path",
  7213. "required": true
  7214. }
  7215. ],
  7216. "responses": {
  7217. "200": {
  7218. "$ref": "#/responses/OrganizationList"
  7219. }
  7220. }
  7221. }
  7222. },
  7223. "/users/{username}/repos": {
  7224. "get": {
  7225. "produces": [
  7226. "application/json"
  7227. ],
  7228. "tags": [
  7229. "user"
  7230. ],
  7231. "summary": "List the repos owned by the given user",
  7232. "operationId": "userListRepos",
  7233. "parameters": [
  7234. {
  7235. "type": "string",
  7236. "description": "username of user",
  7237. "name": "username",
  7238. "in": "path",
  7239. "required": true
  7240. }
  7241. ],
  7242. "responses": {
  7243. "200": {
  7244. "$ref": "#/responses/RepositoryList"
  7245. }
  7246. }
  7247. }
  7248. },
  7249. "/users/{username}/starred": {
  7250. "get": {
  7251. "produces": [
  7252. "application/json"
  7253. ],
  7254. "tags": [
  7255. "user"
  7256. ],
  7257. "summary": "The repos that the given user has starred",
  7258. "operationId": "userListStarred",
  7259. "parameters": [
  7260. {
  7261. "type": "string",
  7262. "description": "username of user",
  7263. "name": "username",
  7264. "in": "path",
  7265. "required": true
  7266. }
  7267. ],
  7268. "responses": {
  7269. "200": {
  7270. "$ref": "#/responses/RepositoryList"
  7271. }
  7272. }
  7273. }
  7274. },
  7275. "/users/{username}/subscriptions": {
  7276. "get": {
  7277. "produces": [
  7278. "application/json"
  7279. ],
  7280. "tags": [
  7281. "user"
  7282. ],
  7283. "summary": "List the repositories watched by a user",
  7284. "operationId": "userListSubscriptions",
  7285. "parameters": [
  7286. {
  7287. "type": "string",
  7288. "description": "username of the user",
  7289. "name": "username",
  7290. "in": "path",
  7291. "required": true
  7292. }
  7293. ],
  7294. "responses": {
  7295. "200": {
  7296. "$ref": "#/responses/RepositoryList"
  7297. }
  7298. }
  7299. }
  7300. },
  7301. "/users/{username}/tokens": {
  7302. "get": {
  7303. "produces": [
  7304. "application/json"
  7305. ],
  7306. "tags": [
  7307. "user"
  7308. ],
  7309. "summary": "List the authenticated user's access tokens",
  7310. "operationId": "userGetTokens",
  7311. "parameters": [
  7312. {
  7313. "type": "string",
  7314. "description": "username of user",
  7315. "name": "username",
  7316. "in": "path",
  7317. "required": true
  7318. }
  7319. ],
  7320. "responses": {
  7321. "200": {
  7322. "$ref": "#/responses/AccessTokenList"
  7323. }
  7324. }
  7325. },
  7326. "post": {
  7327. "consumes": [
  7328. "application/json"
  7329. ],
  7330. "produces": [
  7331. "application/json"
  7332. ],
  7333. "tags": [
  7334. "user"
  7335. ],
  7336. "summary": "Create an access token",
  7337. "operationId": "userCreateToken",
  7338. "parameters": [
  7339. {
  7340. "type": "string",
  7341. "x-go-name": "Name",
  7342. "description": "username of user",
  7343. "name": "username",
  7344. "in": "path",
  7345. "required": true
  7346. },
  7347. {
  7348. "name": "accessToken",
  7349. "in": "body",
  7350. "schema": {
  7351. "type": "object",
  7352. "required": [
  7353. "name"
  7354. ],
  7355. "properties": {
  7356. "name": {
  7357. "type": "string"
  7358. }
  7359. }
  7360. }
  7361. }
  7362. ],
  7363. "responses": {
  7364. "200": {
  7365. "$ref": "#/responses/AccessToken"
  7366. }
  7367. }
  7368. }
  7369. },
  7370. "/users/{username}/tokens/{token}": {
  7371. "delete": {
  7372. "produces": [
  7373. "application/json"
  7374. ],
  7375. "tags": [
  7376. "user"
  7377. ],
  7378. "summary": "delete an access token",
  7379. "operationId": "userDeleteAccessToken",
  7380. "parameters": [
  7381. {
  7382. "type": "string",
  7383. "description": "username of user",
  7384. "name": "username",
  7385. "in": "path",
  7386. "required": true
  7387. },
  7388. {
  7389. "type": "integer",
  7390. "format": "int64",
  7391. "description": "token to be deleted",
  7392. "name": "token",
  7393. "in": "path",
  7394. "required": true
  7395. }
  7396. ],
  7397. "responses": {
  7398. "204": {
  7399. "$ref": "#/responses/empty"
  7400. }
  7401. }
  7402. }
  7403. },
  7404. "/version": {
  7405. "get": {
  7406. "produces": [
  7407. "application/json"
  7408. ],
  7409. "tags": [
  7410. "miscellaneous"
  7411. ],
  7412. "summary": "Returns the version of the Gitea application",
  7413. "operationId": "getVersion",
  7414. "responses": {
  7415. "200": {
  7416. "$ref": "#/responses/ServerVersion"
  7417. }
  7418. }
  7419. }
  7420. }
  7421. },
  7422. "definitions": {
  7423. "APIError": {
  7424. "description": "APIError is an api error with a message",
  7425. "type": "object",
  7426. "properties": {
  7427. "message": {
  7428. "type": "string",
  7429. "x-go-name": "Message"
  7430. },
  7431. "url": {
  7432. "type": "string",
  7433. "x-go-name": "URL"
  7434. }
  7435. },
  7436. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7437. },
  7438. "AccessToken": {
  7439. "type": "object",
  7440. "title": "AccessToken represents an API access token.",
  7441. "properties": {
  7442. "id": {
  7443. "type": "integer",
  7444. "format": "int64",
  7445. "x-go-name": "ID"
  7446. },
  7447. "name": {
  7448. "type": "string",
  7449. "x-go-name": "Name"
  7450. },
  7451. "sha1": {
  7452. "type": "string",
  7453. "x-go-name": "Token"
  7454. },
  7455. "token_last_eight": {
  7456. "type": "string",
  7457. "x-go-name": "TokenLastEight"
  7458. }
  7459. },
  7460. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7461. },
  7462. "AddCollaboratorOption": {
  7463. "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository",
  7464. "type": "object",
  7465. "properties": {
  7466. "permission": {
  7467. "type": "string",
  7468. "x-go-name": "Permission"
  7469. }
  7470. },
  7471. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7472. },
  7473. "AddTimeOption": {
  7474. "description": "AddTimeOption options for adding time to an issue",
  7475. "type": "object",
  7476. "required": [
  7477. "time"
  7478. ],
  7479. "properties": {
  7480. "time": {
  7481. "description": "time in seconds",
  7482. "type": "integer",
  7483. "format": "int64",
  7484. "x-go-name": "Time"
  7485. }
  7486. },
  7487. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7488. },
  7489. "AnnotatedTag": {
  7490. "description": "AnnotatedTag represents an annotated tag",
  7491. "type": "object",
  7492. "properties": {
  7493. "message": {
  7494. "type": "string",
  7495. "x-go-name": "Message"
  7496. },
  7497. "object": {
  7498. "$ref": "#/definitions/AnnotatedTagObject"
  7499. },
  7500. "sha": {
  7501. "type": "string",
  7502. "x-go-name": "SHA"
  7503. },
  7504. "tag": {
  7505. "type": "string",
  7506. "x-go-name": "Tag"
  7507. },
  7508. "tagger": {
  7509. "$ref": "#/definitions/CommitUser"
  7510. },
  7511. "url": {
  7512. "type": "string",
  7513. "x-go-name": "URL"
  7514. },
  7515. "verification": {
  7516. "$ref": "#/definitions/PayloadCommitVerification"
  7517. }
  7518. },
  7519. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7520. },
  7521. "AnnotatedTagObject": {
  7522. "description": "AnnotatedTagObject contains meta information of the tag object",
  7523. "type": "object",
  7524. "properties": {
  7525. "sha": {
  7526. "type": "string",
  7527. "x-go-name": "SHA"
  7528. },
  7529. "type": {
  7530. "type": "string",
  7531. "x-go-name": "Type"
  7532. },
  7533. "url": {
  7534. "type": "string",
  7535. "x-go-name": "URL"
  7536. }
  7537. },
  7538. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7539. },
  7540. "Attachment": {
  7541. "description": "Attachment a generic attachment",
  7542. "type": "object",
  7543. "properties": {
  7544. "browser_download_url": {
  7545. "type": "string",
  7546. "x-go-name": "DownloadURL"
  7547. },
  7548. "created_at": {
  7549. "type": "string",
  7550. "format": "date-time",
  7551. "x-go-name": "Created"
  7552. },
  7553. "download_count": {
  7554. "type": "integer",
  7555. "format": "int64",
  7556. "x-go-name": "DownloadCount"
  7557. },
  7558. "id": {
  7559. "type": "integer",
  7560. "format": "int64",
  7561. "x-go-name": "ID"
  7562. },
  7563. "name": {
  7564. "type": "string",
  7565. "x-go-name": "Name"
  7566. },
  7567. "size": {
  7568. "type": "integer",
  7569. "format": "int64",
  7570. "x-go-name": "Size"
  7571. },
  7572. "uuid": {
  7573. "type": "string",
  7574. "x-go-name": "UUID"
  7575. }
  7576. },
  7577. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7578. },
  7579. "Branch": {
  7580. "description": "Branch represents a repository branch",
  7581. "type": "object",
  7582. "properties": {
  7583. "commit": {
  7584. "$ref": "#/definitions/PayloadCommit"
  7585. },
  7586. "name": {
  7587. "type": "string",
  7588. "x-go-name": "Name"
  7589. }
  7590. },
  7591. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7592. },
  7593. "Comment": {
  7594. "description": "Comment represents a comment on a commit or issue",
  7595. "type": "object",
  7596. "properties": {
  7597. "body": {
  7598. "type": "string",
  7599. "x-go-name": "Body"
  7600. },
  7601. "created_at": {
  7602. "type": "string",
  7603. "format": "date-time",
  7604. "x-go-name": "Created"
  7605. },
  7606. "html_url": {
  7607. "type": "string",
  7608. "x-go-name": "HTMLURL"
  7609. },
  7610. "id": {
  7611. "type": "integer",
  7612. "format": "int64",
  7613. "x-go-name": "ID"
  7614. },
  7615. "issue_url": {
  7616. "type": "string",
  7617. "x-go-name": "IssueURL"
  7618. },
  7619. "original_author": {
  7620. "type": "string",
  7621. "x-go-name": "OriginalAuthor"
  7622. },
  7623. "original_author_id": {
  7624. "type": "integer",
  7625. "format": "int64",
  7626. "x-go-name": "OriginalAuthorID"
  7627. },
  7628. "pull_request_url": {
  7629. "type": "string",
  7630. "x-go-name": "PRURL"
  7631. },
  7632. "updated_at": {
  7633. "type": "string",
  7634. "format": "date-time",
  7635. "x-go-name": "Updated"
  7636. },
  7637. "user": {
  7638. "$ref": "#/definitions/User"
  7639. }
  7640. },
  7641. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7642. },
  7643. "Commit": {
  7644. "type": "object",
  7645. "title": "Commit contains information generated from a Git commit.",
  7646. "properties": {
  7647. "author": {
  7648. "$ref": "#/definitions/User"
  7649. },
  7650. "commit": {
  7651. "$ref": "#/definitions/RepoCommit"
  7652. },
  7653. "committer": {
  7654. "$ref": "#/definitions/User"
  7655. },
  7656. "html_url": {
  7657. "type": "string",
  7658. "x-go-name": "HTMLURL"
  7659. },
  7660. "parents": {
  7661. "type": "array",
  7662. "items": {
  7663. "$ref": "#/definitions/CommitMeta"
  7664. },
  7665. "x-go-name": "Parents"
  7666. },
  7667. "sha": {
  7668. "type": "string",
  7669. "x-go-name": "SHA"
  7670. },
  7671. "url": {
  7672. "type": "string",
  7673. "x-go-name": "URL"
  7674. }
  7675. },
  7676. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7677. },
  7678. "CommitMeta": {
  7679. "type": "object",
  7680. "title": "CommitMeta contains meta information of a commit in terms of API.",
  7681. "properties": {
  7682. "sha": {
  7683. "type": "string",
  7684. "x-go-name": "SHA"
  7685. },
  7686. "url": {
  7687. "type": "string",
  7688. "x-go-name": "URL"
  7689. }
  7690. },
  7691. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7692. },
  7693. "CommitUser": {
  7694. "type": "object",
  7695. "title": "CommitUser contains information of a user in the context of a commit.",
  7696. "properties": {
  7697. "date": {
  7698. "type": "string",
  7699. "x-go-name": "Date"
  7700. },
  7701. "email": {
  7702. "type": "string",
  7703. "format": "email",
  7704. "x-go-name": "Email"
  7705. },
  7706. "name": {
  7707. "type": "string",
  7708. "x-go-name": "Name"
  7709. }
  7710. },
  7711. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7712. },
  7713. "ContentsResponse": {
  7714. "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content",
  7715. "type": "object",
  7716. "properties": {
  7717. "_links": {
  7718. "$ref": "#/definitions/FileLinksResponse"
  7719. },
  7720. "content": {
  7721. "description": "`content` is populated when `type` is `file`, otherwise null",
  7722. "type": "string",
  7723. "x-go-name": "Content"
  7724. },
  7725. "download_url": {
  7726. "type": "string",
  7727. "x-go-name": "DownloadURL"
  7728. },
  7729. "encoding": {
  7730. "description": "`encoding` is populated when `type` is `file`, otherwise null",
  7731. "type": "string",
  7732. "x-go-name": "Encoding"
  7733. },
  7734. "git_url": {
  7735. "type": "string",
  7736. "x-go-name": "GitURL"
  7737. },
  7738. "html_url": {
  7739. "type": "string",
  7740. "x-go-name": "HTMLURL"
  7741. },
  7742. "name": {
  7743. "type": "string",
  7744. "x-go-name": "Name"
  7745. },
  7746. "path": {
  7747. "type": "string",
  7748. "x-go-name": "Path"
  7749. },
  7750. "sha": {
  7751. "type": "string",
  7752. "x-go-name": "SHA"
  7753. },
  7754. "size": {
  7755. "type": "integer",
  7756. "format": "int64",
  7757. "x-go-name": "Size"
  7758. },
  7759. "submodule_git_url": {
  7760. "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null",
  7761. "type": "string",
  7762. "x-go-name": "SubmoduleGitURL"
  7763. },
  7764. "target": {
  7765. "description": "`target` is populated when `type` is `symlink`, otherwise null",
  7766. "type": "string",
  7767. "x-go-name": "Target"
  7768. },
  7769. "type": {
  7770. "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`",
  7771. "type": "string",
  7772. "x-go-name": "Type"
  7773. },
  7774. "url": {
  7775. "type": "string",
  7776. "x-go-name": "URL"
  7777. }
  7778. },
  7779. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7780. },
  7781. "CreateEmailOption": {
  7782. "description": "CreateEmailOption options when creating email addresses",
  7783. "type": "object",
  7784. "properties": {
  7785. "emails": {
  7786. "description": "email addresses to add",
  7787. "type": "array",
  7788. "items": {
  7789. "type": "string"
  7790. },
  7791. "x-go-name": "Emails"
  7792. }
  7793. },
  7794. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7795. },
  7796. "CreateFileOptions": {
  7797. "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)",
  7798. "type": "object",
  7799. "required": [
  7800. "content"
  7801. ],
  7802. "properties": {
  7803. "author": {
  7804. "$ref": "#/definitions/Identity"
  7805. },
  7806. "branch": {
  7807. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  7808. "type": "string",
  7809. "x-go-name": "BranchName"
  7810. },
  7811. "committer": {
  7812. "$ref": "#/definitions/Identity"
  7813. },
  7814. "content": {
  7815. "description": "content must be base64 encoded",
  7816. "type": "string",
  7817. "x-go-name": "Content"
  7818. },
  7819. "message": {
  7820. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  7821. "type": "string",
  7822. "x-go-name": "Message"
  7823. },
  7824. "new_branch": {
  7825. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  7826. "type": "string",
  7827. "x-go-name": "NewBranchName"
  7828. }
  7829. },
  7830. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7831. },
  7832. "CreateForkOption": {
  7833. "description": "CreateForkOption options for creating a fork",
  7834. "type": "object",
  7835. "properties": {
  7836. "organization": {
  7837. "description": "organization name, if forking into an organization",
  7838. "type": "string",
  7839. "x-go-name": "Organization"
  7840. }
  7841. },
  7842. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7843. },
  7844. "CreateGPGKeyOption": {
  7845. "description": "CreateGPGKeyOption options create user GPG key",
  7846. "type": "object",
  7847. "required": [
  7848. "armored_public_key"
  7849. ],
  7850. "properties": {
  7851. "armored_public_key": {
  7852. "description": "An armored GPG key to add",
  7853. "type": "string",
  7854. "uniqueItems": true,
  7855. "x-go-name": "ArmoredKey"
  7856. }
  7857. },
  7858. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7859. },
  7860. "CreateHookOption": {
  7861. "description": "CreateHookOption options when create a hook",
  7862. "type": "object",
  7863. "required": [
  7864. "type",
  7865. "config"
  7866. ],
  7867. "properties": {
  7868. "active": {
  7869. "type": "boolean",
  7870. "default": false,
  7871. "x-go-name": "Active"
  7872. },
  7873. "branch_filter": {
  7874. "type": "string",
  7875. "x-go-name": "BranchFilter"
  7876. },
  7877. "config": {
  7878. "type": "object",
  7879. "additionalProperties": {
  7880. "type": "string"
  7881. },
  7882. "x-go-name": "Config"
  7883. },
  7884. "events": {
  7885. "type": "array",
  7886. "items": {
  7887. "type": "string"
  7888. },
  7889. "x-go-name": "Events"
  7890. },
  7891. "type": {
  7892. "type": "string",
  7893. "enum": [
  7894. "gitea",
  7895. "gogs",
  7896. "slack",
  7897. "discord"
  7898. ],
  7899. "x-go-name": "Type"
  7900. }
  7901. },
  7902. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7903. },
  7904. "CreateIssueCommentOption": {
  7905. "description": "CreateIssueCommentOption options for creating a comment on an issue",
  7906. "type": "object",
  7907. "required": [
  7908. "body"
  7909. ],
  7910. "properties": {
  7911. "body": {
  7912. "type": "string",
  7913. "x-go-name": "Body"
  7914. }
  7915. },
  7916. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7917. },
  7918. "CreateIssueOption": {
  7919. "description": "CreateIssueOption options to create one issue",
  7920. "type": "object",
  7921. "required": [
  7922. "title"
  7923. ],
  7924. "properties": {
  7925. "assignee": {
  7926. "description": "username of assignee",
  7927. "type": "string",
  7928. "x-go-name": "Assignee"
  7929. },
  7930. "assignees": {
  7931. "type": "array",
  7932. "items": {
  7933. "type": "string"
  7934. },
  7935. "x-go-name": "Assignees"
  7936. },
  7937. "body": {
  7938. "type": "string",
  7939. "x-go-name": "Body"
  7940. },
  7941. "closed": {
  7942. "type": "boolean",
  7943. "x-go-name": "Closed"
  7944. },
  7945. "due_date": {
  7946. "type": "string",
  7947. "format": "date-time",
  7948. "x-go-name": "Deadline"
  7949. },
  7950. "labels": {
  7951. "description": "list of label ids",
  7952. "type": "array",
  7953. "items": {
  7954. "type": "integer",
  7955. "format": "int64"
  7956. },
  7957. "x-go-name": "Labels"
  7958. },
  7959. "milestone": {
  7960. "description": "milestone id",
  7961. "type": "integer",
  7962. "format": "int64",
  7963. "x-go-name": "Milestone"
  7964. },
  7965. "title": {
  7966. "type": "string",
  7967. "x-go-name": "Title"
  7968. }
  7969. },
  7970. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7971. },
  7972. "CreateKeyOption": {
  7973. "description": "CreateKeyOption options when creating a key",
  7974. "type": "object",
  7975. "required": [
  7976. "title",
  7977. "key"
  7978. ],
  7979. "properties": {
  7980. "key": {
  7981. "description": "An armored SSH key to add",
  7982. "type": "string",
  7983. "uniqueItems": true,
  7984. "x-go-name": "Key"
  7985. },
  7986. "read_only": {
  7987. "description": "Describe if the key has only read access or read/write",
  7988. "type": "boolean",
  7989. "x-go-name": "ReadOnly"
  7990. },
  7991. "title": {
  7992. "description": "Title of the key to add",
  7993. "type": "string",
  7994. "uniqueItems": true,
  7995. "x-go-name": "Title"
  7996. }
  7997. },
  7998. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7999. },
  8000. "CreateLabelOption": {
  8001. "description": "CreateLabelOption options for creating a label",
  8002. "type": "object",
  8003. "required": [
  8004. "name",
  8005. "color"
  8006. ],
  8007. "properties": {
  8008. "color": {
  8009. "type": "string",
  8010. "x-go-name": "Color",
  8011. "example": "#00aabb"
  8012. },
  8013. "description": {
  8014. "type": "string",
  8015. "x-go-name": "Description"
  8016. },
  8017. "name": {
  8018. "type": "string",
  8019. "x-go-name": "Name"
  8020. }
  8021. },
  8022. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8023. },
  8024. "CreateMilestoneOption": {
  8025. "description": "CreateMilestoneOption options for creating a milestone",
  8026. "type": "object",
  8027. "properties": {
  8028. "description": {
  8029. "type": "string",
  8030. "x-go-name": "Description"
  8031. },
  8032. "due_on": {
  8033. "type": "string",
  8034. "format": "date-time",
  8035. "x-go-name": "Deadline"
  8036. },
  8037. "title": {
  8038. "type": "string",
  8039. "x-go-name": "Title"
  8040. }
  8041. },
  8042. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8043. },
  8044. "CreateOrgOption": {
  8045. "description": "CreateOrgOption options for creating an organization",
  8046. "type": "object",
  8047. "required": [
  8048. "username"
  8049. ],
  8050. "properties": {
  8051. "description": {
  8052. "type": "string",
  8053. "x-go-name": "Description"
  8054. },
  8055. "full_name": {
  8056. "type": "string",
  8057. "x-go-name": "FullName"
  8058. },
  8059. "location": {
  8060. "type": "string",
  8061. "x-go-name": "Location"
  8062. },
  8063. "repo_admin_change_team_access": {
  8064. "type": "boolean",
  8065. "x-go-name": "RepoAdminChangeTeamAccess"
  8066. },
  8067. "username": {
  8068. "type": "string",
  8069. "x-go-name": "UserName"
  8070. },
  8071. "visibility": {
  8072. "description": "possible values are `public` (default), `limited` or `private`",
  8073. "type": "string",
  8074. "enum": [
  8075. "public",
  8076. "limited",
  8077. "private"
  8078. ],
  8079. "x-go-name": "Visibility"
  8080. },
  8081. "website": {
  8082. "type": "string",
  8083. "x-go-name": "Website"
  8084. }
  8085. },
  8086. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8087. },
  8088. "CreatePullRequestOption": {
  8089. "description": "CreatePullRequestOption options when creating a pull request",
  8090. "type": "object",
  8091. "properties": {
  8092. "assignee": {
  8093. "type": "string",
  8094. "x-go-name": "Assignee"
  8095. },
  8096. "assignees": {
  8097. "type": "array",
  8098. "items": {
  8099. "type": "string"
  8100. },
  8101. "x-go-name": "Assignees"
  8102. },
  8103. "base": {
  8104. "type": "string",
  8105. "x-go-name": "Base"
  8106. },
  8107. "body": {
  8108. "type": "string",
  8109. "x-go-name": "Body"
  8110. },
  8111. "due_date": {
  8112. "type": "string",
  8113. "format": "date-time",
  8114. "x-go-name": "Deadline"
  8115. },
  8116. "head": {
  8117. "type": "string",
  8118. "x-go-name": "Head"
  8119. },
  8120. "labels": {
  8121. "type": "array",
  8122. "items": {
  8123. "type": "integer",
  8124. "format": "int64"
  8125. },
  8126. "x-go-name": "Labels"
  8127. },
  8128. "milestone": {
  8129. "type": "integer",
  8130. "format": "int64",
  8131. "x-go-name": "Milestone"
  8132. },
  8133. "title": {
  8134. "type": "string",
  8135. "x-go-name": "Title"
  8136. }
  8137. },
  8138. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8139. },
  8140. "CreateReleaseOption": {
  8141. "description": "CreateReleaseOption options when creating a release",
  8142. "type": "object",
  8143. "required": [
  8144. "tag_name"
  8145. ],
  8146. "properties": {
  8147. "body": {
  8148. "type": "string",
  8149. "x-go-name": "Note"
  8150. },
  8151. "draft": {
  8152. "type": "boolean",
  8153. "x-go-name": "IsDraft"
  8154. },
  8155. "name": {
  8156. "type": "string",
  8157. "x-go-name": "Title"
  8158. },
  8159. "prerelease": {
  8160. "type": "boolean",
  8161. "x-go-name": "IsPrerelease"
  8162. },
  8163. "tag_name": {
  8164. "type": "string",
  8165. "x-go-name": "TagName"
  8166. },
  8167. "target_commitish": {
  8168. "type": "string",
  8169. "x-go-name": "Target"
  8170. }
  8171. },
  8172. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8173. },
  8174. "CreateRepoOption": {
  8175. "description": "CreateRepoOption options when creating repository",
  8176. "type": "object",
  8177. "required": [
  8178. "name"
  8179. ],
  8180. "properties": {
  8181. "auto_init": {
  8182. "description": "Whether the repository should be auto-intialized?",
  8183. "type": "boolean",
  8184. "x-go-name": "AutoInit"
  8185. },
  8186. "description": {
  8187. "description": "Description of the repository to create",
  8188. "type": "string",
  8189. "x-go-name": "Description"
  8190. },
  8191. "gitignores": {
  8192. "description": "Gitignores to use",
  8193. "type": "string",
  8194. "x-go-name": "Gitignores"
  8195. },
  8196. "issue_labels": {
  8197. "description": "Issue Label set to use",
  8198. "type": "string",
  8199. "x-go-name": "IssueLabels"
  8200. },
  8201. "license": {
  8202. "description": "License to use",
  8203. "type": "string",
  8204. "x-go-name": "License"
  8205. },
  8206. "name": {
  8207. "description": "Name of the repository to create",
  8208. "type": "string",
  8209. "uniqueItems": true,
  8210. "x-go-name": "Name"
  8211. },
  8212. "private": {
  8213. "description": "Whether the repository is private",
  8214. "type": "boolean",
  8215. "x-go-name": "Private"
  8216. },
  8217. "readme": {
  8218. "description": "Readme of the repository to create",
  8219. "type": "string",
  8220. "x-go-name": "Readme"
  8221. }
  8222. },
  8223. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8224. },
  8225. "CreateStatusOption": {
  8226. "description": "CreateStatusOption holds the information needed to create a new Status for a Commit",
  8227. "type": "object",
  8228. "properties": {
  8229. "context": {
  8230. "type": "string",
  8231. "x-go-name": "Context"
  8232. },
  8233. "description": {
  8234. "type": "string",
  8235. "x-go-name": "Description"
  8236. },
  8237. "state": {
  8238. "$ref": "#/definitions/StatusState"
  8239. },
  8240. "target_url": {
  8241. "type": "string",
  8242. "x-go-name": "TargetURL"
  8243. }
  8244. },
  8245. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8246. },
  8247. "CreateTeamOption": {
  8248. "description": "CreateTeamOption options for creating a team",
  8249. "type": "object",
  8250. "required": [
  8251. "name"
  8252. ],
  8253. "properties": {
  8254. "description": {
  8255. "type": "string",
  8256. "x-go-name": "Description"
  8257. },
  8258. "includes_all_repositories": {
  8259. "type": "boolean",
  8260. "x-go-name": "IncludesAllRepositories"
  8261. },
  8262. "name": {
  8263. "type": "string",
  8264. "x-go-name": "Name"
  8265. },
  8266. "permission": {
  8267. "type": "string",
  8268. "enum": [
  8269. "read",
  8270. "write",
  8271. "admin"
  8272. ],
  8273. "x-go-name": "Permission"
  8274. },
  8275. "units": {
  8276. "type": "array",
  8277. "items": {
  8278. "type": "string"
  8279. },
  8280. "x-go-name": "Units",
  8281. "example": [
  8282. "repo.code",
  8283. "repo.issues",
  8284. "repo.ext_issues",
  8285. "repo.wiki",
  8286. "repo.pulls",
  8287. "repo.releases",
  8288. "repo.ext_wiki"
  8289. ]
  8290. }
  8291. },
  8292. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8293. },
  8294. "CreateUserOption": {
  8295. "description": "CreateUserOption create user options",
  8296. "type": "object",
  8297. "required": [
  8298. "username",
  8299. "email",
  8300. "password"
  8301. ],
  8302. "properties": {
  8303. "email": {
  8304. "type": "string",
  8305. "format": "email",
  8306. "x-go-name": "Email"
  8307. },
  8308. "full_name": {
  8309. "type": "string",
  8310. "x-go-name": "FullName"
  8311. },
  8312. "login_name": {
  8313. "type": "string",
  8314. "x-go-name": "LoginName"
  8315. },
  8316. "must_change_password": {
  8317. "type": "boolean",
  8318. "x-go-name": "MustChangePassword"
  8319. },
  8320. "password": {
  8321. "type": "string",
  8322. "x-go-name": "Password"
  8323. },
  8324. "send_notify": {
  8325. "type": "boolean",
  8326. "x-go-name": "SendNotify"
  8327. },
  8328. "source_id": {
  8329. "type": "integer",
  8330. "format": "int64",
  8331. "x-go-name": "SourceID"
  8332. },
  8333. "username": {
  8334. "type": "string",
  8335. "x-go-name": "Username"
  8336. }
  8337. },
  8338. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8339. },
  8340. "DeleteEmailOption": {
  8341. "description": "DeleteEmailOption options when deleting email addresses",
  8342. "type": "object",
  8343. "properties": {
  8344. "emails": {
  8345. "description": "email addresses to delete",
  8346. "type": "array",
  8347. "items": {
  8348. "type": "string"
  8349. },
  8350. "x-go-name": "Emails"
  8351. }
  8352. },
  8353. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8354. },
  8355. "DeleteFileOptions": {
  8356. "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)",
  8357. "type": "object",
  8358. "required": [
  8359. "sha"
  8360. ],
  8361. "properties": {
  8362. "author": {
  8363. "$ref": "#/definitions/Identity"
  8364. },
  8365. "branch": {
  8366. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  8367. "type": "string",
  8368. "x-go-name": "BranchName"
  8369. },
  8370. "committer": {
  8371. "$ref": "#/definitions/Identity"
  8372. },
  8373. "message": {
  8374. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  8375. "type": "string",
  8376. "x-go-name": "Message"
  8377. },
  8378. "new_branch": {
  8379. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  8380. "type": "string",
  8381. "x-go-name": "NewBranchName"
  8382. },
  8383. "sha": {
  8384. "description": "sha is the SHA for the file that already exists",
  8385. "type": "string",
  8386. "x-go-name": "SHA"
  8387. }
  8388. },
  8389. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8390. },
  8391. "DeployKey": {
  8392. "description": "DeployKey a deploy key",
  8393. "type": "object",
  8394. "properties": {
  8395. "created_at": {
  8396. "type": "string",
  8397. "format": "date-time",
  8398. "x-go-name": "Created"
  8399. },
  8400. "fingerprint": {
  8401. "type": "string",
  8402. "x-go-name": "Fingerprint"
  8403. },
  8404. "id": {
  8405. "type": "integer",
  8406. "format": "int64",
  8407. "x-go-name": "ID"
  8408. },
  8409. "key": {
  8410. "type": "string",
  8411. "x-go-name": "Key"
  8412. },
  8413. "key_id": {
  8414. "type": "integer",
  8415. "format": "int64",
  8416. "x-go-name": "KeyID"
  8417. },
  8418. "read_only": {
  8419. "type": "boolean",
  8420. "x-go-name": "ReadOnly"
  8421. },
  8422. "repository": {
  8423. "$ref": "#/definitions/Repository"
  8424. },
  8425. "title": {
  8426. "type": "string",
  8427. "x-go-name": "Title"
  8428. },
  8429. "url": {
  8430. "type": "string",
  8431. "x-go-name": "URL"
  8432. }
  8433. },
  8434. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8435. },
  8436. "EditAttachmentOptions": {
  8437. "description": "EditAttachmentOptions options for editing attachments",
  8438. "type": "object",
  8439. "properties": {
  8440. "name": {
  8441. "type": "string",
  8442. "x-go-name": "Name"
  8443. }
  8444. },
  8445. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8446. },
  8447. "EditDeadlineOption": {
  8448. "description": "EditDeadlineOption options for creating a deadline",
  8449. "type": "object",
  8450. "required": [
  8451. "due_date"
  8452. ],
  8453. "properties": {
  8454. "due_date": {
  8455. "type": "string",
  8456. "format": "date-time",
  8457. "x-go-name": "Deadline"
  8458. }
  8459. },
  8460. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8461. },
  8462. "EditGitHookOption": {
  8463. "description": "EditGitHookOption options when modifying one Git hook",
  8464. "type": "object",
  8465. "properties": {
  8466. "content": {
  8467. "type": "string",
  8468. "x-go-name": "Content"
  8469. }
  8470. },
  8471. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8472. },
  8473. "EditHookOption": {
  8474. "description": "EditHookOption options when modify one hook",
  8475. "type": "object",
  8476. "properties": {
  8477. "active": {
  8478. "type": "boolean",
  8479. "x-go-name": "Active"
  8480. },
  8481. "branch_filter": {
  8482. "type": "string",
  8483. "x-go-name": "BranchFilter"
  8484. },
  8485. "config": {
  8486. "type": "object",
  8487. "additionalProperties": {
  8488. "type": "string"
  8489. },
  8490. "x-go-name": "Config"
  8491. },
  8492. "events": {
  8493. "type": "array",
  8494. "items": {
  8495. "type": "string"
  8496. },
  8497. "x-go-name": "Events"
  8498. }
  8499. },
  8500. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8501. },
  8502. "EditIssueCommentOption": {
  8503. "description": "EditIssueCommentOption options for editing a comment",
  8504. "type": "object",
  8505. "required": [
  8506. "body"
  8507. ],
  8508. "properties": {
  8509. "body": {
  8510. "type": "string",
  8511. "x-go-name": "Body"
  8512. }
  8513. },
  8514. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8515. },
  8516. "EditIssueOption": {
  8517. "description": "EditIssueOption options for editing an issue",
  8518. "type": "object",
  8519. "properties": {
  8520. "assignee": {
  8521. "type": "string",
  8522. "x-go-name": "Assignee"
  8523. },
  8524. "assignees": {
  8525. "type": "array",
  8526. "items": {
  8527. "type": "string"
  8528. },
  8529. "x-go-name": "Assignees"
  8530. },
  8531. "body": {
  8532. "type": "string",
  8533. "x-go-name": "Body"
  8534. },
  8535. "due_date": {
  8536. "type": "string",
  8537. "format": "date-time",
  8538. "x-go-name": "Deadline"
  8539. },
  8540. "milestone": {
  8541. "type": "integer",
  8542. "format": "int64",
  8543. "x-go-name": "Milestone"
  8544. },
  8545. "state": {
  8546. "type": "string",
  8547. "x-go-name": "State"
  8548. },
  8549. "title": {
  8550. "type": "string",
  8551. "x-go-name": "Title"
  8552. },
  8553. "unset_due_date": {
  8554. "type": "boolean",
  8555. "x-go-name": "RemoveDeadline"
  8556. }
  8557. },
  8558. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8559. },
  8560. "EditLabelOption": {
  8561. "description": "EditLabelOption options for editing a label",
  8562. "type": "object",
  8563. "properties": {
  8564. "color": {
  8565. "type": "string",
  8566. "x-go-name": "Color"
  8567. },
  8568. "description": {
  8569. "type": "string",
  8570. "x-go-name": "Description"
  8571. },
  8572. "name": {
  8573. "type": "string",
  8574. "x-go-name": "Name"
  8575. }
  8576. },
  8577. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8578. },
  8579. "EditMilestoneOption": {
  8580. "description": "EditMilestoneOption options for editing a milestone",
  8581. "type": "object",
  8582. "properties": {
  8583. "description": {
  8584. "type": "string",
  8585. "x-go-name": "Description"
  8586. },
  8587. "due_on": {
  8588. "type": "string",
  8589. "format": "date-time",
  8590. "x-go-name": "Deadline"
  8591. },
  8592. "state": {
  8593. "type": "string",
  8594. "x-go-name": "State"
  8595. },
  8596. "title": {
  8597. "type": "string",
  8598. "x-go-name": "Title"
  8599. }
  8600. },
  8601. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8602. },
  8603. "EditOrgOption": {
  8604. "description": "EditOrgOption options for editing an organization",
  8605. "type": "object",
  8606. "properties": {
  8607. "description": {
  8608. "type": "string",
  8609. "x-go-name": "Description"
  8610. },
  8611. "full_name": {
  8612. "type": "string",
  8613. "x-go-name": "FullName"
  8614. },
  8615. "location": {
  8616. "type": "string",
  8617. "x-go-name": "Location"
  8618. },
  8619. "repo_admin_change_team_access": {
  8620. "type": "boolean",
  8621. "x-go-name": "RepoAdminChangeTeamAccess"
  8622. },
  8623. "visibility": {
  8624. "description": "possible values are `public`, `limited` or `private`",
  8625. "type": "string",
  8626. "enum": [
  8627. "public",
  8628. "limited",
  8629. "private"
  8630. ],
  8631. "x-go-name": "Visibility"
  8632. },
  8633. "website": {
  8634. "type": "string",
  8635. "x-go-name": "Website"
  8636. }
  8637. },
  8638. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8639. },
  8640. "EditPullRequestOption": {
  8641. "description": "EditPullRequestOption options when modify pull request",
  8642. "type": "object",
  8643. "properties": {
  8644. "assignee": {
  8645. "type": "string",
  8646. "x-go-name": "Assignee"
  8647. },
  8648. "assignees": {
  8649. "type": "array",
  8650. "items": {
  8651. "type": "string"
  8652. },
  8653. "x-go-name": "Assignees"
  8654. },
  8655. "body": {
  8656. "type": "string",
  8657. "x-go-name": "Body"
  8658. },
  8659. "due_date": {
  8660. "type": "string",
  8661. "format": "date-time",
  8662. "x-go-name": "Deadline"
  8663. },
  8664. "labels": {
  8665. "type": "array",
  8666. "items": {
  8667. "type": "integer",
  8668. "format": "int64"
  8669. },
  8670. "x-go-name": "Labels"
  8671. },
  8672. "milestone": {
  8673. "type": "integer",
  8674. "format": "int64",
  8675. "x-go-name": "Milestone"
  8676. },
  8677. "state": {
  8678. "type": "string",
  8679. "x-go-name": "State"
  8680. },
  8681. "title": {
  8682. "type": "string",
  8683. "x-go-name": "Title"
  8684. },
  8685. "unset_due_date": {
  8686. "type": "boolean",
  8687. "x-go-name": "RemoveDeadline"
  8688. }
  8689. },
  8690. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8691. },
  8692. "EditReleaseOption": {
  8693. "description": "EditReleaseOption options when editing a release",
  8694. "type": "object",
  8695. "properties": {
  8696. "body": {
  8697. "type": "string",
  8698. "x-go-name": "Note"
  8699. },
  8700. "draft": {
  8701. "type": "boolean",
  8702. "x-go-name": "IsDraft"
  8703. },
  8704. "name": {
  8705. "type": "string",
  8706. "x-go-name": "Title"
  8707. },
  8708. "prerelease": {
  8709. "type": "boolean",
  8710. "x-go-name": "IsPrerelease"
  8711. },
  8712. "tag_name": {
  8713. "type": "string",
  8714. "x-go-name": "TagName"
  8715. },
  8716. "target_commitish": {
  8717. "type": "string",
  8718. "x-go-name": "Target"
  8719. }
  8720. },
  8721. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8722. },
  8723. "EditRepoOption": {
  8724. "description": "EditRepoOption options when editing a repository's properties",
  8725. "type": "object",
  8726. "properties": {
  8727. "allow_merge_commits": {
  8728. "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`.",
  8729. "type": "boolean",
  8730. "x-go-name": "AllowMerge"
  8731. },
  8732. "allow_rebase": {
  8733. "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.",
  8734. "type": "boolean",
  8735. "x-go-name": "AllowRebase"
  8736. },
  8737. "allow_rebase_explicit": {
  8738. "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`.",
  8739. "type": "boolean",
  8740. "x-go-name": "AllowRebaseMerge"
  8741. },
  8742. "allow_squash_merge": {
  8743. "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.",
  8744. "type": "boolean",
  8745. "x-go-name": "AllowSquash"
  8746. },
  8747. "archived": {
  8748. "description": "set to `true` to archive this repository.",
  8749. "type": "boolean",
  8750. "x-go-name": "Archived"
  8751. },
  8752. "default_branch": {
  8753. "description": "sets the default branch for this repository.",
  8754. "type": "string",
  8755. "x-go-name": "DefaultBranch"
  8756. },
  8757. "description": {
  8758. "description": "a short description of the repository.",
  8759. "type": "string",
  8760. "x-go-name": "Description"
  8761. },
  8762. "external_tracker": {
  8763. "$ref": "#/definitions/ExternalTracker"
  8764. },
  8765. "external_wiki": {
  8766. "$ref": "#/definitions/ExternalWiki"
  8767. },
  8768. "has_issues": {
  8769. "description": "either `true` to enable issues for this repository or `false` to disable them.",
  8770. "type": "boolean",
  8771. "x-go-name": "HasIssues"
  8772. },
  8773. "has_pull_requests": {
  8774. "description": "either `true` to allow pull requests, or `false` to prevent pull request.",
  8775. "type": "boolean",
  8776. "x-go-name": "HasPullRequests"
  8777. },
  8778. "has_wiki": {
  8779. "description": "either `true` to enable the wiki for this repository or `false` to disable it.",
  8780. "type": "boolean",
  8781. "x-go-name": "HasWiki"
  8782. },
  8783. "ignore_whitespace_conflicts": {
  8784. "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.",
  8785. "type": "boolean",
  8786. "x-go-name": "IgnoreWhitespaceConflicts"
  8787. },
  8788. "internal_tracker": {
  8789. "$ref": "#/definitions/InternalTracker"
  8790. },
  8791. "name": {
  8792. "description": "name of the repository",
  8793. "type": "string",
  8794. "uniqueItems": true,
  8795. "x-go-name": "Name"
  8796. },
  8797. "private": {
  8798. "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.",
  8799. "type": "boolean",
  8800. "x-go-name": "Private"
  8801. },
  8802. "template": {
  8803. "description": "either `true` to make this repository a template or `false` to make it a normal repository",
  8804. "type": "boolean",
  8805. "x-go-name": "Template"
  8806. },
  8807. "website": {
  8808. "description": "a URL with more information about the repository.",
  8809. "type": "string",
  8810. "x-go-name": "Website"
  8811. }
  8812. },
  8813. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8814. },
  8815. "EditTeamOption": {
  8816. "description": "EditTeamOption options for editing a team",
  8817. "type": "object",
  8818. "required": [
  8819. "name"
  8820. ],
  8821. "properties": {
  8822. "description": {
  8823. "type": "string",
  8824. "x-go-name": "Description"
  8825. },
  8826. "includes_all_repositories": {
  8827. "type": "boolean",
  8828. "x-go-name": "IncludesAllRepositories"
  8829. },
  8830. "name": {
  8831. "type": "string",
  8832. "x-go-name": "Name"
  8833. },
  8834. "permission": {
  8835. "type": "string",
  8836. "enum": [
  8837. "read",
  8838. "write",
  8839. "admin"
  8840. ],
  8841. "x-go-name": "Permission"
  8842. },
  8843. "units": {
  8844. "type": "array",
  8845. "items": {
  8846. "type": "string"
  8847. },
  8848. "x-go-name": "Units",
  8849. "example": [
  8850. "repo.code",
  8851. "repo.issues",
  8852. "repo.ext_issues",
  8853. "repo.wiki",
  8854. "repo.pulls",
  8855. "repo.releases",
  8856. "repo.ext_wiki"
  8857. ]
  8858. }
  8859. },
  8860. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8861. },
  8862. "EditUserOption": {
  8863. "description": "EditUserOption edit user options",
  8864. "type": "object",
  8865. "required": [
  8866. "email"
  8867. ],
  8868. "properties": {
  8869. "active": {
  8870. "type": "boolean",
  8871. "x-go-name": "Active"
  8872. },
  8873. "admin": {
  8874. "type": "boolean",
  8875. "x-go-name": "Admin"
  8876. },
  8877. "allow_create_organization": {
  8878. "type": "boolean",
  8879. "x-go-name": "AllowCreateOrganization"
  8880. },
  8881. "allow_git_hook": {
  8882. "type": "boolean",
  8883. "x-go-name": "AllowGitHook"
  8884. },
  8885. "allow_import_local": {
  8886. "type": "boolean",
  8887. "x-go-name": "AllowImportLocal"
  8888. },
  8889. "email": {
  8890. "type": "string",
  8891. "format": "email",
  8892. "x-go-name": "Email"
  8893. },
  8894. "full_name": {
  8895. "type": "string",
  8896. "x-go-name": "FullName"
  8897. },
  8898. "location": {
  8899. "type": "string",
  8900. "x-go-name": "Location"
  8901. },
  8902. "login_name": {
  8903. "type": "string",
  8904. "x-go-name": "LoginName"
  8905. },
  8906. "max_repo_creation": {
  8907. "type": "integer",
  8908. "format": "int64",
  8909. "x-go-name": "MaxRepoCreation"
  8910. },
  8911. "must_change_password": {
  8912. "type": "boolean",
  8913. "x-go-name": "MustChangePassword"
  8914. },
  8915. "password": {
  8916. "type": "string",
  8917. "x-go-name": "Password"
  8918. },
  8919. "prohibit_login": {
  8920. "type": "boolean",
  8921. "x-go-name": "ProhibitLogin"
  8922. },
  8923. "source_id": {
  8924. "type": "integer",
  8925. "format": "int64",
  8926. "x-go-name": "SourceID"
  8927. },
  8928. "website": {
  8929. "type": "string",
  8930. "x-go-name": "Website"
  8931. }
  8932. },
  8933. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8934. },
  8935. "Email": {
  8936. "description": "Email an email address belonging to a user",
  8937. "type": "object",
  8938. "properties": {
  8939. "email": {
  8940. "type": "string",
  8941. "format": "email",
  8942. "x-go-name": "Email"
  8943. },
  8944. "primary": {
  8945. "type": "boolean",
  8946. "x-go-name": "Primary"
  8947. },
  8948. "verified": {
  8949. "type": "boolean",
  8950. "x-go-name": "Verified"
  8951. }
  8952. },
  8953. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8954. },
  8955. "ExternalTracker": {
  8956. "description": "ExternalTracker represents settings for external tracker",
  8957. "type": "object",
  8958. "properties": {
  8959. "external_tracker_format": {
  8960. "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.",
  8961. "type": "string",
  8962. "x-go-name": "ExternalTrackerFormat"
  8963. },
  8964. "external_tracker_style": {
  8965. "description": "External Issue Tracker Number Format, either `numeric` or `alphanumeric`",
  8966. "type": "string",
  8967. "x-go-name": "ExternalTrackerStyle"
  8968. },
  8969. "external_tracker_url": {
  8970. "description": "URL of external issue tracker.",
  8971. "type": "string",
  8972. "x-go-name": "ExternalTrackerURL"
  8973. }
  8974. },
  8975. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8976. },
  8977. "ExternalWiki": {
  8978. "description": "ExternalWiki represents setting for external wiki",
  8979. "type": "object",
  8980. "properties": {
  8981. "external_wiki_url": {
  8982. "description": "URL of external wiki.",
  8983. "type": "string",
  8984. "x-go-name": "ExternalWikiURL"
  8985. }
  8986. },
  8987. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8988. },
  8989. "FileCommitResponse": {
  8990. "type": "object",
  8991. "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.",
  8992. "properties": {
  8993. "author": {
  8994. "$ref": "#/definitions/CommitUser"
  8995. },
  8996. "committer": {
  8997. "$ref": "#/definitions/CommitUser"
  8998. },
  8999. "html_url": {
  9000. "type": "string",
  9001. "x-go-name": "HTMLURL"
  9002. },
  9003. "message": {
  9004. "type": "string",
  9005. "x-go-name": "Message"
  9006. },
  9007. "parents": {
  9008. "type": "array",
  9009. "items": {
  9010. "$ref": "#/definitions/CommitMeta"
  9011. },
  9012. "x-go-name": "Parents"
  9013. },
  9014. "sha": {
  9015. "type": "string",
  9016. "x-go-name": "SHA"
  9017. },
  9018. "tree": {
  9019. "$ref": "#/definitions/CommitMeta"
  9020. },
  9021. "url": {
  9022. "type": "string",
  9023. "x-go-name": "URL"
  9024. }
  9025. },
  9026. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9027. },
  9028. "FileDeleteResponse": {
  9029. "description": "FileDeleteResponse contains information about a repo's file that was deleted",
  9030. "type": "object",
  9031. "properties": {
  9032. "commit": {
  9033. "$ref": "#/definitions/FileCommitResponse"
  9034. },
  9035. "content": {
  9036. "type": "object",
  9037. "x-go-name": "Content"
  9038. },
  9039. "verification": {
  9040. "$ref": "#/definitions/PayloadCommitVerification"
  9041. }
  9042. },
  9043. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9044. },
  9045. "FileLinksResponse": {
  9046. "description": "FileLinksResponse contains the links for a repo's file",
  9047. "type": "object",
  9048. "properties": {
  9049. "git": {
  9050. "type": "string",
  9051. "x-go-name": "GitURL"
  9052. },
  9053. "html": {
  9054. "type": "string",
  9055. "x-go-name": "HTMLURL"
  9056. },
  9057. "self": {
  9058. "type": "string",
  9059. "x-go-name": "Self"
  9060. }
  9061. },
  9062. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9063. },
  9064. "FileResponse": {
  9065. "description": "FileResponse contains information about a repo's file",
  9066. "type": "object",
  9067. "properties": {
  9068. "commit": {
  9069. "$ref": "#/definitions/FileCommitResponse"
  9070. },
  9071. "content": {
  9072. "$ref": "#/definitions/ContentsResponse"
  9073. },
  9074. "verification": {
  9075. "$ref": "#/definitions/PayloadCommitVerification"
  9076. }
  9077. },
  9078. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9079. },
  9080. "GPGKey": {
  9081. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  9082. "type": "object",
  9083. "properties": {
  9084. "can_certify": {
  9085. "type": "boolean",
  9086. "x-go-name": "CanCertify"
  9087. },
  9088. "can_encrypt_comms": {
  9089. "type": "boolean",
  9090. "x-go-name": "CanEncryptComms"
  9091. },
  9092. "can_encrypt_storage": {
  9093. "type": "boolean",
  9094. "x-go-name": "CanEncryptStorage"
  9095. },
  9096. "can_sign": {
  9097. "type": "boolean",
  9098. "x-go-name": "CanSign"
  9099. },
  9100. "created_at": {
  9101. "type": "string",
  9102. "format": "date-time",
  9103. "x-go-name": "Created"
  9104. },
  9105. "emails": {
  9106. "type": "array",
  9107. "items": {
  9108. "$ref": "#/definitions/GPGKeyEmail"
  9109. },
  9110. "x-go-name": "Emails"
  9111. },
  9112. "expires_at": {
  9113. "type": "string",
  9114. "format": "date-time",
  9115. "x-go-name": "Expires"
  9116. },
  9117. "id": {
  9118. "type": "integer",
  9119. "format": "int64",
  9120. "x-go-name": "ID"
  9121. },
  9122. "key_id": {
  9123. "type": "string",
  9124. "x-go-name": "KeyID"
  9125. },
  9126. "primary_key_id": {
  9127. "type": "string",
  9128. "x-go-name": "PrimaryKeyID"
  9129. },
  9130. "public_key": {
  9131. "type": "string",
  9132. "x-go-name": "PublicKey"
  9133. },
  9134. "subkeys": {
  9135. "type": "array",
  9136. "items": {
  9137. "$ref": "#/definitions/GPGKey"
  9138. },
  9139. "x-go-name": "SubsKey"
  9140. }
  9141. },
  9142. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9143. },
  9144. "GPGKeyEmail": {
  9145. "description": "GPGKeyEmail an email attached to a GPGKey",
  9146. "type": "object",
  9147. "properties": {
  9148. "email": {
  9149. "type": "string",
  9150. "x-go-name": "Email"
  9151. },
  9152. "verified": {
  9153. "type": "boolean",
  9154. "x-go-name": "Verified"
  9155. }
  9156. },
  9157. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9158. },
  9159. "GitBlobResponse": {
  9160. "description": "GitBlobResponse represents a git blob",
  9161. "type": "object",
  9162. "properties": {
  9163. "content": {
  9164. "type": "string",
  9165. "x-go-name": "Content"
  9166. },
  9167. "encoding": {
  9168. "type": "string",
  9169. "x-go-name": "Encoding"
  9170. },
  9171. "sha": {
  9172. "type": "string",
  9173. "x-go-name": "SHA"
  9174. },
  9175. "size": {
  9176. "type": "integer",
  9177. "format": "int64",
  9178. "x-go-name": "Size"
  9179. },
  9180. "url": {
  9181. "type": "string",
  9182. "x-go-name": "URL"
  9183. }
  9184. },
  9185. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9186. },
  9187. "GitEntry": {
  9188. "description": "GitEntry represents a git tree",
  9189. "type": "object",
  9190. "properties": {
  9191. "mode": {
  9192. "type": "string",
  9193. "x-go-name": "Mode"
  9194. },
  9195. "path": {
  9196. "type": "string",
  9197. "x-go-name": "Path"
  9198. },
  9199. "sha": {
  9200. "type": "string",
  9201. "x-go-name": "SHA"
  9202. },
  9203. "size": {
  9204. "type": "integer",
  9205. "format": "int64",
  9206. "x-go-name": "Size"
  9207. },
  9208. "type": {
  9209. "type": "string",
  9210. "x-go-name": "Type"
  9211. },
  9212. "url": {
  9213. "type": "string",
  9214. "x-go-name": "URL"
  9215. }
  9216. },
  9217. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9218. },
  9219. "GitHook": {
  9220. "description": "GitHook represents a Git repository hook",
  9221. "type": "object",
  9222. "properties": {
  9223. "content": {
  9224. "type": "string",
  9225. "x-go-name": "Content"
  9226. },
  9227. "is_active": {
  9228. "type": "boolean",
  9229. "x-go-name": "IsActive"
  9230. },
  9231. "name": {
  9232. "type": "string",
  9233. "x-go-name": "Name"
  9234. }
  9235. },
  9236. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9237. },
  9238. "GitObject": {
  9239. "type": "object",
  9240. "title": "GitObject represents a Git object.",
  9241. "properties": {
  9242. "sha": {
  9243. "type": "string",
  9244. "x-go-name": "SHA"
  9245. },
  9246. "type": {
  9247. "type": "string",
  9248. "x-go-name": "Type"
  9249. },
  9250. "url": {
  9251. "type": "string",
  9252. "x-go-name": "URL"
  9253. }
  9254. },
  9255. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9256. },
  9257. "GitTreeResponse": {
  9258. "description": "GitTreeResponse returns a git tree",
  9259. "type": "object",
  9260. "properties": {
  9261. "page": {
  9262. "type": "integer",
  9263. "format": "int64",
  9264. "x-go-name": "Page"
  9265. },
  9266. "sha": {
  9267. "type": "string",
  9268. "x-go-name": "SHA"
  9269. },
  9270. "total_count": {
  9271. "type": "integer",
  9272. "format": "int64",
  9273. "x-go-name": "TotalCount"
  9274. },
  9275. "tree": {
  9276. "type": "array",
  9277. "items": {
  9278. "$ref": "#/definitions/GitEntry"
  9279. },
  9280. "x-go-name": "Entries"
  9281. },
  9282. "truncated": {
  9283. "type": "boolean",
  9284. "x-go-name": "Truncated"
  9285. },
  9286. "url": {
  9287. "type": "string",
  9288. "x-go-name": "URL"
  9289. }
  9290. },
  9291. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9292. },
  9293. "Hook": {
  9294. "description": "Hook a hook is a web hook when one repository changed",
  9295. "type": "object",
  9296. "properties": {
  9297. "active": {
  9298. "type": "boolean",
  9299. "x-go-name": "Active"
  9300. },
  9301. "config": {
  9302. "type": "object",
  9303. "additionalProperties": {
  9304. "type": "string"
  9305. },
  9306. "x-go-name": "Config"
  9307. },
  9308. "created_at": {
  9309. "type": "string",
  9310. "format": "date-time",
  9311. "x-go-name": "Created"
  9312. },
  9313. "events": {
  9314. "type": "array",
  9315. "items": {
  9316. "type": "string"
  9317. },
  9318. "x-go-name": "Events"
  9319. },
  9320. "id": {
  9321. "type": "integer",
  9322. "format": "int64",
  9323. "x-go-name": "ID"
  9324. },
  9325. "type": {
  9326. "type": "string",
  9327. "x-go-name": "Type"
  9328. },
  9329. "updated_at": {
  9330. "type": "string",
  9331. "format": "date-time",
  9332. "x-go-name": "Updated"
  9333. }
  9334. },
  9335. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9336. },
  9337. "Identity": {
  9338. "description": "Identity for a person's identity like an author or committer",
  9339. "type": "object",
  9340. "properties": {
  9341. "email": {
  9342. "type": "string",
  9343. "format": "email",
  9344. "x-go-name": "Email"
  9345. },
  9346. "name": {
  9347. "type": "string",
  9348. "x-go-name": "Name"
  9349. }
  9350. },
  9351. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9352. },
  9353. "InternalTracker": {
  9354. "description": "InternalTracker represents settings for internal tracker",
  9355. "type": "object",
  9356. "properties": {
  9357. "allow_only_contributors_to_track_time": {
  9358. "description": "Let only contributors track time (Built-in issue tracker)",
  9359. "type": "boolean",
  9360. "x-go-name": "AllowOnlyContributorsToTrackTime"
  9361. },
  9362. "enable_issue_dependencies": {
  9363. "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)",
  9364. "type": "boolean",
  9365. "x-go-name": "EnableIssueDependencies"
  9366. },
  9367. "enable_time_tracker": {
  9368. "description": "Enable time tracking (Built-in issue tracker)",
  9369. "type": "boolean",
  9370. "x-go-name": "EnableTimeTracker"
  9371. }
  9372. },
  9373. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9374. },
  9375. "Issue": {
  9376. "description": "Issue represents an issue in a repository",
  9377. "type": "object",
  9378. "properties": {
  9379. "assignee": {
  9380. "$ref": "#/definitions/User"
  9381. },
  9382. "assignees": {
  9383. "type": "array",
  9384. "items": {
  9385. "$ref": "#/definitions/User"
  9386. },
  9387. "x-go-name": "Assignees"
  9388. },
  9389. "body": {
  9390. "type": "string",
  9391. "x-go-name": "Body"
  9392. },
  9393. "closed_at": {
  9394. "type": "string",
  9395. "format": "date-time",
  9396. "x-go-name": "Closed"
  9397. },
  9398. "comments": {
  9399. "type": "integer",
  9400. "format": "int64",
  9401. "x-go-name": "Comments"
  9402. },
  9403. "created_at": {
  9404. "type": "string",
  9405. "format": "date-time",
  9406. "x-go-name": "Created"
  9407. },
  9408. "due_date": {
  9409. "type": "string",
  9410. "format": "date-time",
  9411. "x-go-name": "Deadline"
  9412. },
  9413. "id": {
  9414. "type": "integer",
  9415. "format": "int64",
  9416. "x-go-name": "ID"
  9417. },
  9418. "labels": {
  9419. "type": "array",
  9420. "items": {
  9421. "$ref": "#/definitions/Label"
  9422. },
  9423. "x-go-name": "Labels"
  9424. },
  9425. "milestone": {
  9426. "$ref": "#/definitions/Milestone"
  9427. },
  9428. "number": {
  9429. "type": "integer",
  9430. "format": "int64",
  9431. "x-go-name": "Index"
  9432. },
  9433. "original_author": {
  9434. "type": "string",
  9435. "x-go-name": "OriginalAuthor"
  9436. },
  9437. "original_author_id": {
  9438. "type": "integer",
  9439. "format": "int64",
  9440. "x-go-name": "OriginalAuthorID"
  9441. },
  9442. "pull_request": {
  9443. "$ref": "#/definitions/PullRequestMeta"
  9444. },
  9445. "repository": {
  9446. "$ref": "#/definitions/RepositoryMeta"
  9447. },
  9448. "state": {
  9449. "$ref": "#/definitions/StateType"
  9450. },
  9451. "title": {
  9452. "type": "string",
  9453. "x-go-name": "Title"
  9454. },
  9455. "updated_at": {
  9456. "type": "string",
  9457. "format": "date-time",
  9458. "x-go-name": "Updated"
  9459. },
  9460. "url": {
  9461. "type": "string",
  9462. "x-go-name": "URL"
  9463. },
  9464. "user": {
  9465. "$ref": "#/definitions/User"
  9466. }
  9467. },
  9468. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9469. },
  9470. "IssueDeadline": {
  9471. "description": "IssueDeadline represents an issue deadline",
  9472. "type": "object",
  9473. "properties": {
  9474. "due_date": {
  9475. "type": "string",
  9476. "format": "date-time",
  9477. "x-go-name": "Deadline"
  9478. }
  9479. },
  9480. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9481. },
  9482. "IssueLabelsOption": {
  9483. "description": "IssueLabelsOption a collection of labels",
  9484. "type": "object",
  9485. "properties": {
  9486. "labels": {
  9487. "description": "list of label IDs",
  9488. "type": "array",
  9489. "items": {
  9490. "type": "integer",
  9491. "format": "int64"
  9492. },
  9493. "x-go-name": "Labels"
  9494. }
  9495. },
  9496. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9497. },
  9498. "Label": {
  9499. "description": "Label a label to an issue or a pr",
  9500. "type": "object",
  9501. "properties": {
  9502. "color": {
  9503. "type": "string",
  9504. "x-go-name": "Color",
  9505. "example": "00aabb"
  9506. },
  9507. "description": {
  9508. "type": "string",
  9509. "x-go-name": "Description"
  9510. },
  9511. "id": {
  9512. "type": "integer",
  9513. "format": "int64",
  9514. "x-go-name": "ID"
  9515. },
  9516. "name": {
  9517. "type": "string",
  9518. "x-go-name": "Name"
  9519. },
  9520. "url": {
  9521. "type": "string",
  9522. "x-go-name": "URL"
  9523. }
  9524. },
  9525. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9526. },
  9527. "MarkdownOption": {
  9528. "description": "MarkdownOption markdown options",
  9529. "type": "object",
  9530. "properties": {
  9531. "Context": {
  9532. "description": "Context to render\n\nin: body",
  9533. "type": "string"
  9534. },
  9535. "Mode": {
  9536. "description": "Mode to render\n\nin: body",
  9537. "type": "string"
  9538. },
  9539. "Text": {
  9540. "description": "Text markdown to render\n\nin: body",
  9541. "type": "string"
  9542. },
  9543. "Wiki": {
  9544. "description": "Is it a wiki page ?\n\nin: body",
  9545. "type": "boolean"
  9546. }
  9547. },
  9548. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9549. },
  9550. "MergePullRequestOption": {
  9551. "description": "MergePullRequestForm form for merging Pull Request",
  9552. "type": "object",
  9553. "required": [
  9554. "Do"
  9555. ],
  9556. "properties": {
  9557. "Do": {
  9558. "type": "string",
  9559. "enum": [
  9560. "merge",
  9561. "rebase",
  9562. "rebase-merge",
  9563. "squash"
  9564. ]
  9565. },
  9566. "MergeMessageField": {
  9567. "type": "string"
  9568. },
  9569. "MergeTitleField": {
  9570. "type": "string"
  9571. }
  9572. },
  9573. "x-go-name": "MergePullRequestForm",
  9574. "x-go-package": "code.gitea.io/gitea/modules/auth"
  9575. },
  9576. "MigrateRepoForm": {
  9577. "description": "MigrateRepoForm form for migrating repository",
  9578. "type": "object",
  9579. "required": [
  9580. "clone_addr",
  9581. "uid",
  9582. "repo_name"
  9583. ],
  9584. "properties": {
  9585. "auth_password": {
  9586. "type": "string",
  9587. "x-go-name": "AuthPassword"
  9588. },
  9589. "auth_username": {
  9590. "type": "string",
  9591. "x-go-name": "AuthUsername"
  9592. },
  9593. "clone_addr": {
  9594. "type": "string",
  9595. "x-go-name": "CloneAddr"
  9596. },
  9597. "description": {
  9598. "type": "string",
  9599. "x-go-name": "Description"
  9600. },
  9601. "issues": {
  9602. "type": "boolean",
  9603. "x-go-name": "Issues"
  9604. },
  9605. "labels": {
  9606. "type": "boolean",
  9607. "x-go-name": "Labels"
  9608. },
  9609. "milestones": {
  9610. "type": "boolean",
  9611. "x-go-name": "Milestones"
  9612. },
  9613. "mirror": {
  9614. "type": "boolean",
  9615. "x-go-name": "Mirror"
  9616. },
  9617. "private": {
  9618. "type": "boolean",
  9619. "x-go-name": "Private"
  9620. },
  9621. "pull_requests": {
  9622. "type": "boolean",
  9623. "x-go-name": "PullRequests"
  9624. },
  9625. "releases": {
  9626. "type": "boolean",
  9627. "x-go-name": "Releases"
  9628. },
  9629. "repo_name": {
  9630. "type": "string",
  9631. "x-go-name": "RepoName"
  9632. },
  9633. "uid": {
  9634. "type": "integer",
  9635. "format": "int64",
  9636. "x-go-name": "UID"
  9637. },
  9638. "wiki": {
  9639. "type": "boolean",
  9640. "x-go-name": "Wiki"
  9641. }
  9642. },
  9643. "x-go-package": "code.gitea.io/gitea/modules/auth"
  9644. },
  9645. "Milestone": {
  9646. "description": "Milestone milestone is a collection of issues on one repository",
  9647. "type": "object",
  9648. "properties": {
  9649. "closed_at": {
  9650. "type": "string",
  9651. "format": "date-time",
  9652. "x-go-name": "Closed"
  9653. },
  9654. "closed_issues": {
  9655. "type": "integer",
  9656. "format": "int64",
  9657. "x-go-name": "ClosedIssues"
  9658. },
  9659. "description": {
  9660. "type": "string",
  9661. "x-go-name": "Description"
  9662. },
  9663. "due_on": {
  9664. "type": "string",
  9665. "format": "date-time",
  9666. "x-go-name": "Deadline"
  9667. },
  9668. "id": {
  9669. "type": "integer",
  9670. "format": "int64",
  9671. "x-go-name": "ID"
  9672. },
  9673. "open_issues": {
  9674. "type": "integer",
  9675. "format": "int64",
  9676. "x-go-name": "OpenIssues"
  9677. },
  9678. "state": {
  9679. "$ref": "#/definitions/StateType"
  9680. },
  9681. "title": {
  9682. "type": "string",
  9683. "x-go-name": "Title"
  9684. }
  9685. },
  9686. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9687. },
  9688. "Organization": {
  9689. "description": "Organization represents an organization",
  9690. "type": "object",
  9691. "properties": {
  9692. "avatar_url": {
  9693. "type": "string",
  9694. "x-go-name": "AvatarURL"
  9695. },
  9696. "description": {
  9697. "type": "string",
  9698. "x-go-name": "Description"
  9699. },
  9700. "full_name": {
  9701. "type": "string",
  9702. "x-go-name": "FullName"
  9703. },
  9704. "id": {
  9705. "type": "integer",
  9706. "format": "int64",
  9707. "x-go-name": "ID"
  9708. },
  9709. "location": {
  9710. "type": "string",
  9711. "x-go-name": "Location"
  9712. },
  9713. "repo_admin_change_team_access": {
  9714. "type": "boolean",
  9715. "x-go-name": "RepoAdminChangeTeamAccess"
  9716. },
  9717. "username": {
  9718. "type": "string",
  9719. "x-go-name": "UserName"
  9720. },
  9721. "visibility": {
  9722. "type": "string",
  9723. "x-go-name": "Visibility"
  9724. },
  9725. "website": {
  9726. "type": "string",
  9727. "x-go-name": "Website"
  9728. }
  9729. },
  9730. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9731. },
  9732. "PRBranchInfo": {
  9733. "description": "PRBranchInfo information about a branch",
  9734. "type": "object",
  9735. "properties": {
  9736. "label": {
  9737. "type": "string",
  9738. "x-go-name": "Name"
  9739. },
  9740. "ref": {
  9741. "type": "string",
  9742. "x-go-name": "Ref"
  9743. },
  9744. "repo": {
  9745. "$ref": "#/definitions/Repository"
  9746. },
  9747. "repo_id": {
  9748. "type": "integer",
  9749. "format": "int64",
  9750. "x-go-name": "RepoID"
  9751. },
  9752. "sha": {
  9753. "type": "string",
  9754. "x-go-name": "Sha"
  9755. }
  9756. },
  9757. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9758. },
  9759. "PayloadCommit": {
  9760. "description": "PayloadCommit represents a commit",
  9761. "type": "object",
  9762. "properties": {
  9763. "added": {
  9764. "type": "array",
  9765. "items": {
  9766. "type": "string"
  9767. },
  9768. "x-go-name": "Added"
  9769. },
  9770. "author": {
  9771. "$ref": "#/definitions/PayloadUser"
  9772. },
  9773. "committer": {
  9774. "$ref": "#/definitions/PayloadUser"
  9775. },
  9776. "id": {
  9777. "description": "sha1 hash of the commit",
  9778. "type": "string",
  9779. "x-go-name": "ID"
  9780. },
  9781. "message": {
  9782. "type": "string",
  9783. "x-go-name": "Message"
  9784. },
  9785. "modified": {
  9786. "type": "array",
  9787. "items": {
  9788. "type": "string"
  9789. },
  9790. "x-go-name": "Modified"
  9791. },
  9792. "removed": {
  9793. "type": "array",
  9794. "items": {
  9795. "type": "string"
  9796. },
  9797. "x-go-name": "Removed"
  9798. },
  9799. "timestamp": {
  9800. "type": "string",
  9801. "format": "date-time",
  9802. "x-go-name": "Timestamp"
  9803. },
  9804. "url": {
  9805. "type": "string",
  9806. "x-go-name": "URL"
  9807. },
  9808. "verification": {
  9809. "$ref": "#/definitions/PayloadCommitVerification"
  9810. }
  9811. },
  9812. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9813. },
  9814. "PayloadCommitVerification": {
  9815. "description": "PayloadCommitVerification represents the GPG verification of a commit",
  9816. "type": "object",
  9817. "properties": {
  9818. "payload": {
  9819. "type": "string",
  9820. "x-go-name": "Payload"
  9821. },
  9822. "reason": {
  9823. "type": "string",
  9824. "x-go-name": "Reason"
  9825. },
  9826. "signature": {
  9827. "type": "string",
  9828. "x-go-name": "Signature"
  9829. },
  9830. "signer": {
  9831. "$ref": "#/definitions/PayloadUser"
  9832. },
  9833. "verified": {
  9834. "type": "boolean",
  9835. "x-go-name": "Verified"
  9836. }
  9837. },
  9838. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9839. },
  9840. "PayloadUser": {
  9841. "description": "PayloadUser represents the author or committer of a commit",
  9842. "type": "object",
  9843. "properties": {
  9844. "email": {
  9845. "type": "string",
  9846. "format": "email",
  9847. "x-go-name": "Email"
  9848. },
  9849. "name": {
  9850. "description": "Full name of the commit author",
  9851. "type": "string",
  9852. "x-go-name": "Name"
  9853. },
  9854. "username": {
  9855. "type": "string",
  9856. "x-go-name": "UserName"
  9857. }
  9858. },
  9859. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9860. },
  9861. "Permission": {
  9862. "description": "Permission represents a set of permissions",
  9863. "type": "object",
  9864. "properties": {
  9865. "admin": {
  9866. "type": "boolean",
  9867. "x-go-name": "Admin"
  9868. },
  9869. "pull": {
  9870. "type": "boolean",
  9871. "x-go-name": "Pull"
  9872. },
  9873. "push": {
  9874. "type": "boolean",
  9875. "x-go-name": "Push"
  9876. }
  9877. },
  9878. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9879. },
  9880. "PublicKey": {
  9881. "description": "PublicKey publickey is a user key to push code to repository",
  9882. "type": "object",
  9883. "properties": {
  9884. "created_at": {
  9885. "type": "string",
  9886. "format": "date-time",
  9887. "x-go-name": "Created"
  9888. },
  9889. "fingerprint": {
  9890. "type": "string",
  9891. "x-go-name": "Fingerprint"
  9892. },
  9893. "id": {
  9894. "type": "integer",
  9895. "format": "int64",
  9896. "x-go-name": "ID"
  9897. },
  9898. "key": {
  9899. "type": "string",
  9900. "x-go-name": "Key"
  9901. },
  9902. "key_type": {
  9903. "type": "string",
  9904. "x-go-name": "KeyType"
  9905. },
  9906. "read_only": {
  9907. "type": "boolean",
  9908. "x-go-name": "ReadOnly"
  9909. },
  9910. "title": {
  9911. "type": "string",
  9912. "x-go-name": "Title"
  9913. },
  9914. "url": {
  9915. "type": "string",
  9916. "x-go-name": "URL"
  9917. },
  9918. "user": {
  9919. "$ref": "#/definitions/User"
  9920. }
  9921. },
  9922. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9923. },
  9924. "PullRequest": {
  9925. "description": "PullRequest represents a pull request",
  9926. "type": "object",
  9927. "properties": {
  9928. "assignee": {
  9929. "$ref": "#/definitions/User"
  9930. },
  9931. "assignees": {
  9932. "type": "array",
  9933. "items": {
  9934. "$ref": "#/definitions/User"
  9935. },
  9936. "x-go-name": "Assignees"
  9937. },
  9938. "base": {
  9939. "$ref": "#/definitions/PRBranchInfo"
  9940. },
  9941. "body": {
  9942. "type": "string",
  9943. "x-go-name": "Body"
  9944. },
  9945. "closed_at": {
  9946. "type": "string",
  9947. "format": "date-time",
  9948. "x-go-name": "Closed"
  9949. },
  9950. "comments": {
  9951. "type": "integer",
  9952. "format": "int64",
  9953. "x-go-name": "Comments"
  9954. },
  9955. "created_at": {
  9956. "type": "string",
  9957. "format": "date-time",
  9958. "x-go-name": "Created"
  9959. },
  9960. "diff_url": {
  9961. "type": "string",
  9962. "x-go-name": "DiffURL"
  9963. },
  9964. "due_date": {
  9965. "type": "string",
  9966. "format": "date-time",
  9967. "x-go-name": "Deadline"
  9968. },
  9969. "head": {
  9970. "$ref": "#/definitions/PRBranchInfo"
  9971. },
  9972. "html_url": {
  9973. "type": "string",
  9974. "x-go-name": "HTMLURL"
  9975. },
  9976. "id": {
  9977. "type": "integer",
  9978. "format": "int64",
  9979. "x-go-name": "ID"
  9980. },
  9981. "labels": {
  9982. "type": "array",
  9983. "items": {
  9984. "$ref": "#/definitions/Label"
  9985. },
  9986. "x-go-name": "Labels"
  9987. },
  9988. "merge_base": {
  9989. "type": "string",
  9990. "x-go-name": "MergeBase"
  9991. },
  9992. "merge_commit_sha": {
  9993. "type": "string",
  9994. "x-go-name": "MergedCommitID"
  9995. },
  9996. "mergeable": {
  9997. "type": "boolean",
  9998. "x-go-name": "Mergeable"
  9999. },
  10000. "merged": {
  10001. "type": "boolean",
  10002. "x-go-name": "HasMerged"
  10003. },
  10004. "merged_at": {
  10005. "type": "string",
  10006. "format": "date-time",
  10007. "x-go-name": "Merged"
  10008. },
  10009. "merged_by": {
  10010. "$ref": "#/definitions/User"
  10011. },
  10012. "milestone": {
  10013. "$ref": "#/definitions/Milestone"
  10014. },
  10015. "number": {
  10016. "type": "integer",
  10017. "format": "int64",
  10018. "x-go-name": "Index"
  10019. },
  10020. "patch_url": {
  10021. "type": "string",
  10022. "x-go-name": "PatchURL"
  10023. },
  10024. "state": {
  10025. "$ref": "#/definitions/StateType"
  10026. },
  10027. "title": {
  10028. "type": "string",
  10029. "x-go-name": "Title"
  10030. },
  10031. "updated_at": {
  10032. "type": "string",
  10033. "format": "date-time",
  10034. "x-go-name": "Updated"
  10035. },
  10036. "url": {
  10037. "type": "string",
  10038. "x-go-name": "URL"
  10039. },
  10040. "user": {
  10041. "$ref": "#/definitions/User"
  10042. }
  10043. },
  10044. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10045. },
  10046. "PullRequestMeta": {
  10047. "description": "PullRequestMeta PR info if an issue is a PR",
  10048. "type": "object",
  10049. "properties": {
  10050. "merged": {
  10051. "type": "boolean",
  10052. "x-go-name": "HasMerged"
  10053. },
  10054. "merged_at": {
  10055. "type": "string",
  10056. "format": "date-time",
  10057. "x-go-name": "Merged"
  10058. }
  10059. },
  10060. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10061. },
  10062. "Reference": {
  10063. "type": "object",
  10064. "title": "Reference represents a Git reference.",
  10065. "properties": {
  10066. "object": {
  10067. "$ref": "#/definitions/GitObject"
  10068. },
  10069. "ref": {
  10070. "type": "string",
  10071. "x-go-name": "Ref"
  10072. },
  10073. "url": {
  10074. "type": "string",
  10075. "x-go-name": "URL"
  10076. }
  10077. },
  10078. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10079. },
  10080. "Release": {
  10081. "description": "Release represents a repository release",
  10082. "type": "object",
  10083. "properties": {
  10084. "assets": {
  10085. "type": "array",
  10086. "items": {
  10087. "$ref": "#/definitions/Attachment"
  10088. },
  10089. "x-go-name": "Attachments"
  10090. },
  10091. "author": {
  10092. "$ref": "#/definitions/User"
  10093. },
  10094. "body": {
  10095. "type": "string",
  10096. "x-go-name": "Note"
  10097. },
  10098. "created_at": {
  10099. "type": "string",
  10100. "format": "date-time",
  10101. "x-go-name": "CreatedAt"
  10102. },
  10103. "draft": {
  10104. "type": "boolean",
  10105. "x-go-name": "IsDraft"
  10106. },
  10107. "id": {
  10108. "type": "integer",
  10109. "format": "int64",
  10110. "x-go-name": "ID"
  10111. },
  10112. "name": {
  10113. "type": "string",
  10114. "x-go-name": "Title"
  10115. },
  10116. "prerelease": {
  10117. "type": "boolean",
  10118. "x-go-name": "IsPrerelease"
  10119. },
  10120. "published_at": {
  10121. "type": "string",
  10122. "format": "date-time",
  10123. "x-go-name": "PublishedAt"
  10124. },
  10125. "tag_name": {
  10126. "type": "string",
  10127. "x-go-name": "TagName"
  10128. },
  10129. "tarball_url": {
  10130. "type": "string",
  10131. "x-go-name": "TarURL"
  10132. },
  10133. "target_commitish": {
  10134. "type": "string",
  10135. "x-go-name": "Target"
  10136. },
  10137. "url": {
  10138. "type": "string",
  10139. "x-go-name": "URL"
  10140. },
  10141. "zipball_url": {
  10142. "type": "string",
  10143. "x-go-name": "ZipURL"
  10144. }
  10145. },
  10146. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10147. },
  10148. "RepoCommit": {
  10149. "type": "object",
  10150. "title": "RepoCommit contains information of a commit in the context of a repository.",
  10151. "properties": {
  10152. "author": {
  10153. "$ref": "#/definitions/CommitUser"
  10154. },
  10155. "committer": {
  10156. "$ref": "#/definitions/CommitUser"
  10157. },
  10158. "message": {
  10159. "type": "string",
  10160. "x-go-name": "Message"
  10161. },
  10162. "tree": {
  10163. "$ref": "#/definitions/CommitMeta"
  10164. },
  10165. "url": {
  10166. "type": "string",
  10167. "x-go-name": "URL"
  10168. }
  10169. },
  10170. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10171. },
  10172. "RepoTopicOptions": {
  10173. "description": "RepoTopicOptions a collection of repo topic names",
  10174. "type": "object",
  10175. "properties": {
  10176. "topics": {
  10177. "description": "list of topic names",
  10178. "type": "array",
  10179. "items": {
  10180. "type": "string"
  10181. },
  10182. "x-go-name": "Topics"
  10183. }
  10184. },
  10185. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10186. },
  10187. "Repository": {
  10188. "description": "Repository represents a repository",
  10189. "type": "object",
  10190. "properties": {
  10191. "allow_merge_commits": {
  10192. "type": "boolean",
  10193. "x-go-name": "AllowMerge"
  10194. },
  10195. "allow_rebase": {
  10196. "type": "boolean",
  10197. "x-go-name": "AllowRebase"
  10198. },
  10199. "allow_rebase_explicit": {
  10200. "type": "boolean",
  10201. "x-go-name": "AllowRebaseMerge"
  10202. },
  10203. "allow_squash_merge": {
  10204. "type": "boolean",
  10205. "x-go-name": "AllowSquash"
  10206. },
  10207. "archived": {
  10208. "type": "boolean",
  10209. "x-go-name": "Archived"
  10210. },
  10211. "avatar_url": {
  10212. "type": "string",
  10213. "x-go-name": "AvatarURL"
  10214. },
  10215. "clone_url": {
  10216. "type": "string",
  10217. "x-go-name": "CloneURL"
  10218. },
  10219. "created_at": {
  10220. "type": "string",
  10221. "format": "date-time",
  10222. "x-go-name": "Created"
  10223. },
  10224. "default_branch": {
  10225. "type": "string",
  10226. "x-go-name": "DefaultBranch"
  10227. },
  10228. "description": {
  10229. "type": "string",
  10230. "x-go-name": "Description"
  10231. },
  10232. "empty": {
  10233. "type": "boolean",
  10234. "x-go-name": "Empty"
  10235. },
  10236. "external_tracker": {
  10237. "$ref": "#/definitions/ExternalTracker"
  10238. },
  10239. "external_wiki": {
  10240. "$ref": "#/definitions/ExternalWiki"
  10241. },
  10242. "fork": {
  10243. "type": "boolean",
  10244. "x-go-name": "Fork"
  10245. },
  10246. "forks_count": {
  10247. "type": "integer",
  10248. "format": "int64",
  10249. "x-go-name": "Forks"
  10250. },
  10251. "full_name": {
  10252. "type": "string",
  10253. "x-go-name": "FullName"
  10254. },
  10255. "has_issues": {
  10256. "type": "boolean",
  10257. "x-go-name": "HasIssues"
  10258. },
  10259. "has_pull_requests": {
  10260. "type": "boolean",
  10261. "x-go-name": "HasPullRequests"
  10262. },
  10263. "has_wiki": {
  10264. "type": "boolean",
  10265. "x-go-name": "HasWiki"
  10266. },
  10267. "html_url": {
  10268. "type": "string",
  10269. "x-go-name": "HTMLURL"
  10270. },
  10271. "id": {
  10272. "type": "integer",
  10273. "format": "int64",
  10274. "x-go-name": "ID"
  10275. },
  10276. "ignore_whitespace_conflicts": {
  10277. "type": "boolean",
  10278. "x-go-name": "IgnoreWhitespaceConflicts"
  10279. },
  10280. "internal_tracker": {
  10281. "$ref": "#/definitions/InternalTracker"
  10282. },
  10283. "mirror": {
  10284. "type": "boolean",
  10285. "x-go-name": "Mirror"
  10286. },
  10287. "name": {
  10288. "type": "string",
  10289. "x-go-name": "Name"
  10290. },
  10291. "open_issues_count": {
  10292. "type": "integer",
  10293. "format": "int64",
  10294. "x-go-name": "OpenIssues"
  10295. },
  10296. "original_url": {
  10297. "type": "string",
  10298. "x-go-name": "OriginalURL"
  10299. },
  10300. "owner": {
  10301. "$ref": "#/definitions/User"
  10302. },
  10303. "parent": {
  10304. "$ref": "#/definitions/Repository"
  10305. },
  10306. "permissions": {
  10307. "$ref": "#/definitions/Permission"
  10308. },
  10309. "private": {
  10310. "type": "boolean",
  10311. "x-go-name": "Private"
  10312. },
  10313. "size": {
  10314. "type": "integer",
  10315. "format": "int64",
  10316. "x-go-name": "Size"
  10317. },
  10318. "ssh_url": {
  10319. "type": "string",
  10320. "x-go-name": "SSHURL"
  10321. },
  10322. "stars_count": {
  10323. "type": "integer",
  10324. "format": "int64",
  10325. "x-go-name": "Stars"
  10326. },
  10327. "template": {
  10328. "type": "boolean",
  10329. "x-go-name": "Template"
  10330. },
  10331. "updated_at": {
  10332. "type": "string",
  10333. "format": "date-time",
  10334. "x-go-name": "Updated"
  10335. },
  10336. "watchers_count": {
  10337. "type": "integer",
  10338. "format": "int64",
  10339. "x-go-name": "Watchers"
  10340. },
  10341. "website": {
  10342. "type": "string",
  10343. "x-go-name": "Website"
  10344. }
  10345. },
  10346. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10347. },
  10348. "RepositoryMeta": {
  10349. "description": "RepositoryMeta basic repository information",
  10350. "type": "object",
  10351. "properties": {
  10352. "full_name": {
  10353. "type": "string",
  10354. "x-go-name": "FullName"
  10355. },
  10356. "id": {
  10357. "type": "integer",
  10358. "format": "int64",
  10359. "x-go-name": "ID"
  10360. },
  10361. "name": {
  10362. "type": "string",
  10363. "x-go-name": "Name"
  10364. }
  10365. },
  10366. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10367. },
  10368. "SearchResults": {
  10369. "description": "SearchResults results of a successful search",
  10370. "type": "object",
  10371. "properties": {
  10372. "data": {
  10373. "type": "array",
  10374. "items": {
  10375. "$ref": "#/definitions/Repository"
  10376. },
  10377. "x-go-name": "Data"
  10378. },
  10379. "ok": {
  10380. "type": "boolean",
  10381. "x-go-name": "OK"
  10382. }
  10383. },
  10384. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10385. },
  10386. "ServerVersion": {
  10387. "description": "ServerVersion wraps the version of the server",
  10388. "type": "object",
  10389. "properties": {
  10390. "version": {
  10391. "type": "string",
  10392. "x-go-name": "Version"
  10393. }
  10394. },
  10395. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10396. },
  10397. "StateType": {
  10398. "description": "StateType issue state type",
  10399. "type": "string",
  10400. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10401. },
  10402. "Status": {
  10403. "description": "Status holds a single Status of a single Commit",
  10404. "type": "object",
  10405. "properties": {
  10406. "context": {
  10407. "type": "string",
  10408. "x-go-name": "Context"
  10409. },
  10410. "created_at": {
  10411. "type": "string",
  10412. "format": "date-time",
  10413. "x-go-name": "Created"
  10414. },
  10415. "creator": {
  10416. "$ref": "#/definitions/User"
  10417. },
  10418. "description": {
  10419. "type": "string",
  10420. "x-go-name": "Description"
  10421. },
  10422. "id": {
  10423. "type": "integer",
  10424. "format": "int64",
  10425. "x-go-name": "ID"
  10426. },
  10427. "status": {
  10428. "$ref": "#/definitions/StatusState"
  10429. },
  10430. "target_url": {
  10431. "type": "string",
  10432. "x-go-name": "TargetURL"
  10433. },
  10434. "updated_at": {
  10435. "type": "string",
  10436. "format": "date-time",
  10437. "x-go-name": "Updated"
  10438. },
  10439. "url": {
  10440. "type": "string",
  10441. "x-go-name": "URL"
  10442. }
  10443. },
  10444. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10445. },
  10446. "StatusState": {
  10447. "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"",
  10448. "type": "string",
  10449. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10450. },
  10451. "Tag": {
  10452. "description": "Tag represents a repository tag",
  10453. "type": "object",
  10454. "properties": {
  10455. "commit": {
  10456. "$ref": "#/definitions/CommitMeta"
  10457. },
  10458. "id": {
  10459. "type": "string",
  10460. "x-go-name": "ID"
  10461. },
  10462. "name": {
  10463. "type": "string",
  10464. "x-go-name": "Name"
  10465. },
  10466. "tarball_url": {
  10467. "type": "string",
  10468. "x-go-name": "TarballURL"
  10469. },
  10470. "zipball_url": {
  10471. "type": "string",
  10472. "x-go-name": "ZipballURL"
  10473. }
  10474. },
  10475. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10476. },
  10477. "Team": {
  10478. "description": "Team represents a team in an organization",
  10479. "type": "object",
  10480. "properties": {
  10481. "description": {
  10482. "type": "string",
  10483. "x-go-name": "Description"
  10484. },
  10485. "id": {
  10486. "type": "integer",
  10487. "format": "int64",
  10488. "x-go-name": "ID"
  10489. },
  10490. "includes_all_repositories": {
  10491. "type": "boolean",
  10492. "x-go-name": "IncludesAllRepositories"
  10493. },
  10494. "name": {
  10495. "type": "string",
  10496. "x-go-name": "Name"
  10497. },
  10498. "organization": {
  10499. "$ref": "#/definitions/Organization"
  10500. },
  10501. "permission": {
  10502. "type": "string",
  10503. "enum": [
  10504. "none",
  10505. "read",
  10506. "write",
  10507. "admin",
  10508. "owner"
  10509. ],
  10510. "x-go-name": "Permission"
  10511. },
  10512. "units": {
  10513. "type": "array",
  10514. "items": {
  10515. "type": "string"
  10516. },
  10517. "x-go-name": "Units",
  10518. "example": [
  10519. "repo.code",
  10520. "repo.issues",
  10521. "repo.ext_issues",
  10522. "repo.wiki",
  10523. "repo.pulls",
  10524. "repo.releases",
  10525. "repo.ext_wiki"
  10526. ]
  10527. }
  10528. },
  10529. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10530. },
  10531. "TimeStamp": {
  10532. "description": "TimeStamp defines a timestamp",
  10533. "type": "integer",
  10534. "format": "int64",
  10535. "x-go-package": "code.gitea.io/gitea/modules/timeutil"
  10536. },
  10537. "TopicName": {
  10538. "description": "TopicName a list of repo topic names",
  10539. "type": "object",
  10540. "properties": {
  10541. "topics": {
  10542. "type": "array",
  10543. "items": {
  10544. "type": "string"
  10545. },
  10546. "x-go-name": "TopicNames"
  10547. }
  10548. },
  10549. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10550. },
  10551. "TopicResponse": {
  10552. "description": "TopicResponse for returning topics",
  10553. "type": "object",
  10554. "properties": {
  10555. "created": {
  10556. "type": "string",
  10557. "format": "date-time",
  10558. "x-go-name": "Created"
  10559. },
  10560. "id": {
  10561. "type": "integer",
  10562. "format": "int64",
  10563. "x-go-name": "ID"
  10564. },
  10565. "repo_count": {
  10566. "type": "integer",
  10567. "format": "int64",
  10568. "x-go-name": "RepoCount"
  10569. },
  10570. "topic_name": {
  10571. "type": "string",
  10572. "x-go-name": "Name"
  10573. },
  10574. "updated": {
  10575. "type": "string",
  10576. "format": "date-time",
  10577. "x-go-name": "Updated"
  10578. }
  10579. },
  10580. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10581. },
  10582. "TrackedTime": {
  10583. "description": "TrackedTime worked time for an issue / pr",
  10584. "type": "object",
  10585. "properties": {
  10586. "created": {
  10587. "type": "string",
  10588. "format": "date-time",
  10589. "x-go-name": "Created"
  10590. },
  10591. "id": {
  10592. "type": "integer",
  10593. "format": "int64",
  10594. "x-go-name": "ID"
  10595. },
  10596. "issue_id": {
  10597. "type": "integer",
  10598. "format": "int64",
  10599. "x-go-name": "IssueID"
  10600. },
  10601. "time": {
  10602. "description": "Time in seconds",
  10603. "type": "integer",
  10604. "format": "int64",
  10605. "x-go-name": "Time"
  10606. },
  10607. "user_id": {
  10608. "type": "integer",
  10609. "format": "int64",
  10610. "x-go-name": "UserID"
  10611. }
  10612. },
  10613. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10614. },
  10615. "UpdateFileOptions": {
  10616. "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)",
  10617. "type": "object",
  10618. "required": [
  10619. "sha",
  10620. "content"
  10621. ],
  10622. "properties": {
  10623. "author": {
  10624. "$ref": "#/definitions/Identity"
  10625. },
  10626. "branch": {
  10627. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  10628. "type": "string",
  10629. "x-go-name": "BranchName"
  10630. },
  10631. "committer": {
  10632. "$ref": "#/definitions/Identity"
  10633. },
  10634. "content": {
  10635. "description": "content must be base64 encoded",
  10636. "type": "string",
  10637. "x-go-name": "Content"
  10638. },
  10639. "from_path": {
  10640. "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL",
  10641. "type": "string",
  10642. "x-go-name": "FromPath"
  10643. },
  10644. "message": {
  10645. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  10646. "type": "string",
  10647. "x-go-name": "Message"
  10648. },
  10649. "new_branch": {
  10650. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  10651. "type": "string",
  10652. "x-go-name": "NewBranchName"
  10653. },
  10654. "sha": {
  10655. "description": "sha is the SHA for the file that already exists",
  10656. "type": "string",
  10657. "x-go-name": "SHA"
  10658. }
  10659. },
  10660. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10661. },
  10662. "User": {
  10663. "description": "User represents a user",
  10664. "type": "object",
  10665. "properties": {
  10666. "avatar_url": {
  10667. "description": "URL to the user's avatar",
  10668. "type": "string",
  10669. "x-go-name": "AvatarURL"
  10670. },
  10671. "created": {
  10672. "type": "string",
  10673. "format": "date-time",
  10674. "x-go-name": "Created"
  10675. },
  10676. "email": {
  10677. "type": "string",
  10678. "format": "email",
  10679. "x-go-name": "Email"
  10680. },
  10681. "full_name": {
  10682. "description": "the user's full name",
  10683. "type": "string",
  10684. "x-go-name": "FullName"
  10685. },
  10686. "id": {
  10687. "description": "the user's id",
  10688. "type": "integer",
  10689. "format": "int64",
  10690. "x-go-name": "ID"
  10691. },
  10692. "is_admin": {
  10693. "description": "Is the user an administrator",
  10694. "type": "boolean",
  10695. "x-go-name": "IsAdmin"
  10696. },
  10697. "language": {
  10698. "description": "User locale",
  10699. "type": "string",
  10700. "x-go-name": "Language"
  10701. },
  10702. "last_login": {
  10703. "type": "string",
  10704. "format": "date-time",
  10705. "x-go-name": "LastLogin"
  10706. },
  10707. "login": {
  10708. "description": "the user's username",
  10709. "type": "string",
  10710. "x-go-name": "UserName"
  10711. }
  10712. },
  10713. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10714. },
  10715. "UserHeatmapData": {
  10716. "description": "UserHeatmapData represents the data needed to create a heatmap",
  10717. "type": "object",
  10718. "properties": {
  10719. "contributions": {
  10720. "type": "integer",
  10721. "format": "int64",
  10722. "x-go-name": "Contributions"
  10723. },
  10724. "timestamp": {
  10725. "$ref": "#/definitions/TimeStamp"
  10726. }
  10727. },
  10728. "x-go-package": "code.gitea.io/gitea/models"
  10729. },
  10730. "WatchInfo": {
  10731. "description": "WatchInfo represents an API watch status of one repository",
  10732. "type": "object",
  10733. "properties": {
  10734. "created_at": {
  10735. "type": "string",
  10736. "format": "date-time",
  10737. "x-go-name": "CreatedAt"
  10738. },
  10739. "ignored": {
  10740. "type": "boolean",
  10741. "x-go-name": "Ignored"
  10742. },
  10743. "reason": {
  10744. "type": "object",
  10745. "x-go-name": "Reason"
  10746. },
  10747. "repository_url": {
  10748. "type": "string",
  10749. "x-go-name": "RepositoryURL"
  10750. },
  10751. "subscribed": {
  10752. "type": "boolean",
  10753. "x-go-name": "Subscribed"
  10754. },
  10755. "url": {
  10756. "type": "string",
  10757. "x-go-name": "URL"
  10758. }
  10759. },
  10760. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10761. }
  10762. },
  10763. "responses": {
  10764. "AccessToken": {
  10765. "description": "AccessToken represents an API access token.",
  10766. "headers": {
  10767. "id": {
  10768. "type": "integer",
  10769. "format": "int64"
  10770. },
  10771. "name": {
  10772. "type": "string"
  10773. },
  10774. "sha1": {
  10775. "type": "string"
  10776. },
  10777. "token_last_eight": {
  10778. "type": "string"
  10779. }
  10780. }
  10781. },
  10782. "AccessTokenList": {
  10783. "description": "AccessTokenList represents a list of API access token.",
  10784. "schema": {
  10785. "type": "array",
  10786. "items": {
  10787. "$ref": "#/definitions/AccessToken"
  10788. }
  10789. }
  10790. },
  10791. "AnnotatedTag": {
  10792. "description": "AnnotatedTag",
  10793. "schema": {
  10794. "$ref": "#/definitions/AnnotatedTag"
  10795. }
  10796. },
  10797. "Attachment": {
  10798. "description": "Attachment",
  10799. "schema": {
  10800. "$ref": "#/definitions/Attachment"
  10801. }
  10802. },
  10803. "AttachmentList": {
  10804. "description": "AttachmentList",
  10805. "schema": {
  10806. "type": "array",
  10807. "items": {
  10808. "$ref": "#/definitions/Attachment"
  10809. }
  10810. }
  10811. },
  10812. "Branch": {
  10813. "description": "Branch",
  10814. "schema": {
  10815. "$ref": "#/definitions/Branch"
  10816. }
  10817. },
  10818. "BranchList": {
  10819. "description": "BranchList",
  10820. "schema": {
  10821. "type": "array",
  10822. "items": {
  10823. "$ref": "#/definitions/Branch"
  10824. }
  10825. }
  10826. },
  10827. "Comment": {
  10828. "description": "Comment",
  10829. "schema": {
  10830. "$ref": "#/definitions/Comment"
  10831. }
  10832. },
  10833. "CommentList": {
  10834. "description": "CommentList",
  10835. "schema": {
  10836. "type": "array",
  10837. "items": {
  10838. "$ref": "#/definitions/Comment"
  10839. }
  10840. }
  10841. },
  10842. "Commit": {
  10843. "description": "Commit",
  10844. "schema": {
  10845. "$ref": "#/definitions/Commit"
  10846. }
  10847. },
  10848. "CommitList": {
  10849. "description": "CommitList",
  10850. "schema": {
  10851. "type": "array",
  10852. "items": {
  10853. "$ref": "#/definitions/Commit"
  10854. }
  10855. },
  10856. "headers": {
  10857. "X-HasMore": {
  10858. "type": "boolean",
  10859. "description": "True if there is another page"
  10860. },
  10861. "X-Page": {
  10862. "type": "integer",
  10863. "format": "int64",
  10864. "description": "The current page"
  10865. },
  10866. "X-PageCount": {
  10867. "type": "integer",
  10868. "format": "int64",
  10869. "description": "Total number of pages"
  10870. },
  10871. "X-PerPage": {
  10872. "type": "integer",
  10873. "format": "int64",
  10874. "description": "Commits per page"
  10875. },
  10876. "X-Total": {
  10877. "type": "integer",
  10878. "format": "int64",
  10879. "description": "Total commit count"
  10880. }
  10881. }
  10882. },
  10883. "ContentsListResponse": {
  10884. "description": "ContentsListResponse",
  10885. "schema": {
  10886. "type": "array",
  10887. "items": {
  10888. "$ref": "#/definitions/ContentsResponse"
  10889. }
  10890. }
  10891. },
  10892. "ContentsResponse": {
  10893. "description": "ContentsResponse",
  10894. "schema": {
  10895. "$ref": "#/definitions/ContentsResponse"
  10896. }
  10897. },
  10898. "DeployKey": {
  10899. "description": "DeployKey",
  10900. "schema": {
  10901. "$ref": "#/definitions/DeployKey"
  10902. }
  10903. },
  10904. "DeployKeyList": {
  10905. "description": "DeployKeyList",
  10906. "schema": {
  10907. "type": "array",
  10908. "items": {
  10909. "$ref": "#/definitions/DeployKey"
  10910. }
  10911. }
  10912. },
  10913. "EmailList": {
  10914. "description": "EmailList",
  10915. "schema": {
  10916. "type": "array",
  10917. "items": {
  10918. "$ref": "#/definitions/Email"
  10919. }
  10920. }
  10921. },
  10922. "EmptyRepository": {
  10923. "description": "EmptyRepository",
  10924. "schema": {
  10925. "$ref": "#/definitions/APIError"
  10926. }
  10927. },
  10928. "FileDeleteResponse": {
  10929. "description": "FileDeleteResponse",
  10930. "schema": {
  10931. "$ref": "#/definitions/FileDeleteResponse"
  10932. }
  10933. },
  10934. "FileResponse": {
  10935. "description": "FileResponse",
  10936. "schema": {
  10937. "$ref": "#/definitions/FileResponse"
  10938. }
  10939. },
  10940. "GPGKey": {
  10941. "description": "GPGKey",
  10942. "schema": {
  10943. "$ref": "#/definitions/GPGKey"
  10944. }
  10945. },
  10946. "GPGKeyList": {
  10947. "description": "GPGKeyList",
  10948. "schema": {
  10949. "type": "array",
  10950. "items": {
  10951. "$ref": "#/definitions/GPGKey"
  10952. }
  10953. }
  10954. },
  10955. "GitBlobResponse": {
  10956. "description": "GitBlobResponse",
  10957. "schema": {
  10958. "$ref": "#/definitions/GitBlobResponse"
  10959. }
  10960. },
  10961. "GitHook": {
  10962. "description": "GitHook",
  10963. "schema": {
  10964. "$ref": "#/definitions/GitHook"
  10965. }
  10966. },
  10967. "GitHookList": {
  10968. "description": "GitHookList",
  10969. "schema": {
  10970. "type": "array",
  10971. "items": {
  10972. "$ref": "#/definitions/GitHook"
  10973. }
  10974. }
  10975. },
  10976. "GitTreeResponse": {
  10977. "description": "GitTreeResponse",
  10978. "schema": {
  10979. "$ref": "#/definitions/GitTreeResponse"
  10980. }
  10981. },
  10982. "Hook": {
  10983. "description": "Hook",
  10984. "schema": {
  10985. "$ref": "#/definitions/Hook"
  10986. }
  10987. },
  10988. "HookList": {
  10989. "description": "HookList",
  10990. "schema": {
  10991. "type": "array",
  10992. "items": {
  10993. "$ref": "#/definitions/Hook"
  10994. }
  10995. }
  10996. },
  10997. "Issue": {
  10998. "description": "Issue",
  10999. "schema": {
  11000. "$ref": "#/definitions/Issue"
  11001. }
  11002. },
  11003. "IssueDeadline": {
  11004. "description": "IssueDeadline",
  11005. "schema": {
  11006. "$ref": "#/definitions/IssueDeadline"
  11007. }
  11008. },
  11009. "IssueList": {
  11010. "description": "IssueList",
  11011. "schema": {
  11012. "type": "array",
  11013. "items": {
  11014. "$ref": "#/definitions/Issue"
  11015. }
  11016. }
  11017. },
  11018. "Label": {
  11019. "description": "Label",
  11020. "schema": {
  11021. "$ref": "#/definitions/Label"
  11022. }
  11023. },
  11024. "LabelList": {
  11025. "description": "LabelList",
  11026. "schema": {
  11027. "type": "array",
  11028. "items": {
  11029. "$ref": "#/definitions/Label"
  11030. }
  11031. }
  11032. },
  11033. "MarkdownRender": {
  11034. "description": "MarkdownRender is a rendered markdown document",
  11035. "schema": {
  11036. "type": "string"
  11037. }
  11038. },
  11039. "Milestone": {
  11040. "description": "Milestone",
  11041. "schema": {
  11042. "$ref": "#/definitions/Milestone"
  11043. }
  11044. },
  11045. "MilestoneList": {
  11046. "description": "MilestoneList",
  11047. "schema": {
  11048. "type": "array",
  11049. "items": {
  11050. "$ref": "#/definitions/Milestone"
  11051. }
  11052. }
  11053. },
  11054. "Organization": {
  11055. "description": "Organization",
  11056. "schema": {
  11057. "$ref": "#/definitions/Organization"
  11058. }
  11059. },
  11060. "OrganizationList": {
  11061. "description": "OrganizationList",
  11062. "schema": {
  11063. "type": "array",
  11064. "items": {
  11065. "$ref": "#/definitions/Organization"
  11066. }
  11067. }
  11068. },
  11069. "PublicKey": {
  11070. "description": "PublicKey",
  11071. "schema": {
  11072. "$ref": "#/definitions/PublicKey"
  11073. }
  11074. },
  11075. "PublicKeyList": {
  11076. "description": "PublicKeyList",
  11077. "schema": {
  11078. "type": "array",
  11079. "items": {
  11080. "$ref": "#/definitions/PublicKey"
  11081. }
  11082. }
  11083. },
  11084. "PullRequest": {
  11085. "description": "PullRequest",
  11086. "schema": {
  11087. "$ref": "#/definitions/PullRequest"
  11088. }
  11089. },
  11090. "PullRequestList": {
  11091. "description": "PullRequestList",
  11092. "schema": {
  11093. "type": "array",
  11094. "items": {
  11095. "$ref": "#/definitions/PullRequest"
  11096. }
  11097. }
  11098. },
  11099. "Reference": {
  11100. "description": "Reference",
  11101. "schema": {
  11102. "$ref": "#/definitions/Reference"
  11103. }
  11104. },
  11105. "ReferenceList": {
  11106. "description": "ReferenceList",
  11107. "schema": {
  11108. "type": "array",
  11109. "items": {
  11110. "$ref": "#/definitions/Reference"
  11111. }
  11112. }
  11113. },
  11114. "Release": {
  11115. "description": "Release",
  11116. "schema": {
  11117. "$ref": "#/definitions/Release"
  11118. }
  11119. },
  11120. "ReleaseList": {
  11121. "description": "ReleaseList",
  11122. "schema": {
  11123. "type": "array",
  11124. "items": {
  11125. "$ref": "#/definitions/Release"
  11126. }
  11127. }
  11128. },
  11129. "Repository": {
  11130. "description": "Repository",
  11131. "schema": {
  11132. "$ref": "#/definitions/Repository"
  11133. }
  11134. },
  11135. "RepositoryList": {
  11136. "description": "RepositoryList",
  11137. "schema": {
  11138. "type": "array",
  11139. "items": {
  11140. "$ref": "#/definitions/Repository"
  11141. }
  11142. }
  11143. },
  11144. "SearchResults": {
  11145. "description": "SearchResults",
  11146. "schema": {
  11147. "$ref": "#/definitions/SearchResults"
  11148. }
  11149. },
  11150. "ServerVersion": {
  11151. "description": "ServerVersion",
  11152. "schema": {
  11153. "$ref": "#/definitions/ServerVersion"
  11154. }
  11155. },
  11156. "Status": {
  11157. "description": "Status",
  11158. "schema": {
  11159. "$ref": "#/definitions/Status"
  11160. }
  11161. },
  11162. "StatusList": {
  11163. "description": "StatusList",
  11164. "schema": {
  11165. "type": "array",
  11166. "items": {
  11167. "$ref": "#/definitions/Status"
  11168. }
  11169. }
  11170. },
  11171. "Tag": {
  11172. "description": "Tag",
  11173. "schema": {
  11174. "$ref": "#/definitions/Tag"
  11175. }
  11176. },
  11177. "TagList": {
  11178. "description": "TagList",
  11179. "schema": {
  11180. "type": "array",
  11181. "items": {
  11182. "$ref": "#/definitions/Tag"
  11183. }
  11184. }
  11185. },
  11186. "Team": {
  11187. "description": "Team",
  11188. "schema": {
  11189. "$ref": "#/definitions/Team"
  11190. }
  11191. },
  11192. "TeamList": {
  11193. "description": "TeamList",
  11194. "schema": {
  11195. "type": "array",
  11196. "items": {
  11197. "$ref": "#/definitions/Team"
  11198. }
  11199. }
  11200. },
  11201. "TopicListResponse": {
  11202. "description": "TopicListResponse",
  11203. "schema": {
  11204. "type": "array",
  11205. "items": {
  11206. "$ref": "#/definitions/TopicResponse"
  11207. }
  11208. }
  11209. },
  11210. "TopicNames": {
  11211. "description": "TopicNames",
  11212. "schema": {
  11213. "$ref": "#/definitions/TopicName"
  11214. }
  11215. },
  11216. "TrackedTime": {
  11217. "description": "TrackedTime",
  11218. "schema": {
  11219. "$ref": "#/definitions/TrackedTime"
  11220. }
  11221. },
  11222. "TrackedTimeList": {
  11223. "description": "TrackedTimeList",
  11224. "schema": {
  11225. "type": "array",
  11226. "items": {
  11227. "$ref": "#/definitions/TrackedTime"
  11228. }
  11229. }
  11230. },
  11231. "User": {
  11232. "description": "User",
  11233. "schema": {
  11234. "$ref": "#/definitions/User"
  11235. }
  11236. },
  11237. "UserHeatmapData": {
  11238. "description": "UserHeatmapData",
  11239. "schema": {
  11240. "type": "array",
  11241. "items": {
  11242. "$ref": "#/definitions/UserHeatmapData"
  11243. }
  11244. }
  11245. },
  11246. "UserList": {
  11247. "description": "UserList",
  11248. "schema": {
  11249. "type": "array",
  11250. "items": {
  11251. "$ref": "#/definitions/User"
  11252. }
  11253. }
  11254. },
  11255. "WatchInfo": {
  11256. "description": "WatchInfo",
  11257. "schema": {
  11258. "$ref": "#/definitions/WatchInfo"
  11259. }
  11260. },
  11261. "empty": {
  11262. "description": "APIEmpty is an empty response"
  11263. },
  11264. "error": {
  11265. "description": "APIError is error format response",
  11266. "headers": {
  11267. "message": {
  11268. "type": "string"
  11269. },
  11270. "url": {
  11271. "type": "string"
  11272. }
  11273. }
  11274. },
  11275. "forbidden": {
  11276. "description": "APIForbiddenError is a forbidden error response",
  11277. "headers": {
  11278. "message": {
  11279. "type": "string"
  11280. },
  11281. "url": {
  11282. "type": "string"
  11283. }
  11284. }
  11285. },
  11286. "notFound": {
  11287. "description": "APINotFound is a not found empty response"
  11288. },
  11289. "parameterBodies": {
  11290. "description": "parameterBodies",
  11291. "schema": {
  11292. "$ref": "#/definitions/RepoTopicOptions"
  11293. }
  11294. },
  11295. "redirect": {
  11296. "description": "APIRedirect is a redirect response"
  11297. },
  11298. "validationError": {
  11299. "description": "APIValidationError is error format response related to input validation",
  11300. "headers": {
  11301. "message": {
  11302. "type": "string"
  11303. },
  11304. "url": {
  11305. "type": "string"
  11306. }
  11307. }
  11308. }
  11309. },
  11310. "securityDefinitions": {
  11311. "AccessToken": {
  11312. "type": "apiKey",
  11313. "name": "access_token",
  11314. "in": "query"
  11315. },
  11316. "AuthorizationHeaderToken": {
  11317. "description": "API tokens must be prepended with \"token\" followed by a space.",
  11318. "type": "apiKey",
  11319. "name": "Authorization",
  11320. "in": "header"
  11321. },
  11322. "BasicAuth": {
  11323. "type": "basic"
  11324. },
  11325. "SudoHeader": {
  11326. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  11327. "type": "apiKey",
  11328. "name": "Sudo",
  11329. "in": "header"
  11330. },
  11331. "SudoParam": {
  11332. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  11333. "type": "apiKey",
  11334. "name": "sudo",
  11335. "in": "query"
  11336. },
  11337. "Token": {
  11338. "type": "apiKey",
  11339. "name": "token",
  11340. "in": "query"
  11341. }
  11342. },
  11343. "security": [
  11344. {
  11345. "BasicAuth": []
  11346. },
  11347. {
  11348. "Token": []
  11349. },
  11350. {
  11351. "AccessToken": []
  11352. },
  11353. {
  11354. "AuthorizationHeaderToken": []
  11355. },
  11356. {
  11357. "SudoParam": []
  11358. },
  11359. {
  11360. "SudoHeader": []
  11361. }
  11362. ]
  11363. }