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 278 kB

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