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 272 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>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
8 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
Add 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>
6 years ago
Repository avatars (#6986) * Repository avatars - first variant of code from old work for gogs - add migration 87 - add new option in app.ini - add en-US locale string - add new class in repository.less * Add changed index.css, remove unused template name * Update en-us doc about configuration options * Add comments to new functions, add new option to docker app.ini * Add comment for lint * Remove variable, not needed * Fix formatting * Update swagger api template * Check if avatar exists * Fix avatar link/path checks * Typo * TEXT column can't have a default value * Fixes: - remove old avatar file on upload - use ID in name of avatar file - users may upload same files - add simple tests * Fix fmt check * Generate PNG instead of "static" GIF * More informative comment * Fix error message * Update avatar upload checks: - add file size check - add new option - update config docs - add new string to en-us locale * Fixes: - use FileHEader field for check file size - add new test - upload big image * Fix formatting * Update comments * Update log message * Removed wrong style - not needed * Use Sync2 to migrate * Update repos list view - bigger avatar - fix html blocks alignment * A little adjust avatar size * Use small icons for explore/repo list * Use new cool avatar preparation func by @lafriks * Missing changes for new function * Remove unused import, move imports * Missed new option definition in app.ini Add file size check in user/profile avatar upload * Use smaller field length for Avatar * Use session to update repo DB data, update DeleteAvatar - use session too * Fix err variable definition * As suggested @lafriks - return as soon as possible, code readability
6 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add Attachment API (#3478) * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
7 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
Add API endpoint for accessing repo topics (#7963) * Create API endpoints for repo topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Generate swagger Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add documentation to functions Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Grammar fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix function comment Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Can't use FindTopics when looking for a single repo topic, as it doesnt use exact match Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add PUT ​/repos​/{owner}​/{repo}​/topics and remove GET ​/repos​/{owner}​/{repo}​/topics * Ignore if topic is sent twice in same request, refactoring. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix topic dropdown with api changes. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Style fix Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update API documentation Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Better way to handle duplicate topics in slice Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Make response element TopicName an array of strings, instead of using an array of TopicName Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test cases for API Repo Topics. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix format of tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix comments Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix unit tests after adding some more topics to the test fixture. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Update models/topic.go Limit multiple if else if ... Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Engine as first parameter in function Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * Replace magic numbers with http status code constants. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix variable scope Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Test one read with login and one with token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add some more tests Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Apply suggestions from code review Use empty struct for efficiency Co-Authored-By: Lauris BH <lauris@nix.lv> * Add test case to check access for user with write access Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Fix access, repo admin required to change topics Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Correct first test to be without token Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Any repo reader should be able to access topics. * No need for string pointer Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
6 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867
  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. "/repos/migrate": {
  1051. "post": {
  1052. "consumes": [
  1053. "application/json"
  1054. ],
  1055. "produces": [
  1056. "application/json"
  1057. ],
  1058. "tags": [
  1059. "repository"
  1060. ],
  1061. "summary": "Migrate a remote git repository",
  1062. "operationId": "repoMigrate",
  1063. "parameters": [
  1064. {
  1065. "name": "body",
  1066. "in": "body",
  1067. "schema": {
  1068. "$ref": "#/definitions/MigrateRepoForm"
  1069. }
  1070. }
  1071. ],
  1072. "responses": {
  1073. "201": {
  1074. "$ref": "#/responses/Repository"
  1075. }
  1076. }
  1077. }
  1078. },
  1079. "/repos/search": {
  1080. "get": {
  1081. "produces": [
  1082. "application/json"
  1083. ],
  1084. "tags": [
  1085. "repository"
  1086. ],
  1087. "summary": "Search for repositories",
  1088. "operationId": "repoSearch",
  1089. "parameters": [
  1090. {
  1091. "type": "string",
  1092. "description": "keyword",
  1093. "name": "q",
  1094. "in": "query"
  1095. },
  1096. {
  1097. "type": "boolean",
  1098. "description": "Limit search to repositories with keyword as topic",
  1099. "name": "topic",
  1100. "in": "query"
  1101. },
  1102. {
  1103. "type": "boolean",
  1104. "description": "include search of keyword within repository description",
  1105. "name": "includeDesc",
  1106. "in": "query"
  1107. },
  1108. {
  1109. "type": "integer",
  1110. "format": "int64",
  1111. "description": "search only for repos that the user with the given id owns or contributes to",
  1112. "name": "uid",
  1113. "in": "query"
  1114. },
  1115. {
  1116. "type": "integer",
  1117. "format": "int64",
  1118. "description": "search only for repos that the user with the given id has starred",
  1119. "name": "starredBy",
  1120. "in": "query"
  1121. },
  1122. {
  1123. "type": "boolean",
  1124. "description": "include private repositories this user has access to (defaults to true)",
  1125. "name": "private",
  1126. "in": "query"
  1127. },
  1128. {
  1129. "type": "integer",
  1130. "description": "page number of results to return (1-based)",
  1131. "name": "page",
  1132. "in": "query"
  1133. },
  1134. {
  1135. "type": "integer",
  1136. "description": "page size of results, maximum page size is 50",
  1137. "name": "limit",
  1138. "in": "query"
  1139. },
  1140. {
  1141. "type": "string",
  1142. "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"",
  1143. "name": "mode",
  1144. "in": "query"
  1145. },
  1146. {
  1147. "type": "boolean",
  1148. "description": "if `uid` is given, search only for repos that the user owns",
  1149. "name": "exclusive",
  1150. "in": "query"
  1151. },
  1152. {
  1153. "type": "string",
  1154. "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"",
  1155. "name": "sort",
  1156. "in": "query"
  1157. },
  1158. {
  1159. "type": "string",
  1160. "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.",
  1161. "name": "order",
  1162. "in": "query"
  1163. }
  1164. ],
  1165. "responses": {
  1166. "200": {
  1167. "$ref": "#/responses/SearchResults"
  1168. },
  1169. "422": {
  1170. "$ref": "#/responses/validationError"
  1171. }
  1172. }
  1173. }
  1174. },
  1175. "/repos/{owner}/{repo}": {
  1176. "get": {
  1177. "produces": [
  1178. "application/json"
  1179. ],
  1180. "tags": [
  1181. "repository"
  1182. ],
  1183. "summary": "Get a repository",
  1184. "operationId": "repoGet",
  1185. "parameters": [
  1186. {
  1187. "type": "string",
  1188. "description": "owner of the repo",
  1189. "name": "owner",
  1190. "in": "path",
  1191. "required": true
  1192. },
  1193. {
  1194. "type": "string",
  1195. "description": "name of the repo",
  1196. "name": "repo",
  1197. "in": "path",
  1198. "required": true
  1199. }
  1200. ],
  1201. "responses": {
  1202. "200": {
  1203. "$ref": "#/responses/Repository"
  1204. }
  1205. }
  1206. },
  1207. "delete": {
  1208. "produces": [
  1209. "application/json"
  1210. ],
  1211. "tags": [
  1212. "repository"
  1213. ],
  1214. "summary": "Delete a repository",
  1215. "operationId": "repoDelete",
  1216. "parameters": [
  1217. {
  1218. "type": "string",
  1219. "description": "owner of the repo to delete",
  1220. "name": "owner",
  1221. "in": "path",
  1222. "required": true
  1223. },
  1224. {
  1225. "type": "string",
  1226. "description": "name of the repo to delete",
  1227. "name": "repo",
  1228. "in": "path",
  1229. "required": true
  1230. }
  1231. ],
  1232. "responses": {
  1233. "204": {
  1234. "$ref": "#/responses/empty"
  1235. },
  1236. "403": {
  1237. "$ref": "#/responses/forbidden"
  1238. }
  1239. }
  1240. },
  1241. "patch": {
  1242. "produces": [
  1243. "application/json"
  1244. ],
  1245. "tags": [
  1246. "repository"
  1247. ],
  1248. "summary": "Edit a repository's properties. Only fields that are set will be changed.",
  1249. "operationId": "repoEdit",
  1250. "parameters": [
  1251. {
  1252. "type": "string",
  1253. "description": "owner of the repo to edit",
  1254. "name": "owner",
  1255. "in": "path",
  1256. "required": true
  1257. },
  1258. {
  1259. "type": "string",
  1260. "description": "name of the repo to edit",
  1261. "name": "repo",
  1262. "in": "path",
  1263. "required": true
  1264. },
  1265. {
  1266. "description": "Properties of a repo that you can edit",
  1267. "name": "body",
  1268. "in": "body",
  1269. "schema": {
  1270. "$ref": "#/definitions/EditRepoOption"
  1271. }
  1272. }
  1273. ],
  1274. "responses": {
  1275. "200": {
  1276. "$ref": "#/responses/Repository"
  1277. },
  1278. "403": {
  1279. "$ref": "#/responses/forbidden"
  1280. },
  1281. "422": {
  1282. "$ref": "#/responses/validationError"
  1283. }
  1284. }
  1285. }
  1286. },
  1287. "/repos/{owner}/{repo}/archive/{archive}": {
  1288. "get": {
  1289. "produces": [
  1290. "application/json"
  1291. ],
  1292. "tags": [
  1293. "repository"
  1294. ],
  1295. "summary": "Get an archive of a repository",
  1296. "operationId": "repoGetArchive",
  1297. "parameters": [
  1298. {
  1299. "type": "string",
  1300. "description": "owner of the repo",
  1301. "name": "owner",
  1302. "in": "path",
  1303. "required": true
  1304. },
  1305. {
  1306. "type": "string",
  1307. "description": "name of the repo",
  1308. "name": "repo",
  1309. "in": "path",
  1310. "required": true
  1311. },
  1312. {
  1313. "type": "string",
  1314. "description": "archive to download, consisting of a git reference and archive",
  1315. "name": "archive",
  1316. "in": "path",
  1317. "required": true
  1318. }
  1319. ],
  1320. "responses": {
  1321. "200": {
  1322. "description": "success"
  1323. }
  1324. }
  1325. }
  1326. },
  1327. "/repos/{owner}/{repo}/branches": {
  1328. "get": {
  1329. "produces": [
  1330. "application/json"
  1331. ],
  1332. "tags": [
  1333. "repository"
  1334. ],
  1335. "summary": "List a repository's branches",
  1336. "operationId": "repoListBranches",
  1337. "parameters": [
  1338. {
  1339. "type": "string",
  1340. "description": "owner of the repo",
  1341. "name": "owner",
  1342. "in": "path",
  1343. "required": true
  1344. },
  1345. {
  1346. "type": "string",
  1347. "description": "name of the repo",
  1348. "name": "repo",
  1349. "in": "path",
  1350. "required": true
  1351. }
  1352. ],
  1353. "responses": {
  1354. "200": {
  1355. "$ref": "#/responses/BranchList"
  1356. }
  1357. }
  1358. }
  1359. },
  1360. "/repos/{owner}/{repo}/branches/{branch}": {
  1361. "get": {
  1362. "produces": [
  1363. "application/json"
  1364. ],
  1365. "tags": [
  1366. "repository"
  1367. ],
  1368. "summary": "Retrieve a specific branch from a repository",
  1369. "operationId": "repoGetBranch",
  1370. "parameters": [
  1371. {
  1372. "type": "string",
  1373. "description": "owner of the repo",
  1374. "name": "owner",
  1375. "in": "path",
  1376. "required": true
  1377. },
  1378. {
  1379. "type": "string",
  1380. "description": "name of the repo",
  1381. "name": "repo",
  1382. "in": "path",
  1383. "required": true
  1384. },
  1385. {
  1386. "type": "string",
  1387. "description": "branch to get",
  1388. "name": "branch",
  1389. "in": "path",
  1390. "required": true
  1391. }
  1392. ],
  1393. "responses": {
  1394. "200": {
  1395. "$ref": "#/responses/Branch"
  1396. }
  1397. }
  1398. }
  1399. },
  1400. "/repos/{owner}/{repo}/collaborators": {
  1401. "get": {
  1402. "produces": [
  1403. "application/json"
  1404. ],
  1405. "tags": [
  1406. "repository"
  1407. ],
  1408. "summary": "List a repository's collaborators",
  1409. "operationId": "repoListCollaborators",
  1410. "parameters": [
  1411. {
  1412. "type": "string",
  1413. "description": "owner of the repo",
  1414. "name": "owner",
  1415. "in": "path",
  1416. "required": true
  1417. },
  1418. {
  1419. "type": "string",
  1420. "description": "name of the repo",
  1421. "name": "repo",
  1422. "in": "path",
  1423. "required": true
  1424. }
  1425. ],
  1426. "responses": {
  1427. "200": {
  1428. "$ref": "#/responses/UserList"
  1429. }
  1430. }
  1431. }
  1432. },
  1433. "/repos/{owner}/{repo}/collaborators/{collaborator}": {
  1434. "get": {
  1435. "produces": [
  1436. "application/json"
  1437. ],
  1438. "tags": [
  1439. "repository"
  1440. ],
  1441. "summary": "Check if a user is a collaborator of a repository",
  1442. "operationId": "repoCheckCollaborator",
  1443. "parameters": [
  1444. {
  1445. "type": "string",
  1446. "description": "owner of the repo",
  1447. "name": "owner",
  1448. "in": "path",
  1449. "required": true
  1450. },
  1451. {
  1452. "type": "string",
  1453. "description": "name of the repo",
  1454. "name": "repo",
  1455. "in": "path",
  1456. "required": true
  1457. },
  1458. {
  1459. "type": "string",
  1460. "description": "username of the collaborator",
  1461. "name": "collaborator",
  1462. "in": "path",
  1463. "required": true
  1464. }
  1465. ],
  1466. "responses": {
  1467. "204": {
  1468. "$ref": "#/responses/empty"
  1469. },
  1470. "404": {
  1471. "$ref": "#/responses/empty"
  1472. }
  1473. }
  1474. },
  1475. "put": {
  1476. "produces": [
  1477. "application/json"
  1478. ],
  1479. "tags": [
  1480. "repository"
  1481. ],
  1482. "summary": "Add a collaborator to a repository",
  1483. "operationId": "repoAddCollaborator",
  1484. "parameters": [
  1485. {
  1486. "type": "string",
  1487. "description": "owner of the repo",
  1488. "name": "owner",
  1489. "in": "path",
  1490. "required": true
  1491. },
  1492. {
  1493. "type": "string",
  1494. "description": "name of the repo",
  1495. "name": "repo",
  1496. "in": "path",
  1497. "required": true
  1498. },
  1499. {
  1500. "type": "string",
  1501. "description": "username of the collaborator to add",
  1502. "name": "collaborator",
  1503. "in": "path",
  1504. "required": true
  1505. },
  1506. {
  1507. "name": "body",
  1508. "in": "body",
  1509. "schema": {
  1510. "$ref": "#/definitions/AddCollaboratorOption"
  1511. }
  1512. }
  1513. ],
  1514. "responses": {
  1515. "204": {
  1516. "$ref": "#/responses/empty"
  1517. }
  1518. }
  1519. },
  1520. "delete": {
  1521. "produces": [
  1522. "application/json"
  1523. ],
  1524. "tags": [
  1525. "repository"
  1526. ],
  1527. "summary": "Delete a collaborator from a repository",
  1528. "operationId": "repoDeleteCollaborator",
  1529. "parameters": [
  1530. {
  1531. "type": "string",
  1532. "description": "owner of the repo",
  1533. "name": "owner",
  1534. "in": "path",
  1535. "required": true
  1536. },
  1537. {
  1538. "type": "string",
  1539. "description": "name of the repo",
  1540. "name": "repo",
  1541. "in": "path",
  1542. "required": true
  1543. },
  1544. {
  1545. "type": "string",
  1546. "description": "username of the collaborator to delete",
  1547. "name": "collaborator",
  1548. "in": "path",
  1549. "required": true
  1550. }
  1551. ],
  1552. "responses": {
  1553. "204": {
  1554. "$ref": "#/responses/empty"
  1555. }
  1556. }
  1557. }
  1558. },
  1559. "/repos/{owner}/{repo}/commits": {
  1560. "get": {
  1561. "produces": [
  1562. "application/json"
  1563. ],
  1564. "tags": [
  1565. "repository"
  1566. ],
  1567. "summary": "Get a list of all commits from a repository",
  1568. "operationId": "repoGetAllCommits",
  1569. "parameters": [
  1570. {
  1571. "type": "string",
  1572. "description": "owner of the repo",
  1573. "name": "owner",
  1574. "in": "path",
  1575. "required": true
  1576. },
  1577. {
  1578. "type": "string",
  1579. "description": "name of the repo",
  1580. "name": "repo",
  1581. "in": "path",
  1582. "required": true
  1583. },
  1584. {
  1585. "type": "string",
  1586. "description": "SHA or branch to start listing commits from (usually 'master')",
  1587. "name": "sha",
  1588. "in": "query"
  1589. },
  1590. {
  1591. "type": "integer",
  1592. "description": "page number of requested commits",
  1593. "name": "page",
  1594. "in": "query"
  1595. }
  1596. ],
  1597. "responses": {
  1598. "200": {
  1599. "$ref": "#/responses/CommitList"
  1600. },
  1601. "404": {
  1602. "$ref": "#/responses/notFound"
  1603. },
  1604. "409": {
  1605. "$ref": "#/responses/EmptyRepository"
  1606. }
  1607. }
  1608. }
  1609. },
  1610. "/repos/{owner}/{repo}/commits/{ref}/statuses": {
  1611. "get": {
  1612. "produces": [
  1613. "application/json"
  1614. ],
  1615. "tags": [
  1616. "repository"
  1617. ],
  1618. "summary": "Get a commit's combined status, by branch/tag/commit reference",
  1619. "operationId": "repoGetCombinedStatusByRef",
  1620. "parameters": [
  1621. {
  1622. "type": "string",
  1623. "description": "owner of the repo",
  1624. "name": "owner",
  1625. "in": "path",
  1626. "required": true
  1627. },
  1628. {
  1629. "type": "string",
  1630. "description": "name of the repo",
  1631. "name": "repo",
  1632. "in": "path",
  1633. "required": true
  1634. },
  1635. {
  1636. "type": "string",
  1637. "description": "name of branch/tag/commit",
  1638. "name": "ref",
  1639. "in": "path",
  1640. "required": true
  1641. },
  1642. {
  1643. "type": "integer",
  1644. "description": "page number of results",
  1645. "name": "page",
  1646. "in": "query"
  1647. }
  1648. ],
  1649. "responses": {
  1650. "200": {
  1651. "$ref": "#/responses/Status"
  1652. }
  1653. }
  1654. }
  1655. },
  1656. "/repos/{owner}/{repo}/contents": {
  1657. "get": {
  1658. "produces": [
  1659. "application/json"
  1660. ],
  1661. "tags": [
  1662. "repository"
  1663. ],
  1664. "summary": "Gets the metadata of all the entries of the root dir",
  1665. "operationId": "repoGetContentsList",
  1666. "parameters": [
  1667. {
  1668. "type": "string",
  1669. "description": "owner of the repo",
  1670. "name": "owner",
  1671. "in": "path",
  1672. "required": true
  1673. },
  1674. {
  1675. "type": "string",
  1676. "description": "name of the repo",
  1677. "name": "repo",
  1678. "in": "path",
  1679. "required": true
  1680. },
  1681. {
  1682. "type": "string",
  1683. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  1684. "name": "ref",
  1685. "in": "query"
  1686. }
  1687. ],
  1688. "responses": {
  1689. "200": {
  1690. "$ref": "#/responses/ContentsListResponse"
  1691. }
  1692. }
  1693. }
  1694. },
  1695. "/repos/{owner}/{repo}/contents/{filepath}": {
  1696. "get": {
  1697. "produces": [
  1698. "application/json"
  1699. ],
  1700. "tags": [
  1701. "repository"
  1702. ],
  1703. "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir",
  1704. "operationId": "repoGetContents",
  1705. "parameters": [
  1706. {
  1707. "type": "string",
  1708. "description": "owner of the repo",
  1709. "name": "owner",
  1710. "in": "path",
  1711. "required": true
  1712. },
  1713. {
  1714. "type": "string",
  1715. "description": "name of the repo",
  1716. "name": "repo",
  1717. "in": "path",
  1718. "required": true
  1719. },
  1720. {
  1721. "type": "string",
  1722. "description": "path of the dir, file, symlink or submodule in the repo",
  1723. "name": "filepath",
  1724. "in": "path",
  1725. "required": true
  1726. },
  1727. {
  1728. "type": "string",
  1729. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  1730. "name": "ref",
  1731. "in": "query"
  1732. }
  1733. ],
  1734. "responses": {
  1735. "200": {
  1736. "$ref": "#/responses/ContentsResponse"
  1737. }
  1738. }
  1739. },
  1740. "put": {
  1741. "consumes": [
  1742. "application/json"
  1743. ],
  1744. "produces": [
  1745. "application/json"
  1746. ],
  1747. "tags": [
  1748. "repository"
  1749. ],
  1750. "summary": "Update a file in a repository",
  1751. "operationId": "repoUpdateFile",
  1752. "parameters": [
  1753. {
  1754. "type": "string",
  1755. "description": "owner of the repo",
  1756. "name": "owner",
  1757. "in": "path",
  1758. "required": true
  1759. },
  1760. {
  1761. "type": "string",
  1762. "description": "name of the repo",
  1763. "name": "repo",
  1764. "in": "path",
  1765. "required": true
  1766. },
  1767. {
  1768. "type": "string",
  1769. "description": "path of the file to update",
  1770. "name": "filepath",
  1771. "in": "path",
  1772. "required": true
  1773. },
  1774. {
  1775. "name": "body",
  1776. "in": "body",
  1777. "required": true,
  1778. "schema": {
  1779. "$ref": "#/definitions/UpdateFileOptions"
  1780. }
  1781. }
  1782. ],
  1783. "responses": {
  1784. "200": {
  1785. "$ref": "#/responses/FileResponse"
  1786. }
  1787. }
  1788. },
  1789. "post": {
  1790. "consumes": [
  1791. "application/json"
  1792. ],
  1793. "produces": [
  1794. "application/json"
  1795. ],
  1796. "tags": [
  1797. "repository"
  1798. ],
  1799. "summary": "Create a file in a repository",
  1800. "operationId": "repoCreateFile",
  1801. "parameters": [
  1802. {
  1803. "type": "string",
  1804. "description": "owner of the repo",
  1805. "name": "owner",
  1806. "in": "path",
  1807. "required": true
  1808. },
  1809. {
  1810. "type": "string",
  1811. "description": "name of the repo",
  1812. "name": "repo",
  1813. "in": "path",
  1814. "required": true
  1815. },
  1816. {
  1817. "type": "string",
  1818. "description": "path of the file to create",
  1819. "name": "filepath",
  1820. "in": "path",
  1821. "required": true
  1822. },
  1823. {
  1824. "name": "body",
  1825. "in": "body",
  1826. "required": true,
  1827. "schema": {
  1828. "$ref": "#/definitions/CreateFileOptions"
  1829. }
  1830. }
  1831. ],
  1832. "responses": {
  1833. "201": {
  1834. "$ref": "#/responses/FileResponse"
  1835. }
  1836. }
  1837. },
  1838. "delete": {
  1839. "consumes": [
  1840. "application/json"
  1841. ],
  1842. "produces": [
  1843. "application/json"
  1844. ],
  1845. "tags": [
  1846. "repository"
  1847. ],
  1848. "summary": "Delete a file in a repository",
  1849. "operationId": "repoDeleteFile",
  1850. "parameters": [
  1851. {
  1852. "type": "string",
  1853. "description": "owner of the repo",
  1854. "name": "owner",
  1855. "in": "path",
  1856. "required": true
  1857. },
  1858. {
  1859. "type": "string",
  1860. "description": "name of the repo",
  1861. "name": "repo",
  1862. "in": "path",
  1863. "required": true
  1864. },
  1865. {
  1866. "type": "string",
  1867. "description": "path of the file to delete",
  1868. "name": "filepath",
  1869. "in": "path",
  1870. "required": true
  1871. },
  1872. {
  1873. "name": "body",
  1874. "in": "body",
  1875. "required": true,
  1876. "schema": {
  1877. "$ref": "#/definitions/DeleteFileOptions"
  1878. }
  1879. }
  1880. ],
  1881. "responses": {
  1882. "200": {
  1883. "$ref": "#/responses/FileDeleteResponse"
  1884. }
  1885. }
  1886. }
  1887. },
  1888. "/repos/{owner}/{repo}/editorconfig/{filepath}": {
  1889. "get": {
  1890. "produces": [
  1891. "application/json"
  1892. ],
  1893. "tags": [
  1894. "repository"
  1895. ],
  1896. "summary": "Get the EditorConfig definitions of a file in a repository",
  1897. "operationId": "repoGetEditorConfig",
  1898. "parameters": [
  1899. {
  1900. "type": "string",
  1901. "description": "owner of the repo",
  1902. "name": "owner",
  1903. "in": "path",
  1904. "required": true
  1905. },
  1906. {
  1907. "type": "string",
  1908. "description": "name of the repo",
  1909. "name": "repo",
  1910. "in": "path",
  1911. "required": true
  1912. },
  1913. {
  1914. "type": "string",
  1915. "description": "filepath of file to get",
  1916. "name": "filepath",
  1917. "in": "path",
  1918. "required": true
  1919. }
  1920. ],
  1921. "responses": {
  1922. "200": {
  1923. "description": "success"
  1924. }
  1925. }
  1926. }
  1927. },
  1928. "/repos/{owner}/{repo}/forks": {
  1929. "get": {
  1930. "produces": [
  1931. "application/json"
  1932. ],
  1933. "tags": [
  1934. "repository"
  1935. ],
  1936. "summary": "List a repository's forks",
  1937. "operationId": "listForks",
  1938. "parameters": [
  1939. {
  1940. "type": "string",
  1941. "description": "owner of the repo",
  1942. "name": "owner",
  1943. "in": "path",
  1944. "required": true
  1945. },
  1946. {
  1947. "type": "string",
  1948. "description": "name of the repo",
  1949. "name": "repo",
  1950. "in": "path",
  1951. "required": true
  1952. }
  1953. ],
  1954. "responses": {
  1955. "200": {
  1956. "$ref": "#/responses/RepositoryList"
  1957. }
  1958. }
  1959. },
  1960. "post": {
  1961. "produces": [
  1962. "application/json"
  1963. ],
  1964. "tags": [
  1965. "repository"
  1966. ],
  1967. "summary": "Fork a repository",
  1968. "operationId": "createFork",
  1969. "parameters": [
  1970. {
  1971. "type": "string",
  1972. "description": "owner of the repo to fork",
  1973. "name": "owner",
  1974. "in": "path",
  1975. "required": true
  1976. },
  1977. {
  1978. "type": "string",
  1979. "description": "name of the repo to fork",
  1980. "name": "repo",
  1981. "in": "path",
  1982. "required": true
  1983. },
  1984. {
  1985. "name": "body",
  1986. "in": "body",
  1987. "schema": {
  1988. "$ref": "#/definitions/CreateForkOption"
  1989. }
  1990. }
  1991. ],
  1992. "responses": {
  1993. "202": {
  1994. "$ref": "#/responses/Repository"
  1995. }
  1996. }
  1997. }
  1998. },
  1999. "/repos/{owner}/{repo}/git/blobs/{sha}": {
  2000. "get": {
  2001. "produces": [
  2002. "application/json"
  2003. ],
  2004. "tags": [
  2005. "repository"
  2006. ],
  2007. "summary": "Gets the blob of a repository.",
  2008. "operationId": "GetBlob",
  2009. "parameters": [
  2010. {
  2011. "type": "string",
  2012. "description": "owner of the repo",
  2013. "name": "owner",
  2014. "in": "path",
  2015. "required": true
  2016. },
  2017. {
  2018. "type": "string",
  2019. "description": "name of the repo",
  2020. "name": "repo",
  2021. "in": "path",
  2022. "required": true
  2023. },
  2024. {
  2025. "type": "string",
  2026. "description": "sha of the commit",
  2027. "name": "sha",
  2028. "in": "path",
  2029. "required": true
  2030. }
  2031. ],
  2032. "responses": {
  2033. "200": {
  2034. "$ref": "#/responses/GitBlobResponse"
  2035. }
  2036. }
  2037. }
  2038. },
  2039. "/repos/{owner}/{repo}/git/commits/{sha}": {
  2040. "get": {
  2041. "produces": [
  2042. "application/json"
  2043. ],
  2044. "tags": [
  2045. "repository"
  2046. ],
  2047. "summary": "Get a single commit from a repository",
  2048. "operationId": "repoGetSingleCommit",
  2049. "parameters": [
  2050. {
  2051. "type": "string",
  2052. "description": "owner of the repo",
  2053. "name": "owner",
  2054. "in": "path",
  2055. "required": true
  2056. },
  2057. {
  2058. "type": "string",
  2059. "description": "name of the repo",
  2060. "name": "repo",
  2061. "in": "path",
  2062. "required": true
  2063. },
  2064. {
  2065. "type": "string",
  2066. "description": "the commit hash",
  2067. "name": "sha",
  2068. "in": "path",
  2069. "required": true
  2070. }
  2071. ],
  2072. "responses": {
  2073. "200": {
  2074. "$ref": "#/responses/Commit"
  2075. },
  2076. "404": {
  2077. "$ref": "#/responses/notFound"
  2078. }
  2079. }
  2080. }
  2081. },
  2082. "/repos/{owner}/{repo}/git/refs": {
  2083. "get": {
  2084. "produces": [
  2085. "application/json"
  2086. ],
  2087. "tags": [
  2088. "repository"
  2089. ],
  2090. "summary": "Get specified ref or filtered repository's refs",
  2091. "operationId": "repoListAllGitRefs",
  2092. "parameters": [
  2093. {
  2094. "type": "string",
  2095. "description": "owner of the repo",
  2096. "name": "owner",
  2097. "in": "path",
  2098. "required": true
  2099. },
  2100. {
  2101. "type": "string",
  2102. "description": "name of the repo",
  2103. "name": "repo",
  2104. "in": "path",
  2105. "required": true
  2106. }
  2107. ],
  2108. "responses": {
  2109. "200": {
  2110. "$ref": "#/responses/ReferenceList"
  2111. },
  2112. "404": {
  2113. "$ref": "#/responses/notFound"
  2114. }
  2115. }
  2116. }
  2117. },
  2118. "/repos/{owner}/{repo}/git/refs/{ref}": {
  2119. "get": {
  2120. "produces": [
  2121. "application/json"
  2122. ],
  2123. "tags": [
  2124. "repository"
  2125. ],
  2126. "summary": "Get specified ref or filtered repository's refs",
  2127. "operationId": "repoListGitRefs",
  2128. "parameters": [
  2129. {
  2130. "type": "string",
  2131. "description": "owner of the repo",
  2132. "name": "owner",
  2133. "in": "path",
  2134. "required": true
  2135. },
  2136. {
  2137. "type": "string",
  2138. "description": "name of the repo",
  2139. "name": "repo",
  2140. "in": "path",
  2141. "required": true
  2142. },
  2143. {
  2144. "type": "string",
  2145. "description": "part or full name of the ref",
  2146. "name": "ref",
  2147. "in": "path",
  2148. "required": true
  2149. }
  2150. ],
  2151. "responses": {
  2152. "200": {
  2153. "$ref": "#/responses/ReferenceList"
  2154. },
  2155. "404": {
  2156. "$ref": "#/responses/notFound"
  2157. }
  2158. }
  2159. }
  2160. },
  2161. "/repos/{owner}/{repo}/git/tags/{sha}": {
  2162. "get": {
  2163. "produces": [
  2164. "application/json"
  2165. ],
  2166. "tags": [
  2167. "repository"
  2168. ],
  2169. "summary": "Gets the tag object of an annotated tag (not lightweight tags)",
  2170. "operationId": "GetTag",
  2171. "parameters": [
  2172. {
  2173. "type": "string",
  2174. "description": "owner of the repo",
  2175. "name": "owner",
  2176. "in": "path",
  2177. "required": true
  2178. },
  2179. {
  2180. "type": "string",
  2181. "description": "name of the repo",
  2182. "name": "repo",
  2183. "in": "path",
  2184. "required": true
  2185. },
  2186. {
  2187. "type": "string",
  2188. "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.",
  2189. "name": "sha",
  2190. "in": "path",
  2191. "required": true
  2192. }
  2193. ],
  2194. "responses": {
  2195. "200": {
  2196. "$ref": "#/responses/AnnotatedTag"
  2197. }
  2198. }
  2199. }
  2200. },
  2201. "/repos/{owner}/{repo}/git/trees/{sha}": {
  2202. "get": {
  2203. "produces": [
  2204. "application/json"
  2205. ],
  2206. "tags": [
  2207. "repository"
  2208. ],
  2209. "summary": "Gets the tree of a repository.",
  2210. "operationId": "GetTree",
  2211. "parameters": [
  2212. {
  2213. "type": "string",
  2214. "description": "owner of the repo",
  2215. "name": "owner",
  2216. "in": "path",
  2217. "required": true
  2218. },
  2219. {
  2220. "type": "string",
  2221. "description": "name of the repo",
  2222. "name": "repo",
  2223. "in": "path",
  2224. "required": true
  2225. },
  2226. {
  2227. "type": "string",
  2228. "description": "sha of the commit",
  2229. "name": "sha",
  2230. "in": "path",
  2231. "required": true
  2232. },
  2233. {
  2234. "type": "boolean",
  2235. "description": "show all directories and files",
  2236. "name": "recursive",
  2237. "in": "query"
  2238. },
  2239. {
  2240. "type": "integer",
  2241. "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",
  2242. "name": "page",
  2243. "in": "query"
  2244. },
  2245. {
  2246. "type": "integer",
  2247. "description": "number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE",
  2248. "name": "per_page",
  2249. "in": "query"
  2250. }
  2251. ],
  2252. "responses": {
  2253. "200": {
  2254. "$ref": "#/responses/GitTreeResponse"
  2255. }
  2256. }
  2257. }
  2258. },
  2259. "/repos/{owner}/{repo}/hooks": {
  2260. "get": {
  2261. "produces": [
  2262. "application/json"
  2263. ],
  2264. "tags": [
  2265. "repository"
  2266. ],
  2267. "summary": "List the hooks in a repository",
  2268. "operationId": "repoListHooks",
  2269. "parameters": [
  2270. {
  2271. "type": "string",
  2272. "description": "owner of the repo",
  2273. "name": "owner",
  2274. "in": "path",
  2275. "required": true
  2276. },
  2277. {
  2278. "type": "string",
  2279. "description": "name of the repo",
  2280. "name": "repo",
  2281. "in": "path",
  2282. "required": true
  2283. }
  2284. ],
  2285. "responses": {
  2286. "200": {
  2287. "$ref": "#/responses/HookList"
  2288. }
  2289. }
  2290. },
  2291. "post": {
  2292. "consumes": [
  2293. "application/json"
  2294. ],
  2295. "produces": [
  2296. "application/json"
  2297. ],
  2298. "tags": [
  2299. "repository"
  2300. ],
  2301. "summary": "Create a hook",
  2302. "operationId": "repoCreateHook",
  2303. "parameters": [
  2304. {
  2305. "type": "string",
  2306. "description": "owner of the repo",
  2307. "name": "owner",
  2308. "in": "path",
  2309. "required": true
  2310. },
  2311. {
  2312. "type": "string",
  2313. "description": "name of the repo",
  2314. "name": "repo",
  2315. "in": "path",
  2316. "required": true
  2317. },
  2318. {
  2319. "name": "body",
  2320. "in": "body",
  2321. "schema": {
  2322. "$ref": "#/definitions/CreateHookOption"
  2323. }
  2324. }
  2325. ],
  2326. "responses": {
  2327. "201": {
  2328. "$ref": "#/responses/Hook"
  2329. }
  2330. }
  2331. }
  2332. },
  2333. "/repos/{owner}/{repo}/hooks/git": {
  2334. "get": {
  2335. "produces": [
  2336. "application/json"
  2337. ],
  2338. "tags": [
  2339. "repository"
  2340. ],
  2341. "summary": "List the Git hooks in a repository",
  2342. "operationId": "repoListGitHooks",
  2343. "parameters": [
  2344. {
  2345. "type": "string",
  2346. "description": "owner of the repo",
  2347. "name": "owner",
  2348. "in": "path",
  2349. "required": true
  2350. },
  2351. {
  2352. "type": "string",
  2353. "description": "name of the repo",
  2354. "name": "repo",
  2355. "in": "path",
  2356. "required": true
  2357. }
  2358. ],
  2359. "responses": {
  2360. "200": {
  2361. "$ref": "#/responses/GitHookList"
  2362. }
  2363. }
  2364. }
  2365. },
  2366. "/repos/{owner}/{repo}/hooks/git/{id}": {
  2367. "get": {
  2368. "produces": [
  2369. "application/json"
  2370. ],
  2371. "tags": [
  2372. "repository"
  2373. ],
  2374. "summary": "Get a Git hook",
  2375. "operationId": "repoGetGitHook",
  2376. "parameters": [
  2377. {
  2378. "type": "string",
  2379. "description": "owner of the repo",
  2380. "name": "owner",
  2381. "in": "path",
  2382. "required": true
  2383. },
  2384. {
  2385. "type": "string",
  2386. "description": "name of the repo",
  2387. "name": "repo",
  2388. "in": "path",
  2389. "required": true
  2390. },
  2391. {
  2392. "type": "string",
  2393. "description": "id of the hook to get",
  2394. "name": "id",
  2395. "in": "path",
  2396. "required": true
  2397. }
  2398. ],
  2399. "responses": {
  2400. "200": {
  2401. "$ref": "#/responses/GitHook"
  2402. },
  2403. "404": {
  2404. "$ref": "#/responses/notFound"
  2405. }
  2406. }
  2407. },
  2408. "delete": {
  2409. "produces": [
  2410. "application/json"
  2411. ],
  2412. "tags": [
  2413. "repository"
  2414. ],
  2415. "summary": "Delete a Git hook in a repository",
  2416. "operationId": "repoDeleteGitHook",
  2417. "parameters": [
  2418. {
  2419. "type": "string",
  2420. "description": "owner of the repo",
  2421. "name": "owner",
  2422. "in": "path",
  2423. "required": true
  2424. },
  2425. {
  2426. "type": "string",
  2427. "description": "name of the repo",
  2428. "name": "repo",
  2429. "in": "path",
  2430. "required": true
  2431. },
  2432. {
  2433. "type": "string",
  2434. "description": "id of the hook to get",
  2435. "name": "id",
  2436. "in": "path",
  2437. "required": true
  2438. }
  2439. ],
  2440. "responses": {
  2441. "204": {
  2442. "$ref": "#/responses/empty"
  2443. },
  2444. "404": {
  2445. "$ref": "#/responses/notFound"
  2446. }
  2447. }
  2448. },
  2449. "patch": {
  2450. "produces": [
  2451. "application/json"
  2452. ],
  2453. "tags": [
  2454. "repository"
  2455. ],
  2456. "summary": "Edit a Git hook in a repository",
  2457. "operationId": "repoEditGitHook",
  2458. "parameters": [
  2459. {
  2460. "type": "string",
  2461. "description": "owner of the repo",
  2462. "name": "owner",
  2463. "in": "path",
  2464. "required": true
  2465. },
  2466. {
  2467. "type": "string",
  2468. "description": "name of the repo",
  2469. "name": "repo",
  2470. "in": "path",
  2471. "required": true
  2472. },
  2473. {
  2474. "type": "string",
  2475. "description": "id of the hook to get",
  2476. "name": "id",
  2477. "in": "path",
  2478. "required": true
  2479. },
  2480. {
  2481. "name": "body",
  2482. "in": "body",
  2483. "schema": {
  2484. "$ref": "#/definitions/EditGitHookOption"
  2485. }
  2486. }
  2487. ],
  2488. "responses": {
  2489. "200": {
  2490. "$ref": "#/responses/GitHook"
  2491. },
  2492. "404": {
  2493. "$ref": "#/responses/notFound"
  2494. }
  2495. }
  2496. }
  2497. },
  2498. "/repos/{owner}/{repo}/hooks/{id}": {
  2499. "get": {
  2500. "produces": [
  2501. "application/json"
  2502. ],
  2503. "tags": [
  2504. "repository"
  2505. ],
  2506. "summary": "Get a hook",
  2507. "operationId": "repoGetHook",
  2508. "parameters": [
  2509. {
  2510. "type": "string",
  2511. "description": "owner of the repo",
  2512. "name": "owner",
  2513. "in": "path",
  2514. "required": true
  2515. },
  2516. {
  2517. "type": "string",
  2518. "description": "name of the repo",
  2519. "name": "repo",
  2520. "in": "path",
  2521. "required": true
  2522. },
  2523. {
  2524. "type": "integer",
  2525. "format": "int64",
  2526. "description": "id of the hook to get",
  2527. "name": "id",
  2528. "in": "path",
  2529. "required": true
  2530. }
  2531. ],
  2532. "responses": {
  2533. "200": {
  2534. "$ref": "#/responses/Hook"
  2535. }
  2536. }
  2537. },
  2538. "delete": {
  2539. "produces": [
  2540. "application/json"
  2541. ],
  2542. "tags": [
  2543. "repository"
  2544. ],
  2545. "summary": "Delete a hook in a repository",
  2546. "operationId": "repoDeleteHook",
  2547. "parameters": [
  2548. {
  2549. "type": "string",
  2550. "description": "owner of the repo",
  2551. "name": "owner",
  2552. "in": "path",
  2553. "required": true
  2554. },
  2555. {
  2556. "type": "string",
  2557. "description": "name of the repo",
  2558. "name": "repo",
  2559. "in": "path",
  2560. "required": true
  2561. },
  2562. {
  2563. "type": "integer",
  2564. "format": "int64",
  2565. "description": "id of the hook to delete",
  2566. "name": "id",
  2567. "in": "path",
  2568. "required": true
  2569. }
  2570. ],
  2571. "responses": {
  2572. "204": {
  2573. "$ref": "#/responses/empty"
  2574. },
  2575. "404": {
  2576. "$ref": "#/responses/notFound"
  2577. }
  2578. }
  2579. },
  2580. "patch": {
  2581. "produces": [
  2582. "application/json"
  2583. ],
  2584. "tags": [
  2585. "repository"
  2586. ],
  2587. "summary": "Edit a hook in a repository",
  2588. "operationId": "repoEditHook",
  2589. "parameters": [
  2590. {
  2591. "type": "string",
  2592. "description": "owner of the repo",
  2593. "name": "owner",
  2594. "in": "path",
  2595. "required": true
  2596. },
  2597. {
  2598. "type": "string",
  2599. "description": "name of the repo",
  2600. "name": "repo",
  2601. "in": "path",
  2602. "required": true
  2603. },
  2604. {
  2605. "type": "integer",
  2606. "format": "int64",
  2607. "description": "index of the hook",
  2608. "name": "id",
  2609. "in": "path",
  2610. "required": true
  2611. },
  2612. {
  2613. "name": "body",
  2614. "in": "body",
  2615. "schema": {
  2616. "$ref": "#/definitions/EditHookOption"
  2617. }
  2618. }
  2619. ],
  2620. "responses": {
  2621. "200": {
  2622. "$ref": "#/responses/Hook"
  2623. }
  2624. }
  2625. }
  2626. },
  2627. "/repos/{owner}/{repo}/hooks/{id}/tests": {
  2628. "post": {
  2629. "produces": [
  2630. "application/json"
  2631. ],
  2632. "tags": [
  2633. "repository"
  2634. ],
  2635. "summary": "Test a push webhook",
  2636. "operationId": "repoTestHook",
  2637. "parameters": [
  2638. {
  2639. "type": "string",
  2640. "description": "owner of the repo",
  2641. "name": "owner",
  2642. "in": "path",
  2643. "required": true
  2644. },
  2645. {
  2646. "type": "string",
  2647. "description": "name of the repo",
  2648. "name": "repo",
  2649. "in": "path",
  2650. "required": true
  2651. },
  2652. {
  2653. "type": "integer",
  2654. "format": "int64",
  2655. "description": "id of the hook to test",
  2656. "name": "id",
  2657. "in": "path",
  2658. "required": true
  2659. }
  2660. ],
  2661. "responses": {
  2662. "204": {
  2663. "$ref": "#/responses/empty"
  2664. }
  2665. }
  2666. }
  2667. },
  2668. "/repos/{owner}/{repo}/issues": {
  2669. "get": {
  2670. "produces": [
  2671. "application/json"
  2672. ],
  2673. "tags": [
  2674. "issue"
  2675. ],
  2676. "summary": "List a repository's issues",
  2677. "operationId": "issueListIssues",
  2678. "parameters": [
  2679. {
  2680. "type": "string",
  2681. "description": "owner of the repo",
  2682. "name": "owner",
  2683. "in": "path",
  2684. "required": true
  2685. },
  2686. {
  2687. "type": "string",
  2688. "description": "name of the repo",
  2689. "name": "repo",
  2690. "in": "path",
  2691. "required": true
  2692. },
  2693. {
  2694. "type": "string",
  2695. "description": "whether issue is open or closed",
  2696. "name": "state",
  2697. "in": "query"
  2698. },
  2699. {
  2700. "type": "string",
  2701. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  2702. "name": "labels",
  2703. "in": "query"
  2704. },
  2705. {
  2706. "type": "integer",
  2707. "description": "page number of requested issues",
  2708. "name": "page",
  2709. "in": "query"
  2710. },
  2711. {
  2712. "type": "string",
  2713. "description": "search string",
  2714. "name": "q",
  2715. "in": "query"
  2716. }
  2717. ],
  2718. "responses": {
  2719. "200": {
  2720. "$ref": "#/responses/IssueList"
  2721. }
  2722. }
  2723. },
  2724. "post": {
  2725. "consumes": [
  2726. "application/json"
  2727. ],
  2728. "produces": [
  2729. "application/json"
  2730. ],
  2731. "tags": [
  2732. "issue"
  2733. ],
  2734. "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  2735. "operationId": "issueCreateIssue",
  2736. "parameters": [
  2737. {
  2738. "type": "string",
  2739. "description": "owner of the repo",
  2740. "name": "owner",
  2741. "in": "path",
  2742. "required": true
  2743. },
  2744. {
  2745. "type": "string",
  2746. "description": "name of the repo",
  2747. "name": "repo",
  2748. "in": "path",
  2749. "required": true
  2750. },
  2751. {
  2752. "name": "body",
  2753. "in": "body",
  2754. "schema": {
  2755. "$ref": "#/definitions/CreateIssueOption"
  2756. }
  2757. }
  2758. ],
  2759. "responses": {
  2760. "201": {
  2761. "$ref": "#/responses/Issue"
  2762. }
  2763. }
  2764. }
  2765. },
  2766. "/repos/{owner}/{repo}/issues/comments": {
  2767. "get": {
  2768. "produces": [
  2769. "application/json"
  2770. ],
  2771. "tags": [
  2772. "issue"
  2773. ],
  2774. "summary": "List all comments in a repository",
  2775. "operationId": "issueGetRepoComments",
  2776. "parameters": [
  2777. {
  2778. "type": "string",
  2779. "description": "owner of the repo",
  2780. "name": "owner",
  2781. "in": "path",
  2782. "required": true
  2783. },
  2784. {
  2785. "type": "string",
  2786. "description": "name of the repo",
  2787. "name": "repo",
  2788. "in": "path",
  2789. "required": true
  2790. },
  2791. {
  2792. "type": "string",
  2793. "description": "if provided, only comments updated since the provided time are returned.",
  2794. "name": "since",
  2795. "in": "query"
  2796. }
  2797. ],
  2798. "responses": {
  2799. "200": {
  2800. "$ref": "#/responses/CommentList"
  2801. }
  2802. }
  2803. }
  2804. },
  2805. "/repos/{owner}/{repo}/issues/comments/{id}": {
  2806. "delete": {
  2807. "tags": [
  2808. "issue"
  2809. ],
  2810. "summary": "Delete a comment",
  2811. "operationId": "issueDeleteComment",
  2812. "parameters": [
  2813. {
  2814. "type": "string",
  2815. "description": "owner of the repo",
  2816. "name": "owner",
  2817. "in": "path",
  2818. "required": true
  2819. },
  2820. {
  2821. "type": "string",
  2822. "description": "name of the repo",
  2823. "name": "repo",
  2824. "in": "path",
  2825. "required": true
  2826. },
  2827. {
  2828. "type": "integer",
  2829. "format": "int64",
  2830. "description": "id of comment to delete",
  2831. "name": "id",
  2832. "in": "path",
  2833. "required": true
  2834. }
  2835. ],
  2836. "responses": {
  2837. "204": {
  2838. "$ref": "#/responses/empty"
  2839. }
  2840. }
  2841. },
  2842. "patch": {
  2843. "consumes": [
  2844. "application/json"
  2845. ],
  2846. "produces": [
  2847. "application/json"
  2848. ],
  2849. "tags": [
  2850. "issue"
  2851. ],
  2852. "summary": "Edit a comment",
  2853. "operationId": "issueEditComment",
  2854. "parameters": [
  2855. {
  2856. "type": "string",
  2857. "description": "owner of the repo",
  2858. "name": "owner",
  2859. "in": "path",
  2860. "required": true
  2861. },
  2862. {
  2863. "type": "string",
  2864. "description": "name of the repo",
  2865. "name": "repo",
  2866. "in": "path",
  2867. "required": true
  2868. },
  2869. {
  2870. "type": "integer",
  2871. "format": "int64",
  2872. "description": "id of the comment to edit",
  2873. "name": "id",
  2874. "in": "path",
  2875. "required": true
  2876. },
  2877. {
  2878. "name": "body",
  2879. "in": "body",
  2880. "schema": {
  2881. "$ref": "#/definitions/EditIssueCommentOption"
  2882. }
  2883. }
  2884. ],
  2885. "responses": {
  2886. "200": {
  2887. "$ref": "#/responses/Comment"
  2888. }
  2889. }
  2890. }
  2891. },
  2892. "/repos/{owner}/{repo}/issues/{id}/times": {
  2893. "get": {
  2894. "produces": [
  2895. "application/json"
  2896. ],
  2897. "tags": [
  2898. "issue"
  2899. ],
  2900. "summary": "List an issue's tracked times",
  2901. "operationId": "issueTrackedTimes",
  2902. "parameters": [
  2903. {
  2904. "type": "string",
  2905. "description": "owner of the repo",
  2906. "name": "owner",
  2907. "in": "path",
  2908. "required": true
  2909. },
  2910. {
  2911. "type": "string",
  2912. "description": "name of the repo",
  2913. "name": "repo",
  2914. "in": "path",
  2915. "required": true
  2916. },
  2917. {
  2918. "type": "integer",
  2919. "format": "int64",
  2920. "description": "index of the issue",
  2921. "name": "id",
  2922. "in": "path",
  2923. "required": true
  2924. }
  2925. ],
  2926. "responses": {
  2927. "200": {
  2928. "$ref": "#/responses/TrackedTimeList"
  2929. }
  2930. }
  2931. },
  2932. "post": {
  2933. "consumes": [
  2934. "application/json"
  2935. ],
  2936. "produces": [
  2937. "application/json"
  2938. ],
  2939. "tags": [
  2940. "issue"
  2941. ],
  2942. "summary": "Add a tracked time to a issue",
  2943. "operationId": "issueAddTime",
  2944. "parameters": [
  2945. {
  2946. "type": "string",
  2947. "description": "owner of the repo",
  2948. "name": "owner",
  2949. "in": "path",
  2950. "required": true
  2951. },
  2952. {
  2953. "type": "string",
  2954. "description": "name of the repo",
  2955. "name": "repo",
  2956. "in": "path",
  2957. "required": true
  2958. },
  2959. {
  2960. "type": "integer",
  2961. "format": "int64",
  2962. "description": "index of the issue to add tracked time to",
  2963. "name": "id",
  2964. "in": "path",
  2965. "required": true
  2966. },
  2967. {
  2968. "name": "body",
  2969. "in": "body",
  2970. "schema": {
  2971. "$ref": "#/definitions/AddTimeOption"
  2972. }
  2973. }
  2974. ],
  2975. "responses": {
  2976. "200": {
  2977. "$ref": "#/responses/TrackedTime"
  2978. },
  2979. "400": {
  2980. "$ref": "#/responses/error"
  2981. },
  2982. "403": {
  2983. "$ref": "#/responses/error"
  2984. }
  2985. }
  2986. }
  2987. },
  2988. "/repos/{owner}/{repo}/issues/{index}": {
  2989. "get": {
  2990. "produces": [
  2991. "application/json"
  2992. ],
  2993. "tags": [
  2994. "issue"
  2995. ],
  2996. "summary": "Get an issue",
  2997. "operationId": "issueGetIssue",
  2998. "parameters": [
  2999. {
  3000. "type": "string",
  3001. "description": "owner of the repo",
  3002. "name": "owner",
  3003. "in": "path",
  3004. "required": true
  3005. },
  3006. {
  3007. "type": "string",
  3008. "description": "name of the repo",
  3009. "name": "repo",
  3010. "in": "path",
  3011. "required": true
  3012. },
  3013. {
  3014. "type": "integer",
  3015. "format": "int64",
  3016. "description": "index of the issue to get",
  3017. "name": "index",
  3018. "in": "path",
  3019. "required": true
  3020. }
  3021. ],
  3022. "responses": {
  3023. "200": {
  3024. "$ref": "#/responses/Issue"
  3025. }
  3026. }
  3027. },
  3028. "patch": {
  3029. "consumes": [
  3030. "application/json"
  3031. ],
  3032. "produces": [
  3033. "application/json"
  3034. ],
  3035. "tags": [
  3036. "issue"
  3037. ],
  3038. "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  3039. "operationId": "issueEditIssue",
  3040. "parameters": [
  3041. {
  3042. "type": "string",
  3043. "description": "owner of the repo",
  3044. "name": "owner",
  3045. "in": "path",
  3046. "required": true
  3047. },
  3048. {
  3049. "type": "string",
  3050. "description": "name of the repo",
  3051. "name": "repo",
  3052. "in": "path",
  3053. "required": true
  3054. },
  3055. {
  3056. "type": "integer",
  3057. "format": "int64",
  3058. "description": "index of the issue to edit",
  3059. "name": "index",
  3060. "in": "path",
  3061. "required": true
  3062. },
  3063. {
  3064. "name": "body",
  3065. "in": "body",
  3066. "schema": {
  3067. "$ref": "#/definitions/EditIssueOption"
  3068. }
  3069. }
  3070. ],
  3071. "responses": {
  3072. "201": {
  3073. "$ref": "#/responses/Issue"
  3074. }
  3075. }
  3076. }
  3077. },
  3078. "/repos/{owner}/{repo}/issues/{index}/comments": {
  3079. "get": {
  3080. "produces": [
  3081. "application/json"
  3082. ],
  3083. "tags": [
  3084. "issue"
  3085. ],
  3086. "summary": "List all comments on an issue",
  3087. "operationId": "issueGetComments",
  3088. "parameters": [
  3089. {
  3090. "type": "string",
  3091. "description": "owner of the repo",
  3092. "name": "owner",
  3093. "in": "path",
  3094. "required": true
  3095. },
  3096. {
  3097. "type": "string",
  3098. "description": "name of the repo",
  3099. "name": "repo",
  3100. "in": "path",
  3101. "required": true
  3102. },
  3103. {
  3104. "type": "integer",
  3105. "format": "int64",
  3106. "description": "index of the issue",
  3107. "name": "index",
  3108. "in": "path",
  3109. "required": true
  3110. },
  3111. {
  3112. "type": "string",
  3113. "description": "if provided, only comments updated since the specified time are returned.",
  3114. "name": "since",
  3115. "in": "query"
  3116. }
  3117. ],
  3118. "responses": {
  3119. "200": {
  3120. "$ref": "#/responses/CommentList"
  3121. }
  3122. }
  3123. },
  3124. "post": {
  3125. "consumes": [
  3126. "application/json"
  3127. ],
  3128. "produces": [
  3129. "application/json"
  3130. ],
  3131. "tags": [
  3132. "issue"
  3133. ],
  3134. "summary": "Add a comment to an issue",
  3135. "operationId": "issueCreateComment",
  3136. "parameters": [
  3137. {
  3138. "type": "string",
  3139. "description": "owner of the repo",
  3140. "name": "owner",
  3141. "in": "path",
  3142. "required": true
  3143. },
  3144. {
  3145. "type": "string",
  3146. "description": "name of the repo",
  3147. "name": "repo",
  3148. "in": "path",
  3149. "required": true
  3150. },
  3151. {
  3152. "type": "integer",
  3153. "format": "int64",
  3154. "description": "index of the issue",
  3155. "name": "index",
  3156. "in": "path",
  3157. "required": true
  3158. },
  3159. {
  3160. "name": "body",
  3161. "in": "body",
  3162. "schema": {
  3163. "$ref": "#/definitions/CreateIssueCommentOption"
  3164. }
  3165. }
  3166. ],
  3167. "responses": {
  3168. "201": {
  3169. "$ref": "#/responses/Comment"
  3170. }
  3171. }
  3172. }
  3173. },
  3174. "/repos/{owner}/{repo}/issues/{index}/comments/{id}": {
  3175. "delete": {
  3176. "tags": [
  3177. "issue"
  3178. ],
  3179. "summary": "Delete a comment",
  3180. "operationId": "issueDeleteCommentDeprecated",
  3181. "deprecated": true,
  3182. "parameters": [
  3183. {
  3184. "type": "string",
  3185. "description": "owner of the repo",
  3186. "name": "owner",
  3187. "in": "path",
  3188. "required": true
  3189. },
  3190. {
  3191. "type": "string",
  3192. "description": "name of the repo",
  3193. "name": "repo",
  3194. "in": "path",
  3195. "required": true
  3196. },
  3197. {
  3198. "type": "integer",
  3199. "description": "this parameter is ignored",
  3200. "name": "index",
  3201. "in": "path",
  3202. "required": true
  3203. },
  3204. {
  3205. "type": "integer",
  3206. "format": "int64",
  3207. "description": "id of comment to delete",
  3208. "name": "id",
  3209. "in": "path",
  3210. "required": true
  3211. }
  3212. ],
  3213. "responses": {
  3214. "204": {
  3215. "$ref": "#/responses/empty"
  3216. }
  3217. }
  3218. },
  3219. "patch": {
  3220. "consumes": [
  3221. "application/json"
  3222. ],
  3223. "produces": [
  3224. "application/json"
  3225. ],
  3226. "tags": [
  3227. "issue"
  3228. ],
  3229. "summary": "Edit a comment",
  3230. "operationId": "issueEditCommentDeprecated",
  3231. "deprecated": true,
  3232. "parameters": [
  3233. {
  3234. "type": "string",
  3235. "description": "owner of the repo",
  3236. "name": "owner",
  3237. "in": "path",
  3238. "required": true
  3239. },
  3240. {
  3241. "type": "string",
  3242. "description": "name of the repo",
  3243. "name": "repo",
  3244. "in": "path",
  3245. "required": true
  3246. },
  3247. {
  3248. "type": "integer",
  3249. "description": "this parameter is ignored",
  3250. "name": "index",
  3251. "in": "path",
  3252. "required": true
  3253. },
  3254. {
  3255. "type": "integer",
  3256. "format": "int64",
  3257. "description": "id of the comment to edit",
  3258. "name": "id",
  3259. "in": "path",
  3260. "required": true
  3261. },
  3262. {
  3263. "name": "body",
  3264. "in": "body",
  3265. "schema": {
  3266. "$ref": "#/definitions/EditIssueCommentOption"
  3267. }
  3268. }
  3269. ],
  3270. "responses": {
  3271. "200": {
  3272. "$ref": "#/responses/Comment"
  3273. }
  3274. }
  3275. }
  3276. },
  3277. "/repos/{owner}/{repo}/issues/{index}/deadline": {
  3278. "post": {
  3279. "consumes": [
  3280. "application/json"
  3281. ],
  3282. "produces": [
  3283. "application/json"
  3284. ],
  3285. "tags": [
  3286. "issue"
  3287. ],
  3288. "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.",
  3289. "operationId": "issueEditIssueDeadline",
  3290. "parameters": [
  3291. {
  3292. "type": "string",
  3293. "description": "owner of the repo",
  3294. "name": "owner",
  3295. "in": "path",
  3296. "required": true
  3297. },
  3298. {
  3299. "type": "string",
  3300. "description": "name of the repo",
  3301. "name": "repo",
  3302. "in": "path",
  3303. "required": true
  3304. },
  3305. {
  3306. "type": "integer",
  3307. "format": "int64",
  3308. "description": "index of the issue to create or update a deadline on",
  3309. "name": "index",
  3310. "in": "path",
  3311. "required": true
  3312. },
  3313. {
  3314. "name": "body",
  3315. "in": "body",
  3316. "schema": {
  3317. "$ref": "#/definitions/EditDeadlineOption"
  3318. }
  3319. }
  3320. ],
  3321. "responses": {
  3322. "201": {
  3323. "$ref": "#/responses/IssueDeadline"
  3324. },
  3325. "403": {
  3326. "description": "Not repo writer"
  3327. },
  3328. "404": {
  3329. "description": "Issue not found"
  3330. }
  3331. }
  3332. }
  3333. },
  3334. "/repos/{owner}/{repo}/issues/{index}/labels": {
  3335. "get": {
  3336. "produces": [
  3337. "application/json"
  3338. ],
  3339. "tags": [
  3340. "issue"
  3341. ],
  3342. "summary": "Get an issue's labels",
  3343. "operationId": "issueGetLabels",
  3344. "parameters": [
  3345. {
  3346. "type": "string",
  3347. "description": "owner of the repo",
  3348. "name": "owner",
  3349. "in": "path",
  3350. "required": true
  3351. },
  3352. {
  3353. "type": "string",
  3354. "description": "name of the repo",
  3355. "name": "repo",
  3356. "in": "path",
  3357. "required": true
  3358. },
  3359. {
  3360. "type": "integer",
  3361. "format": "int64",
  3362. "description": "index of the issue",
  3363. "name": "index",
  3364. "in": "path",
  3365. "required": true
  3366. }
  3367. ],
  3368. "responses": {
  3369. "200": {
  3370. "$ref": "#/responses/LabelList"
  3371. },
  3372. "404": {
  3373. "$ref": "#/responses/notFound"
  3374. }
  3375. }
  3376. },
  3377. "put": {
  3378. "consumes": [
  3379. "application/json"
  3380. ],
  3381. "produces": [
  3382. "application/json"
  3383. ],
  3384. "tags": [
  3385. "issue"
  3386. ],
  3387. "summary": "Replace an issue's labels",
  3388. "operationId": "issueReplaceLabels",
  3389. "parameters": [
  3390. {
  3391. "type": "string",
  3392. "description": "owner of the repo",
  3393. "name": "owner",
  3394. "in": "path",
  3395. "required": true
  3396. },
  3397. {
  3398. "type": "string",
  3399. "description": "name of the repo",
  3400. "name": "repo",
  3401. "in": "path",
  3402. "required": true
  3403. },
  3404. {
  3405. "type": "integer",
  3406. "format": "int64",
  3407. "description": "index of the issue",
  3408. "name": "index",
  3409. "in": "path",
  3410. "required": true
  3411. },
  3412. {
  3413. "name": "body",
  3414. "in": "body",
  3415. "schema": {
  3416. "$ref": "#/definitions/IssueLabelsOption"
  3417. }
  3418. }
  3419. ],
  3420. "responses": {
  3421. "200": {
  3422. "$ref": "#/responses/LabelList"
  3423. }
  3424. }
  3425. },
  3426. "post": {
  3427. "consumes": [
  3428. "application/json"
  3429. ],
  3430. "produces": [
  3431. "application/json"
  3432. ],
  3433. "tags": [
  3434. "issue"
  3435. ],
  3436. "summary": "Add a label to an issue",
  3437. "operationId": "issueAddLabel",
  3438. "parameters": [
  3439. {
  3440. "type": "string",
  3441. "description": "owner of the repo",
  3442. "name": "owner",
  3443. "in": "path",
  3444. "required": true
  3445. },
  3446. {
  3447. "type": "string",
  3448. "description": "name of the repo",
  3449. "name": "repo",
  3450. "in": "path",
  3451. "required": true
  3452. },
  3453. {
  3454. "type": "integer",
  3455. "format": "int64",
  3456. "description": "index of the issue",
  3457. "name": "index",
  3458. "in": "path",
  3459. "required": true
  3460. },
  3461. {
  3462. "name": "body",
  3463. "in": "body",
  3464. "schema": {
  3465. "$ref": "#/definitions/IssueLabelsOption"
  3466. }
  3467. }
  3468. ],
  3469. "responses": {
  3470. "200": {
  3471. "$ref": "#/responses/LabelList"
  3472. }
  3473. }
  3474. },
  3475. "delete": {
  3476. "produces": [
  3477. "application/json"
  3478. ],
  3479. "tags": [
  3480. "issue"
  3481. ],
  3482. "summary": "Remove all labels from an issue",
  3483. "operationId": "issueClearLabels",
  3484. "parameters": [
  3485. {
  3486. "type": "string",
  3487. "description": "owner of the repo",
  3488. "name": "owner",
  3489. "in": "path",
  3490. "required": true
  3491. },
  3492. {
  3493. "type": "string",
  3494. "description": "name of the repo",
  3495. "name": "repo",
  3496. "in": "path",
  3497. "required": true
  3498. },
  3499. {
  3500. "type": "integer",
  3501. "format": "int64",
  3502. "description": "index of the issue",
  3503. "name": "index",
  3504. "in": "path",
  3505. "required": true
  3506. }
  3507. ],
  3508. "responses": {
  3509. "204": {
  3510. "$ref": "#/responses/empty"
  3511. }
  3512. }
  3513. }
  3514. },
  3515. "/repos/{owner}/{repo}/issues/{index}/labels/{id}": {
  3516. "delete": {
  3517. "produces": [
  3518. "application/json"
  3519. ],
  3520. "tags": [
  3521. "issue"
  3522. ],
  3523. "summary": "Remove a label from an issue",
  3524. "operationId": "issueRemoveLabel",
  3525. "parameters": [
  3526. {
  3527. "type": "string",
  3528. "description": "owner of the repo",
  3529. "name": "owner",
  3530. "in": "path",
  3531. "required": true
  3532. },
  3533. {
  3534. "type": "string",
  3535. "description": "name of the repo",
  3536. "name": "repo",
  3537. "in": "path",
  3538. "required": true
  3539. },
  3540. {
  3541. "type": "integer",
  3542. "format": "int64",
  3543. "description": "index of the issue",
  3544. "name": "index",
  3545. "in": "path",
  3546. "required": true
  3547. },
  3548. {
  3549. "type": "integer",
  3550. "format": "int64",
  3551. "description": "id of the label to remove",
  3552. "name": "id",
  3553. "in": "path",
  3554. "required": true
  3555. }
  3556. ],
  3557. "responses": {
  3558. "204": {
  3559. "$ref": "#/responses/empty"
  3560. }
  3561. }
  3562. }
  3563. },
  3564. "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": {
  3565. "post": {
  3566. "consumes": [
  3567. "application/json"
  3568. ],
  3569. "produces": [
  3570. "application/json"
  3571. ],
  3572. "tags": [
  3573. "issue"
  3574. ],
  3575. "summary": "Start stopwatch on an issue.",
  3576. "operationId": "issueStartStopWatch",
  3577. "parameters": [
  3578. {
  3579. "type": "string",
  3580. "description": "owner of the repo",
  3581. "name": "owner",
  3582. "in": "path",
  3583. "required": true
  3584. },
  3585. {
  3586. "type": "string",
  3587. "description": "name of the repo",
  3588. "name": "repo",
  3589. "in": "path",
  3590. "required": true
  3591. },
  3592. {
  3593. "type": "integer",
  3594. "format": "int64",
  3595. "description": "index of the issue to create the stopwatch on",
  3596. "name": "index",
  3597. "in": "path",
  3598. "required": true
  3599. }
  3600. ],
  3601. "responses": {
  3602. "201": {
  3603. "$ref": "#/responses/empty"
  3604. },
  3605. "403": {
  3606. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  3607. },
  3608. "404": {
  3609. "description": "Issue not found"
  3610. },
  3611. "409": {
  3612. "description": "Cannot start a stopwatch again if it already exists"
  3613. }
  3614. }
  3615. }
  3616. },
  3617. "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": {
  3618. "post": {
  3619. "consumes": [
  3620. "application/json"
  3621. ],
  3622. "produces": [
  3623. "application/json"
  3624. ],
  3625. "tags": [
  3626. "issue"
  3627. ],
  3628. "summary": "Stop an issue's existing stopwatch.",
  3629. "operationId": "issueStopWatch",
  3630. "parameters": [
  3631. {
  3632. "type": "string",
  3633. "description": "owner of the repo",
  3634. "name": "owner",
  3635. "in": "path",
  3636. "required": true
  3637. },
  3638. {
  3639. "type": "string",
  3640. "description": "name of the repo",
  3641. "name": "repo",
  3642. "in": "path",
  3643. "required": true
  3644. },
  3645. {
  3646. "type": "integer",
  3647. "format": "int64",
  3648. "description": "index of the issue to stop the stopwatch on",
  3649. "name": "index",
  3650. "in": "path",
  3651. "required": true
  3652. }
  3653. ],
  3654. "responses": {
  3655. "201": {
  3656. "$ref": "#/responses/empty"
  3657. },
  3658. "403": {
  3659. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  3660. },
  3661. "404": {
  3662. "description": "Issue not found"
  3663. },
  3664. "409": {
  3665. "description": "Cannot stop a non existent stopwatch"
  3666. }
  3667. }
  3668. }
  3669. },
  3670. "/repos/{owner}/{repo}/keys": {
  3671. "get": {
  3672. "produces": [
  3673. "application/json"
  3674. ],
  3675. "tags": [
  3676. "repository"
  3677. ],
  3678. "summary": "List a repository's keys",
  3679. "operationId": "repoListKeys",
  3680. "parameters": [
  3681. {
  3682. "type": "string",
  3683. "description": "owner of the repo",
  3684. "name": "owner",
  3685. "in": "path",
  3686. "required": true
  3687. },
  3688. {
  3689. "type": "string",
  3690. "description": "name of the repo",
  3691. "name": "repo",
  3692. "in": "path",
  3693. "required": true
  3694. },
  3695. {
  3696. "type": "integer",
  3697. "description": "the key_id to search for",
  3698. "name": "key_id",
  3699. "in": "query"
  3700. },
  3701. {
  3702. "type": "string",
  3703. "description": "fingerprint of the key",
  3704. "name": "fingerprint",
  3705. "in": "query"
  3706. }
  3707. ],
  3708. "responses": {
  3709. "200": {
  3710. "$ref": "#/responses/DeployKeyList"
  3711. }
  3712. }
  3713. },
  3714. "post": {
  3715. "consumes": [
  3716. "application/json"
  3717. ],
  3718. "produces": [
  3719. "application/json"
  3720. ],
  3721. "tags": [
  3722. "repository"
  3723. ],
  3724. "summary": "Add a key to a repository",
  3725. "operationId": "repoCreateKey",
  3726. "parameters": [
  3727. {
  3728. "type": "string",
  3729. "description": "owner of the repo",
  3730. "name": "owner",
  3731. "in": "path",
  3732. "required": true
  3733. },
  3734. {
  3735. "type": "string",
  3736. "description": "name of the repo",
  3737. "name": "repo",
  3738. "in": "path",
  3739. "required": true
  3740. },
  3741. {
  3742. "name": "body",
  3743. "in": "body",
  3744. "schema": {
  3745. "$ref": "#/definitions/CreateKeyOption"
  3746. }
  3747. }
  3748. ],
  3749. "responses": {
  3750. "201": {
  3751. "$ref": "#/responses/DeployKey"
  3752. }
  3753. }
  3754. }
  3755. },
  3756. "/repos/{owner}/{repo}/keys/{id}": {
  3757. "get": {
  3758. "produces": [
  3759. "application/json"
  3760. ],
  3761. "tags": [
  3762. "repository"
  3763. ],
  3764. "summary": "Get a repository's key by id",
  3765. "operationId": "repoGetKey",
  3766. "parameters": [
  3767. {
  3768. "type": "string",
  3769. "description": "owner of the repo",
  3770. "name": "owner",
  3771. "in": "path",
  3772. "required": true
  3773. },
  3774. {
  3775. "type": "string",
  3776. "description": "name of the repo",
  3777. "name": "repo",
  3778. "in": "path",
  3779. "required": true
  3780. },
  3781. {
  3782. "type": "integer",
  3783. "format": "int64",
  3784. "description": "id of the key to get",
  3785. "name": "id",
  3786. "in": "path",
  3787. "required": true
  3788. }
  3789. ],
  3790. "responses": {
  3791. "200": {
  3792. "$ref": "#/responses/DeployKey"
  3793. }
  3794. }
  3795. },
  3796. "delete": {
  3797. "tags": [
  3798. "repository"
  3799. ],
  3800. "summary": "Delete a key from a repository",
  3801. "operationId": "repoDeleteKey",
  3802. "parameters": [
  3803. {
  3804. "type": "string",
  3805. "description": "owner of the repo",
  3806. "name": "owner",
  3807. "in": "path",
  3808. "required": true
  3809. },
  3810. {
  3811. "type": "string",
  3812. "description": "name of the repo",
  3813. "name": "repo",
  3814. "in": "path",
  3815. "required": true
  3816. },
  3817. {
  3818. "type": "integer",
  3819. "format": "int64",
  3820. "description": "id of the key to delete",
  3821. "name": "id",
  3822. "in": "path",
  3823. "required": true
  3824. }
  3825. ],
  3826. "responses": {
  3827. "204": {
  3828. "$ref": "#/responses/empty"
  3829. }
  3830. }
  3831. }
  3832. },
  3833. "/repos/{owner}/{repo}/labels": {
  3834. "get": {
  3835. "produces": [
  3836. "application/json"
  3837. ],
  3838. "tags": [
  3839. "issue"
  3840. ],
  3841. "summary": "Get all of a repository's labels",
  3842. "operationId": "issueListLabels",
  3843. "parameters": [
  3844. {
  3845. "type": "string",
  3846. "description": "owner of the repo",
  3847. "name": "owner",
  3848. "in": "path",
  3849. "required": true
  3850. },
  3851. {
  3852. "type": "string",
  3853. "description": "name of the repo",
  3854. "name": "repo",
  3855. "in": "path",
  3856. "required": true
  3857. }
  3858. ],
  3859. "responses": {
  3860. "200": {
  3861. "$ref": "#/responses/LabelList"
  3862. }
  3863. }
  3864. },
  3865. "post": {
  3866. "consumes": [
  3867. "application/json"
  3868. ],
  3869. "produces": [
  3870. "application/json"
  3871. ],
  3872. "tags": [
  3873. "issue"
  3874. ],
  3875. "summary": "Create a label",
  3876. "operationId": "issueCreateLabel",
  3877. "parameters": [
  3878. {
  3879. "type": "string",
  3880. "description": "owner of the repo",
  3881. "name": "owner",
  3882. "in": "path",
  3883. "required": true
  3884. },
  3885. {
  3886. "type": "string",
  3887. "description": "name of the repo",
  3888. "name": "repo",
  3889. "in": "path",
  3890. "required": true
  3891. },
  3892. {
  3893. "name": "body",
  3894. "in": "body",
  3895. "schema": {
  3896. "$ref": "#/definitions/CreateLabelOption"
  3897. }
  3898. }
  3899. ],
  3900. "responses": {
  3901. "201": {
  3902. "$ref": "#/responses/Label"
  3903. }
  3904. }
  3905. }
  3906. },
  3907. "/repos/{owner}/{repo}/labels/{id}": {
  3908. "get": {
  3909. "produces": [
  3910. "application/json"
  3911. ],
  3912. "tags": [
  3913. "issue"
  3914. ],
  3915. "summary": "Get a single label",
  3916. "operationId": "issueGetLabel",
  3917. "parameters": [
  3918. {
  3919. "type": "string",
  3920. "description": "owner of the repo",
  3921. "name": "owner",
  3922. "in": "path",
  3923. "required": true
  3924. },
  3925. {
  3926. "type": "string",
  3927. "description": "name of the repo",
  3928. "name": "repo",
  3929. "in": "path",
  3930. "required": true
  3931. },
  3932. {
  3933. "type": "integer",
  3934. "format": "int64",
  3935. "description": "id of the label to get",
  3936. "name": "id",
  3937. "in": "path",
  3938. "required": true
  3939. }
  3940. ],
  3941. "responses": {
  3942. "200": {
  3943. "$ref": "#/responses/Label"
  3944. }
  3945. }
  3946. },
  3947. "delete": {
  3948. "tags": [
  3949. "issue"
  3950. ],
  3951. "summary": "Delete a label",
  3952. "operationId": "issueDeleteLabel",
  3953. "parameters": [
  3954. {
  3955. "type": "string",
  3956. "description": "owner of the repo",
  3957. "name": "owner",
  3958. "in": "path",
  3959. "required": true
  3960. },
  3961. {
  3962. "type": "string",
  3963. "description": "name of the repo",
  3964. "name": "repo",
  3965. "in": "path",
  3966. "required": true
  3967. },
  3968. {
  3969. "type": "integer",
  3970. "format": "int64",
  3971. "description": "id of the label to delete",
  3972. "name": "id",
  3973. "in": "path",
  3974. "required": true
  3975. }
  3976. ],
  3977. "responses": {
  3978. "204": {
  3979. "$ref": "#/responses/empty"
  3980. }
  3981. }
  3982. },
  3983. "patch": {
  3984. "consumes": [
  3985. "application/json"
  3986. ],
  3987. "produces": [
  3988. "application/json"
  3989. ],
  3990. "tags": [
  3991. "issue"
  3992. ],
  3993. "summary": "Update a label",
  3994. "operationId": "issueEditLabel",
  3995. "parameters": [
  3996. {
  3997. "type": "string",
  3998. "description": "owner of the repo",
  3999. "name": "owner",
  4000. "in": "path",
  4001. "required": true
  4002. },
  4003. {
  4004. "type": "string",
  4005. "description": "name of the repo",
  4006. "name": "repo",
  4007. "in": "path",
  4008. "required": true
  4009. },
  4010. {
  4011. "type": "integer",
  4012. "format": "int64",
  4013. "description": "id of the label to edit",
  4014. "name": "id",
  4015. "in": "path",
  4016. "required": true
  4017. },
  4018. {
  4019. "name": "body",
  4020. "in": "body",
  4021. "schema": {
  4022. "$ref": "#/definitions/EditLabelOption"
  4023. }
  4024. }
  4025. ],
  4026. "responses": {
  4027. "200": {
  4028. "$ref": "#/responses/Label"
  4029. }
  4030. }
  4031. }
  4032. },
  4033. "/repos/{owner}/{repo}/milestones": {
  4034. "get": {
  4035. "produces": [
  4036. "application/json"
  4037. ],
  4038. "tags": [
  4039. "issue"
  4040. ],
  4041. "summary": "Get all of a repository's opened milestones",
  4042. "operationId": "issueGetMilestonesList",
  4043. "parameters": [
  4044. {
  4045. "type": "string",
  4046. "description": "owner of the repo",
  4047. "name": "owner",
  4048. "in": "path",
  4049. "required": true
  4050. },
  4051. {
  4052. "type": "string",
  4053. "description": "name of the repo",
  4054. "name": "repo",
  4055. "in": "path",
  4056. "required": true
  4057. },
  4058. {
  4059. "type": "string",
  4060. "description": "Milestone state, Recognised values are open, closed and all. Defaults to \"open\"",
  4061. "name": "state",
  4062. "in": "query"
  4063. }
  4064. ],
  4065. "responses": {
  4066. "200": {
  4067. "$ref": "#/responses/MilestoneList"
  4068. }
  4069. }
  4070. },
  4071. "post": {
  4072. "consumes": [
  4073. "application/json"
  4074. ],
  4075. "produces": [
  4076. "application/json"
  4077. ],
  4078. "tags": [
  4079. "issue"
  4080. ],
  4081. "summary": "Create a milestone",
  4082. "operationId": "issueCreateMilestone",
  4083. "parameters": [
  4084. {
  4085. "type": "string",
  4086. "description": "owner of the repo",
  4087. "name": "owner",
  4088. "in": "path",
  4089. "required": true
  4090. },
  4091. {
  4092. "type": "string",
  4093. "description": "name of the repo",
  4094. "name": "repo",
  4095. "in": "path",
  4096. "required": true
  4097. },
  4098. {
  4099. "name": "body",
  4100. "in": "body",
  4101. "schema": {
  4102. "$ref": "#/definitions/CreateMilestoneOption"
  4103. }
  4104. }
  4105. ],
  4106. "responses": {
  4107. "201": {
  4108. "$ref": "#/responses/Milestone"
  4109. }
  4110. }
  4111. }
  4112. },
  4113. "/repos/{owner}/{repo}/milestones/{id}": {
  4114. "get": {
  4115. "produces": [
  4116. "application/json"
  4117. ],
  4118. "tags": [
  4119. "issue"
  4120. ],
  4121. "summary": "Get a milestone",
  4122. "operationId": "issueGetMilestone",
  4123. "parameters": [
  4124. {
  4125. "type": "string",
  4126. "description": "owner of the repo",
  4127. "name": "owner",
  4128. "in": "path",
  4129. "required": true
  4130. },
  4131. {
  4132. "type": "string",
  4133. "description": "name of the repo",
  4134. "name": "repo",
  4135. "in": "path",
  4136. "required": true
  4137. },
  4138. {
  4139. "type": "integer",
  4140. "format": "int64",
  4141. "description": "id of the milestone",
  4142. "name": "id",
  4143. "in": "path",
  4144. "required": true
  4145. }
  4146. ],
  4147. "responses": {
  4148. "200": {
  4149. "$ref": "#/responses/Milestone"
  4150. }
  4151. }
  4152. },
  4153. "delete": {
  4154. "tags": [
  4155. "issue"
  4156. ],
  4157. "summary": "Delete a milestone",
  4158. "operationId": "issueDeleteMilestone",
  4159. "parameters": [
  4160. {
  4161. "type": "string",
  4162. "description": "owner of the repo",
  4163. "name": "owner",
  4164. "in": "path",
  4165. "required": true
  4166. },
  4167. {
  4168. "type": "string",
  4169. "description": "name of the repo",
  4170. "name": "repo",
  4171. "in": "path",
  4172. "required": true
  4173. },
  4174. {
  4175. "type": "integer",
  4176. "format": "int64",
  4177. "description": "id of the milestone to delete",
  4178. "name": "id",
  4179. "in": "path",
  4180. "required": true
  4181. }
  4182. ],
  4183. "responses": {
  4184. "204": {
  4185. "$ref": "#/responses/empty"
  4186. }
  4187. }
  4188. },
  4189. "patch": {
  4190. "consumes": [
  4191. "application/json"
  4192. ],
  4193. "produces": [
  4194. "application/json"
  4195. ],
  4196. "tags": [
  4197. "issue"
  4198. ],
  4199. "summary": "Update a milestone",
  4200. "operationId": "issueEditMilestone",
  4201. "parameters": [
  4202. {
  4203. "type": "string",
  4204. "description": "owner of the repo",
  4205. "name": "owner",
  4206. "in": "path",
  4207. "required": true
  4208. },
  4209. {
  4210. "type": "string",
  4211. "description": "name of the repo",
  4212. "name": "repo",
  4213. "in": "path",
  4214. "required": true
  4215. },
  4216. {
  4217. "type": "integer",
  4218. "format": "int64",
  4219. "description": "id of the milestone",
  4220. "name": "id",
  4221. "in": "path",
  4222. "required": true
  4223. },
  4224. {
  4225. "name": "body",
  4226. "in": "body",
  4227. "schema": {
  4228. "$ref": "#/definitions/EditMilestoneOption"
  4229. }
  4230. }
  4231. ],
  4232. "responses": {
  4233. "200": {
  4234. "$ref": "#/responses/Milestone"
  4235. }
  4236. }
  4237. }
  4238. },
  4239. "/repos/{owner}/{repo}/mirror-sync": {
  4240. "post": {
  4241. "produces": [
  4242. "application/json"
  4243. ],
  4244. "tags": [
  4245. "repository"
  4246. ],
  4247. "summary": "Sync a mirrored repository",
  4248. "operationId": "repoMirrorSync",
  4249. "parameters": [
  4250. {
  4251. "type": "string",
  4252. "description": "owner of the repo to sync",
  4253. "name": "owner",
  4254. "in": "path",
  4255. "required": true
  4256. },
  4257. {
  4258. "type": "string",
  4259. "description": "name of the repo to sync",
  4260. "name": "repo",
  4261. "in": "path",
  4262. "required": true
  4263. }
  4264. ],
  4265. "responses": {
  4266. "200": {
  4267. "$ref": "#/responses/empty"
  4268. }
  4269. }
  4270. }
  4271. },
  4272. "/repos/{owner}/{repo}/pulls": {
  4273. "get": {
  4274. "produces": [
  4275. "application/json"
  4276. ],
  4277. "tags": [
  4278. "repository"
  4279. ],
  4280. "summary": "List a repo's pull requests",
  4281. "operationId": "repoListPullRequests",
  4282. "parameters": [
  4283. {
  4284. "type": "string",
  4285. "description": "owner of the repo",
  4286. "name": "owner",
  4287. "in": "path",
  4288. "required": true
  4289. },
  4290. {
  4291. "type": "string",
  4292. "description": "name of the repo",
  4293. "name": "repo",
  4294. "in": "path",
  4295. "required": true
  4296. },
  4297. {
  4298. "type": "integer",
  4299. "description": "Page number",
  4300. "name": "page",
  4301. "in": "query"
  4302. },
  4303. {
  4304. "enum": [
  4305. "closed",
  4306. "open",
  4307. "all"
  4308. ],
  4309. "type": "string",
  4310. "description": "State of pull request: open or closed (optional)",
  4311. "name": "state",
  4312. "in": "query"
  4313. },
  4314. {
  4315. "enum": [
  4316. "oldest",
  4317. "recentupdate",
  4318. "leastupdate",
  4319. "mostcomment",
  4320. "leastcomment",
  4321. "priority"
  4322. ],
  4323. "type": "string",
  4324. "description": "Type of sort",
  4325. "name": "sort",
  4326. "in": "query"
  4327. },
  4328. {
  4329. "type": "integer",
  4330. "format": "int64",
  4331. "description": "ID of the milestone",
  4332. "name": "milestone",
  4333. "in": "query"
  4334. },
  4335. {
  4336. "type": "array",
  4337. "items": {
  4338. "type": "integer",
  4339. "format": "int64"
  4340. },
  4341. "collectionFormat": "multi",
  4342. "description": "Label IDs",
  4343. "name": "labels",
  4344. "in": "query"
  4345. }
  4346. ],
  4347. "responses": {
  4348. "200": {
  4349. "$ref": "#/responses/PullRequestList"
  4350. }
  4351. }
  4352. },
  4353. "post": {
  4354. "consumes": [
  4355. "application/json"
  4356. ],
  4357. "produces": [
  4358. "application/json"
  4359. ],
  4360. "tags": [
  4361. "repository"
  4362. ],
  4363. "summary": "Create a pull request",
  4364. "operationId": "repoCreatePullRequest",
  4365. "parameters": [
  4366. {
  4367. "type": "string",
  4368. "description": "owner of the repo",
  4369. "name": "owner",
  4370. "in": "path",
  4371. "required": true
  4372. },
  4373. {
  4374. "type": "string",
  4375. "description": "name of the repo",
  4376. "name": "repo",
  4377. "in": "path",
  4378. "required": true
  4379. },
  4380. {
  4381. "name": "body",
  4382. "in": "body",
  4383. "schema": {
  4384. "$ref": "#/definitions/CreatePullRequestOption"
  4385. }
  4386. }
  4387. ],
  4388. "responses": {
  4389. "201": {
  4390. "$ref": "#/responses/PullRequest"
  4391. }
  4392. }
  4393. }
  4394. },
  4395. "/repos/{owner}/{repo}/pulls/{index}": {
  4396. "get": {
  4397. "produces": [
  4398. "application/json"
  4399. ],
  4400. "tags": [
  4401. "repository"
  4402. ],
  4403. "summary": "Get a pull request",
  4404. "operationId": "repoGetPullRequest",
  4405. "parameters": [
  4406. {
  4407. "type": "string",
  4408. "description": "owner of the repo",
  4409. "name": "owner",
  4410. "in": "path",
  4411. "required": true
  4412. },
  4413. {
  4414. "type": "string",
  4415. "description": "name of the repo",
  4416. "name": "repo",
  4417. "in": "path",
  4418. "required": true
  4419. },
  4420. {
  4421. "type": "integer",
  4422. "format": "int64",
  4423. "description": "index of the pull request to get",
  4424. "name": "index",
  4425. "in": "path",
  4426. "required": true
  4427. }
  4428. ],
  4429. "responses": {
  4430. "200": {
  4431. "$ref": "#/responses/PullRequest"
  4432. }
  4433. }
  4434. },
  4435. "patch": {
  4436. "consumes": [
  4437. "application/json"
  4438. ],
  4439. "produces": [
  4440. "application/json"
  4441. ],
  4442. "tags": [
  4443. "repository"
  4444. ],
  4445. "summary": "Update a pull request",
  4446. "operationId": "repoEditPullRequest",
  4447. "parameters": [
  4448. {
  4449. "type": "string",
  4450. "description": "owner of the repo",
  4451. "name": "owner",
  4452. "in": "path",
  4453. "required": true
  4454. },
  4455. {
  4456. "type": "string",
  4457. "description": "name of the repo",
  4458. "name": "repo",
  4459. "in": "path",
  4460. "required": true
  4461. },
  4462. {
  4463. "type": "integer",
  4464. "format": "int64",
  4465. "description": "index of the pull request to edit",
  4466. "name": "index",
  4467. "in": "path",
  4468. "required": true
  4469. },
  4470. {
  4471. "name": "body",
  4472. "in": "body",
  4473. "schema": {
  4474. "$ref": "#/definitions/EditPullRequestOption"
  4475. }
  4476. }
  4477. ],
  4478. "responses": {
  4479. "201": {
  4480. "$ref": "#/responses/PullRequest"
  4481. }
  4482. }
  4483. }
  4484. },
  4485. "/repos/{owner}/{repo}/pulls/{index}/merge": {
  4486. "get": {
  4487. "produces": [
  4488. "application/json"
  4489. ],
  4490. "tags": [
  4491. "repository"
  4492. ],
  4493. "summary": "Check if a pull request has been merged",
  4494. "operationId": "repoPullRequestIsMerged",
  4495. "parameters": [
  4496. {
  4497. "type": "string",
  4498. "description": "owner of the repo",
  4499. "name": "owner",
  4500. "in": "path",
  4501. "required": true
  4502. },
  4503. {
  4504. "type": "string",
  4505. "description": "name of the repo",
  4506. "name": "repo",
  4507. "in": "path",
  4508. "required": true
  4509. },
  4510. {
  4511. "type": "integer",
  4512. "format": "int64",
  4513. "description": "index of the pull request",
  4514. "name": "index",
  4515. "in": "path",
  4516. "required": true
  4517. }
  4518. ],
  4519. "responses": {
  4520. "204": {
  4521. "description": "pull request has been merged"
  4522. },
  4523. "404": {
  4524. "description": "pull request has not been merged"
  4525. }
  4526. }
  4527. },
  4528. "post": {
  4529. "produces": [
  4530. "application/json"
  4531. ],
  4532. "tags": [
  4533. "repository"
  4534. ],
  4535. "summary": "Merge a pull request",
  4536. "operationId": "repoMergePullRequest",
  4537. "parameters": [
  4538. {
  4539. "type": "string",
  4540. "description": "owner of the repo",
  4541. "name": "owner",
  4542. "in": "path",
  4543. "required": true
  4544. },
  4545. {
  4546. "type": "string",
  4547. "description": "name of the repo",
  4548. "name": "repo",
  4549. "in": "path",
  4550. "required": true
  4551. },
  4552. {
  4553. "type": "integer",
  4554. "format": "int64",
  4555. "description": "index of the pull request to merge",
  4556. "name": "index",
  4557. "in": "path",
  4558. "required": true
  4559. },
  4560. {
  4561. "name": "body",
  4562. "in": "body",
  4563. "schema": {
  4564. "$ref": "#/definitions/MergePullRequestOption"
  4565. }
  4566. }
  4567. ],
  4568. "responses": {
  4569. "200": {
  4570. "$ref": "#/responses/empty"
  4571. },
  4572. "405": {
  4573. "$ref": "#/responses/empty"
  4574. }
  4575. }
  4576. }
  4577. },
  4578. "/repos/{owner}/{repo}/raw/{filepath}": {
  4579. "get": {
  4580. "produces": [
  4581. "application/json"
  4582. ],
  4583. "tags": [
  4584. "repository"
  4585. ],
  4586. "summary": "Get a file from a repository",
  4587. "operationId": "repoGetRawFile",
  4588. "parameters": [
  4589. {
  4590. "type": "string",
  4591. "description": "owner of the repo",
  4592. "name": "owner",
  4593. "in": "path",
  4594. "required": true
  4595. },
  4596. {
  4597. "type": "string",
  4598. "description": "name of the repo",
  4599. "name": "repo",
  4600. "in": "path",
  4601. "required": true
  4602. },
  4603. {
  4604. "type": "string",
  4605. "description": "filepath of the file to get",
  4606. "name": "filepath",
  4607. "in": "path",
  4608. "required": true
  4609. }
  4610. ],
  4611. "responses": {
  4612. "200": {
  4613. "description": "success"
  4614. }
  4615. }
  4616. }
  4617. },
  4618. "/repos/{owner}/{repo}/releases": {
  4619. "get": {
  4620. "produces": [
  4621. "application/json"
  4622. ],
  4623. "tags": [
  4624. "repository"
  4625. ],
  4626. "summary": "List a repo's releases",
  4627. "operationId": "repoListReleases",
  4628. "parameters": [
  4629. {
  4630. "type": "string",
  4631. "description": "owner of the repo",
  4632. "name": "owner",
  4633. "in": "path",
  4634. "required": true
  4635. },
  4636. {
  4637. "type": "string",
  4638. "description": "name of the repo",
  4639. "name": "repo",
  4640. "in": "path",
  4641. "required": true
  4642. },
  4643. {
  4644. "type": "integer",
  4645. "description": "page wants to load",
  4646. "name": "page",
  4647. "in": "query"
  4648. },
  4649. {
  4650. "type": "integer",
  4651. "description": "items count every page wants to load",
  4652. "name": "per_page",
  4653. "in": "query"
  4654. }
  4655. ],
  4656. "responses": {
  4657. "200": {
  4658. "$ref": "#/responses/ReleaseList"
  4659. }
  4660. }
  4661. },
  4662. "post": {
  4663. "consumes": [
  4664. "application/json"
  4665. ],
  4666. "produces": [
  4667. "application/json"
  4668. ],
  4669. "tags": [
  4670. "repository"
  4671. ],
  4672. "summary": "Create a release",
  4673. "operationId": "repoCreateRelease",
  4674. "parameters": [
  4675. {
  4676. "type": "string",
  4677. "description": "owner of the repo",
  4678. "name": "owner",
  4679. "in": "path",
  4680. "required": true
  4681. },
  4682. {
  4683. "type": "string",
  4684. "description": "name of the repo",
  4685. "name": "repo",
  4686. "in": "path",
  4687. "required": true
  4688. },
  4689. {
  4690. "name": "body",
  4691. "in": "body",
  4692. "schema": {
  4693. "$ref": "#/definitions/CreateReleaseOption"
  4694. }
  4695. }
  4696. ],
  4697. "responses": {
  4698. "201": {
  4699. "$ref": "#/responses/Release"
  4700. }
  4701. }
  4702. }
  4703. },
  4704. "/repos/{owner}/{repo}/releases/{id}": {
  4705. "get": {
  4706. "produces": [
  4707. "application/json"
  4708. ],
  4709. "tags": [
  4710. "repository"
  4711. ],
  4712. "summary": "Get a release",
  4713. "operationId": "repoGetRelease",
  4714. "parameters": [
  4715. {
  4716. "type": "string",
  4717. "description": "owner of the repo",
  4718. "name": "owner",
  4719. "in": "path",
  4720. "required": true
  4721. },
  4722. {
  4723. "type": "string",
  4724. "description": "name of the repo",
  4725. "name": "repo",
  4726. "in": "path",
  4727. "required": true
  4728. },
  4729. {
  4730. "type": "integer",
  4731. "format": "int64",
  4732. "description": "id of the release to get",
  4733. "name": "id",
  4734. "in": "path",
  4735. "required": true
  4736. }
  4737. ],
  4738. "responses": {
  4739. "200": {
  4740. "$ref": "#/responses/Release"
  4741. }
  4742. }
  4743. },
  4744. "delete": {
  4745. "tags": [
  4746. "repository"
  4747. ],
  4748. "summary": "Delete a release",
  4749. "operationId": "repoDeleteRelease",
  4750. "parameters": [
  4751. {
  4752. "type": "string",
  4753. "description": "owner of the repo",
  4754. "name": "owner",
  4755. "in": "path",
  4756. "required": true
  4757. },
  4758. {
  4759. "type": "string",
  4760. "description": "name of the repo",
  4761. "name": "repo",
  4762. "in": "path",
  4763. "required": true
  4764. },
  4765. {
  4766. "type": "integer",
  4767. "format": "int64",
  4768. "description": "id of the release to delete",
  4769. "name": "id",
  4770. "in": "path",
  4771. "required": true
  4772. }
  4773. ],
  4774. "responses": {
  4775. "204": {
  4776. "$ref": "#/responses/empty"
  4777. }
  4778. }
  4779. },
  4780. "patch": {
  4781. "consumes": [
  4782. "application/json"
  4783. ],
  4784. "produces": [
  4785. "application/json"
  4786. ],
  4787. "tags": [
  4788. "repository"
  4789. ],
  4790. "summary": "Update a release",
  4791. "operationId": "repoEditRelease",
  4792. "parameters": [
  4793. {
  4794. "type": "string",
  4795. "description": "owner of the repo",
  4796. "name": "owner",
  4797. "in": "path",
  4798. "required": true
  4799. },
  4800. {
  4801. "type": "string",
  4802. "description": "name of the repo",
  4803. "name": "repo",
  4804. "in": "path",
  4805. "required": true
  4806. },
  4807. {
  4808. "type": "integer",
  4809. "format": "int64",
  4810. "description": "id of the release to edit",
  4811. "name": "id",
  4812. "in": "path",
  4813. "required": true
  4814. },
  4815. {
  4816. "name": "body",
  4817. "in": "body",
  4818. "schema": {
  4819. "$ref": "#/definitions/EditReleaseOption"
  4820. }
  4821. }
  4822. ],
  4823. "responses": {
  4824. "200": {
  4825. "$ref": "#/responses/Release"
  4826. }
  4827. }
  4828. }
  4829. },
  4830. "/repos/{owner}/{repo}/releases/{id}/assets": {
  4831. "get": {
  4832. "produces": [
  4833. "application/json"
  4834. ],
  4835. "tags": [
  4836. "repository"
  4837. ],
  4838. "summary": "List release's attachments",
  4839. "operationId": "repoListReleaseAttachments",
  4840. "parameters": [
  4841. {
  4842. "type": "string",
  4843. "description": "owner of the repo",
  4844. "name": "owner",
  4845. "in": "path",
  4846. "required": true
  4847. },
  4848. {
  4849. "type": "string",
  4850. "description": "name of the repo",
  4851. "name": "repo",
  4852. "in": "path",
  4853. "required": true
  4854. },
  4855. {
  4856. "type": "integer",
  4857. "format": "int64",
  4858. "description": "id of the release",
  4859. "name": "id",
  4860. "in": "path",
  4861. "required": true
  4862. }
  4863. ],
  4864. "responses": {
  4865. "200": {
  4866. "$ref": "#/responses/AttachmentList"
  4867. }
  4868. }
  4869. },
  4870. "post": {
  4871. "consumes": [
  4872. "multipart/form-data"
  4873. ],
  4874. "produces": [
  4875. "application/json"
  4876. ],
  4877. "tags": [
  4878. "repository"
  4879. ],
  4880. "summary": "Create a release attachment",
  4881. "operationId": "repoCreateReleaseAttachment",
  4882. "parameters": [
  4883. {
  4884. "type": "string",
  4885. "description": "owner of the repo",
  4886. "name": "owner",
  4887. "in": "path",
  4888. "required": true
  4889. },
  4890. {
  4891. "type": "string",
  4892. "description": "name of the repo",
  4893. "name": "repo",
  4894. "in": "path",
  4895. "required": true
  4896. },
  4897. {
  4898. "type": "integer",
  4899. "format": "int64",
  4900. "description": "id of the release",
  4901. "name": "id",
  4902. "in": "path",
  4903. "required": true
  4904. },
  4905. {
  4906. "type": "string",
  4907. "description": "name of the attachment",
  4908. "name": "name",
  4909. "in": "query"
  4910. },
  4911. {
  4912. "type": "file",
  4913. "description": "attachment to upload",
  4914. "name": "attachment",
  4915. "in": "formData",
  4916. "required": true
  4917. }
  4918. ],
  4919. "responses": {
  4920. "201": {
  4921. "$ref": "#/responses/Attachment"
  4922. }
  4923. }
  4924. }
  4925. },
  4926. "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": {
  4927. "get": {
  4928. "produces": [
  4929. "application/json"
  4930. ],
  4931. "tags": [
  4932. "repository"
  4933. ],
  4934. "summary": "Get a release attachment",
  4935. "operationId": "repoGetReleaseAttachment",
  4936. "parameters": [
  4937. {
  4938. "type": "string",
  4939. "description": "owner of the repo",
  4940. "name": "owner",
  4941. "in": "path",
  4942. "required": true
  4943. },
  4944. {
  4945. "type": "string",
  4946. "description": "name of the repo",
  4947. "name": "repo",
  4948. "in": "path",
  4949. "required": true
  4950. },
  4951. {
  4952. "type": "integer",
  4953. "format": "int64",
  4954. "description": "id of the release",
  4955. "name": "id",
  4956. "in": "path",
  4957. "required": true
  4958. },
  4959. {
  4960. "type": "integer",
  4961. "format": "int64",
  4962. "description": "id of the attachment to get",
  4963. "name": "attachment_id",
  4964. "in": "path",
  4965. "required": true
  4966. }
  4967. ],
  4968. "responses": {
  4969. "200": {
  4970. "$ref": "#/responses/Attachment"
  4971. }
  4972. }
  4973. },
  4974. "delete": {
  4975. "produces": [
  4976. "application/json"
  4977. ],
  4978. "tags": [
  4979. "repository"
  4980. ],
  4981. "summary": "Delete a release attachment",
  4982. "operationId": "repoDeleteReleaseAttachment",
  4983. "parameters": [
  4984. {
  4985. "type": "string",
  4986. "description": "owner of the repo",
  4987. "name": "owner",
  4988. "in": "path",
  4989. "required": true
  4990. },
  4991. {
  4992. "type": "string",
  4993. "description": "name of the repo",
  4994. "name": "repo",
  4995. "in": "path",
  4996. "required": true
  4997. },
  4998. {
  4999. "type": "integer",
  5000. "format": "int64",
  5001. "description": "id of the release",
  5002. "name": "id",
  5003. "in": "path",
  5004. "required": true
  5005. },
  5006. {
  5007. "type": "integer",
  5008. "format": "int64",
  5009. "description": "id of the attachment to delete",
  5010. "name": "attachment_id",
  5011. "in": "path",
  5012. "required": true
  5013. }
  5014. ],
  5015. "responses": {
  5016. "204": {
  5017. "$ref": "#/responses/empty"
  5018. }
  5019. }
  5020. },
  5021. "patch": {
  5022. "consumes": [
  5023. "application/json"
  5024. ],
  5025. "produces": [
  5026. "application/json"
  5027. ],
  5028. "tags": [
  5029. "repository"
  5030. ],
  5031. "summary": "Edit a release attachment",
  5032. "operationId": "repoEditReleaseAttachment",
  5033. "parameters": [
  5034. {
  5035. "type": "string",
  5036. "description": "owner of the repo",
  5037. "name": "owner",
  5038. "in": "path",
  5039. "required": true
  5040. },
  5041. {
  5042. "type": "string",
  5043. "description": "name of the repo",
  5044. "name": "repo",
  5045. "in": "path",
  5046. "required": true
  5047. },
  5048. {
  5049. "type": "integer",
  5050. "format": "int64",
  5051. "description": "id of the release",
  5052. "name": "id",
  5053. "in": "path",
  5054. "required": true
  5055. },
  5056. {
  5057. "type": "integer",
  5058. "format": "int64",
  5059. "description": "id of the attachment to edit",
  5060. "name": "attachment_id",
  5061. "in": "path",
  5062. "required": true
  5063. },
  5064. {
  5065. "name": "body",
  5066. "in": "body",
  5067. "schema": {
  5068. "$ref": "#/definitions/EditAttachmentOptions"
  5069. }
  5070. }
  5071. ],
  5072. "responses": {
  5073. "201": {
  5074. "$ref": "#/responses/Attachment"
  5075. }
  5076. }
  5077. }
  5078. },
  5079. "/repos/{owner}/{repo}/stargazers": {
  5080. "get": {
  5081. "produces": [
  5082. "application/json"
  5083. ],
  5084. "tags": [
  5085. "repository"
  5086. ],
  5087. "summary": "List a repo's stargazers",
  5088. "operationId": "repoListStargazers",
  5089. "parameters": [
  5090. {
  5091. "type": "string",
  5092. "description": "owner of the repo",
  5093. "name": "owner",
  5094. "in": "path",
  5095. "required": true
  5096. },
  5097. {
  5098. "type": "string",
  5099. "description": "name of the repo",
  5100. "name": "repo",
  5101. "in": "path",
  5102. "required": true
  5103. }
  5104. ],
  5105. "responses": {
  5106. "200": {
  5107. "$ref": "#/responses/UserList"
  5108. }
  5109. }
  5110. }
  5111. },
  5112. "/repos/{owner}/{repo}/statuses/{sha}": {
  5113. "get": {
  5114. "produces": [
  5115. "application/json"
  5116. ],
  5117. "tags": [
  5118. "repository"
  5119. ],
  5120. "summary": "Get a commit's statuses",
  5121. "operationId": "repoListStatuses",
  5122. "parameters": [
  5123. {
  5124. "type": "string",
  5125. "description": "owner of the repo",
  5126. "name": "owner",
  5127. "in": "path",
  5128. "required": true
  5129. },
  5130. {
  5131. "type": "string",
  5132. "description": "name of the repo",
  5133. "name": "repo",
  5134. "in": "path",
  5135. "required": true
  5136. },
  5137. {
  5138. "type": "string",
  5139. "description": "sha of the commit",
  5140. "name": "sha",
  5141. "in": "path",
  5142. "required": true
  5143. },
  5144. {
  5145. "type": "integer",
  5146. "description": "page number of results",
  5147. "name": "page",
  5148. "in": "query"
  5149. },
  5150. {
  5151. "enum": [
  5152. "oldest",
  5153. "recentupdate",
  5154. "leastupdate",
  5155. "leastindex",
  5156. "highestindex"
  5157. ],
  5158. "type": "string",
  5159. "description": "type of sort",
  5160. "name": "sort",
  5161. "in": "query"
  5162. },
  5163. {
  5164. "enum": [
  5165. "pending",
  5166. "success",
  5167. "error",
  5168. "failure",
  5169. "warning"
  5170. ],
  5171. "type": "string",
  5172. "description": "type of state",
  5173. "name": "state",
  5174. "in": "query"
  5175. }
  5176. ],
  5177. "responses": {
  5178. "200": {
  5179. "$ref": "#/responses/StatusList"
  5180. }
  5181. }
  5182. },
  5183. "post": {
  5184. "produces": [
  5185. "application/json"
  5186. ],
  5187. "tags": [
  5188. "repository"
  5189. ],
  5190. "summary": "Create a commit status",
  5191. "operationId": "repoCreateStatus",
  5192. "parameters": [
  5193. {
  5194. "type": "string",
  5195. "description": "owner of the repo",
  5196. "name": "owner",
  5197. "in": "path",
  5198. "required": true
  5199. },
  5200. {
  5201. "type": "string",
  5202. "description": "name of the repo",
  5203. "name": "repo",
  5204. "in": "path",
  5205. "required": true
  5206. },
  5207. {
  5208. "type": "string",
  5209. "description": "sha of the commit",
  5210. "name": "sha",
  5211. "in": "path",
  5212. "required": true
  5213. },
  5214. {
  5215. "name": "body",
  5216. "in": "body",
  5217. "schema": {
  5218. "$ref": "#/definitions/CreateStatusOption"
  5219. }
  5220. }
  5221. ],
  5222. "responses": {
  5223. "200": {
  5224. "$ref": "#/responses/StatusList"
  5225. }
  5226. }
  5227. }
  5228. },
  5229. "/repos/{owner}/{repo}/subscribers": {
  5230. "get": {
  5231. "produces": [
  5232. "application/json"
  5233. ],
  5234. "tags": [
  5235. "repository"
  5236. ],
  5237. "summary": "List a repo's watchers",
  5238. "operationId": "repoListSubscribers",
  5239. "parameters": [
  5240. {
  5241. "type": "string",
  5242. "description": "owner of the repo",
  5243. "name": "owner",
  5244. "in": "path",
  5245. "required": true
  5246. },
  5247. {
  5248. "type": "string",
  5249. "description": "name of the repo",
  5250. "name": "repo",
  5251. "in": "path",
  5252. "required": true
  5253. }
  5254. ],
  5255. "responses": {
  5256. "200": {
  5257. "$ref": "#/responses/UserList"
  5258. }
  5259. }
  5260. }
  5261. },
  5262. "/repos/{owner}/{repo}/subscription": {
  5263. "get": {
  5264. "tags": [
  5265. "repository"
  5266. ],
  5267. "summary": "Check if the current user is watching a repo",
  5268. "operationId": "userCurrentCheckSubscription",
  5269. "parameters": [
  5270. {
  5271. "type": "string",
  5272. "description": "owner of the repo",
  5273. "name": "owner",
  5274. "in": "path",
  5275. "required": true
  5276. },
  5277. {
  5278. "type": "string",
  5279. "description": "name of the repo",
  5280. "name": "repo",
  5281. "in": "path",
  5282. "required": true
  5283. }
  5284. ],
  5285. "responses": {
  5286. "200": {
  5287. "$ref": "#/responses/WatchInfo"
  5288. }
  5289. }
  5290. },
  5291. "put": {
  5292. "tags": [
  5293. "repository"
  5294. ],
  5295. "summary": "Watch a repo",
  5296. "operationId": "userCurrentPutSubscription",
  5297. "parameters": [
  5298. {
  5299. "type": "string",
  5300. "description": "owner of the repo",
  5301. "name": "owner",
  5302. "in": "path",
  5303. "required": true
  5304. },
  5305. {
  5306. "type": "string",
  5307. "description": "name of the repo",
  5308. "name": "repo",
  5309. "in": "path",
  5310. "required": true
  5311. }
  5312. ],
  5313. "responses": {
  5314. "200": {
  5315. "$ref": "#/responses/WatchInfo"
  5316. }
  5317. }
  5318. },
  5319. "delete": {
  5320. "tags": [
  5321. "repository"
  5322. ],
  5323. "summary": "Unwatch a repo",
  5324. "operationId": "userCurrentDeleteSubscription",
  5325. "parameters": [
  5326. {
  5327. "type": "string",
  5328. "description": "owner of the repo",
  5329. "name": "owner",
  5330. "in": "path",
  5331. "required": true
  5332. },
  5333. {
  5334. "type": "string",
  5335. "description": "name of the repo",
  5336. "name": "repo",
  5337. "in": "path",
  5338. "required": true
  5339. }
  5340. ],
  5341. "responses": {
  5342. "204": {
  5343. "$ref": "#/responses/empty"
  5344. }
  5345. }
  5346. }
  5347. },
  5348. "/repos/{owner}/{repo}/tags": {
  5349. "get": {
  5350. "produces": [
  5351. "application/json"
  5352. ],
  5353. "tags": [
  5354. "repository"
  5355. ],
  5356. "summary": "List a repository's tags",
  5357. "operationId": "repoListTags",
  5358. "parameters": [
  5359. {
  5360. "type": "string",
  5361. "description": "owner of the repo",
  5362. "name": "owner",
  5363. "in": "path",
  5364. "required": true
  5365. },
  5366. {
  5367. "type": "string",
  5368. "description": "name of the repo",
  5369. "name": "repo",
  5370. "in": "path",
  5371. "required": true
  5372. }
  5373. ],
  5374. "responses": {
  5375. "200": {
  5376. "$ref": "#/responses/TagList"
  5377. }
  5378. }
  5379. }
  5380. },
  5381. "/repos/{owner}/{repo}/times": {
  5382. "get": {
  5383. "produces": [
  5384. "application/json"
  5385. ],
  5386. "tags": [
  5387. "repository"
  5388. ],
  5389. "summary": "List a repo's tracked times",
  5390. "operationId": "repoTrackedTimes",
  5391. "parameters": [
  5392. {
  5393. "type": "string",
  5394. "description": "owner of the repo",
  5395. "name": "owner",
  5396. "in": "path",
  5397. "required": true
  5398. },
  5399. {
  5400. "type": "string",
  5401. "description": "name of the repo",
  5402. "name": "repo",
  5403. "in": "path",
  5404. "required": true
  5405. }
  5406. ],
  5407. "responses": {
  5408. "200": {
  5409. "$ref": "#/responses/TrackedTimeList"
  5410. }
  5411. }
  5412. }
  5413. },
  5414. "/repos/{owner}/{repo}/times/{user}": {
  5415. "get": {
  5416. "produces": [
  5417. "application/json"
  5418. ],
  5419. "tags": [
  5420. "user"
  5421. ],
  5422. "summary": "List a user's tracked times in a repo",
  5423. "operationId": "userTrackedTimes",
  5424. "parameters": [
  5425. {
  5426. "type": "string",
  5427. "description": "owner of the repo",
  5428. "name": "owner",
  5429. "in": "path",
  5430. "required": true
  5431. },
  5432. {
  5433. "type": "string",
  5434. "description": "name of the repo",
  5435. "name": "repo",
  5436. "in": "path",
  5437. "required": true
  5438. },
  5439. {
  5440. "type": "string",
  5441. "description": "username of user",
  5442. "name": "user",
  5443. "in": "path",
  5444. "required": true
  5445. }
  5446. ],
  5447. "responses": {
  5448. "200": {
  5449. "$ref": "#/responses/TrackedTimeList"
  5450. }
  5451. }
  5452. }
  5453. },
  5454. "/repos/{owner}/{repo}/topics": {
  5455. "get": {
  5456. "produces": [
  5457. "application/json"
  5458. ],
  5459. "tags": [
  5460. "repository"
  5461. ],
  5462. "summary": "Get list of topics that a repository has",
  5463. "operationId": "repoListTopics",
  5464. "parameters": [
  5465. {
  5466. "type": "string",
  5467. "description": "owner of the repo",
  5468. "name": "owner",
  5469. "in": "path",
  5470. "required": true
  5471. },
  5472. {
  5473. "type": "string",
  5474. "description": "name of the repo",
  5475. "name": "repo",
  5476. "in": "path",
  5477. "required": true
  5478. }
  5479. ],
  5480. "responses": {
  5481. "200": {
  5482. "$ref": "#/responses/TopicNames"
  5483. }
  5484. }
  5485. },
  5486. "put": {
  5487. "produces": [
  5488. "application/json"
  5489. ],
  5490. "tags": [
  5491. "repository"
  5492. ],
  5493. "summary": "Replace list of topics for a repository",
  5494. "operationId": "repoUpdateTopics",
  5495. "parameters": [
  5496. {
  5497. "type": "string",
  5498. "description": "owner of the repo",
  5499. "name": "owner",
  5500. "in": "path",
  5501. "required": true
  5502. },
  5503. {
  5504. "type": "string",
  5505. "description": "name of the repo",
  5506. "name": "repo",
  5507. "in": "path",
  5508. "required": true
  5509. },
  5510. {
  5511. "name": "body",
  5512. "in": "body",
  5513. "schema": {
  5514. "$ref": "#/definitions/RepoTopicOptions"
  5515. }
  5516. }
  5517. ],
  5518. "responses": {
  5519. "204": {
  5520. "$ref": "#/responses/empty"
  5521. }
  5522. }
  5523. }
  5524. },
  5525. "/repos/{owner}/{repo}/topics/{topic}": {
  5526. "put": {
  5527. "produces": [
  5528. "application/json"
  5529. ],
  5530. "tags": [
  5531. "repository"
  5532. ],
  5533. "summary": "Add a topic to a repository",
  5534. "operationId": "repoAddTopíc",
  5535. "parameters": [
  5536. {
  5537. "type": "string",
  5538. "description": "owner of the repo",
  5539. "name": "owner",
  5540. "in": "path",
  5541. "required": true
  5542. },
  5543. {
  5544. "type": "string",
  5545. "description": "name of the repo",
  5546. "name": "repo",
  5547. "in": "path",
  5548. "required": true
  5549. },
  5550. {
  5551. "type": "string",
  5552. "description": "name of the topic to add",
  5553. "name": "topic",
  5554. "in": "path",
  5555. "required": true
  5556. }
  5557. ],
  5558. "responses": {
  5559. "204": {
  5560. "$ref": "#/responses/empty"
  5561. }
  5562. }
  5563. },
  5564. "delete": {
  5565. "produces": [
  5566. "application/json"
  5567. ],
  5568. "tags": [
  5569. "repository"
  5570. ],
  5571. "summary": "Delete a topic from a repository",
  5572. "operationId": "repoDeleteTopic",
  5573. "parameters": [
  5574. {
  5575. "type": "string",
  5576. "description": "owner of the repo",
  5577. "name": "owner",
  5578. "in": "path",
  5579. "required": true
  5580. },
  5581. {
  5582. "type": "string",
  5583. "description": "name of the repo",
  5584. "name": "repo",
  5585. "in": "path",
  5586. "required": true
  5587. },
  5588. {
  5589. "type": "string",
  5590. "description": "name of the topic to delete",
  5591. "name": "topic",
  5592. "in": "path",
  5593. "required": true
  5594. }
  5595. ],
  5596. "responses": {
  5597. "204": {
  5598. "$ref": "#/responses/empty"
  5599. }
  5600. }
  5601. }
  5602. },
  5603. "/repositories/{id}": {
  5604. "get": {
  5605. "produces": [
  5606. "application/json"
  5607. ],
  5608. "tags": [
  5609. "repository"
  5610. ],
  5611. "summary": "Get a repository by id",
  5612. "operationId": "repoGetByID",
  5613. "parameters": [
  5614. {
  5615. "type": "integer",
  5616. "format": "int64",
  5617. "description": "id of the repo to get",
  5618. "name": "id",
  5619. "in": "path",
  5620. "required": true
  5621. }
  5622. ],
  5623. "responses": {
  5624. "200": {
  5625. "$ref": "#/responses/Repository"
  5626. }
  5627. }
  5628. }
  5629. },
  5630. "/teams/{id}": {
  5631. "get": {
  5632. "produces": [
  5633. "application/json"
  5634. ],
  5635. "tags": [
  5636. "organization"
  5637. ],
  5638. "summary": "Get a team",
  5639. "operationId": "orgGetTeam",
  5640. "parameters": [
  5641. {
  5642. "type": "integer",
  5643. "format": "int64",
  5644. "description": "id of the team to get",
  5645. "name": "id",
  5646. "in": "path",
  5647. "required": true
  5648. }
  5649. ],
  5650. "responses": {
  5651. "200": {
  5652. "$ref": "#/responses/Team"
  5653. }
  5654. }
  5655. },
  5656. "delete": {
  5657. "tags": [
  5658. "organization"
  5659. ],
  5660. "summary": "Delete a team",
  5661. "operationId": "orgDeleteTeam",
  5662. "parameters": [
  5663. {
  5664. "type": "integer",
  5665. "format": "int64",
  5666. "description": "id of the team to delete",
  5667. "name": "id",
  5668. "in": "path",
  5669. "required": true
  5670. }
  5671. ],
  5672. "responses": {
  5673. "204": {
  5674. "description": "team deleted"
  5675. }
  5676. }
  5677. },
  5678. "patch": {
  5679. "consumes": [
  5680. "application/json"
  5681. ],
  5682. "produces": [
  5683. "application/json"
  5684. ],
  5685. "tags": [
  5686. "organization"
  5687. ],
  5688. "summary": "Edit a team",
  5689. "operationId": "orgEditTeam",
  5690. "parameters": [
  5691. {
  5692. "type": "integer",
  5693. "description": "id of the team to edit",
  5694. "name": "id",
  5695. "in": "path",
  5696. "required": true
  5697. },
  5698. {
  5699. "name": "body",
  5700. "in": "body",
  5701. "schema": {
  5702. "$ref": "#/definitions/EditTeamOption"
  5703. }
  5704. }
  5705. ],
  5706. "responses": {
  5707. "200": {
  5708. "$ref": "#/responses/Team"
  5709. }
  5710. }
  5711. }
  5712. },
  5713. "/teams/{id}/members": {
  5714. "get": {
  5715. "produces": [
  5716. "application/json"
  5717. ],
  5718. "tags": [
  5719. "organization"
  5720. ],
  5721. "summary": "List a team's members",
  5722. "operationId": "orgListTeamMembers",
  5723. "parameters": [
  5724. {
  5725. "type": "integer",
  5726. "format": "int64",
  5727. "description": "id of the team",
  5728. "name": "id",
  5729. "in": "path",
  5730. "required": true
  5731. }
  5732. ],
  5733. "responses": {
  5734. "200": {
  5735. "$ref": "#/responses/UserList"
  5736. }
  5737. }
  5738. }
  5739. },
  5740. "/teams/{id}/members/{username}": {
  5741. "get": {
  5742. "produces": [
  5743. "application/json"
  5744. ],
  5745. "tags": [
  5746. "organization"
  5747. ],
  5748. "summary": "List a particular member of team",
  5749. "operationId": "orgListTeamMember",
  5750. "parameters": [
  5751. {
  5752. "type": "integer",
  5753. "format": "int64",
  5754. "description": "id of the team",
  5755. "name": "id",
  5756. "in": "path",
  5757. "required": true
  5758. },
  5759. {
  5760. "type": "string",
  5761. "description": "username of the member to list",
  5762. "name": "username",
  5763. "in": "path",
  5764. "required": true
  5765. }
  5766. ],
  5767. "responses": {
  5768. "200": {
  5769. "$ref": "#/responses/User"
  5770. }
  5771. }
  5772. },
  5773. "put": {
  5774. "produces": [
  5775. "application/json"
  5776. ],
  5777. "tags": [
  5778. "organization"
  5779. ],
  5780. "summary": "Add a team member",
  5781. "operationId": "orgAddTeamMember",
  5782. "parameters": [
  5783. {
  5784. "type": "integer",
  5785. "format": "int64",
  5786. "description": "id of the team",
  5787. "name": "id",
  5788. "in": "path",
  5789. "required": true
  5790. },
  5791. {
  5792. "type": "string",
  5793. "description": "username of the user to add",
  5794. "name": "username",
  5795. "in": "path",
  5796. "required": true
  5797. }
  5798. ],
  5799. "responses": {
  5800. "204": {
  5801. "$ref": "#/responses/empty"
  5802. }
  5803. }
  5804. },
  5805. "delete": {
  5806. "produces": [
  5807. "application/json"
  5808. ],
  5809. "tags": [
  5810. "organization"
  5811. ],
  5812. "summary": "Remove a team member",
  5813. "operationId": "orgRemoveTeamMember",
  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 user to remove",
  5826. "name": "username",
  5827. "in": "path",
  5828. "required": true
  5829. }
  5830. ],
  5831. "responses": {
  5832. "204": {
  5833. "$ref": "#/responses/empty"
  5834. }
  5835. }
  5836. }
  5837. },
  5838. "/teams/{id}/repos": {
  5839. "get": {
  5840. "produces": [
  5841. "application/json"
  5842. ],
  5843. "tags": [
  5844. "organization"
  5845. ],
  5846. "summary": "List a team's repos",
  5847. "operationId": "orgListTeamRepos",
  5848. "parameters": [
  5849. {
  5850. "type": "integer",
  5851. "format": "int64",
  5852. "description": "id of the team",
  5853. "name": "id",
  5854. "in": "path",
  5855. "required": true
  5856. }
  5857. ],
  5858. "responses": {
  5859. "200": {
  5860. "$ref": "#/responses/RepositoryList"
  5861. }
  5862. }
  5863. }
  5864. },
  5865. "/teams/{id}/repos/{org}/{repo}": {
  5866. "put": {
  5867. "produces": [
  5868. "application/json"
  5869. ],
  5870. "tags": [
  5871. "organization"
  5872. ],
  5873. "summary": "Add a repository to a team",
  5874. "operationId": "orgAddTeamRepository",
  5875. "parameters": [
  5876. {
  5877. "type": "integer",
  5878. "format": "int64",
  5879. "description": "id of the team",
  5880. "name": "id",
  5881. "in": "path",
  5882. "required": true
  5883. },
  5884. {
  5885. "type": "string",
  5886. "description": "organization that owns the repo to add",
  5887. "name": "org",
  5888. "in": "path",
  5889. "required": true
  5890. },
  5891. {
  5892. "type": "string",
  5893. "description": "name of the repo to add",
  5894. "name": "repo",
  5895. "in": "path",
  5896. "required": true
  5897. }
  5898. ],
  5899. "responses": {
  5900. "204": {
  5901. "$ref": "#/responses/empty"
  5902. }
  5903. }
  5904. },
  5905. "delete": {
  5906. "description": "This does not delete the repository, it only removes the repository from the team.",
  5907. "produces": [
  5908. "application/json"
  5909. ],
  5910. "tags": [
  5911. "organization"
  5912. ],
  5913. "summary": "Remove a repository from a team",
  5914. "operationId": "orgRemoveTeamRepository",
  5915. "parameters": [
  5916. {
  5917. "type": "integer",
  5918. "format": "int64",
  5919. "description": "id of the team",
  5920. "name": "id",
  5921. "in": "path",
  5922. "required": true
  5923. },
  5924. {
  5925. "type": "string",
  5926. "description": "organization that owns the repo to remove",
  5927. "name": "org",
  5928. "in": "path",
  5929. "required": true
  5930. },
  5931. {
  5932. "type": "string",
  5933. "description": "name of the repo to remove",
  5934. "name": "repo",
  5935. "in": "path",
  5936. "required": true
  5937. }
  5938. ],
  5939. "responses": {
  5940. "204": {
  5941. "$ref": "#/responses/empty"
  5942. }
  5943. }
  5944. }
  5945. },
  5946. "/topics/search": {
  5947. "get": {
  5948. "produces": [
  5949. "application/json"
  5950. ],
  5951. "tags": [
  5952. "repository"
  5953. ],
  5954. "summary": "search topics via keyword",
  5955. "operationId": "topicSearch",
  5956. "parameters": [
  5957. {
  5958. "type": "string",
  5959. "description": "keywords to search",
  5960. "name": "q",
  5961. "in": "query",
  5962. "required": true
  5963. }
  5964. ],
  5965. "responses": {
  5966. "200": {
  5967. "$ref": "#/responses/TopicListResponse"
  5968. }
  5969. }
  5970. }
  5971. },
  5972. "/user": {
  5973. "get": {
  5974. "produces": [
  5975. "application/json"
  5976. ],
  5977. "tags": [
  5978. "user"
  5979. ],
  5980. "summary": "Get the authenticated user",
  5981. "operationId": "userGetCurrent",
  5982. "responses": {
  5983. "200": {
  5984. "$ref": "#/responses/User"
  5985. }
  5986. }
  5987. }
  5988. },
  5989. "/user/emails": {
  5990. "get": {
  5991. "produces": [
  5992. "application/json"
  5993. ],
  5994. "tags": [
  5995. "user"
  5996. ],
  5997. "summary": "List the authenticated user's email addresses",
  5998. "operationId": "userListEmails",
  5999. "responses": {
  6000. "200": {
  6001. "$ref": "#/responses/EmailList"
  6002. }
  6003. }
  6004. },
  6005. "post": {
  6006. "produces": [
  6007. "application/json"
  6008. ],
  6009. "tags": [
  6010. "user"
  6011. ],
  6012. "summary": "Add email addresses",
  6013. "operationId": "userAddEmail",
  6014. "parameters": [
  6015. {
  6016. "name": "body",
  6017. "in": "body",
  6018. "schema": {
  6019. "$ref": "#/definitions/CreateEmailOption"
  6020. }
  6021. }
  6022. ],
  6023. "responses": {
  6024. "201": {
  6025. "$ref": "#/responses/EmailList"
  6026. }
  6027. }
  6028. },
  6029. "delete": {
  6030. "produces": [
  6031. "application/json"
  6032. ],
  6033. "tags": [
  6034. "user"
  6035. ],
  6036. "summary": "Delete email addresses",
  6037. "operationId": "userDeleteEmail",
  6038. "parameters": [
  6039. {
  6040. "name": "body",
  6041. "in": "body",
  6042. "schema": {
  6043. "$ref": "#/definitions/DeleteEmailOption"
  6044. }
  6045. }
  6046. ],
  6047. "responses": {
  6048. "204": {
  6049. "$ref": "#/responses/empty"
  6050. }
  6051. }
  6052. }
  6053. },
  6054. "/user/followers": {
  6055. "get": {
  6056. "produces": [
  6057. "application/json"
  6058. ],
  6059. "tags": [
  6060. "user"
  6061. ],
  6062. "summary": "List the authenticated user's followers",
  6063. "operationId": "userCurrentListFollowers",
  6064. "responses": {
  6065. "200": {
  6066. "$ref": "#/responses/UserList"
  6067. }
  6068. }
  6069. }
  6070. },
  6071. "/user/following": {
  6072. "get": {
  6073. "produces": [
  6074. "application/json"
  6075. ],
  6076. "tags": [
  6077. "user"
  6078. ],
  6079. "summary": "List the users that the authenticated user is following",
  6080. "operationId": "userCurrentListFollowing",
  6081. "responses": {
  6082. "200": {
  6083. "$ref": "#/responses/UserList"
  6084. }
  6085. }
  6086. }
  6087. },
  6088. "/user/following/{username}": {
  6089. "get": {
  6090. "tags": [
  6091. "user"
  6092. ],
  6093. "summary": "Check whether a user is followed by the authenticated user",
  6094. "operationId": "userCurrentCheckFollowing",
  6095. "parameters": [
  6096. {
  6097. "type": "string",
  6098. "description": "username of followed user",
  6099. "name": "username",
  6100. "in": "path",
  6101. "required": true
  6102. }
  6103. ],
  6104. "responses": {
  6105. "204": {
  6106. "$ref": "#/responses/empty"
  6107. },
  6108. "404": {
  6109. "$ref": "#/responses/notFound"
  6110. }
  6111. }
  6112. },
  6113. "put": {
  6114. "tags": [
  6115. "user"
  6116. ],
  6117. "summary": "Follow a user",
  6118. "operationId": "userCurrentPutFollow",
  6119. "parameters": [
  6120. {
  6121. "type": "string",
  6122. "description": "username of user to follow",
  6123. "name": "username",
  6124. "in": "path",
  6125. "required": true
  6126. }
  6127. ],
  6128. "responses": {
  6129. "204": {
  6130. "$ref": "#/responses/empty"
  6131. }
  6132. }
  6133. },
  6134. "delete": {
  6135. "tags": [
  6136. "user"
  6137. ],
  6138. "summary": "Unfollow a user",
  6139. "operationId": "userCurrentDeleteFollow",
  6140. "parameters": [
  6141. {
  6142. "type": "string",
  6143. "description": "username of user to unfollow",
  6144. "name": "username",
  6145. "in": "path",
  6146. "required": true
  6147. }
  6148. ],
  6149. "responses": {
  6150. "204": {
  6151. "$ref": "#/responses/empty"
  6152. }
  6153. }
  6154. }
  6155. },
  6156. "/user/gpg_keys": {
  6157. "get": {
  6158. "produces": [
  6159. "application/json"
  6160. ],
  6161. "tags": [
  6162. "user"
  6163. ],
  6164. "summary": "List the authenticated user's GPG keys",
  6165. "operationId": "userCurrentListGPGKeys",
  6166. "responses": {
  6167. "200": {
  6168. "$ref": "#/responses/GPGKeyList"
  6169. }
  6170. }
  6171. },
  6172. "post": {
  6173. "consumes": [
  6174. "application/json"
  6175. ],
  6176. "produces": [
  6177. "application/json"
  6178. ],
  6179. "tags": [
  6180. "user"
  6181. ],
  6182. "summary": "Create a GPG key",
  6183. "operationId": "userCurrentPostGPGKey",
  6184. "parameters": [
  6185. {
  6186. "name": "Form",
  6187. "in": "body",
  6188. "schema": {
  6189. "$ref": "#/definitions/CreateGPGKeyOption"
  6190. }
  6191. }
  6192. ],
  6193. "responses": {
  6194. "201": {
  6195. "$ref": "#/responses/GPGKey"
  6196. },
  6197. "422": {
  6198. "$ref": "#/responses/validationError"
  6199. }
  6200. }
  6201. }
  6202. },
  6203. "/user/gpg_keys/{id}": {
  6204. "get": {
  6205. "produces": [
  6206. "application/json"
  6207. ],
  6208. "tags": [
  6209. "user"
  6210. ],
  6211. "summary": "Get a GPG key",
  6212. "operationId": "userCurrentGetGPGKey",
  6213. "parameters": [
  6214. {
  6215. "type": "integer",
  6216. "format": "int64",
  6217. "description": "id of key to get",
  6218. "name": "id",
  6219. "in": "path",
  6220. "required": true
  6221. }
  6222. ],
  6223. "responses": {
  6224. "200": {
  6225. "$ref": "#/responses/GPGKey"
  6226. },
  6227. "404": {
  6228. "$ref": "#/responses/notFound"
  6229. }
  6230. }
  6231. },
  6232. "delete": {
  6233. "produces": [
  6234. "application/json"
  6235. ],
  6236. "tags": [
  6237. "user"
  6238. ],
  6239. "summary": "Remove a GPG key",
  6240. "operationId": "userCurrentDeleteGPGKey",
  6241. "parameters": [
  6242. {
  6243. "type": "integer",
  6244. "format": "int64",
  6245. "description": "id of key to delete",
  6246. "name": "id",
  6247. "in": "path",
  6248. "required": true
  6249. }
  6250. ],
  6251. "responses": {
  6252. "204": {
  6253. "$ref": "#/responses/empty"
  6254. },
  6255. "403": {
  6256. "$ref": "#/responses/forbidden"
  6257. }
  6258. }
  6259. }
  6260. },
  6261. "/user/keys": {
  6262. "get": {
  6263. "produces": [
  6264. "application/json"
  6265. ],
  6266. "tags": [
  6267. "user"
  6268. ],
  6269. "summary": "List the authenticated user's public keys",
  6270. "operationId": "userCurrentListKeys",
  6271. "parameters": [
  6272. {
  6273. "type": "string",
  6274. "description": "fingerprint of the key",
  6275. "name": "fingerprint",
  6276. "in": "query"
  6277. }
  6278. ],
  6279. "responses": {
  6280. "200": {
  6281. "$ref": "#/responses/PublicKeyList"
  6282. }
  6283. }
  6284. },
  6285. "post": {
  6286. "consumes": [
  6287. "application/json"
  6288. ],
  6289. "produces": [
  6290. "application/json"
  6291. ],
  6292. "tags": [
  6293. "user"
  6294. ],
  6295. "summary": "Create a public key",
  6296. "operationId": "userCurrentPostKey",
  6297. "parameters": [
  6298. {
  6299. "name": "body",
  6300. "in": "body",
  6301. "schema": {
  6302. "$ref": "#/definitions/CreateKeyOption"
  6303. }
  6304. }
  6305. ],
  6306. "responses": {
  6307. "201": {
  6308. "$ref": "#/responses/PublicKey"
  6309. },
  6310. "422": {
  6311. "$ref": "#/responses/validationError"
  6312. }
  6313. }
  6314. }
  6315. },
  6316. "/user/keys/{id}": {
  6317. "get": {
  6318. "produces": [
  6319. "application/json"
  6320. ],
  6321. "tags": [
  6322. "user"
  6323. ],
  6324. "summary": "Get a public key",
  6325. "operationId": "userCurrentGetKey",
  6326. "parameters": [
  6327. {
  6328. "type": "integer",
  6329. "format": "int64",
  6330. "description": "id of key to get",
  6331. "name": "id",
  6332. "in": "path",
  6333. "required": true
  6334. }
  6335. ],
  6336. "responses": {
  6337. "200": {
  6338. "$ref": "#/responses/PublicKey"
  6339. },
  6340. "404": {
  6341. "$ref": "#/responses/notFound"
  6342. }
  6343. }
  6344. },
  6345. "delete": {
  6346. "produces": [
  6347. "application/json"
  6348. ],
  6349. "tags": [
  6350. "user"
  6351. ],
  6352. "summary": "Delete a public key",
  6353. "operationId": "userCurrentDeleteKey",
  6354. "parameters": [
  6355. {
  6356. "type": "integer",
  6357. "format": "int64",
  6358. "description": "id of key to delete",
  6359. "name": "id",
  6360. "in": "path",
  6361. "required": true
  6362. }
  6363. ],
  6364. "responses": {
  6365. "204": {
  6366. "$ref": "#/responses/empty"
  6367. },
  6368. "403": {
  6369. "$ref": "#/responses/forbidden"
  6370. },
  6371. "404": {
  6372. "$ref": "#/responses/notFound"
  6373. }
  6374. }
  6375. }
  6376. },
  6377. "/user/orgs": {
  6378. "get": {
  6379. "produces": [
  6380. "application/json"
  6381. ],
  6382. "tags": [
  6383. "organization"
  6384. ],
  6385. "summary": "List the current user's organizations",
  6386. "operationId": "orgListCurrentUserOrgs",
  6387. "responses": {
  6388. "200": {
  6389. "$ref": "#/responses/OrganizationList"
  6390. }
  6391. }
  6392. }
  6393. },
  6394. "/user/repos": {
  6395. "get": {
  6396. "produces": [
  6397. "application/json"
  6398. ],
  6399. "tags": [
  6400. "user"
  6401. ],
  6402. "summary": "List the repos that the authenticated user owns or has access to",
  6403. "operationId": "userCurrentListRepos",
  6404. "responses": {
  6405. "200": {
  6406. "$ref": "#/responses/RepositoryList"
  6407. }
  6408. }
  6409. },
  6410. "post": {
  6411. "consumes": [
  6412. "application/json"
  6413. ],
  6414. "produces": [
  6415. "application/json"
  6416. ],
  6417. "tags": [
  6418. "repository",
  6419. "user"
  6420. ],
  6421. "summary": "Create a repository",
  6422. "operationId": "createCurrentUserRepo",
  6423. "parameters": [
  6424. {
  6425. "name": "body",
  6426. "in": "body",
  6427. "schema": {
  6428. "$ref": "#/definitions/CreateRepoOption"
  6429. }
  6430. }
  6431. ],
  6432. "responses": {
  6433. "201": {
  6434. "$ref": "#/responses/Repository"
  6435. },
  6436. "409": {
  6437. "description": "The repository with the same name already exists."
  6438. },
  6439. "422": {
  6440. "$ref": "#/responses/validationError"
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "/user/starred": {
  6446. "get": {
  6447. "produces": [
  6448. "application/json"
  6449. ],
  6450. "tags": [
  6451. "user"
  6452. ],
  6453. "summary": "The repos that the authenticated user has starred",
  6454. "operationId": "userCurrentListStarred",
  6455. "responses": {
  6456. "200": {
  6457. "$ref": "#/responses/RepositoryList"
  6458. }
  6459. }
  6460. }
  6461. },
  6462. "/user/starred/{owner}/{repo}": {
  6463. "get": {
  6464. "tags": [
  6465. "user"
  6466. ],
  6467. "summary": "Whether the authenticated is starring the repo",
  6468. "operationId": "userCurrentCheckStarring",
  6469. "parameters": [
  6470. {
  6471. "type": "string",
  6472. "description": "owner of the repo",
  6473. "name": "owner",
  6474. "in": "path",
  6475. "required": true
  6476. },
  6477. {
  6478. "type": "string",
  6479. "description": "name of the repo",
  6480. "name": "repo",
  6481. "in": "path",
  6482. "required": true
  6483. }
  6484. ],
  6485. "responses": {
  6486. "204": {
  6487. "$ref": "#/responses/empty"
  6488. },
  6489. "404": {
  6490. "$ref": "#/responses/notFound"
  6491. }
  6492. }
  6493. },
  6494. "put": {
  6495. "tags": [
  6496. "user"
  6497. ],
  6498. "summary": "Star the given repo",
  6499. "operationId": "userCurrentPutStar",
  6500. "parameters": [
  6501. {
  6502. "type": "string",
  6503. "description": "owner of the repo to star",
  6504. "name": "owner",
  6505. "in": "path",
  6506. "required": true
  6507. },
  6508. {
  6509. "type": "string",
  6510. "description": "name of the repo to star",
  6511. "name": "repo",
  6512. "in": "path",
  6513. "required": true
  6514. }
  6515. ],
  6516. "responses": {
  6517. "204": {
  6518. "$ref": "#/responses/empty"
  6519. }
  6520. }
  6521. },
  6522. "delete": {
  6523. "tags": [
  6524. "user"
  6525. ],
  6526. "summary": "Unstar the given repo",
  6527. "operationId": "userCurrentDeleteStar",
  6528. "parameters": [
  6529. {
  6530. "type": "string",
  6531. "description": "owner of the repo to unstar",
  6532. "name": "owner",
  6533. "in": "path",
  6534. "required": true
  6535. },
  6536. {
  6537. "type": "string",
  6538. "description": "name of the repo to unstar",
  6539. "name": "repo",
  6540. "in": "path",
  6541. "required": true
  6542. }
  6543. ],
  6544. "responses": {
  6545. "204": {
  6546. "$ref": "#/responses/empty"
  6547. }
  6548. }
  6549. }
  6550. },
  6551. "/user/subscriptions": {
  6552. "get": {
  6553. "produces": [
  6554. "application/json"
  6555. ],
  6556. "tags": [
  6557. "user"
  6558. ],
  6559. "summary": "List repositories watched by the authenticated user",
  6560. "operationId": "userCurrentListSubscriptions",
  6561. "responses": {
  6562. "200": {
  6563. "$ref": "#/responses/RepositoryList"
  6564. }
  6565. }
  6566. }
  6567. },
  6568. "/user/teams": {
  6569. "get": {
  6570. "produces": [
  6571. "application/json"
  6572. ],
  6573. "tags": [
  6574. "user"
  6575. ],
  6576. "summary": "List all the teams a user belongs to",
  6577. "operationId": "userListTeams",
  6578. "responses": {
  6579. "200": {
  6580. "$ref": "#/responses/TeamList"
  6581. }
  6582. }
  6583. }
  6584. },
  6585. "/user/times": {
  6586. "get": {
  6587. "produces": [
  6588. "application/json"
  6589. ],
  6590. "tags": [
  6591. "user"
  6592. ],
  6593. "summary": "List the current user's tracked times",
  6594. "operationId": "userCurrentTrackedTimes",
  6595. "responses": {
  6596. "200": {
  6597. "$ref": "#/responses/TrackedTimeList"
  6598. }
  6599. }
  6600. }
  6601. },
  6602. "/users/search": {
  6603. "get": {
  6604. "produces": [
  6605. "application/json"
  6606. ],
  6607. "tags": [
  6608. "user"
  6609. ],
  6610. "summary": "Search for users",
  6611. "operationId": "userSearch",
  6612. "parameters": [
  6613. {
  6614. "type": "string",
  6615. "description": "keyword",
  6616. "name": "q",
  6617. "in": "query"
  6618. },
  6619. {
  6620. "type": "integer",
  6621. "format": "int64",
  6622. "description": "ID of the user to search for",
  6623. "name": "uid",
  6624. "in": "query"
  6625. },
  6626. {
  6627. "type": "integer",
  6628. "description": "maximum number of users to return",
  6629. "name": "limit",
  6630. "in": "query"
  6631. }
  6632. ],
  6633. "responses": {
  6634. "200": {
  6635. "description": "SearchResults of a successful search",
  6636. "schema": {
  6637. "type": "object",
  6638. "properties": {
  6639. "data": {
  6640. "type": "array",
  6641. "items": {
  6642. "$ref": "#/definitions/User"
  6643. }
  6644. },
  6645. "ok": {
  6646. "type": "boolean"
  6647. }
  6648. }
  6649. }
  6650. }
  6651. }
  6652. }
  6653. },
  6654. "/users/{follower}/following/{followee}": {
  6655. "get": {
  6656. "tags": [
  6657. "user"
  6658. ],
  6659. "summary": "Check if one user is following another user",
  6660. "operationId": "userCheckFollowing",
  6661. "parameters": [
  6662. {
  6663. "type": "string",
  6664. "description": "username of following user",
  6665. "name": "follower",
  6666. "in": "path",
  6667. "required": true
  6668. },
  6669. {
  6670. "type": "string",
  6671. "description": "username of followed user",
  6672. "name": "followee",
  6673. "in": "path",
  6674. "required": true
  6675. }
  6676. ],
  6677. "responses": {
  6678. "204": {
  6679. "$ref": "#/responses/empty"
  6680. },
  6681. "404": {
  6682. "$ref": "#/responses/notFound"
  6683. }
  6684. }
  6685. }
  6686. },
  6687. "/users/{username}": {
  6688. "get": {
  6689. "produces": [
  6690. "application/json"
  6691. ],
  6692. "tags": [
  6693. "user"
  6694. ],
  6695. "summary": "Get a user",
  6696. "operationId": "userGet",
  6697. "parameters": [
  6698. {
  6699. "type": "string",
  6700. "description": "username of user to get",
  6701. "name": "username",
  6702. "in": "path",
  6703. "required": true
  6704. }
  6705. ],
  6706. "responses": {
  6707. "200": {
  6708. "$ref": "#/responses/User"
  6709. },
  6710. "404": {
  6711. "$ref": "#/responses/notFound"
  6712. }
  6713. }
  6714. }
  6715. },
  6716. "/users/{username}/followers": {
  6717. "get": {
  6718. "produces": [
  6719. "application/json"
  6720. ],
  6721. "tags": [
  6722. "user"
  6723. ],
  6724. "summary": "List the given user's followers",
  6725. "operationId": "userListFollowers",
  6726. "parameters": [
  6727. {
  6728. "type": "string",
  6729. "description": "username of user",
  6730. "name": "username",
  6731. "in": "path",
  6732. "required": true
  6733. }
  6734. ],
  6735. "responses": {
  6736. "200": {
  6737. "$ref": "#/responses/UserList"
  6738. }
  6739. }
  6740. }
  6741. },
  6742. "/users/{username}/following": {
  6743. "get": {
  6744. "produces": [
  6745. "application/json"
  6746. ],
  6747. "tags": [
  6748. "user"
  6749. ],
  6750. "summary": "List the users that the given user is following",
  6751. "operationId": "userListFollowing",
  6752. "parameters": [
  6753. {
  6754. "type": "string",
  6755. "description": "username of user",
  6756. "name": "username",
  6757. "in": "path",
  6758. "required": true
  6759. }
  6760. ],
  6761. "responses": {
  6762. "200": {
  6763. "$ref": "#/responses/UserList"
  6764. }
  6765. }
  6766. }
  6767. },
  6768. "/users/{username}/gpg_keys": {
  6769. "get": {
  6770. "produces": [
  6771. "application/json"
  6772. ],
  6773. "tags": [
  6774. "user"
  6775. ],
  6776. "summary": "List the given user's GPG keys",
  6777. "operationId": "userListGPGKeys",
  6778. "parameters": [
  6779. {
  6780. "type": "string",
  6781. "description": "username of user",
  6782. "name": "username",
  6783. "in": "path",
  6784. "required": true
  6785. }
  6786. ],
  6787. "responses": {
  6788. "200": {
  6789. "$ref": "#/responses/GPGKeyList"
  6790. }
  6791. }
  6792. }
  6793. },
  6794. "/users/{username}/heatmap": {
  6795. "get": {
  6796. "produces": [
  6797. "application/json"
  6798. ],
  6799. "tags": [
  6800. "user"
  6801. ],
  6802. "summary": "Get a user's heatmap",
  6803. "operationId": "userGetHeatmapData",
  6804. "parameters": [
  6805. {
  6806. "type": "string",
  6807. "description": "username of user to get",
  6808. "name": "username",
  6809. "in": "path",
  6810. "required": true
  6811. }
  6812. ],
  6813. "responses": {
  6814. "200": {
  6815. "$ref": "#/responses/UserHeatmapData"
  6816. },
  6817. "404": {
  6818. "$ref": "#/responses/notFound"
  6819. }
  6820. }
  6821. }
  6822. },
  6823. "/users/{username}/keys": {
  6824. "get": {
  6825. "produces": [
  6826. "application/json"
  6827. ],
  6828. "tags": [
  6829. "user"
  6830. ],
  6831. "summary": "List the given user's public keys",
  6832. "operationId": "userListKeys",
  6833. "parameters": [
  6834. {
  6835. "type": "string",
  6836. "description": "username of user",
  6837. "name": "username",
  6838. "in": "path",
  6839. "required": true
  6840. },
  6841. {
  6842. "type": "string",
  6843. "description": "fingerprint of the key",
  6844. "name": "fingerprint",
  6845. "in": "query"
  6846. }
  6847. ],
  6848. "responses": {
  6849. "200": {
  6850. "$ref": "#/responses/PublicKeyList"
  6851. }
  6852. }
  6853. }
  6854. },
  6855. "/users/{username}/orgs": {
  6856. "get": {
  6857. "produces": [
  6858. "application/json"
  6859. ],
  6860. "tags": [
  6861. "organization"
  6862. ],
  6863. "summary": "List a user's organizations",
  6864. "operationId": "orgListUserOrgs",
  6865. "parameters": [
  6866. {
  6867. "type": "string",
  6868. "description": "username of user",
  6869. "name": "username",
  6870. "in": "path",
  6871. "required": true
  6872. }
  6873. ],
  6874. "responses": {
  6875. "200": {
  6876. "$ref": "#/responses/OrganizationList"
  6877. }
  6878. }
  6879. }
  6880. },
  6881. "/users/{username}/repos": {
  6882. "get": {
  6883. "produces": [
  6884. "application/json"
  6885. ],
  6886. "tags": [
  6887. "user"
  6888. ],
  6889. "summary": "List the repos owned by the given user",
  6890. "operationId": "userListRepos",
  6891. "parameters": [
  6892. {
  6893. "type": "string",
  6894. "description": "username of user",
  6895. "name": "username",
  6896. "in": "path",
  6897. "required": true
  6898. }
  6899. ],
  6900. "responses": {
  6901. "200": {
  6902. "$ref": "#/responses/RepositoryList"
  6903. }
  6904. }
  6905. }
  6906. },
  6907. "/users/{username}/starred": {
  6908. "get": {
  6909. "produces": [
  6910. "application/json"
  6911. ],
  6912. "tags": [
  6913. "user"
  6914. ],
  6915. "summary": "The repos that the given user has starred",
  6916. "operationId": "userListStarred",
  6917. "parameters": [
  6918. {
  6919. "type": "string",
  6920. "description": "username of user",
  6921. "name": "username",
  6922. "in": "path",
  6923. "required": true
  6924. }
  6925. ],
  6926. "responses": {
  6927. "200": {
  6928. "$ref": "#/responses/RepositoryList"
  6929. }
  6930. }
  6931. }
  6932. },
  6933. "/users/{username}/subscriptions": {
  6934. "get": {
  6935. "produces": [
  6936. "application/json"
  6937. ],
  6938. "tags": [
  6939. "user"
  6940. ],
  6941. "summary": "List the repositories watched by a user",
  6942. "operationId": "userListSubscriptions",
  6943. "parameters": [
  6944. {
  6945. "type": "string",
  6946. "description": "username of the user",
  6947. "name": "username",
  6948. "in": "path",
  6949. "required": true
  6950. }
  6951. ],
  6952. "responses": {
  6953. "200": {
  6954. "$ref": "#/responses/RepositoryList"
  6955. }
  6956. }
  6957. }
  6958. },
  6959. "/users/{username}/tokens": {
  6960. "get": {
  6961. "produces": [
  6962. "application/json"
  6963. ],
  6964. "tags": [
  6965. "user"
  6966. ],
  6967. "summary": "List the authenticated user's access tokens",
  6968. "operationId": "userGetTokens",
  6969. "parameters": [
  6970. {
  6971. "type": "string",
  6972. "description": "username of user",
  6973. "name": "username",
  6974. "in": "path",
  6975. "required": true
  6976. }
  6977. ],
  6978. "responses": {
  6979. "200": {
  6980. "$ref": "#/responses/AccessTokenList"
  6981. }
  6982. }
  6983. },
  6984. "post": {
  6985. "consumes": [
  6986. "application/json"
  6987. ],
  6988. "produces": [
  6989. "application/json"
  6990. ],
  6991. "tags": [
  6992. "user"
  6993. ],
  6994. "summary": "Create an access token",
  6995. "operationId": "userCreateToken",
  6996. "parameters": [
  6997. {
  6998. "type": "string",
  6999. "x-go-name": "Name",
  7000. "description": "username of user",
  7001. "name": "username",
  7002. "in": "path",
  7003. "required": true
  7004. },
  7005. {
  7006. "name": "accessToken",
  7007. "in": "body",
  7008. "schema": {
  7009. "type": "object",
  7010. "required": [
  7011. "name"
  7012. ],
  7013. "properties": {
  7014. "name": {
  7015. "type": "string"
  7016. }
  7017. }
  7018. }
  7019. }
  7020. ],
  7021. "responses": {
  7022. "200": {
  7023. "$ref": "#/responses/AccessToken"
  7024. }
  7025. }
  7026. }
  7027. },
  7028. "/users/{username}/tokens/{token}": {
  7029. "delete": {
  7030. "produces": [
  7031. "application/json"
  7032. ],
  7033. "tags": [
  7034. "user"
  7035. ],
  7036. "summary": "delete an access token",
  7037. "operationId": "userDeleteAccessToken",
  7038. "parameters": [
  7039. {
  7040. "type": "string",
  7041. "description": "username of user",
  7042. "name": "username",
  7043. "in": "path",
  7044. "required": true
  7045. },
  7046. {
  7047. "type": "integer",
  7048. "format": "int64",
  7049. "description": "token to be deleted",
  7050. "name": "token",
  7051. "in": "path",
  7052. "required": true
  7053. }
  7054. ],
  7055. "responses": {
  7056. "204": {
  7057. "$ref": "#/responses/empty"
  7058. }
  7059. }
  7060. }
  7061. },
  7062. "/version": {
  7063. "get": {
  7064. "produces": [
  7065. "application/json"
  7066. ],
  7067. "tags": [
  7068. "miscellaneous"
  7069. ],
  7070. "summary": "Returns the version of the Gitea application",
  7071. "operationId": "getVersion",
  7072. "responses": {
  7073. "200": {
  7074. "$ref": "#/responses/ServerVersion"
  7075. }
  7076. }
  7077. }
  7078. }
  7079. },
  7080. "definitions": {
  7081. "APIError": {
  7082. "description": "APIError is an api error with a message",
  7083. "type": "object",
  7084. "properties": {
  7085. "message": {
  7086. "type": "string",
  7087. "x-go-name": "Message"
  7088. },
  7089. "url": {
  7090. "type": "string",
  7091. "x-go-name": "URL"
  7092. }
  7093. },
  7094. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7095. },
  7096. "AccessToken": {
  7097. "type": "object",
  7098. "title": "AccessToken represents an API access token.",
  7099. "properties": {
  7100. "id": {
  7101. "type": "integer",
  7102. "format": "int64",
  7103. "x-go-name": "ID"
  7104. },
  7105. "name": {
  7106. "type": "string",
  7107. "x-go-name": "Name"
  7108. },
  7109. "sha1": {
  7110. "type": "string",
  7111. "x-go-name": "Token"
  7112. },
  7113. "token_last_eight": {
  7114. "type": "string",
  7115. "x-go-name": "TokenLastEight"
  7116. }
  7117. },
  7118. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7119. },
  7120. "AddCollaboratorOption": {
  7121. "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository",
  7122. "type": "object",
  7123. "properties": {
  7124. "permission": {
  7125. "type": "string",
  7126. "x-go-name": "Permission"
  7127. }
  7128. },
  7129. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7130. },
  7131. "AddTimeOption": {
  7132. "description": "AddTimeOption options for adding time to an issue",
  7133. "type": "object",
  7134. "required": [
  7135. "time"
  7136. ],
  7137. "properties": {
  7138. "time": {
  7139. "description": "time in seconds",
  7140. "type": "integer",
  7141. "format": "int64",
  7142. "x-go-name": "Time"
  7143. }
  7144. },
  7145. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7146. },
  7147. "AnnotatedTag": {
  7148. "description": "AnnotatedTag represents an annotated tag",
  7149. "type": "object",
  7150. "properties": {
  7151. "message": {
  7152. "type": "string",
  7153. "x-go-name": "Message"
  7154. },
  7155. "object": {
  7156. "$ref": "#/definitions/AnnotatedTagObject"
  7157. },
  7158. "sha": {
  7159. "type": "string",
  7160. "x-go-name": "SHA"
  7161. },
  7162. "tag": {
  7163. "type": "string",
  7164. "x-go-name": "Tag"
  7165. },
  7166. "tagger": {
  7167. "$ref": "#/definitions/CommitUser"
  7168. },
  7169. "url": {
  7170. "type": "string",
  7171. "x-go-name": "URL"
  7172. },
  7173. "verification": {
  7174. "$ref": "#/definitions/PayloadCommitVerification"
  7175. }
  7176. },
  7177. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7178. },
  7179. "AnnotatedTagObject": {
  7180. "description": "AnnotatedTagObject contains meta information of the tag object",
  7181. "type": "object",
  7182. "properties": {
  7183. "sha": {
  7184. "type": "string",
  7185. "x-go-name": "SHA"
  7186. },
  7187. "type": {
  7188. "type": "string",
  7189. "x-go-name": "Type"
  7190. },
  7191. "url": {
  7192. "type": "string",
  7193. "x-go-name": "URL"
  7194. }
  7195. },
  7196. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7197. },
  7198. "Attachment": {
  7199. "description": "Attachment a generic attachment",
  7200. "type": "object",
  7201. "properties": {
  7202. "browser_download_url": {
  7203. "type": "string",
  7204. "x-go-name": "DownloadURL"
  7205. },
  7206. "created_at": {
  7207. "type": "string",
  7208. "format": "date-time",
  7209. "x-go-name": "Created"
  7210. },
  7211. "download_count": {
  7212. "type": "integer",
  7213. "format": "int64",
  7214. "x-go-name": "DownloadCount"
  7215. },
  7216. "id": {
  7217. "type": "integer",
  7218. "format": "int64",
  7219. "x-go-name": "ID"
  7220. },
  7221. "name": {
  7222. "type": "string",
  7223. "x-go-name": "Name"
  7224. },
  7225. "size": {
  7226. "type": "integer",
  7227. "format": "int64",
  7228. "x-go-name": "Size"
  7229. },
  7230. "uuid": {
  7231. "type": "string",
  7232. "x-go-name": "UUID"
  7233. }
  7234. },
  7235. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7236. },
  7237. "Branch": {
  7238. "description": "Branch represents a repository branch",
  7239. "type": "object",
  7240. "properties": {
  7241. "commit": {
  7242. "$ref": "#/definitions/PayloadCommit"
  7243. },
  7244. "name": {
  7245. "type": "string",
  7246. "x-go-name": "Name"
  7247. }
  7248. },
  7249. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7250. },
  7251. "Comment": {
  7252. "description": "Comment represents a comment on a commit or issue",
  7253. "type": "object",
  7254. "properties": {
  7255. "body": {
  7256. "type": "string",
  7257. "x-go-name": "Body"
  7258. },
  7259. "created_at": {
  7260. "type": "string",
  7261. "format": "date-time",
  7262. "x-go-name": "Created"
  7263. },
  7264. "html_url": {
  7265. "type": "string",
  7266. "x-go-name": "HTMLURL"
  7267. },
  7268. "id": {
  7269. "type": "integer",
  7270. "format": "int64",
  7271. "x-go-name": "ID"
  7272. },
  7273. "issue_url": {
  7274. "type": "string",
  7275. "x-go-name": "IssueURL"
  7276. },
  7277. "original_author": {
  7278. "type": "string",
  7279. "x-go-name": "OriginalAuthor"
  7280. },
  7281. "original_author_id": {
  7282. "type": "integer",
  7283. "format": "int64",
  7284. "x-go-name": "OriginalAuthorID"
  7285. },
  7286. "pull_request_url": {
  7287. "type": "string",
  7288. "x-go-name": "PRURL"
  7289. },
  7290. "updated_at": {
  7291. "type": "string",
  7292. "format": "date-time",
  7293. "x-go-name": "Updated"
  7294. },
  7295. "user": {
  7296. "$ref": "#/definitions/User"
  7297. }
  7298. },
  7299. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7300. },
  7301. "Commit": {
  7302. "type": "object",
  7303. "title": "Commit contains information generated from a Git commit.",
  7304. "properties": {
  7305. "author": {
  7306. "$ref": "#/definitions/User"
  7307. },
  7308. "commit": {
  7309. "$ref": "#/definitions/RepoCommit"
  7310. },
  7311. "committer": {
  7312. "$ref": "#/definitions/User"
  7313. },
  7314. "html_url": {
  7315. "type": "string",
  7316. "x-go-name": "HTMLURL"
  7317. },
  7318. "parents": {
  7319. "type": "array",
  7320. "items": {
  7321. "$ref": "#/definitions/CommitMeta"
  7322. },
  7323. "x-go-name": "Parents"
  7324. },
  7325. "sha": {
  7326. "type": "string",
  7327. "x-go-name": "SHA"
  7328. },
  7329. "url": {
  7330. "type": "string",
  7331. "x-go-name": "URL"
  7332. }
  7333. },
  7334. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7335. },
  7336. "CommitMeta": {
  7337. "type": "object",
  7338. "title": "CommitMeta contains meta information of a commit in terms of API.",
  7339. "properties": {
  7340. "sha": {
  7341. "type": "string",
  7342. "x-go-name": "SHA"
  7343. },
  7344. "url": {
  7345. "type": "string",
  7346. "x-go-name": "URL"
  7347. }
  7348. },
  7349. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7350. },
  7351. "CommitUser": {
  7352. "type": "object",
  7353. "title": "CommitUser contains information of a user in the context of a commit.",
  7354. "properties": {
  7355. "date": {
  7356. "type": "string",
  7357. "x-go-name": "Date"
  7358. },
  7359. "email": {
  7360. "type": "string",
  7361. "format": "email",
  7362. "x-go-name": "Email"
  7363. },
  7364. "name": {
  7365. "type": "string",
  7366. "x-go-name": "Name"
  7367. }
  7368. },
  7369. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7370. },
  7371. "ContentsResponse": {
  7372. "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content",
  7373. "type": "object",
  7374. "properties": {
  7375. "_links": {
  7376. "$ref": "#/definitions/FileLinksResponse"
  7377. },
  7378. "content": {
  7379. "description": "`content` is populated when `type` is `file`, otherwise null",
  7380. "type": "string",
  7381. "x-go-name": "Content"
  7382. },
  7383. "download_url": {
  7384. "type": "string",
  7385. "x-go-name": "DownloadURL"
  7386. },
  7387. "encoding": {
  7388. "description": "`encoding` is populated when `type` is `file`, otherwise null",
  7389. "type": "string",
  7390. "x-go-name": "Encoding"
  7391. },
  7392. "git_url": {
  7393. "type": "string",
  7394. "x-go-name": "GitURL"
  7395. },
  7396. "html_url": {
  7397. "type": "string",
  7398. "x-go-name": "HTMLURL"
  7399. },
  7400. "name": {
  7401. "type": "string",
  7402. "x-go-name": "Name"
  7403. },
  7404. "path": {
  7405. "type": "string",
  7406. "x-go-name": "Path"
  7407. },
  7408. "sha": {
  7409. "type": "string",
  7410. "x-go-name": "SHA"
  7411. },
  7412. "size": {
  7413. "type": "integer",
  7414. "format": "int64",
  7415. "x-go-name": "Size"
  7416. },
  7417. "submodule_git_url": {
  7418. "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null",
  7419. "type": "string",
  7420. "x-go-name": "SubmoduleGitURL"
  7421. },
  7422. "target": {
  7423. "description": "`target` is populated when `type` is `symlink`, otherwise null",
  7424. "type": "string",
  7425. "x-go-name": "Target"
  7426. },
  7427. "type": {
  7428. "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`",
  7429. "type": "string",
  7430. "x-go-name": "Type"
  7431. },
  7432. "url": {
  7433. "type": "string",
  7434. "x-go-name": "URL"
  7435. }
  7436. },
  7437. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7438. },
  7439. "CreateEmailOption": {
  7440. "description": "CreateEmailOption options when creating email addresses",
  7441. "type": "object",
  7442. "properties": {
  7443. "emails": {
  7444. "description": "email addresses to add",
  7445. "type": "array",
  7446. "items": {
  7447. "type": "string"
  7448. },
  7449. "x-go-name": "Emails"
  7450. }
  7451. },
  7452. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7453. },
  7454. "CreateFileOptions": {
  7455. "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)",
  7456. "type": "object",
  7457. "required": [
  7458. "content"
  7459. ],
  7460. "properties": {
  7461. "author": {
  7462. "$ref": "#/definitions/Identity"
  7463. },
  7464. "branch": {
  7465. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  7466. "type": "string",
  7467. "x-go-name": "BranchName"
  7468. },
  7469. "committer": {
  7470. "$ref": "#/definitions/Identity"
  7471. },
  7472. "content": {
  7473. "description": "content must be base64 encoded",
  7474. "type": "string",
  7475. "x-go-name": "Content"
  7476. },
  7477. "message": {
  7478. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  7479. "type": "string",
  7480. "x-go-name": "Message"
  7481. },
  7482. "new_branch": {
  7483. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  7484. "type": "string",
  7485. "x-go-name": "NewBranchName"
  7486. }
  7487. },
  7488. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7489. },
  7490. "CreateForkOption": {
  7491. "description": "CreateForkOption options for creating a fork",
  7492. "type": "object",
  7493. "properties": {
  7494. "organization": {
  7495. "description": "organization name, if forking into an organization",
  7496. "type": "string",
  7497. "x-go-name": "Organization"
  7498. }
  7499. },
  7500. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7501. },
  7502. "CreateGPGKeyOption": {
  7503. "description": "CreateGPGKeyOption options create user GPG key",
  7504. "type": "object",
  7505. "required": [
  7506. "armored_public_key"
  7507. ],
  7508. "properties": {
  7509. "armored_public_key": {
  7510. "description": "An armored GPG key to add",
  7511. "type": "string",
  7512. "uniqueItems": true,
  7513. "x-go-name": "ArmoredKey"
  7514. }
  7515. },
  7516. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7517. },
  7518. "CreateHookOption": {
  7519. "description": "CreateHookOption options when create a hook",
  7520. "type": "object",
  7521. "required": [
  7522. "type",
  7523. "config"
  7524. ],
  7525. "properties": {
  7526. "active": {
  7527. "type": "boolean",
  7528. "default": false,
  7529. "x-go-name": "Active"
  7530. },
  7531. "config": {
  7532. "type": "object",
  7533. "additionalProperties": {
  7534. "type": "string"
  7535. },
  7536. "x-go-name": "Config"
  7537. },
  7538. "events": {
  7539. "type": "array",
  7540. "items": {
  7541. "type": "string"
  7542. },
  7543. "x-go-name": "Events"
  7544. },
  7545. "type": {
  7546. "type": "string",
  7547. "enum": [
  7548. "gitea",
  7549. "gogs",
  7550. "slack",
  7551. "discord"
  7552. ],
  7553. "x-go-name": "Type"
  7554. }
  7555. },
  7556. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7557. },
  7558. "CreateIssueCommentOption": {
  7559. "description": "CreateIssueCommentOption options for creating a comment on an issue",
  7560. "type": "object",
  7561. "required": [
  7562. "body"
  7563. ],
  7564. "properties": {
  7565. "body": {
  7566. "type": "string",
  7567. "x-go-name": "Body"
  7568. }
  7569. },
  7570. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7571. },
  7572. "CreateIssueOption": {
  7573. "description": "CreateIssueOption options to create one issue",
  7574. "type": "object",
  7575. "required": [
  7576. "title"
  7577. ],
  7578. "properties": {
  7579. "assignee": {
  7580. "description": "username of assignee",
  7581. "type": "string",
  7582. "x-go-name": "Assignee"
  7583. },
  7584. "assignees": {
  7585. "type": "array",
  7586. "items": {
  7587. "type": "string"
  7588. },
  7589. "x-go-name": "Assignees"
  7590. },
  7591. "body": {
  7592. "type": "string",
  7593. "x-go-name": "Body"
  7594. },
  7595. "closed": {
  7596. "type": "boolean",
  7597. "x-go-name": "Closed"
  7598. },
  7599. "due_date": {
  7600. "type": "string",
  7601. "format": "date-time",
  7602. "x-go-name": "Deadline"
  7603. },
  7604. "labels": {
  7605. "description": "list of label ids",
  7606. "type": "array",
  7607. "items": {
  7608. "type": "integer",
  7609. "format": "int64"
  7610. },
  7611. "x-go-name": "Labels"
  7612. },
  7613. "milestone": {
  7614. "description": "milestone id",
  7615. "type": "integer",
  7616. "format": "int64",
  7617. "x-go-name": "Milestone"
  7618. },
  7619. "title": {
  7620. "type": "string",
  7621. "x-go-name": "Title"
  7622. }
  7623. },
  7624. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7625. },
  7626. "CreateKeyOption": {
  7627. "description": "CreateKeyOption options when creating a key",
  7628. "type": "object",
  7629. "required": [
  7630. "title",
  7631. "key"
  7632. ],
  7633. "properties": {
  7634. "key": {
  7635. "description": "An armored SSH key to add",
  7636. "type": "string",
  7637. "uniqueItems": true,
  7638. "x-go-name": "Key"
  7639. },
  7640. "read_only": {
  7641. "description": "Describe if the key has only read access or read/write",
  7642. "type": "boolean",
  7643. "x-go-name": "ReadOnly"
  7644. },
  7645. "title": {
  7646. "description": "Title of the key to add",
  7647. "type": "string",
  7648. "uniqueItems": true,
  7649. "x-go-name": "Title"
  7650. }
  7651. },
  7652. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7653. },
  7654. "CreateLabelOption": {
  7655. "description": "CreateLabelOption options for creating a label",
  7656. "type": "object",
  7657. "required": [
  7658. "name",
  7659. "color"
  7660. ],
  7661. "properties": {
  7662. "color": {
  7663. "type": "string",
  7664. "x-go-name": "Color",
  7665. "example": "#00aabb"
  7666. },
  7667. "description": {
  7668. "type": "string",
  7669. "x-go-name": "Description"
  7670. },
  7671. "name": {
  7672. "type": "string",
  7673. "x-go-name": "Name"
  7674. }
  7675. },
  7676. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7677. },
  7678. "CreateMilestoneOption": {
  7679. "description": "CreateMilestoneOption options for creating a milestone",
  7680. "type": "object",
  7681. "properties": {
  7682. "description": {
  7683. "type": "string",
  7684. "x-go-name": "Description"
  7685. },
  7686. "due_on": {
  7687. "type": "string",
  7688. "format": "date-time",
  7689. "x-go-name": "Deadline"
  7690. },
  7691. "title": {
  7692. "type": "string",
  7693. "x-go-name": "Title"
  7694. }
  7695. },
  7696. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7697. },
  7698. "CreateOrgOption": {
  7699. "description": "CreateOrgOption options for creating an organization",
  7700. "type": "object",
  7701. "required": [
  7702. "username"
  7703. ],
  7704. "properties": {
  7705. "description": {
  7706. "type": "string",
  7707. "x-go-name": "Description"
  7708. },
  7709. "full_name": {
  7710. "type": "string",
  7711. "x-go-name": "FullName"
  7712. },
  7713. "location": {
  7714. "type": "string",
  7715. "x-go-name": "Location"
  7716. },
  7717. "username": {
  7718. "type": "string",
  7719. "x-go-name": "UserName"
  7720. },
  7721. "visibility": {
  7722. "description": "possible values are `public` (default), `limited` or `private`",
  7723. "type": "string",
  7724. "enum": [
  7725. "public",
  7726. "limited",
  7727. "private"
  7728. ],
  7729. "x-go-name": "Visibility"
  7730. },
  7731. "website": {
  7732. "type": "string",
  7733. "x-go-name": "Website"
  7734. }
  7735. },
  7736. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7737. },
  7738. "CreatePullRequestOption": {
  7739. "description": "CreatePullRequestOption options when creating a pull request",
  7740. "type": "object",
  7741. "properties": {
  7742. "assignee": {
  7743. "type": "string",
  7744. "x-go-name": "Assignee"
  7745. },
  7746. "assignees": {
  7747. "type": "array",
  7748. "items": {
  7749. "type": "string"
  7750. },
  7751. "x-go-name": "Assignees"
  7752. },
  7753. "base": {
  7754. "type": "string",
  7755. "x-go-name": "Base"
  7756. },
  7757. "body": {
  7758. "type": "string",
  7759. "x-go-name": "Body"
  7760. },
  7761. "due_date": {
  7762. "type": "string",
  7763. "format": "date-time",
  7764. "x-go-name": "Deadline"
  7765. },
  7766. "head": {
  7767. "type": "string",
  7768. "x-go-name": "Head"
  7769. },
  7770. "labels": {
  7771. "type": "array",
  7772. "items": {
  7773. "type": "integer",
  7774. "format": "int64"
  7775. },
  7776. "x-go-name": "Labels"
  7777. },
  7778. "milestone": {
  7779. "type": "integer",
  7780. "format": "int64",
  7781. "x-go-name": "Milestone"
  7782. },
  7783. "title": {
  7784. "type": "string",
  7785. "x-go-name": "Title"
  7786. }
  7787. },
  7788. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7789. },
  7790. "CreateReleaseOption": {
  7791. "description": "CreateReleaseOption options when creating a release",
  7792. "type": "object",
  7793. "required": [
  7794. "tag_name"
  7795. ],
  7796. "properties": {
  7797. "body": {
  7798. "type": "string",
  7799. "x-go-name": "Note"
  7800. },
  7801. "draft": {
  7802. "type": "boolean",
  7803. "x-go-name": "IsDraft"
  7804. },
  7805. "name": {
  7806. "type": "string",
  7807. "x-go-name": "Title"
  7808. },
  7809. "prerelease": {
  7810. "type": "boolean",
  7811. "x-go-name": "IsPrerelease"
  7812. },
  7813. "tag_name": {
  7814. "type": "string",
  7815. "x-go-name": "TagName"
  7816. },
  7817. "target_commitish": {
  7818. "type": "string",
  7819. "x-go-name": "Target"
  7820. }
  7821. },
  7822. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7823. },
  7824. "CreateRepoOption": {
  7825. "description": "CreateRepoOption options when creating repository",
  7826. "type": "object",
  7827. "required": [
  7828. "name"
  7829. ],
  7830. "properties": {
  7831. "auto_init": {
  7832. "description": "Whether the repository should be auto-intialized?",
  7833. "type": "boolean",
  7834. "x-go-name": "AutoInit"
  7835. },
  7836. "description": {
  7837. "description": "Description of the repository to create",
  7838. "type": "string",
  7839. "x-go-name": "Description"
  7840. },
  7841. "gitignores": {
  7842. "description": "Gitignores to use",
  7843. "type": "string",
  7844. "x-go-name": "Gitignores"
  7845. },
  7846. "license": {
  7847. "description": "License to use",
  7848. "type": "string",
  7849. "x-go-name": "License"
  7850. },
  7851. "name": {
  7852. "description": "Name of the repository to create",
  7853. "type": "string",
  7854. "uniqueItems": true,
  7855. "x-go-name": "Name"
  7856. },
  7857. "private": {
  7858. "description": "Whether the repository is private",
  7859. "type": "boolean",
  7860. "x-go-name": "Private"
  7861. },
  7862. "readme": {
  7863. "description": "Readme of the repository to create",
  7864. "type": "string",
  7865. "x-go-name": "Readme"
  7866. }
  7867. },
  7868. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7869. },
  7870. "CreateStatusOption": {
  7871. "description": "CreateStatusOption holds the information needed to create a new Status for a Commit",
  7872. "type": "object",
  7873. "properties": {
  7874. "context": {
  7875. "type": "string",
  7876. "x-go-name": "Context"
  7877. },
  7878. "description": {
  7879. "type": "string",
  7880. "x-go-name": "Description"
  7881. },
  7882. "state": {
  7883. "$ref": "#/definitions/StatusState"
  7884. },
  7885. "target_url": {
  7886. "type": "string",
  7887. "x-go-name": "TargetURL"
  7888. }
  7889. },
  7890. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7891. },
  7892. "CreateTeamOption": {
  7893. "description": "CreateTeamOption options for creating a team",
  7894. "type": "object",
  7895. "required": [
  7896. "name"
  7897. ],
  7898. "properties": {
  7899. "description": {
  7900. "type": "string",
  7901. "x-go-name": "Description"
  7902. },
  7903. "name": {
  7904. "type": "string",
  7905. "x-go-name": "Name"
  7906. },
  7907. "permission": {
  7908. "type": "string",
  7909. "enum": [
  7910. "read",
  7911. "write",
  7912. "admin"
  7913. ],
  7914. "x-go-name": "Permission"
  7915. },
  7916. "units": {
  7917. "type": "array",
  7918. "items": {
  7919. "type": "string"
  7920. },
  7921. "x-go-name": "Units",
  7922. "example": [
  7923. "repo.code",
  7924. "repo.issues",
  7925. "repo.ext_issues",
  7926. "repo.wiki",
  7927. "repo.pulls",
  7928. "repo.releases",
  7929. "repo.ext_wiki"
  7930. ]
  7931. }
  7932. },
  7933. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7934. },
  7935. "CreateUserOption": {
  7936. "description": "CreateUserOption create user options",
  7937. "type": "object",
  7938. "required": [
  7939. "username",
  7940. "email",
  7941. "password"
  7942. ],
  7943. "properties": {
  7944. "email": {
  7945. "type": "string",
  7946. "format": "email",
  7947. "x-go-name": "Email"
  7948. },
  7949. "full_name": {
  7950. "type": "string",
  7951. "x-go-name": "FullName"
  7952. },
  7953. "login_name": {
  7954. "type": "string",
  7955. "x-go-name": "LoginName"
  7956. },
  7957. "must_change_password": {
  7958. "type": "boolean",
  7959. "x-go-name": "MustChangePassword"
  7960. },
  7961. "password": {
  7962. "type": "string",
  7963. "x-go-name": "Password"
  7964. },
  7965. "send_notify": {
  7966. "type": "boolean",
  7967. "x-go-name": "SendNotify"
  7968. },
  7969. "source_id": {
  7970. "type": "integer",
  7971. "format": "int64",
  7972. "x-go-name": "SourceID"
  7973. },
  7974. "username": {
  7975. "type": "string",
  7976. "x-go-name": "Username"
  7977. }
  7978. },
  7979. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7980. },
  7981. "DeleteEmailOption": {
  7982. "description": "DeleteEmailOption options when deleting email addresses",
  7983. "type": "object",
  7984. "properties": {
  7985. "emails": {
  7986. "description": "email addresses to delete",
  7987. "type": "array",
  7988. "items": {
  7989. "type": "string"
  7990. },
  7991. "x-go-name": "Emails"
  7992. }
  7993. },
  7994. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7995. },
  7996. "DeleteFileOptions": {
  7997. "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)",
  7998. "type": "object",
  7999. "required": [
  8000. "sha"
  8001. ],
  8002. "properties": {
  8003. "author": {
  8004. "$ref": "#/definitions/Identity"
  8005. },
  8006. "branch": {
  8007. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  8008. "type": "string",
  8009. "x-go-name": "BranchName"
  8010. },
  8011. "committer": {
  8012. "$ref": "#/definitions/Identity"
  8013. },
  8014. "message": {
  8015. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  8016. "type": "string",
  8017. "x-go-name": "Message"
  8018. },
  8019. "new_branch": {
  8020. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  8021. "type": "string",
  8022. "x-go-name": "NewBranchName"
  8023. },
  8024. "sha": {
  8025. "description": "sha is the SHA for the file that already exists",
  8026. "type": "string",
  8027. "x-go-name": "SHA"
  8028. }
  8029. },
  8030. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8031. },
  8032. "DeployKey": {
  8033. "description": "DeployKey a deploy key",
  8034. "type": "object",
  8035. "properties": {
  8036. "created_at": {
  8037. "type": "string",
  8038. "format": "date-time",
  8039. "x-go-name": "Created"
  8040. },
  8041. "fingerprint": {
  8042. "type": "string",
  8043. "x-go-name": "Fingerprint"
  8044. },
  8045. "id": {
  8046. "type": "integer",
  8047. "format": "int64",
  8048. "x-go-name": "ID"
  8049. },
  8050. "key": {
  8051. "type": "string",
  8052. "x-go-name": "Key"
  8053. },
  8054. "key_id": {
  8055. "type": "integer",
  8056. "format": "int64",
  8057. "x-go-name": "KeyID"
  8058. },
  8059. "read_only": {
  8060. "type": "boolean",
  8061. "x-go-name": "ReadOnly"
  8062. },
  8063. "repository": {
  8064. "$ref": "#/definitions/Repository"
  8065. },
  8066. "title": {
  8067. "type": "string",
  8068. "x-go-name": "Title"
  8069. },
  8070. "url": {
  8071. "type": "string",
  8072. "x-go-name": "URL"
  8073. }
  8074. },
  8075. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8076. },
  8077. "EditAttachmentOptions": {
  8078. "description": "EditAttachmentOptions options for editing attachments",
  8079. "type": "object",
  8080. "properties": {
  8081. "name": {
  8082. "type": "string",
  8083. "x-go-name": "Name"
  8084. }
  8085. },
  8086. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8087. },
  8088. "EditDeadlineOption": {
  8089. "description": "EditDeadlineOption options for creating a deadline",
  8090. "type": "object",
  8091. "required": [
  8092. "due_date"
  8093. ],
  8094. "properties": {
  8095. "due_date": {
  8096. "type": "string",
  8097. "format": "date-time",
  8098. "x-go-name": "Deadline"
  8099. }
  8100. },
  8101. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8102. },
  8103. "EditGitHookOption": {
  8104. "description": "EditGitHookOption options when modifying one Git hook",
  8105. "type": "object",
  8106. "properties": {
  8107. "content": {
  8108. "type": "string",
  8109. "x-go-name": "Content"
  8110. }
  8111. },
  8112. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8113. },
  8114. "EditHookOption": {
  8115. "description": "EditHookOption options when modify one hook",
  8116. "type": "object",
  8117. "properties": {
  8118. "active": {
  8119. "type": "boolean",
  8120. "x-go-name": "Active"
  8121. },
  8122. "config": {
  8123. "type": "object",
  8124. "additionalProperties": {
  8125. "type": "string"
  8126. },
  8127. "x-go-name": "Config"
  8128. },
  8129. "events": {
  8130. "type": "array",
  8131. "items": {
  8132. "type": "string"
  8133. },
  8134. "x-go-name": "Events"
  8135. }
  8136. },
  8137. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8138. },
  8139. "EditIssueCommentOption": {
  8140. "description": "EditIssueCommentOption options for editing a comment",
  8141. "type": "object",
  8142. "required": [
  8143. "body"
  8144. ],
  8145. "properties": {
  8146. "body": {
  8147. "type": "string",
  8148. "x-go-name": "Body"
  8149. }
  8150. },
  8151. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8152. },
  8153. "EditIssueOption": {
  8154. "description": "EditIssueOption options for editing an issue",
  8155. "type": "object",
  8156. "properties": {
  8157. "assignee": {
  8158. "type": "string",
  8159. "x-go-name": "Assignee"
  8160. },
  8161. "assignees": {
  8162. "type": "array",
  8163. "items": {
  8164. "type": "string"
  8165. },
  8166. "x-go-name": "Assignees"
  8167. },
  8168. "body": {
  8169. "type": "string",
  8170. "x-go-name": "Body"
  8171. },
  8172. "due_date": {
  8173. "type": "string",
  8174. "format": "date-time",
  8175. "x-go-name": "Deadline"
  8176. },
  8177. "milestone": {
  8178. "type": "integer",
  8179. "format": "int64",
  8180. "x-go-name": "Milestone"
  8181. },
  8182. "state": {
  8183. "type": "string",
  8184. "x-go-name": "State"
  8185. },
  8186. "title": {
  8187. "type": "string",
  8188. "x-go-name": "Title"
  8189. }
  8190. },
  8191. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8192. },
  8193. "EditLabelOption": {
  8194. "description": "EditLabelOption options for editing a label",
  8195. "type": "object",
  8196. "properties": {
  8197. "color": {
  8198. "type": "string",
  8199. "x-go-name": "Color"
  8200. },
  8201. "description": {
  8202. "type": "string",
  8203. "x-go-name": "Description"
  8204. },
  8205. "name": {
  8206. "type": "string",
  8207. "x-go-name": "Name"
  8208. }
  8209. },
  8210. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8211. },
  8212. "EditMilestoneOption": {
  8213. "description": "EditMilestoneOption options for editing a milestone",
  8214. "type": "object",
  8215. "properties": {
  8216. "description": {
  8217. "type": "string",
  8218. "x-go-name": "Description"
  8219. },
  8220. "due_on": {
  8221. "type": "string",
  8222. "format": "date-time",
  8223. "x-go-name": "Deadline"
  8224. },
  8225. "state": {
  8226. "type": "string",
  8227. "x-go-name": "State"
  8228. },
  8229. "title": {
  8230. "type": "string",
  8231. "x-go-name": "Title"
  8232. }
  8233. },
  8234. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8235. },
  8236. "EditOrgOption": {
  8237. "description": "EditOrgOption options for editing an organization",
  8238. "type": "object",
  8239. "properties": {
  8240. "description": {
  8241. "type": "string",
  8242. "x-go-name": "Description"
  8243. },
  8244. "full_name": {
  8245. "type": "string",
  8246. "x-go-name": "FullName"
  8247. },
  8248. "location": {
  8249. "type": "string",
  8250. "x-go-name": "Location"
  8251. },
  8252. "visibility": {
  8253. "description": "possible values are `public`, `limited` or `private`",
  8254. "type": "string",
  8255. "enum": [
  8256. "public",
  8257. "limited",
  8258. "private"
  8259. ],
  8260. "x-go-name": "Visibility"
  8261. },
  8262. "website": {
  8263. "type": "string",
  8264. "x-go-name": "Website"
  8265. }
  8266. },
  8267. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8268. },
  8269. "EditPullRequestOption": {
  8270. "description": "EditPullRequestOption options when modify pull request",
  8271. "type": "object",
  8272. "properties": {
  8273. "assignee": {
  8274. "type": "string",
  8275. "x-go-name": "Assignee"
  8276. },
  8277. "assignees": {
  8278. "type": "array",
  8279. "items": {
  8280. "type": "string"
  8281. },
  8282. "x-go-name": "Assignees"
  8283. },
  8284. "body": {
  8285. "type": "string",
  8286. "x-go-name": "Body"
  8287. },
  8288. "due_date": {
  8289. "type": "string",
  8290. "format": "date-time",
  8291. "x-go-name": "Deadline"
  8292. },
  8293. "labels": {
  8294. "type": "array",
  8295. "items": {
  8296. "type": "integer",
  8297. "format": "int64"
  8298. },
  8299. "x-go-name": "Labels"
  8300. },
  8301. "milestone": {
  8302. "type": "integer",
  8303. "format": "int64",
  8304. "x-go-name": "Milestone"
  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. "EditReleaseOption": {
  8318. "description": "EditReleaseOption options when editing a release",
  8319. "type": "object",
  8320. "properties": {
  8321. "body": {
  8322. "type": "string",
  8323. "x-go-name": "Note"
  8324. },
  8325. "draft": {
  8326. "type": "boolean",
  8327. "x-go-name": "IsDraft"
  8328. },
  8329. "name": {
  8330. "type": "string",
  8331. "x-go-name": "Title"
  8332. },
  8333. "prerelease": {
  8334. "type": "boolean",
  8335. "x-go-name": "IsPrerelease"
  8336. },
  8337. "tag_name": {
  8338. "type": "string",
  8339. "x-go-name": "TagName"
  8340. },
  8341. "target_commitish": {
  8342. "type": "string",
  8343. "x-go-name": "Target"
  8344. }
  8345. },
  8346. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8347. },
  8348. "EditRepoOption": {
  8349. "description": "EditRepoOption options when editing a repository's properties",
  8350. "type": "object",
  8351. "properties": {
  8352. "allow_merge_commits": {
  8353. "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`.",
  8354. "type": "boolean",
  8355. "x-go-name": "AllowMerge"
  8356. },
  8357. "allow_rebase": {
  8358. "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.",
  8359. "type": "boolean",
  8360. "x-go-name": "AllowRebase"
  8361. },
  8362. "allow_rebase_explicit": {
  8363. "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`.",
  8364. "type": "boolean",
  8365. "x-go-name": "AllowRebaseMerge"
  8366. },
  8367. "allow_squash_merge": {
  8368. "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.",
  8369. "type": "boolean",
  8370. "x-go-name": "AllowSquash"
  8371. },
  8372. "archived": {
  8373. "description": "set to `true` to archive this repository.",
  8374. "type": "boolean",
  8375. "x-go-name": "Archived"
  8376. },
  8377. "default_branch": {
  8378. "description": "sets the default branch for this repository.",
  8379. "type": "string",
  8380. "x-go-name": "DefaultBranch"
  8381. },
  8382. "description": {
  8383. "description": "a short description of the repository.",
  8384. "type": "string",
  8385. "x-go-name": "Description"
  8386. },
  8387. "has_issues": {
  8388. "description": "either `true` to enable issues for this repository or `false` to disable them.",
  8389. "type": "boolean",
  8390. "x-go-name": "HasIssues"
  8391. },
  8392. "has_pull_requests": {
  8393. "description": "either `true` to allow pull requests, or `false` to prevent pull request.",
  8394. "type": "boolean",
  8395. "x-go-name": "HasPullRequests"
  8396. },
  8397. "has_wiki": {
  8398. "description": "either `true` to enable the wiki for this repository or `false` to disable it.",
  8399. "type": "boolean",
  8400. "x-go-name": "HasWiki"
  8401. },
  8402. "ignore_whitespace_conflicts": {
  8403. "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.",
  8404. "type": "boolean",
  8405. "x-go-name": "IgnoreWhitespaceConflicts"
  8406. },
  8407. "name": {
  8408. "description": "name of the repository",
  8409. "type": "string",
  8410. "uniqueItems": true,
  8411. "x-go-name": "Name"
  8412. },
  8413. "private": {
  8414. "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.",
  8415. "type": "boolean",
  8416. "x-go-name": "Private"
  8417. },
  8418. "website": {
  8419. "description": "a URL with more information about the repository.",
  8420. "type": "string",
  8421. "x-go-name": "Website"
  8422. }
  8423. },
  8424. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8425. },
  8426. "EditTeamOption": {
  8427. "description": "EditTeamOption options for editing a team",
  8428. "type": "object",
  8429. "required": [
  8430. "name"
  8431. ],
  8432. "properties": {
  8433. "description": {
  8434. "type": "string",
  8435. "x-go-name": "Description"
  8436. },
  8437. "name": {
  8438. "type": "string",
  8439. "x-go-name": "Name"
  8440. },
  8441. "permission": {
  8442. "type": "string",
  8443. "enum": [
  8444. "read",
  8445. "write",
  8446. "admin"
  8447. ],
  8448. "x-go-name": "Permission"
  8449. },
  8450. "units": {
  8451. "type": "array",
  8452. "items": {
  8453. "type": "string"
  8454. },
  8455. "x-go-name": "Units",
  8456. "example": [
  8457. "repo.code",
  8458. "repo.issues",
  8459. "repo.ext_issues",
  8460. "repo.wiki",
  8461. "repo.pulls",
  8462. "repo.releases",
  8463. "repo.ext_wiki"
  8464. ]
  8465. }
  8466. },
  8467. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8468. },
  8469. "EditUserOption": {
  8470. "description": "EditUserOption edit user options",
  8471. "type": "object",
  8472. "required": [
  8473. "email"
  8474. ],
  8475. "properties": {
  8476. "active": {
  8477. "type": "boolean",
  8478. "x-go-name": "Active"
  8479. },
  8480. "admin": {
  8481. "type": "boolean",
  8482. "x-go-name": "Admin"
  8483. },
  8484. "allow_create_organization": {
  8485. "type": "boolean",
  8486. "x-go-name": "AllowCreateOrganization"
  8487. },
  8488. "allow_git_hook": {
  8489. "type": "boolean",
  8490. "x-go-name": "AllowGitHook"
  8491. },
  8492. "allow_import_local": {
  8493. "type": "boolean",
  8494. "x-go-name": "AllowImportLocal"
  8495. },
  8496. "email": {
  8497. "type": "string",
  8498. "format": "email",
  8499. "x-go-name": "Email"
  8500. },
  8501. "full_name": {
  8502. "type": "string",
  8503. "x-go-name": "FullName"
  8504. },
  8505. "location": {
  8506. "type": "string",
  8507. "x-go-name": "Location"
  8508. },
  8509. "login_name": {
  8510. "type": "string",
  8511. "x-go-name": "LoginName"
  8512. },
  8513. "max_repo_creation": {
  8514. "type": "integer",
  8515. "format": "int64",
  8516. "x-go-name": "MaxRepoCreation"
  8517. },
  8518. "must_change_password": {
  8519. "type": "boolean",
  8520. "x-go-name": "MustChangePassword"
  8521. },
  8522. "password": {
  8523. "type": "string",
  8524. "x-go-name": "Password"
  8525. },
  8526. "prohibit_login": {
  8527. "type": "boolean",
  8528. "x-go-name": "ProhibitLogin"
  8529. },
  8530. "source_id": {
  8531. "type": "integer",
  8532. "format": "int64",
  8533. "x-go-name": "SourceID"
  8534. },
  8535. "website": {
  8536. "type": "string",
  8537. "x-go-name": "Website"
  8538. }
  8539. },
  8540. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8541. },
  8542. "Email": {
  8543. "description": "Email an email address belonging to a user",
  8544. "type": "object",
  8545. "properties": {
  8546. "email": {
  8547. "type": "string",
  8548. "format": "email",
  8549. "x-go-name": "Email"
  8550. },
  8551. "primary": {
  8552. "type": "boolean",
  8553. "x-go-name": "Primary"
  8554. },
  8555. "verified": {
  8556. "type": "boolean",
  8557. "x-go-name": "Verified"
  8558. }
  8559. },
  8560. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8561. },
  8562. "FileCommitResponse": {
  8563. "type": "object",
  8564. "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.",
  8565. "properties": {
  8566. "author": {
  8567. "$ref": "#/definitions/CommitUser"
  8568. },
  8569. "committer": {
  8570. "$ref": "#/definitions/CommitUser"
  8571. },
  8572. "html_url": {
  8573. "type": "string",
  8574. "x-go-name": "HTMLURL"
  8575. },
  8576. "message": {
  8577. "type": "string",
  8578. "x-go-name": "Message"
  8579. },
  8580. "parents": {
  8581. "type": "array",
  8582. "items": {
  8583. "$ref": "#/definitions/CommitMeta"
  8584. },
  8585. "x-go-name": "Parents"
  8586. },
  8587. "sha": {
  8588. "type": "string",
  8589. "x-go-name": "SHA"
  8590. },
  8591. "tree": {
  8592. "$ref": "#/definitions/CommitMeta"
  8593. },
  8594. "url": {
  8595. "type": "string",
  8596. "x-go-name": "URL"
  8597. }
  8598. },
  8599. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8600. },
  8601. "FileDeleteResponse": {
  8602. "description": "FileDeleteResponse contains information about a repo's file that was deleted",
  8603. "type": "object",
  8604. "properties": {
  8605. "commit": {
  8606. "$ref": "#/definitions/FileCommitResponse"
  8607. },
  8608. "content": {
  8609. "type": "object",
  8610. "x-go-name": "Content"
  8611. },
  8612. "verification": {
  8613. "$ref": "#/definitions/PayloadCommitVerification"
  8614. }
  8615. },
  8616. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8617. },
  8618. "FileLinksResponse": {
  8619. "description": "FileLinksResponse contains the links for a repo's file",
  8620. "type": "object",
  8621. "properties": {
  8622. "git": {
  8623. "type": "string",
  8624. "x-go-name": "GitURL"
  8625. },
  8626. "html": {
  8627. "type": "string",
  8628. "x-go-name": "HTMLURL"
  8629. },
  8630. "self": {
  8631. "type": "string",
  8632. "x-go-name": "Self"
  8633. }
  8634. },
  8635. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8636. },
  8637. "FileResponse": {
  8638. "description": "FileResponse contains information about a repo's file",
  8639. "type": "object",
  8640. "properties": {
  8641. "commit": {
  8642. "$ref": "#/definitions/FileCommitResponse"
  8643. },
  8644. "content": {
  8645. "$ref": "#/definitions/ContentsResponse"
  8646. },
  8647. "verification": {
  8648. "$ref": "#/definitions/PayloadCommitVerification"
  8649. }
  8650. },
  8651. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8652. },
  8653. "GPGKey": {
  8654. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  8655. "type": "object",
  8656. "properties": {
  8657. "can_certify": {
  8658. "type": "boolean",
  8659. "x-go-name": "CanCertify"
  8660. },
  8661. "can_encrypt_comms": {
  8662. "type": "boolean",
  8663. "x-go-name": "CanEncryptComms"
  8664. },
  8665. "can_encrypt_storage": {
  8666. "type": "boolean",
  8667. "x-go-name": "CanEncryptStorage"
  8668. },
  8669. "can_sign": {
  8670. "type": "boolean",
  8671. "x-go-name": "CanSign"
  8672. },
  8673. "created_at": {
  8674. "type": "string",
  8675. "format": "date-time",
  8676. "x-go-name": "Created"
  8677. },
  8678. "emails": {
  8679. "type": "array",
  8680. "items": {
  8681. "$ref": "#/definitions/GPGKeyEmail"
  8682. },
  8683. "x-go-name": "Emails"
  8684. },
  8685. "expires_at": {
  8686. "type": "string",
  8687. "format": "date-time",
  8688. "x-go-name": "Expires"
  8689. },
  8690. "id": {
  8691. "type": "integer",
  8692. "format": "int64",
  8693. "x-go-name": "ID"
  8694. },
  8695. "key_id": {
  8696. "type": "string",
  8697. "x-go-name": "KeyID"
  8698. },
  8699. "primary_key_id": {
  8700. "type": "string",
  8701. "x-go-name": "PrimaryKeyID"
  8702. },
  8703. "public_key": {
  8704. "type": "string",
  8705. "x-go-name": "PublicKey"
  8706. },
  8707. "subkeys": {
  8708. "type": "array",
  8709. "items": {
  8710. "$ref": "#/definitions/GPGKey"
  8711. },
  8712. "x-go-name": "SubsKey"
  8713. }
  8714. },
  8715. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8716. },
  8717. "GPGKeyEmail": {
  8718. "description": "GPGKeyEmail an email attached to a GPGKey",
  8719. "type": "object",
  8720. "properties": {
  8721. "email": {
  8722. "type": "string",
  8723. "x-go-name": "Email"
  8724. },
  8725. "verified": {
  8726. "type": "boolean",
  8727. "x-go-name": "Verified"
  8728. }
  8729. },
  8730. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8731. },
  8732. "GitBlobResponse": {
  8733. "description": "GitBlobResponse represents a git blob",
  8734. "type": "object",
  8735. "properties": {
  8736. "content": {
  8737. "type": "string",
  8738. "x-go-name": "Content"
  8739. },
  8740. "encoding": {
  8741. "type": "string",
  8742. "x-go-name": "Encoding"
  8743. },
  8744. "sha": {
  8745. "type": "string",
  8746. "x-go-name": "SHA"
  8747. },
  8748. "size": {
  8749. "type": "integer",
  8750. "format": "int64",
  8751. "x-go-name": "Size"
  8752. },
  8753. "url": {
  8754. "type": "string",
  8755. "x-go-name": "URL"
  8756. }
  8757. },
  8758. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8759. },
  8760. "GitEntry": {
  8761. "description": "GitEntry represents a git tree",
  8762. "type": "object",
  8763. "properties": {
  8764. "mode": {
  8765. "type": "string",
  8766. "x-go-name": "Mode"
  8767. },
  8768. "path": {
  8769. "type": "string",
  8770. "x-go-name": "Path"
  8771. },
  8772. "sha": {
  8773. "type": "string",
  8774. "x-go-name": "SHA"
  8775. },
  8776. "size": {
  8777. "type": "integer",
  8778. "format": "int64",
  8779. "x-go-name": "Size"
  8780. },
  8781. "type": {
  8782. "type": "string",
  8783. "x-go-name": "Type"
  8784. },
  8785. "url": {
  8786. "type": "string",
  8787. "x-go-name": "URL"
  8788. }
  8789. },
  8790. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8791. },
  8792. "GitHook": {
  8793. "description": "GitHook represents a Git repository hook",
  8794. "type": "object",
  8795. "properties": {
  8796. "content": {
  8797. "type": "string",
  8798. "x-go-name": "Content"
  8799. },
  8800. "is_active": {
  8801. "type": "boolean",
  8802. "x-go-name": "IsActive"
  8803. },
  8804. "name": {
  8805. "type": "string",
  8806. "x-go-name": "Name"
  8807. }
  8808. },
  8809. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8810. },
  8811. "GitObject": {
  8812. "type": "object",
  8813. "title": "GitObject represents a Git object.",
  8814. "properties": {
  8815. "sha": {
  8816. "type": "string",
  8817. "x-go-name": "SHA"
  8818. },
  8819. "type": {
  8820. "type": "string",
  8821. "x-go-name": "Type"
  8822. },
  8823. "url": {
  8824. "type": "string",
  8825. "x-go-name": "URL"
  8826. }
  8827. },
  8828. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8829. },
  8830. "GitTreeResponse": {
  8831. "description": "GitTreeResponse returns a git tree",
  8832. "type": "object",
  8833. "properties": {
  8834. "page": {
  8835. "type": "integer",
  8836. "format": "int64",
  8837. "x-go-name": "Page"
  8838. },
  8839. "sha": {
  8840. "type": "string",
  8841. "x-go-name": "SHA"
  8842. },
  8843. "total_count": {
  8844. "type": "integer",
  8845. "format": "int64",
  8846. "x-go-name": "TotalCount"
  8847. },
  8848. "tree": {
  8849. "type": "array",
  8850. "items": {
  8851. "$ref": "#/definitions/GitEntry"
  8852. },
  8853. "x-go-name": "Entries"
  8854. },
  8855. "truncated": {
  8856. "type": "boolean",
  8857. "x-go-name": "Truncated"
  8858. },
  8859. "url": {
  8860. "type": "string",
  8861. "x-go-name": "URL"
  8862. }
  8863. },
  8864. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8865. },
  8866. "Hook": {
  8867. "description": "Hook a hook is a web hook when one repository changed",
  8868. "type": "object",
  8869. "properties": {
  8870. "active": {
  8871. "type": "boolean",
  8872. "x-go-name": "Active"
  8873. },
  8874. "config": {
  8875. "type": "object",
  8876. "additionalProperties": {
  8877. "type": "string"
  8878. },
  8879. "x-go-name": "Config"
  8880. },
  8881. "created_at": {
  8882. "type": "string",
  8883. "format": "date-time",
  8884. "x-go-name": "Created"
  8885. },
  8886. "events": {
  8887. "type": "array",
  8888. "items": {
  8889. "type": "string"
  8890. },
  8891. "x-go-name": "Events"
  8892. },
  8893. "id": {
  8894. "type": "integer",
  8895. "format": "int64",
  8896. "x-go-name": "ID"
  8897. },
  8898. "type": {
  8899. "type": "string",
  8900. "x-go-name": "Type"
  8901. },
  8902. "updated_at": {
  8903. "type": "string",
  8904. "format": "date-time",
  8905. "x-go-name": "Updated"
  8906. }
  8907. },
  8908. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8909. },
  8910. "Identity": {
  8911. "description": "Identity for a person's identity like an author or committer",
  8912. "type": "object",
  8913. "properties": {
  8914. "email": {
  8915. "type": "string",
  8916. "format": "email",
  8917. "x-go-name": "Email"
  8918. },
  8919. "name": {
  8920. "type": "string",
  8921. "x-go-name": "Name"
  8922. }
  8923. },
  8924. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8925. },
  8926. "Issue": {
  8927. "description": "Issue represents an issue in a repository",
  8928. "type": "object",
  8929. "properties": {
  8930. "assignee": {
  8931. "$ref": "#/definitions/User"
  8932. },
  8933. "assignees": {
  8934. "type": "array",
  8935. "items": {
  8936. "$ref": "#/definitions/User"
  8937. },
  8938. "x-go-name": "Assignees"
  8939. },
  8940. "body": {
  8941. "type": "string",
  8942. "x-go-name": "Body"
  8943. },
  8944. "closed_at": {
  8945. "type": "string",
  8946. "format": "date-time",
  8947. "x-go-name": "Closed"
  8948. },
  8949. "comments": {
  8950. "type": "integer",
  8951. "format": "int64",
  8952. "x-go-name": "Comments"
  8953. },
  8954. "created_at": {
  8955. "type": "string",
  8956. "format": "date-time",
  8957. "x-go-name": "Created"
  8958. },
  8959. "due_date": {
  8960. "type": "string",
  8961. "format": "date-time",
  8962. "x-go-name": "Deadline"
  8963. },
  8964. "id": {
  8965. "type": "integer",
  8966. "format": "int64",
  8967. "x-go-name": "ID"
  8968. },
  8969. "labels": {
  8970. "type": "array",
  8971. "items": {
  8972. "$ref": "#/definitions/Label"
  8973. },
  8974. "x-go-name": "Labels"
  8975. },
  8976. "milestone": {
  8977. "$ref": "#/definitions/Milestone"
  8978. },
  8979. "number": {
  8980. "type": "integer",
  8981. "format": "int64",
  8982. "x-go-name": "Index"
  8983. },
  8984. "original_author": {
  8985. "type": "string",
  8986. "x-go-name": "OriginalAuthor"
  8987. },
  8988. "original_author_id": {
  8989. "type": "integer",
  8990. "format": "int64",
  8991. "x-go-name": "OriginalAuthorID"
  8992. },
  8993. "pull_request": {
  8994. "$ref": "#/definitions/PullRequestMeta"
  8995. },
  8996. "state": {
  8997. "$ref": "#/definitions/StateType"
  8998. },
  8999. "title": {
  9000. "type": "string",
  9001. "x-go-name": "Title"
  9002. },
  9003. "updated_at": {
  9004. "type": "string",
  9005. "format": "date-time",
  9006. "x-go-name": "Updated"
  9007. },
  9008. "url": {
  9009. "type": "string",
  9010. "x-go-name": "URL"
  9011. },
  9012. "user": {
  9013. "$ref": "#/definitions/User"
  9014. }
  9015. },
  9016. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9017. },
  9018. "IssueDeadline": {
  9019. "description": "IssueDeadline represents an issue deadline",
  9020. "type": "object",
  9021. "properties": {
  9022. "due_date": {
  9023. "type": "string",
  9024. "format": "date-time",
  9025. "x-go-name": "Deadline"
  9026. }
  9027. },
  9028. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9029. },
  9030. "IssueLabelsOption": {
  9031. "description": "IssueLabelsOption a collection of labels",
  9032. "type": "object",
  9033. "properties": {
  9034. "labels": {
  9035. "description": "list of label IDs",
  9036. "type": "array",
  9037. "items": {
  9038. "type": "integer",
  9039. "format": "int64"
  9040. },
  9041. "x-go-name": "Labels"
  9042. }
  9043. },
  9044. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9045. },
  9046. "Label": {
  9047. "description": "Label a label to an issue or a pr",
  9048. "type": "object",
  9049. "properties": {
  9050. "color": {
  9051. "type": "string",
  9052. "x-go-name": "Color",
  9053. "example": "00aabb"
  9054. },
  9055. "description": {
  9056. "type": "string",
  9057. "x-go-name": "Description"
  9058. },
  9059. "id": {
  9060. "type": "integer",
  9061. "format": "int64",
  9062. "x-go-name": "ID"
  9063. },
  9064. "name": {
  9065. "type": "string",
  9066. "x-go-name": "Name"
  9067. },
  9068. "url": {
  9069. "type": "string",
  9070. "x-go-name": "URL"
  9071. }
  9072. },
  9073. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9074. },
  9075. "MarkdownOption": {
  9076. "description": "MarkdownOption markdown options",
  9077. "type": "object",
  9078. "properties": {
  9079. "Context": {
  9080. "description": "Context to render\n\nin: body",
  9081. "type": "string"
  9082. },
  9083. "Mode": {
  9084. "description": "Mode to render\n\nin: body",
  9085. "type": "string"
  9086. },
  9087. "Text": {
  9088. "description": "Text markdown to render\n\nin: body",
  9089. "type": "string"
  9090. },
  9091. "Wiki": {
  9092. "description": "Is it a wiki page ?\n\nin: body",
  9093. "type": "boolean"
  9094. }
  9095. },
  9096. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9097. },
  9098. "MergePullRequestOption": {
  9099. "description": "MergePullRequestForm form for merging Pull Request",
  9100. "type": "object",
  9101. "required": [
  9102. "Do"
  9103. ],
  9104. "properties": {
  9105. "Do": {
  9106. "type": "string",
  9107. "enum": [
  9108. "merge",
  9109. "rebase",
  9110. "rebase-merge",
  9111. "squash"
  9112. ]
  9113. },
  9114. "MergeMessageField": {
  9115. "type": "string"
  9116. },
  9117. "MergeTitleField": {
  9118. "type": "string"
  9119. }
  9120. },
  9121. "x-go-name": "MergePullRequestForm",
  9122. "x-go-package": "code.gitea.io/gitea/modules/auth"
  9123. },
  9124. "MigrateRepoForm": {
  9125. "description": "MigrateRepoForm form for migrating repository",
  9126. "type": "object",
  9127. "required": [
  9128. "clone_addr",
  9129. "uid",
  9130. "repo_name"
  9131. ],
  9132. "properties": {
  9133. "auth_password": {
  9134. "type": "string",
  9135. "x-go-name": "AuthPassword"
  9136. },
  9137. "auth_username": {
  9138. "type": "string",
  9139. "x-go-name": "AuthUsername"
  9140. },
  9141. "clone_addr": {
  9142. "type": "string",
  9143. "x-go-name": "CloneAddr"
  9144. },
  9145. "description": {
  9146. "type": "string",
  9147. "x-go-name": "Description"
  9148. },
  9149. "issues": {
  9150. "type": "boolean",
  9151. "x-go-name": "Issues"
  9152. },
  9153. "labels": {
  9154. "type": "boolean",
  9155. "x-go-name": "Labels"
  9156. },
  9157. "milestones": {
  9158. "type": "boolean",
  9159. "x-go-name": "Milestones"
  9160. },
  9161. "mirror": {
  9162. "type": "boolean",
  9163. "x-go-name": "Mirror"
  9164. },
  9165. "private": {
  9166. "type": "boolean",
  9167. "x-go-name": "Private"
  9168. },
  9169. "pull_requests": {
  9170. "type": "boolean",
  9171. "x-go-name": "PullRequests"
  9172. },
  9173. "releases": {
  9174. "type": "boolean",
  9175. "x-go-name": "Releases"
  9176. },
  9177. "repo_name": {
  9178. "type": "string",
  9179. "x-go-name": "RepoName"
  9180. },
  9181. "uid": {
  9182. "type": "integer",
  9183. "format": "int64",
  9184. "x-go-name": "UID"
  9185. },
  9186. "wiki": {
  9187. "type": "boolean",
  9188. "x-go-name": "Wiki"
  9189. }
  9190. },
  9191. "x-go-package": "code.gitea.io/gitea/modules/auth"
  9192. },
  9193. "Milestone": {
  9194. "description": "Milestone milestone is a collection of issues on one repository",
  9195. "type": "object",
  9196. "properties": {
  9197. "closed_at": {
  9198. "type": "string",
  9199. "format": "date-time",
  9200. "x-go-name": "Closed"
  9201. },
  9202. "closed_issues": {
  9203. "type": "integer",
  9204. "format": "int64",
  9205. "x-go-name": "ClosedIssues"
  9206. },
  9207. "description": {
  9208. "type": "string",
  9209. "x-go-name": "Description"
  9210. },
  9211. "due_on": {
  9212. "type": "string",
  9213. "format": "date-time",
  9214. "x-go-name": "Deadline"
  9215. },
  9216. "id": {
  9217. "type": "integer",
  9218. "format": "int64",
  9219. "x-go-name": "ID"
  9220. },
  9221. "open_issues": {
  9222. "type": "integer",
  9223. "format": "int64",
  9224. "x-go-name": "OpenIssues"
  9225. },
  9226. "state": {
  9227. "$ref": "#/definitions/StateType"
  9228. },
  9229. "title": {
  9230. "type": "string",
  9231. "x-go-name": "Title"
  9232. }
  9233. },
  9234. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9235. },
  9236. "Organization": {
  9237. "description": "Organization represents an organization",
  9238. "type": "object",
  9239. "properties": {
  9240. "avatar_url": {
  9241. "type": "string",
  9242. "x-go-name": "AvatarURL"
  9243. },
  9244. "description": {
  9245. "type": "string",
  9246. "x-go-name": "Description"
  9247. },
  9248. "full_name": {
  9249. "type": "string",
  9250. "x-go-name": "FullName"
  9251. },
  9252. "id": {
  9253. "type": "integer",
  9254. "format": "int64",
  9255. "x-go-name": "ID"
  9256. },
  9257. "location": {
  9258. "type": "string",
  9259. "x-go-name": "Location"
  9260. },
  9261. "username": {
  9262. "type": "string",
  9263. "x-go-name": "UserName"
  9264. },
  9265. "visibility": {
  9266. "type": "string",
  9267. "x-go-name": "Visibility"
  9268. },
  9269. "website": {
  9270. "type": "string",
  9271. "x-go-name": "Website"
  9272. }
  9273. },
  9274. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9275. },
  9276. "PRBranchInfo": {
  9277. "description": "PRBranchInfo information about a branch",
  9278. "type": "object",
  9279. "properties": {
  9280. "label": {
  9281. "type": "string",
  9282. "x-go-name": "Name"
  9283. },
  9284. "ref": {
  9285. "type": "string",
  9286. "x-go-name": "Ref"
  9287. },
  9288. "repo": {
  9289. "$ref": "#/definitions/Repository"
  9290. },
  9291. "repo_id": {
  9292. "type": "integer",
  9293. "format": "int64",
  9294. "x-go-name": "RepoID"
  9295. },
  9296. "sha": {
  9297. "type": "string",
  9298. "x-go-name": "Sha"
  9299. }
  9300. },
  9301. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9302. },
  9303. "PayloadCommit": {
  9304. "description": "PayloadCommit represents a commit",
  9305. "type": "object",
  9306. "properties": {
  9307. "added": {
  9308. "type": "array",
  9309. "items": {
  9310. "type": "string"
  9311. },
  9312. "x-go-name": "Added"
  9313. },
  9314. "author": {
  9315. "$ref": "#/definitions/PayloadUser"
  9316. },
  9317. "committer": {
  9318. "$ref": "#/definitions/PayloadUser"
  9319. },
  9320. "id": {
  9321. "description": "sha1 hash of the commit",
  9322. "type": "string",
  9323. "x-go-name": "ID"
  9324. },
  9325. "message": {
  9326. "type": "string",
  9327. "x-go-name": "Message"
  9328. },
  9329. "modified": {
  9330. "type": "array",
  9331. "items": {
  9332. "type": "string"
  9333. },
  9334. "x-go-name": "Modified"
  9335. },
  9336. "removed": {
  9337. "type": "array",
  9338. "items": {
  9339. "type": "string"
  9340. },
  9341. "x-go-name": "Removed"
  9342. },
  9343. "timestamp": {
  9344. "type": "string",
  9345. "format": "date-time",
  9346. "x-go-name": "Timestamp"
  9347. },
  9348. "url": {
  9349. "type": "string",
  9350. "x-go-name": "URL"
  9351. },
  9352. "verification": {
  9353. "$ref": "#/definitions/PayloadCommitVerification"
  9354. }
  9355. },
  9356. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9357. },
  9358. "PayloadCommitVerification": {
  9359. "description": "PayloadCommitVerification represents the GPG verification of a commit",
  9360. "type": "object",
  9361. "properties": {
  9362. "payload": {
  9363. "type": "string",
  9364. "x-go-name": "Payload"
  9365. },
  9366. "reason": {
  9367. "type": "string",
  9368. "x-go-name": "Reason"
  9369. },
  9370. "signature": {
  9371. "type": "string",
  9372. "x-go-name": "Signature"
  9373. },
  9374. "verified": {
  9375. "type": "boolean",
  9376. "x-go-name": "Verified"
  9377. }
  9378. },
  9379. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9380. },
  9381. "PayloadUser": {
  9382. "description": "PayloadUser represents the author or committer of a commit",
  9383. "type": "object",
  9384. "properties": {
  9385. "email": {
  9386. "type": "string",
  9387. "format": "email",
  9388. "x-go-name": "Email"
  9389. },
  9390. "name": {
  9391. "description": "Full name of the commit author",
  9392. "type": "string",
  9393. "x-go-name": "Name"
  9394. },
  9395. "username": {
  9396. "type": "string",
  9397. "x-go-name": "UserName"
  9398. }
  9399. },
  9400. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9401. },
  9402. "Permission": {
  9403. "description": "Permission represents a set of permissions",
  9404. "type": "object",
  9405. "properties": {
  9406. "admin": {
  9407. "type": "boolean",
  9408. "x-go-name": "Admin"
  9409. },
  9410. "pull": {
  9411. "type": "boolean",
  9412. "x-go-name": "Pull"
  9413. },
  9414. "push": {
  9415. "type": "boolean",
  9416. "x-go-name": "Push"
  9417. }
  9418. },
  9419. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9420. },
  9421. "PublicKey": {
  9422. "description": "PublicKey publickey is a user key to push code to repository",
  9423. "type": "object",
  9424. "properties": {
  9425. "created_at": {
  9426. "type": "string",
  9427. "format": "date-time",
  9428. "x-go-name": "Created"
  9429. },
  9430. "fingerprint": {
  9431. "type": "string",
  9432. "x-go-name": "Fingerprint"
  9433. },
  9434. "id": {
  9435. "type": "integer",
  9436. "format": "int64",
  9437. "x-go-name": "ID"
  9438. },
  9439. "key": {
  9440. "type": "string",
  9441. "x-go-name": "Key"
  9442. },
  9443. "key_type": {
  9444. "type": "string",
  9445. "x-go-name": "KeyType"
  9446. },
  9447. "read_only": {
  9448. "type": "boolean",
  9449. "x-go-name": "ReadOnly"
  9450. },
  9451. "title": {
  9452. "type": "string",
  9453. "x-go-name": "Title"
  9454. },
  9455. "url": {
  9456. "type": "string",
  9457. "x-go-name": "URL"
  9458. },
  9459. "user": {
  9460. "$ref": "#/definitions/User"
  9461. }
  9462. },
  9463. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9464. },
  9465. "PullRequest": {
  9466. "description": "PullRequest represents a pull request",
  9467. "type": "object",
  9468. "properties": {
  9469. "assignee": {
  9470. "$ref": "#/definitions/User"
  9471. },
  9472. "assignees": {
  9473. "type": "array",
  9474. "items": {
  9475. "$ref": "#/definitions/User"
  9476. },
  9477. "x-go-name": "Assignees"
  9478. },
  9479. "base": {
  9480. "$ref": "#/definitions/PRBranchInfo"
  9481. },
  9482. "body": {
  9483. "type": "string",
  9484. "x-go-name": "Body"
  9485. },
  9486. "closed_at": {
  9487. "type": "string",
  9488. "format": "date-time",
  9489. "x-go-name": "Closed"
  9490. },
  9491. "comments": {
  9492. "type": "integer",
  9493. "format": "int64",
  9494. "x-go-name": "Comments"
  9495. },
  9496. "created_at": {
  9497. "type": "string",
  9498. "format": "date-time",
  9499. "x-go-name": "Created"
  9500. },
  9501. "diff_url": {
  9502. "type": "string",
  9503. "x-go-name": "DiffURL"
  9504. },
  9505. "due_date": {
  9506. "type": "string",
  9507. "format": "date-time",
  9508. "x-go-name": "Deadline"
  9509. },
  9510. "head": {
  9511. "$ref": "#/definitions/PRBranchInfo"
  9512. },
  9513. "html_url": {
  9514. "type": "string",
  9515. "x-go-name": "HTMLURL"
  9516. },
  9517. "id": {
  9518. "type": "integer",
  9519. "format": "int64",
  9520. "x-go-name": "ID"
  9521. },
  9522. "labels": {
  9523. "type": "array",
  9524. "items": {
  9525. "$ref": "#/definitions/Label"
  9526. },
  9527. "x-go-name": "Labels"
  9528. },
  9529. "merge_base": {
  9530. "type": "string",
  9531. "x-go-name": "MergeBase"
  9532. },
  9533. "merge_commit_sha": {
  9534. "type": "string",
  9535. "x-go-name": "MergedCommitID"
  9536. },
  9537. "mergeable": {
  9538. "type": "boolean",
  9539. "x-go-name": "Mergeable"
  9540. },
  9541. "merged": {
  9542. "type": "boolean",
  9543. "x-go-name": "HasMerged"
  9544. },
  9545. "merged_at": {
  9546. "type": "string",
  9547. "format": "date-time",
  9548. "x-go-name": "Merged"
  9549. },
  9550. "merged_by": {
  9551. "$ref": "#/definitions/User"
  9552. },
  9553. "milestone": {
  9554. "$ref": "#/definitions/Milestone"
  9555. },
  9556. "number": {
  9557. "type": "integer",
  9558. "format": "int64",
  9559. "x-go-name": "Index"
  9560. },
  9561. "patch_url": {
  9562. "type": "string",
  9563. "x-go-name": "PatchURL"
  9564. },
  9565. "state": {
  9566. "$ref": "#/definitions/StateType"
  9567. },
  9568. "title": {
  9569. "type": "string",
  9570. "x-go-name": "Title"
  9571. },
  9572. "updated_at": {
  9573. "type": "string",
  9574. "format": "date-time",
  9575. "x-go-name": "Updated"
  9576. },
  9577. "url": {
  9578. "type": "string",
  9579. "x-go-name": "URL"
  9580. },
  9581. "user": {
  9582. "$ref": "#/definitions/User"
  9583. }
  9584. },
  9585. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9586. },
  9587. "PullRequestMeta": {
  9588. "description": "PullRequestMeta PR info if an issue is a PR",
  9589. "type": "object",
  9590. "properties": {
  9591. "merged": {
  9592. "type": "boolean",
  9593. "x-go-name": "HasMerged"
  9594. },
  9595. "merged_at": {
  9596. "type": "string",
  9597. "format": "date-time",
  9598. "x-go-name": "Merged"
  9599. }
  9600. },
  9601. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9602. },
  9603. "Reference": {
  9604. "type": "object",
  9605. "title": "Reference represents a Git reference.",
  9606. "properties": {
  9607. "object": {
  9608. "$ref": "#/definitions/GitObject"
  9609. },
  9610. "ref": {
  9611. "type": "string",
  9612. "x-go-name": "Ref"
  9613. },
  9614. "url": {
  9615. "type": "string",
  9616. "x-go-name": "URL"
  9617. }
  9618. },
  9619. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9620. },
  9621. "Release": {
  9622. "description": "Release represents a repository release",
  9623. "type": "object",
  9624. "properties": {
  9625. "assets": {
  9626. "type": "array",
  9627. "items": {
  9628. "$ref": "#/definitions/Attachment"
  9629. },
  9630. "x-go-name": "Attachments"
  9631. },
  9632. "author": {
  9633. "$ref": "#/definitions/User"
  9634. },
  9635. "body": {
  9636. "type": "string",
  9637. "x-go-name": "Note"
  9638. },
  9639. "created_at": {
  9640. "type": "string",
  9641. "format": "date-time",
  9642. "x-go-name": "CreatedAt"
  9643. },
  9644. "draft": {
  9645. "type": "boolean",
  9646. "x-go-name": "IsDraft"
  9647. },
  9648. "id": {
  9649. "type": "integer",
  9650. "format": "int64",
  9651. "x-go-name": "ID"
  9652. },
  9653. "name": {
  9654. "type": "string",
  9655. "x-go-name": "Title"
  9656. },
  9657. "prerelease": {
  9658. "type": "boolean",
  9659. "x-go-name": "IsPrerelease"
  9660. },
  9661. "published_at": {
  9662. "type": "string",
  9663. "format": "date-time",
  9664. "x-go-name": "PublishedAt"
  9665. },
  9666. "tag_name": {
  9667. "type": "string",
  9668. "x-go-name": "TagName"
  9669. },
  9670. "tarball_url": {
  9671. "type": "string",
  9672. "x-go-name": "TarURL"
  9673. },
  9674. "target_commitish": {
  9675. "type": "string",
  9676. "x-go-name": "Target"
  9677. },
  9678. "url": {
  9679. "type": "string",
  9680. "x-go-name": "URL"
  9681. },
  9682. "zipball_url": {
  9683. "type": "string",
  9684. "x-go-name": "ZipURL"
  9685. }
  9686. },
  9687. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9688. },
  9689. "RepoCommit": {
  9690. "type": "object",
  9691. "title": "RepoCommit contains information of a commit in the context of a repository.",
  9692. "properties": {
  9693. "author": {
  9694. "$ref": "#/definitions/CommitUser"
  9695. },
  9696. "committer": {
  9697. "$ref": "#/definitions/CommitUser"
  9698. },
  9699. "message": {
  9700. "type": "string",
  9701. "x-go-name": "Message"
  9702. },
  9703. "tree": {
  9704. "$ref": "#/definitions/CommitMeta"
  9705. },
  9706. "url": {
  9707. "type": "string",
  9708. "x-go-name": "URL"
  9709. }
  9710. },
  9711. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9712. },
  9713. "RepoTopicOptions": {
  9714. "description": "RepoTopicOptions a collection of repo topic names",
  9715. "type": "object",
  9716. "properties": {
  9717. "topics": {
  9718. "description": "list of topic names",
  9719. "type": "array",
  9720. "items": {
  9721. "type": "string"
  9722. },
  9723. "x-go-name": "Topics"
  9724. }
  9725. },
  9726. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9727. },
  9728. "Repository": {
  9729. "description": "Repository represents a repository",
  9730. "type": "object",
  9731. "properties": {
  9732. "allow_merge_commits": {
  9733. "type": "boolean",
  9734. "x-go-name": "AllowMerge"
  9735. },
  9736. "allow_rebase": {
  9737. "type": "boolean",
  9738. "x-go-name": "AllowRebase"
  9739. },
  9740. "allow_rebase_explicit": {
  9741. "type": "boolean",
  9742. "x-go-name": "AllowRebaseMerge"
  9743. },
  9744. "allow_squash_merge": {
  9745. "type": "boolean",
  9746. "x-go-name": "AllowSquash"
  9747. },
  9748. "archived": {
  9749. "type": "boolean",
  9750. "x-go-name": "Archived"
  9751. },
  9752. "avatar_url": {
  9753. "type": "string",
  9754. "x-go-name": "AvatarURL"
  9755. },
  9756. "clone_url": {
  9757. "type": "string",
  9758. "x-go-name": "CloneURL"
  9759. },
  9760. "created_at": {
  9761. "type": "string",
  9762. "format": "date-time",
  9763. "x-go-name": "Created"
  9764. },
  9765. "default_branch": {
  9766. "type": "string",
  9767. "x-go-name": "DefaultBranch"
  9768. },
  9769. "description": {
  9770. "type": "string",
  9771. "x-go-name": "Description"
  9772. },
  9773. "empty": {
  9774. "type": "boolean",
  9775. "x-go-name": "Empty"
  9776. },
  9777. "fork": {
  9778. "type": "boolean",
  9779. "x-go-name": "Fork"
  9780. },
  9781. "forks_count": {
  9782. "type": "integer",
  9783. "format": "int64",
  9784. "x-go-name": "Forks"
  9785. },
  9786. "full_name": {
  9787. "type": "string",
  9788. "x-go-name": "FullName"
  9789. },
  9790. "has_issues": {
  9791. "type": "boolean",
  9792. "x-go-name": "HasIssues"
  9793. },
  9794. "has_pull_requests": {
  9795. "type": "boolean",
  9796. "x-go-name": "HasPullRequests"
  9797. },
  9798. "has_wiki": {
  9799. "type": "boolean",
  9800. "x-go-name": "HasWiki"
  9801. },
  9802. "html_url": {
  9803. "type": "string",
  9804. "x-go-name": "HTMLURL"
  9805. },
  9806. "id": {
  9807. "type": "integer",
  9808. "format": "int64",
  9809. "x-go-name": "ID"
  9810. },
  9811. "ignore_whitespace_conflicts": {
  9812. "type": "boolean",
  9813. "x-go-name": "IgnoreWhitespaceConflicts"
  9814. },
  9815. "mirror": {
  9816. "type": "boolean",
  9817. "x-go-name": "Mirror"
  9818. },
  9819. "name": {
  9820. "type": "string",
  9821. "x-go-name": "Name"
  9822. },
  9823. "open_issues_count": {
  9824. "type": "integer",
  9825. "format": "int64",
  9826. "x-go-name": "OpenIssues"
  9827. },
  9828. "original_url": {
  9829. "type": "string",
  9830. "x-go-name": "OriginalURL"
  9831. },
  9832. "owner": {
  9833. "$ref": "#/definitions/User"
  9834. },
  9835. "parent": {
  9836. "$ref": "#/definitions/Repository"
  9837. },
  9838. "permissions": {
  9839. "$ref": "#/definitions/Permission"
  9840. },
  9841. "private": {
  9842. "type": "boolean",
  9843. "x-go-name": "Private"
  9844. },
  9845. "size": {
  9846. "type": "integer",
  9847. "format": "int64",
  9848. "x-go-name": "Size"
  9849. },
  9850. "ssh_url": {
  9851. "type": "string",
  9852. "x-go-name": "SSHURL"
  9853. },
  9854. "stars_count": {
  9855. "type": "integer",
  9856. "format": "int64",
  9857. "x-go-name": "Stars"
  9858. },
  9859. "updated_at": {
  9860. "type": "string",
  9861. "format": "date-time",
  9862. "x-go-name": "Updated"
  9863. },
  9864. "watchers_count": {
  9865. "type": "integer",
  9866. "format": "int64",
  9867. "x-go-name": "Watchers"
  9868. },
  9869. "website": {
  9870. "type": "string",
  9871. "x-go-name": "Website"
  9872. }
  9873. },
  9874. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9875. },
  9876. "SearchResults": {
  9877. "description": "SearchResults results of a successful search",
  9878. "type": "object",
  9879. "properties": {
  9880. "data": {
  9881. "type": "array",
  9882. "items": {
  9883. "$ref": "#/definitions/Repository"
  9884. },
  9885. "x-go-name": "Data"
  9886. },
  9887. "ok": {
  9888. "type": "boolean",
  9889. "x-go-name": "OK"
  9890. }
  9891. },
  9892. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9893. },
  9894. "ServerVersion": {
  9895. "description": "ServerVersion wraps the version of the server",
  9896. "type": "object",
  9897. "properties": {
  9898. "version": {
  9899. "type": "string",
  9900. "x-go-name": "Version"
  9901. }
  9902. },
  9903. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9904. },
  9905. "StateType": {
  9906. "description": "StateType issue state type",
  9907. "type": "string",
  9908. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9909. },
  9910. "Status": {
  9911. "description": "Status holds a single Status of a single Commit",
  9912. "type": "object",
  9913. "properties": {
  9914. "context": {
  9915. "type": "string",
  9916. "x-go-name": "Context"
  9917. },
  9918. "created_at": {
  9919. "type": "string",
  9920. "format": "date-time",
  9921. "x-go-name": "Created"
  9922. },
  9923. "creator": {
  9924. "$ref": "#/definitions/User"
  9925. },
  9926. "description": {
  9927. "type": "string",
  9928. "x-go-name": "Description"
  9929. },
  9930. "id": {
  9931. "type": "integer",
  9932. "format": "int64",
  9933. "x-go-name": "ID"
  9934. },
  9935. "status": {
  9936. "$ref": "#/definitions/StatusState"
  9937. },
  9938. "target_url": {
  9939. "type": "string",
  9940. "x-go-name": "TargetURL"
  9941. },
  9942. "updated_at": {
  9943. "type": "string",
  9944. "format": "date-time",
  9945. "x-go-name": "Updated"
  9946. },
  9947. "url": {
  9948. "type": "string",
  9949. "x-go-name": "URL"
  9950. }
  9951. },
  9952. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9953. },
  9954. "StatusState": {
  9955. "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"",
  9956. "type": "string",
  9957. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9958. },
  9959. "Tag": {
  9960. "description": "Tag represents a repository tag",
  9961. "type": "object",
  9962. "properties": {
  9963. "commit": {
  9964. "$ref": "#/definitions/CommitMeta"
  9965. },
  9966. "id": {
  9967. "type": "string",
  9968. "x-go-name": "ID"
  9969. },
  9970. "name": {
  9971. "type": "string",
  9972. "x-go-name": "Name"
  9973. },
  9974. "tarball_url": {
  9975. "type": "string",
  9976. "x-go-name": "TarballURL"
  9977. },
  9978. "zipball_url": {
  9979. "type": "string",
  9980. "x-go-name": "ZipballURL"
  9981. }
  9982. },
  9983. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9984. },
  9985. "Team": {
  9986. "description": "Team represents a team in an organization",
  9987. "type": "object",
  9988. "properties": {
  9989. "description": {
  9990. "type": "string",
  9991. "x-go-name": "Description"
  9992. },
  9993. "id": {
  9994. "type": "integer",
  9995. "format": "int64",
  9996. "x-go-name": "ID"
  9997. },
  9998. "name": {
  9999. "type": "string",
  10000. "x-go-name": "Name"
  10001. },
  10002. "organization": {
  10003. "$ref": "#/definitions/Organization"
  10004. },
  10005. "permission": {
  10006. "type": "string",
  10007. "enum": [
  10008. "none",
  10009. "read",
  10010. "write",
  10011. "admin",
  10012. "owner"
  10013. ],
  10014. "x-go-name": "Permission"
  10015. },
  10016. "units": {
  10017. "type": "array",
  10018. "items": {
  10019. "type": "string"
  10020. },
  10021. "x-go-name": "Units",
  10022. "example": [
  10023. "repo.code",
  10024. "repo.issues",
  10025. "repo.ext_issues",
  10026. "repo.wiki",
  10027. "repo.pulls",
  10028. "repo.releases",
  10029. "repo.ext_wiki"
  10030. ]
  10031. }
  10032. },
  10033. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10034. },
  10035. "TimeStamp": {
  10036. "description": "TimeStamp defines a timestamp",
  10037. "type": "integer",
  10038. "format": "int64",
  10039. "x-go-package": "code.gitea.io/gitea/modules/timeutil"
  10040. },
  10041. "TopicName": {
  10042. "description": "TopicName a list of repo topic names",
  10043. "type": "object",
  10044. "properties": {
  10045. "topics": {
  10046. "type": "array",
  10047. "items": {
  10048. "type": "string"
  10049. },
  10050. "x-go-name": "TopicNames"
  10051. }
  10052. },
  10053. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10054. },
  10055. "TopicResponse": {
  10056. "description": "TopicResponse for returning topics",
  10057. "type": "object",
  10058. "properties": {
  10059. "created": {
  10060. "type": "string",
  10061. "format": "date-time",
  10062. "x-go-name": "Created"
  10063. },
  10064. "id": {
  10065. "type": "integer",
  10066. "format": "int64",
  10067. "x-go-name": "ID"
  10068. },
  10069. "repo_count": {
  10070. "type": "integer",
  10071. "format": "int64",
  10072. "x-go-name": "RepoCount"
  10073. },
  10074. "topic_name": {
  10075. "type": "string",
  10076. "x-go-name": "Name"
  10077. },
  10078. "updated": {
  10079. "type": "string",
  10080. "format": "date-time",
  10081. "x-go-name": "Updated"
  10082. }
  10083. },
  10084. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10085. },
  10086. "TrackedTime": {
  10087. "description": "TrackedTime worked time for an issue / pr",
  10088. "type": "object",
  10089. "properties": {
  10090. "created": {
  10091. "type": "string",
  10092. "format": "date-time",
  10093. "x-go-name": "Created"
  10094. },
  10095. "id": {
  10096. "type": "integer",
  10097. "format": "int64",
  10098. "x-go-name": "ID"
  10099. },
  10100. "issue_id": {
  10101. "type": "integer",
  10102. "format": "int64",
  10103. "x-go-name": "IssueID"
  10104. },
  10105. "time": {
  10106. "description": "Time in seconds",
  10107. "type": "integer",
  10108. "format": "int64",
  10109. "x-go-name": "Time"
  10110. },
  10111. "user_id": {
  10112. "type": "integer",
  10113. "format": "int64",
  10114. "x-go-name": "UserID"
  10115. }
  10116. },
  10117. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10118. },
  10119. "UpdateFileOptions": {
  10120. "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)",
  10121. "type": "object",
  10122. "required": [
  10123. "sha",
  10124. "content"
  10125. ],
  10126. "properties": {
  10127. "author": {
  10128. "$ref": "#/definitions/Identity"
  10129. },
  10130. "branch": {
  10131. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  10132. "type": "string",
  10133. "x-go-name": "BranchName"
  10134. },
  10135. "committer": {
  10136. "$ref": "#/definitions/Identity"
  10137. },
  10138. "content": {
  10139. "description": "content must be base64 encoded",
  10140. "type": "string",
  10141. "x-go-name": "Content"
  10142. },
  10143. "from_path": {
  10144. "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL",
  10145. "type": "string",
  10146. "x-go-name": "FromPath"
  10147. },
  10148. "message": {
  10149. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  10150. "type": "string",
  10151. "x-go-name": "Message"
  10152. },
  10153. "new_branch": {
  10154. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  10155. "type": "string",
  10156. "x-go-name": "NewBranchName"
  10157. },
  10158. "sha": {
  10159. "description": "sha is the SHA for the file that already exists",
  10160. "type": "string",
  10161. "x-go-name": "SHA"
  10162. }
  10163. },
  10164. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10165. },
  10166. "User": {
  10167. "description": "User represents a user",
  10168. "type": "object",
  10169. "properties": {
  10170. "avatar_url": {
  10171. "description": "URL to the user's avatar",
  10172. "type": "string",
  10173. "x-go-name": "AvatarURL"
  10174. },
  10175. "created": {
  10176. "type": "string",
  10177. "format": "date-time",
  10178. "x-go-name": "Created"
  10179. },
  10180. "email": {
  10181. "type": "string",
  10182. "format": "email",
  10183. "x-go-name": "Email"
  10184. },
  10185. "full_name": {
  10186. "description": "the user's full name",
  10187. "type": "string",
  10188. "x-go-name": "FullName"
  10189. },
  10190. "id": {
  10191. "description": "the user's id",
  10192. "type": "integer",
  10193. "format": "int64",
  10194. "x-go-name": "ID"
  10195. },
  10196. "is_admin": {
  10197. "description": "Is the user an administrator",
  10198. "type": "boolean",
  10199. "x-go-name": "IsAdmin"
  10200. },
  10201. "language": {
  10202. "description": "User locale",
  10203. "type": "string",
  10204. "x-go-name": "Language"
  10205. },
  10206. "last_login": {
  10207. "type": "string",
  10208. "format": "date-time",
  10209. "x-go-name": "LastLogin"
  10210. },
  10211. "login": {
  10212. "description": "the user's username",
  10213. "type": "string",
  10214. "x-go-name": "UserName"
  10215. }
  10216. },
  10217. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10218. },
  10219. "UserHeatmapData": {
  10220. "description": "UserHeatmapData represents the data needed to create a heatmap",
  10221. "type": "object",
  10222. "properties": {
  10223. "contributions": {
  10224. "type": "integer",
  10225. "format": "int64",
  10226. "x-go-name": "Contributions"
  10227. },
  10228. "timestamp": {
  10229. "$ref": "#/definitions/TimeStamp"
  10230. }
  10231. },
  10232. "x-go-package": "code.gitea.io/gitea/models"
  10233. },
  10234. "WatchInfo": {
  10235. "description": "WatchInfo represents an API watch status of one repository",
  10236. "type": "object",
  10237. "properties": {
  10238. "created_at": {
  10239. "type": "string",
  10240. "format": "date-time",
  10241. "x-go-name": "CreatedAt"
  10242. },
  10243. "ignored": {
  10244. "type": "boolean",
  10245. "x-go-name": "Ignored"
  10246. },
  10247. "reason": {
  10248. "type": "object",
  10249. "x-go-name": "Reason"
  10250. },
  10251. "repository_url": {
  10252. "type": "string",
  10253. "x-go-name": "RepositoryURL"
  10254. },
  10255. "subscribed": {
  10256. "type": "boolean",
  10257. "x-go-name": "Subscribed"
  10258. },
  10259. "url": {
  10260. "type": "string",
  10261. "x-go-name": "URL"
  10262. }
  10263. },
  10264. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10265. }
  10266. },
  10267. "responses": {
  10268. "AccessToken": {
  10269. "description": "AccessToken represents an API access token.",
  10270. "headers": {
  10271. "id": {
  10272. "type": "integer",
  10273. "format": "int64"
  10274. },
  10275. "name": {
  10276. "type": "string"
  10277. },
  10278. "sha1": {
  10279. "type": "string"
  10280. },
  10281. "token_last_eight": {
  10282. "type": "string"
  10283. }
  10284. }
  10285. },
  10286. "AccessTokenList": {
  10287. "description": "AccessTokenList represents a list of API access token.",
  10288. "schema": {
  10289. "type": "array",
  10290. "items": {
  10291. "$ref": "#/definitions/AccessToken"
  10292. }
  10293. }
  10294. },
  10295. "AnnotatedTag": {
  10296. "description": "AnnotatedTag",
  10297. "schema": {
  10298. "$ref": "#/definitions/AnnotatedTag"
  10299. }
  10300. },
  10301. "Attachment": {
  10302. "description": "Attachment",
  10303. "schema": {
  10304. "$ref": "#/definitions/Attachment"
  10305. }
  10306. },
  10307. "AttachmentList": {
  10308. "description": "AttachmentList",
  10309. "schema": {
  10310. "type": "array",
  10311. "items": {
  10312. "$ref": "#/definitions/Attachment"
  10313. }
  10314. }
  10315. },
  10316. "Branch": {
  10317. "description": "Branch",
  10318. "schema": {
  10319. "$ref": "#/definitions/Branch"
  10320. }
  10321. },
  10322. "BranchList": {
  10323. "description": "BranchList",
  10324. "schema": {
  10325. "type": "array",
  10326. "items": {
  10327. "$ref": "#/definitions/Branch"
  10328. }
  10329. }
  10330. },
  10331. "Comment": {
  10332. "description": "Comment",
  10333. "schema": {
  10334. "$ref": "#/definitions/Comment"
  10335. }
  10336. },
  10337. "CommentList": {
  10338. "description": "CommentList",
  10339. "schema": {
  10340. "type": "array",
  10341. "items": {
  10342. "$ref": "#/definitions/Comment"
  10343. }
  10344. }
  10345. },
  10346. "Commit": {
  10347. "description": "Commit",
  10348. "schema": {
  10349. "$ref": "#/definitions/Commit"
  10350. }
  10351. },
  10352. "CommitList": {
  10353. "description": "CommitList",
  10354. "schema": {
  10355. "type": "array",
  10356. "items": {
  10357. "$ref": "#/definitions/Commit"
  10358. }
  10359. },
  10360. "headers": {
  10361. "X-HasMore": {
  10362. "type": "boolean",
  10363. "description": "True if there is another page"
  10364. },
  10365. "X-Page": {
  10366. "type": "integer",
  10367. "format": "int64",
  10368. "description": "The current page"
  10369. },
  10370. "X-PageCount": {
  10371. "type": "integer",
  10372. "format": "int64",
  10373. "description": "Total number of pages"
  10374. },
  10375. "X-PerPage": {
  10376. "type": "integer",
  10377. "format": "int64",
  10378. "description": "Commits per page"
  10379. },
  10380. "X-Total": {
  10381. "type": "integer",
  10382. "format": "int64",
  10383. "description": "Total commit count"
  10384. }
  10385. }
  10386. },
  10387. "ContentsListResponse": {
  10388. "description": "ContentsListResponse",
  10389. "schema": {
  10390. "type": "array",
  10391. "items": {
  10392. "$ref": "#/definitions/ContentsResponse"
  10393. }
  10394. }
  10395. },
  10396. "ContentsResponse": {
  10397. "description": "ContentsResponse",
  10398. "schema": {
  10399. "$ref": "#/definitions/ContentsResponse"
  10400. }
  10401. },
  10402. "DeployKey": {
  10403. "description": "DeployKey",
  10404. "schema": {
  10405. "$ref": "#/definitions/DeployKey"
  10406. }
  10407. },
  10408. "DeployKeyList": {
  10409. "description": "DeployKeyList",
  10410. "schema": {
  10411. "type": "array",
  10412. "items": {
  10413. "$ref": "#/definitions/DeployKey"
  10414. }
  10415. }
  10416. },
  10417. "EmailList": {
  10418. "description": "EmailList",
  10419. "schema": {
  10420. "type": "array",
  10421. "items": {
  10422. "$ref": "#/definitions/Email"
  10423. }
  10424. }
  10425. },
  10426. "EmptyRepository": {
  10427. "description": "EmptyRepository",
  10428. "schema": {
  10429. "$ref": "#/definitions/APIError"
  10430. }
  10431. },
  10432. "FileDeleteResponse": {
  10433. "description": "FileDeleteResponse",
  10434. "schema": {
  10435. "$ref": "#/definitions/FileDeleteResponse"
  10436. }
  10437. },
  10438. "FileResponse": {
  10439. "description": "FileResponse",
  10440. "schema": {
  10441. "$ref": "#/definitions/FileResponse"
  10442. }
  10443. },
  10444. "GPGKey": {
  10445. "description": "GPGKey",
  10446. "schema": {
  10447. "$ref": "#/definitions/GPGKey"
  10448. }
  10449. },
  10450. "GPGKeyList": {
  10451. "description": "GPGKeyList",
  10452. "schema": {
  10453. "type": "array",
  10454. "items": {
  10455. "$ref": "#/definitions/GPGKey"
  10456. }
  10457. }
  10458. },
  10459. "GitBlobResponse": {
  10460. "description": "GitBlobResponse",
  10461. "schema": {
  10462. "$ref": "#/definitions/GitBlobResponse"
  10463. }
  10464. },
  10465. "GitHook": {
  10466. "description": "GitHook",
  10467. "schema": {
  10468. "$ref": "#/definitions/GitHook"
  10469. }
  10470. },
  10471. "GitHookList": {
  10472. "description": "GitHookList",
  10473. "schema": {
  10474. "type": "array",
  10475. "items": {
  10476. "$ref": "#/definitions/GitHook"
  10477. }
  10478. }
  10479. },
  10480. "GitTreeResponse": {
  10481. "description": "GitTreeResponse",
  10482. "schema": {
  10483. "$ref": "#/definitions/GitTreeResponse"
  10484. }
  10485. },
  10486. "Hook": {
  10487. "description": "Hook",
  10488. "schema": {
  10489. "$ref": "#/definitions/Hook"
  10490. }
  10491. },
  10492. "HookList": {
  10493. "description": "HookList",
  10494. "schema": {
  10495. "type": "array",
  10496. "items": {
  10497. "$ref": "#/definitions/Hook"
  10498. }
  10499. }
  10500. },
  10501. "Issue": {
  10502. "description": "Issue",
  10503. "schema": {
  10504. "$ref": "#/definitions/Issue"
  10505. }
  10506. },
  10507. "IssueDeadline": {
  10508. "description": "IssueDeadline",
  10509. "schema": {
  10510. "$ref": "#/definitions/IssueDeadline"
  10511. }
  10512. },
  10513. "IssueList": {
  10514. "description": "IssueList",
  10515. "schema": {
  10516. "type": "array",
  10517. "items": {
  10518. "$ref": "#/definitions/Issue"
  10519. }
  10520. }
  10521. },
  10522. "Label": {
  10523. "description": "Label",
  10524. "schema": {
  10525. "$ref": "#/definitions/Label"
  10526. }
  10527. },
  10528. "LabelList": {
  10529. "description": "LabelList",
  10530. "schema": {
  10531. "type": "array",
  10532. "items": {
  10533. "$ref": "#/definitions/Label"
  10534. }
  10535. }
  10536. },
  10537. "MarkdownRender": {
  10538. "description": "MarkdownRender is a rendered markdown document",
  10539. "schema": {
  10540. "type": "string"
  10541. }
  10542. },
  10543. "Milestone": {
  10544. "description": "Milestone",
  10545. "schema": {
  10546. "$ref": "#/definitions/Milestone"
  10547. }
  10548. },
  10549. "MilestoneList": {
  10550. "description": "MilestoneList",
  10551. "schema": {
  10552. "type": "array",
  10553. "items": {
  10554. "$ref": "#/definitions/Milestone"
  10555. }
  10556. }
  10557. },
  10558. "Organization": {
  10559. "description": "Organization",
  10560. "schema": {
  10561. "$ref": "#/definitions/Organization"
  10562. }
  10563. },
  10564. "OrganizationList": {
  10565. "description": "OrganizationList",
  10566. "schema": {
  10567. "type": "array",
  10568. "items": {
  10569. "$ref": "#/definitions/Organization"
  10570. }
  10571. }
  10572. },
  10573. "PublicKey": {
  10574. "description": "PublicKey",
  10575. "schema": {
  10576. "$ref": "#/definitions/PublicKey"
  10577. }
  10578. },
  10579. "PublicKeyList": {
  10580. "description": "PublicKeyList",
  10581. "schema": {
  10582. "type": "array",
  10583. "items": {
  10584. "$ref": "#/definitions/PublicKey"
  10585. }
  10586. }
  10587. },
  10588. "PullRequest": {
  10589. "description": "PullRequest",
  10590. "schema": {
  10591. "$ref": "#/definitions/PullRequest"
  10592. }
  10593. },
  10594. "PullRequestList": {
  10595. "description": "PullRequestList",
  10596. "schema": {
  10597. "type": "array",
  10598. "items": {
  10599. "$ref": "#/definitions/PullRequest"
  10600. }
  10601. }
  10602. },
  10603. "Reference": {
  10604. "description": "Reference",
  10605. "schema": {
  10606. "$ref": "#/definitions/Reference"
  10607. }
  10608. },
  10609. "ReferenceList": {
  10610. "description": "ReferenceList",
  10611. "schema": {
  10612. "type": "array",
  10613. "items": {
  10614. "$ref": "#/definitions/Reference"
  10615. }
  10616. }
  10617. },
  10618. "Release": {
  10619. "description": "Release",
  10620. "schema": {
  10621. "$ref": "#/definitions/Release"
  10622. }
  10623. },
  10624. "ReleaseList": {
  10625. "description": "ReleaseList",
  10626. "schema": {
  10627. "type": "array",
  10628. "items": {
  10629. "$ref": "#/definitions/Release"
  10630. }
  10631. }
  10632. },
  10633. "Repository": {
  10634. "description": "Repository",
  10635. "schema": {
  10636. "$ref": "#/definitions/Repository"
  10637. }
  10638. },
  10639. "RepositoryList": {
  10640. "description": "RepositoryList",
  10641. "schema": {
  10642. "type": "array",
  10643. "items": {
  10644. "$ref": "#/definitions/Repository"
  10645. }
  10646. }
  10647. },
  10648. "SearchResults": {
  10649. "description": "SearchResults",
  10650. "schema": {
  10651. "$ref": "#/definitions/SearchResults"
  10652. }
  10653. },
  10654. "ServerVersion": {
  10655. "description": "ServerVersion",
  10656. "schema": {
  10657. "$ref": "#/definitions/ServerVersion"
  10658. }
  10659. },
  10660. "Status": {
  10661. "description": "Status",
  10662. "schema": {
  10663. "$ref": "#/definitions/Status"
  10664. }
  10665. },
  10666. "StatusList": {
  10667. "description": "StatusList",
  10668. "schema": {
  10669. "type": "array",
  10670. "items": {
  10671. "$ref": "#/definitions/Status"
  10672. }
  10673. }
  10674. },
  10675. "Tag": {
  10676. "description": "Tag",
  10677. "schema": {
  10678. "$ref": "#/definitions/Tag"
  10679. }
  10680. },
  10681. "TagList": {
  10682. "description": "TagList",
  10683. "schema": {
  10684. "type": "array",
  10685. "items": {
  10686. "$ref": "#/definitions/Tag"
  10687. }
  10688. }
  10689. },
  10690. "Team": {
  10691. "description": "Team",
  10692. "schema": {
  10693. "$ref": "#/definitions/Team"
  10694. }
  10695. },
  10696. "TeamList": {
  10697. "description": "TeamList",
  10698. "schema": {
  10699. "type": "array",
  10700. "items": {
  10701. "$ref": "#/definitions/Team"
  10702. }
  10703. }
  10704. },
  10705. "TopicListResponse": {
  10706. "description": "TopicListResponse",
  10707. "schema": {
  10708. "type": "array",
  10709. "items": {
  10710. "$ref": "#/definitions/TopicResponse"
  10711. }
  10712. }
  10713. },
  10714. "TopicNames": {
  10715. "description": "TopicNames",
  10716. "schema": {
  10717. "$ref": "#/definitions/TopicName"
  10718. }
  10719. },
  10720. "TrackedTime": {
  10721. "description": "TrackedTime",
  10722. "schema": {
  10723. "$ref": "#/definitions/TrackedTime"
  10724. }
  10725. },
  10726. "TrackedTimeList": {
  10727. "description": "TrackedTimeList",
  10728. "schema": {
  10729. "type": "array",
  10730. "items": {
  10731. "$ref": "#/definitions/TrackedTime"
  10732. }
  10733. }
  10734. },
  10735. "User": {
  10736. "description": "User",
  10737. "schema": {
  10738. "$ref": "#/definitions/User"
  10739. }
  10740. },
  10741. "UserHeatmapData": {
  10742. "description": "UserHeatmapData",
  10743. "schema": {
  10744. "type": "array",
  10745. "items": {
  10746. "$ref": "#/definitions/UserHeatmapData"
  10747. }
  10748. }
  10749. },
  10750. "UserList": {
  10751. "description": "UserList",
  10752. "schema": {
  10753. "type": "array",
  10754. "items": {
  10755. "$ref": "#/definitions/User"
  10756. }
  10757. }
  10758. },
  10759. "WatchInfo": {
  10760. "description": "WatchInfo",
  10761. "schema": {
  10762. "$ref": "#/definitions/WatchInfo"
  10763. }
  10764. },
  10765. "empty": {
  10766. "description": "APIEmpty is an empty response"
  10767. },
  10768. "error": {
  10769. "description": "APIError is error format response",
  10770. "headers": {
  10771. "message": {
  10772. "type": "string"
  10773. },
  10774. "url": {
  10775. "type": "string"
  10776. }
  10777. }
  10778. },
  10779. "forbidden": {
  10780. "description": "APIForbiddenError is a forbidden error response",
  10781. "headers": {
  10782. "message": {
  10783. "type": "string"
  10784. },
  10785. "url": {
  10786. "type": "string"
  10787. }
  10788. }
  10789. },
  10790. "notFound": {
  10791. "description": "APINotFound is a not found empty response"
  10792. },
  10793. "parameterBodies": {
  10794. "description": "parameterBodies",
  10795. "schema": {
  10796. "$ref": "#/definitions/RepoTopicOptions"
  10797. }
  10798. },
  10799. "redirect": {
  10800. "description": "APIRedirect is a redirect response"
  10801. },
  10802. "validationError": {
  10803. "description": "APIValidationError is error format response related to input validation",
  10804. "headers": {
  10805. "message": {
  10806. "type": "string"
  10807. },
  10808. "url": {
  10809. "type": "string"
  10810. }
  10811. }
  10812. }
  10813. },
  10814. "securityDefinitions": {
  10815. "AccessToken": {
  10816. "type": "apiKey",
  10817. "name": "access_token",
  10818. "in": "query"
  10819. },
  10820. "AuthorizationHeaderToken": {
  10821. "description": "API tokens must be prepended with \"token\" followed by a space.",
  10822. "type": "apiKey",
  10823. "name": "Authorization",
  10824. "in": "header"
  10825. },
  10826. "BasicAuth": {
  10827. "type": "basic"
  10828. },
  10829. "SudoHeader": {
  10830. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  10831. "type": "apiKey",
  10832. "name": "Sudo",
  10833. "in": "header"
  10834. },
  10835. "SudoParam": {
  10836. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  10837. "type": "apiKey",
  10838. "name": "sudo",
  10839. "in": "query"
  10840. },
  10841. "Token": {
  10842. "type": "apiKey",
  10843. "name": "token",
  10844. "in": "query"
  10845. }
  10846. },
  10847. "security": [
  10848. {
  10849. "BasicAuth": []
  10850. },
  10851. {
  10852. "Token": []
  10853. },
  10854. {
  10855. "AccessToken": []
  10856. },
  10857. {
  10858. "AuthorizationHeaderToken": []
  10859. },
  10860. {
  10861. "SudoParam": []
  10862. },
  10863. {
  10864. "SudoHeader": []
  10865. }
  10866. ]
  10867. }