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 273 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
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880
  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. "branch_filter": {
  7532. "type": "string",
  7533. "x-go-name": "BranchFilter"
  7534. },
  7535. "config": {
  7536. "type": "object",
  7537. "additionalProperties": {
  7538. "type": "string"
  7539. },
  7540. "x-go-name": "Config"
  7541. },
  7542. "events": {
  7543. "type": "array",
  7544. "items": {
  7545. "type": "string"
  7546. },
  7547. "x-go-name": "Events"
  7548. },
  7549. "type": {
  7550. "type": "string",
  7551. "enum": [
  7552. "gitea",
  7553. "gogs",
  7554. "slack",
  7555. "discord"
  7556. ],
  7557. "x-go-name": "Type"
  7558. }
  7559. },
  7560. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7561. },
  7562. "CreateIssueCommentOption": {
  7563. "description": "CreateIssueCommentOption options for creating a comment on an issue",
  7564. "type": "object",
  7565. "required": [
  7566. "body"
  7567. ],
  7568. "properties": {
  7569. "body": {
  7570. "type": "string",
  7571. "x-go-name": "Body"
  7572. }
  7573. },
  7574. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7575. },
  7576. "CreateIssueOption": {
  7577. "description": "CreateIssueOption options to create one issue",
  7578. "type": "object",
  7579. "required": [
  7580. "title"
  7581. ],
  7582. "properties": {
  7583. "assignee": {
  7584. "description": "username of assignee",
  7585. "type": "string",
  7586. "x-go-name": "Assignee"
  7587. },
  7588. "assignees": {
  7589. "type": "array",
  7590. "items": {
  7591. "type": "string"
  7592. },
  7593. "x-go-name": "Assignees"
  7594. },
  7595. "body": {
  7596. "type": "string",
  7597. "x-go-name": "Body"
  7598. },
  7599. "closed": {
  7600. "type": "boolean",
  7601. "x-go-name": "Closed"
  7602. },
  7603. "due_date": {
  7604. "type": "string",
  7605. "format": "date-time",
  7606. "x-go-name": "Deadline"
  7607. },
  7608. "labels": {
  7609. "description": "list of label ids",
  7610. "type": "array",
  7611. "items": {
  7612. "type": "integer",
  7613. "format": "int64"
  7614. },
  7615. "x-go-name": "Labels"
  7616. },
  7617. "milestone": {
  7618. "description": "milestone id",
  7619. "type": "integer",
  7620. "format": "int64",
  7621. "x-go-name": "Milestone"
  7622. },
  7623. "title": {
  7624. "type": "string",
  7625. "x-go-name": "Title"
  7626. }
  7627. },
  7628. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7629. },
  7630. "CreateKeyOption": {
  7631. "description": "CreateKeyOption options when creating a key",
  7632. "type": "object",
  7633. "required": [
  7634. "title",
  7635. "key"
  7636. ],
  7637. "properties": {
  7638. "key": {
  7639. "description": "An armored SSH key to add",
  7640. "type": "string",
  7641. "uniqueItems": true,
  7642. "x-go-name": "Key"
  7643. },
  7644. "read_only": {
  7645. "description": "Describe if the key has only read access or read/write",
  7646. "type": "boolean",
  7647. "x-go-name": "ReadOnly"
  7648. },
  7649. "title": {
  7650. "description": "Title of the key to add",
  7651. "type": "string",
  7652. "uniqueItems": true,
  7653. "x-go-name": "Title"
  7654. }
  7655. },
  7656. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7657. },
  7658. "CreateLabelOption": {
  7659. "description": "CreateLabelOption options for creating a label",
  7660. "type": "object",
  7661. "required": [
  7662. "name",
  7663. "color"
  7664. ],
  7665. "properties": {
  7666. "color": {
  7667. "type": "string",
  7668. "x-go-name": "Color",
  7669. "example": "#00aabb"
  7670. },
  7671. "description": {
  7672. "type": "string",
  7673. "x-go-name": "Description"
  7674. },
  7675. "name": {
  7676. "type": "string",
  7677. "x-go-name": "Name"
  7678. }
  7679. },
  7680. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7681. },
  7682. "CreateMilestoneOption": {
  7683. "description": "CreateMilestoneOption options for creating a milestone",
  7684. "type": "object",
  7685. "properties": {
  7686. "description": {
  7687. "type": "string",
  7688. "x-go-name": "Description"
  7689. },
  7690. "due_on": {
  7691. "type": "string",
  7692. "format": "date-time",
  7693. "x-go-name": "Deadline"
  7694. },
  7695. "title": {
  7696. "type": "string",
  7697. "x-go-name": "Title"
  7698. }
  7699. },
  7700. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7701. },
  7702. "CreateOrgOption": {
  7703. "description": "CreateOrgOption options for creating an organization",
  7704. "type": "object",
  7705. "required": [
  7706. "username"
  7707. ],
  7708. "properties": {
  7709. "description": {
  7710. "type": "string",
  7711. "x-go-name": "Description"
  7712. },
  7713. "full_name": {
  7714. "type": "string",
  7715. "x-go-name": "FullName"
  7716. },
  7717. "location": {
  7718. "type": "string",
  7719. "x-go-name": "Location"
  7720. },
  7721. "username": {
  7722. "type": "string",
  7723. "x-go-name": "UserName"
  7724. },
  7725. "visibility": {
  7726. "description": "possible values are `public` (default), `limited` or `private`",
  7727. "type": "string",
  7728. "enum": [
  7729. "public",
  7730. "limited",
  7731. "private"
  7732. ],
  7733. "x-go-name": "Visibility"
  7734. },
  7735. "website": {
  7736. "type": "string",
  7737. "x-go-name": "Website"
  7738. }
  7739. },
  7740. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7741. },
  7742. "CreatePullRequestOption": {
  7743. "description": "CreatePullRequestOption options when creating a pull request",
  7744. "type": "object",
  7745. "properties": {
  7746. "assignee": {
  7747. "type": "string",
  7748. "x-go-name": "Assignee"
  7749. },
  7750. "assignees": {
  7751. "type": "array",
  7752. "items": {
  7753. "type": "string"
  7754. },
  7755. "x-go-name": "Assignees"
  7756. },
  7757. "base": {
  7758. "type": "string",
  7759. "x-go-name": "Base"
  7760. },
  7761. "body": {
  7762. "type": "string",
  7763. "x-go-name": "Body"
  7764. },
  7765. "due_date": {
  7766. "type": "string",
  7767. "format": "date-time",
  7768. "x-go-name": "Deadline"
  7769. },
  7770. "head": {
  7771. "type": "string",
  7772. "x-go-name": "Head"
  7773. },
  7774. "labels": {
  7775. "type": "array",
  7776. "items": {
  7777. "type": "integer",
  7778. "format": "int64"
  7779. },
  7780. "x-go-name": "Labels"
  7781. },
  7782. "milestone": {
  7783. "type": "integer",
  7784. "format": "int64",
  7785. "x-go-name": "Milestone"
  7786. },
  7787. "title": {
  7788. "type": "string",
  7789. "x-go-name": "Title"
  7790. }
  7791. },
  7792. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7793. },
  7794. "CreateReleaseOption": {
  7795. "description": "CreateReleaseOption options when creating a release",
  7796. "type": "object",
  7797. "required": [
  7798. "tag_name"
  7799. ],
  7800. "properties": {
  7801. "body": {
  7802. "type": "string",
  7803. "x-go-name": "Note"
  7804. },
  7805. "draft": {
  7806. "type": "boolean",
  7807. "x-go-name": "IsDraft"
  7808. },
  7809. "name": {
  7810. "type": "string",
  7811. "x-go-name": "Title"
  7812. },
  7813. "prerelease": {
  7814. "type": "boolean",
  7815. "x-go-name": "IsPrerelease"
  7816. },
  7817. "tag_name": {
  7818. "type": "string",
  7819. "x-go-name": "TagName"
  7820. },
  7821. "target_commitish": {
  7822. "type": "string",
  7823. "x-go-name": "Target"
  7824. }
  7825. },
  7826. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7827. },
  7828. "CreateRepoOption": {
  7829. "description": "CreateRepoOption options when creating repository",
  7830. "type": "object",
  7831. "required": [
  7832. "name"
  7833. ],
  7834. "properties": {
  7835. "auto_init": {
  7836. "description": "Whether the repository should be auto-intialized?",
  7837. "type": "boolean",
  7838. "x-go-name": "AutoInit"
  7839. },
  7840. "description": {
  7841. "description": "Description of the repository to create",
  7842. "type": "string",
  7843. "x-go-name": "Description"
  7844. },
  7845. "gitignores": {
  7846. "description": "Gitignores to use",
  7847. "type": "string",
  7848. "x-go-name": "Gitignores"
  7849. },
  7850. "issue_labels": {
  7851. "description": "Issue Label set to use",
  7852. "type": "string",
  7853. "x-go-name": "IssueLabels"
  7854. },
  7855. "license": {
  7856. "description": "License to use",
  7857. "type": "string",
  7858. "x-go-name": "License"
  7859. },
  7860. "name": {
  7861. "description": "Name of the repository to create",
  7862. "type": "string",
  7863. "uniqueItems": true,
  7864. "x-go-name": "Name"
  7865. },
  7866. "private": {
  7867. "description": "Whether the repository is private",
  7868. "type": "boolean",
  7869. "x-go-name": "Private"
  7870. },
  7871. "readme": {
  7872. "description": "Readme of the repository to create",
  7873. "type": "string",
  7874. "x-go-name": "Readme"
  7875. }
  7876. },
  7877. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7878. },
  7879. "CreateStatusOption": {
  7880. "description": "CreateStatusOption holds the information needed to create a new Status for a Commit",
  7881. "type": "object",
  7882. "properties": {
  7883. "context": {
  7884. "type": "string",
  7885. "x-go-name": "Context"
  7886. },
  7887. "description": {
  7888. "type": "string",
  7889. "x-go-name": "Description"
  7890. },
  7891. "state": {
  7892. "$ref": "#/definitions/StatusState"
  7893. },
  7894. "target_url": {
  7895. "type": "string",
  7896. "x-go-name": "TargetURL"
  7897. }
  7898. },
  7899. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7900. },
  7901. "CreateTeamOption": {
  7902. "description": "CreateTeamOption options for creating a team",
  7903. "type": "object",
  7904. "required": [
  7905. "name"
  7906. ],
  7907. "properties": {
  7908. "description": {
  7909. "type": "string",
  7910. "x-go-name": "Description"
  7911. },
  7912. "name": {
  7913. "type": "string",
  7914. "x-go-name": "Name"
  7915. },
  7916. "permission": {
  7917. "type": "string",
  7918. "enum": [
  7919. "read",
  7920. "write",
  7921. "admin"
  7922. ],
  7923. "x-go-name": "Permission"
  7924. },
  7925. "units": {
  7926. "type": "array",
  7927. "items": {
  7928. "type": "string"
  7929. },
  7930. "x-go-name": "Units",
  7931. "example": [
  7932. "repo.code",
  7933. "repo.issues",
  7934. "repo.ext_issues",
  7935. "repo.wiki",
  7936. "repo.pulls",
  7937. "repo.releases",
  7938. "repo.ext_wiki"
  7939. ]
  7940. }
  7941. },
  7942. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7943. },
  7944. "CreateUserOption": {
  7945. "description": "CreateUserOption create user options",
  7946. "type": "object",
  7947. "required": [
  7948. "username",
  7949. "email",
  7950. "password"
  7951. ],
  7952. "properties": {
  7953. "email": {
  7954. "type": "string",
  7955. "format": "email",
  7956. "x-go-name": "Email"
  7957. },
  7958. "full_name": {
  7959. "type": "string",
  7960. "x-go-name": "FullName"
  7961. },
  7962. "login_name": {
  7963. "type": "string",
  7964. "x-go-name": "LoginName"
  7965. },
  7966. "must_change_password": {
  7967. "type": "boolean",
  7968. "x-go-name": "MustChangePassword"
  7969. },
  7970. "password": {
  7971. "type": "string",
  7972. "x-go-name": "Password"
  7973. },
  7974. "send_notify": {
  7975. "type": "boolean",
  7976. "x-go-name": "SendNotify"
  7977. },
  7978. "source_id": {
  7979. "type": "integer",
  7980. "format": "int64",
  7981. "x-go-name": "SourceID"
  7982. },
  7983. "username": {
  7984. "type": "string",
  7985. "x-go-name": "Username"
  7986. }
  7987. },
  7988. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7989. },
  7990. "DeleteEmailOption": {
  7991. "description": "DeleteEmailOption options when deleting email addresses",
  7992. "type": "object",
  7993. "properties": {
  7994. "emails": {
  7995. "description": "email addresses to delete",
  7996. "type": "array",
  7997. "items": {
  7998. "type": "string"
  7999. },
  8000. "x-go-name": "Emails"
  8001. }
  8002. },
  8003. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8004. },
  8005. "DeleteFileOptions": {
  8006. "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)",
  8007. "type": "object",
  8008. "required": [
  8009. "sha"
  8010. ],
  8011. "properties": {
  8012. "author": {
  8013. "$ref": "#/definitions/Identity"
  8014. },
  8015. "branch": {
  8016. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  8017. "type": "string",
  8018. "x-go-name": "BranchName"
  8019. },
  8020. "committer": {
  8021. "$ref": "#/definitions/Identity"
  8022. },
  8023. "message": {
  8024. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  8025. "type": "string",
  8026. "x-go-name": "Message"
  8027. },
  8028. "new_branch": {
  8029. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  8030. "type": "string",
  8031. "x-go-name": "NewBranchName"
  8032. },
  8033. "sha": {
  8034. "description": "sha is the SHA for the file that already exists",
  8035. "type": "string",
  8036. "x-go-name": "SHA"
  8037. }
  8038. },
  8039. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8040. },
  8041. "DeployKey": {
  8042. "description": "DeployKey a deploy key",
  8043. "type": "object",
  8044. "properties": {
  8045. "created_at": {
  8046. "type": "string",
  8047. "format": "date-time",
  8048. "x-go-name": "Created"
  8049. },
  8050. "fingerprint": {
  8051. "type": "string",
  8052. "x-go-name": "Fingerprint"
  8053. },
  8054. "id": {
  8055. "type": "integer",
  8056. "format": "int64",
  8057. "x-go-name": "ID"
  8058. },
  8059. "key": {
  8060. "type": "string",
  8061. "x-go-name": "Key"
  8062. },
  8063. "key_id": {
  8064. "type": "integer",
  8065. "format": "int64",
  8066. "x-go-name": "KeyID"
  8067. },
  8068. "read_only": {
  8069. "type": "boolean",
  8070. "x-go-name": "ReadOnly"
  8071. },
  8072. "repository": {
  8073. "$ref": "#/definitions/Repository"
  8074. },
  8075. "title": {
  8076. "type": "string",
  8077. "x-go-name": "Title"
  8078. },
  8079. "url": {
  8080. "type": "string",
  8081. "x-go-name": "URL"
  8082. }
  8083. },
  8084. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8085. },
  8086. "EditAttachmentOptions": {
  8087. "description": "EditAttachmentOptions options for editing attachments",
  8088. "type": "object",
  8089. "properties": {
  8090. "name": {
  8091. "type": "string",
  8092. "x-go-name": "Name"
  8093. }
  8094. },
  8095. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8096. },
  8097. "EditDeadlineOption": {
  8098. "description": "EditDeadlineOption options for creating a deadline",
  8099. "type": "object",
  8100. "required": [
  8101. "due_date"
  8102. ],
  8103. "properties": {
  8104. "due_date": {
  8105. "type": "string",
  8106. "format": "date-time",
  8107. "x-go-name": "Deadline"
  8108. }
  8109. },
  8110. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8111. },
  8112. "EditGitHookOption": {
  8113. "description": "EditGitHookOption options when modifying one Git hook",
  8114. "type": "object",
  8115. "properties": {
  8116. "content": {
  8117. "type": "string",
  8118. "x-go-name": "Content"
  8119. }
  8120. },
  8121. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8122. },
  8123. "EditHookOption": {
  8124. "description": "EditHookOption options when modify one hook",
  8125. "type": "object",
  8126. "properties": {
  8127. "active": {
  8128. "type": "boolean",
  8129. "x-go-name": "Active"
  8130. },
  8131. "branch_filter": {
  8132. "type": "string",
  8133. "x-go-name": "BranchFilter"
  8134. },
  8135. "config": {
  8136. "type": "object",
  8137. "additionalProperties": {
  8138. "type": "string"
  8139. },
  8140. "x-go-name": "Config"
  8141. },
  8142. "events": {
  8143. "type": "array",
  8144. "items": {
  8145. "type": "string"
  8146. },
  8147. "x-go-name": "Events"
  8148. }
  8149. },
  8150. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8151. },
  8152. "EditIssueCommentOption": {
  8153. "description": "EditIssueCommentOption options for editing a comment",
  8154. "type": "object",
  8155. "required": [
  8156. "body"
  8157. ],
  8158. "properties": {
  8159. "body": {
  8160. "type": "string",
  8161. "x-go-name": "Body"
  8162. }
  8163. },
  8164. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8165. },
  8166. "EditIssueOption": {
  8167. "description": "EditIssueOption options for editing an issue",
  8168. "type": "object",
  8169. "properties": {
  8170. "assignee": {
  8171. "type": "string",
  8172. "x-go-name": "Assignee"
  8173. },
  8174. "assignees": {
  8175. "type": "array",
  8176. "items": {
  8177. "type": "string"
  8178. },
  8179. "x-go-name": "Assignees"
  8180. },
  8181. "body": {
  8182. "type": "string",
  8183. "x-go-name": "Body"
  8184. },
  8185. "due_date": {
  8186. "type": "string",
  8187. "format": "date-time",
  8188. "x-go-name": "Deadline"
  8189. },
  8190. "milestone": {
  8191. "type": "integer",
  8192. "format": "int64",
  8193. "x-go-name": "Milestone"
  8194. },
  8195. "state": {
  8196. "type": "string",
  8197. "x-go-name": "State"
  8198. },
  8199. "title": {
  8200. "type": "string",
  8201. "x-go-name": "Title"
  8202. }
  8203. },
  8204. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8205. },
  8206. "EditLabelOption": {
  8207. "description": "EditLabelOption options for editing a label",
  8208. "type": "object",
  8209. "properties": {
  8210. "color": {
  8211. "type": "string",
  8212. "x-go-name": "Color"
  8213. },
  8214. "description": {
  8215. "type": "string",
  8216. "x-go-name": "Description"
  8217. },
  8218. "name": {
  8219. "type": "string",
  8220. "x-go-name": "Name"
  8221. }
  8222. },
  8223. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8224. },
  8225. "EditMilestoneOption": {
  8226. "description": "EditMilestoneOption options for editing a milestone",
  8227. "type": "object",
  8228. "properties": {
  8229. "description": {
  8230. "type": "string",
  8231. "x-go-name": "Description"
  8232. },
  8233. "due_on": {
  8234. "type": "string",
  8235. "format": "date-time",
  8236. "x-go-name": "Deadline"
  8237. },
  8238. "state": {
  8239. "type": "string",
  8240. "x-go-name": "State"
  8241. },
  8242. "title": {
  8243. "type": "string",
  8244. "x-go-name": "Title"
  8245. }
  8246. },
  8247. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8248. },
  8249. "EditOrgOption": {
  8250. "description": "EditOrgOption options for editing an organization",
  8251. "type": "object",
  8252. "properties": {
  8253. "description": {
  8254. "type": "string",
  8255. "x-go-name": "Description"
  8256. },
  8257. "full_name": {
  8258. "type": "string",
  8259. "x-go-name": "FullName"
  8260. },
  8261. "location": {
  8262. "type": "string",
  8263. "x-go-name": "Location"
  8264. },
  8265. "visibility": {
  8266. "description": "possible values are `public`, `limited` or `private`",
  8267. "type": "string",
  8268. "enum": [
  8269. "public",
  8270. "limited",
  8271. "private"
  8272. ],
  8273. "x-go-name": "Visibility"
  8274. },
  8275. "website": {
  8276. "type": "string",
  8277. "x-go-name": "Website"
  8278. }
  8279. },
  8280. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8281. },
  8282. "EditPullRequestOption": {
  8283. "description": "EditPullRequestOption options when modify pull request",
  8284. "type": "object",
  8285. "properties": {
  8286. "assignee": {
  8287. "type": "string",
  8288. "x-go-name": "Assignee"
  8289. },
  8290. "assignees": {
  8291. "type": "array",
  8292. "items": {
  8293. "type": "string"
  8294. },
  8295. "x-go-name": "Assignees"
  8296. },
  8297. "body": {
  8298. "type": "string",
  8299. "x-go-name": "Body"
  8300. },
  8301. "due_date": {
  8302. "type": "string",
  8303. "format": "date-time",
  8304. "x-go-name": "Deadline"
  8305. },
  8306. "labels": {
  8307. "type": "array",
  8308. "items": {
  8309. "type": "integer",
  8310. "format": "int64"
  8311. },
  8312. "x-go-name": "Labels"
  8313. },
  8314. "milestone": {
  8315. "type": "integer",
  8316. "format": "int64",
  8317. "x-go-name": "Milestone"
  8318. },
  8319. "state": {
  8320. "type": "string",
  8321. "x-go-name": "State"
  8322. },
  8323. "title": {
  8324. "type": "string",
  8325. "x-go-name": "Title"
  8326. }
  8327. },
  8328. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8329. },
  8330. "EditReleaseOption": {
  8331. "description": "EditReleaseOption options when editing a release",
  8332. "type": "object",
  8333. "properties": {
  8334. "body": {
  8335. "type": "string",
  8336. "x-go-name": "Note"
  8337. },
  8338. "draft": {
  8339. "type": "boolean",
  8340. "x-go-name": "IsDraft"
  8341. },
  8342. "name": {
  8343. "type": "string",
  8344. "x-go-name": "Title"
  8345. },
  8346. "prerelease": {
  8347. "type": "boolean",
  8348. "x-go-name": "IsPrerelease"
  8349. },
  8350. "tag_name": {
  8351. "type": "string",
  8352. "x-go-name": "TagName"
  8353. },
  8354. "target_commitish": {
  8355. "type": "string",
  8356. "x-go-name": "Target"
  8357. }
  8358. },
  8359. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8360. },
  8361. "EditRepoOption": {
  8362. "description": "EditRepoOption options when editing a repository's properties",
  8363. "type": "object",
  8364. "properties": {
  8365. "allow_merge_commits": {
  8366. "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`.",
  8367. "type": "boolean",
  8368. "x-go-name": "AllowMerge"
  8369. },
  8370. "allow_rebase": {
  8371. "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.",
  8372. "type": "boolean",
  8373. "x-go-name": "AllowRebase"
  8374. },
  8375. "allow_rebase_explicit": {
  8376. "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`.",
  8377. "type": "boolean",
  8378. "x-go-name": "AllowRebaseMerge"
  8379. },
  8380. "allow_squash_merge": {
  8381. "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.",
  8382. "type": "boolean",
  8383. "x-go-name": "AllowSquash"
  8384. },
  8385. "archived": {
  8386. "description": "set to `true` to archive this repository.",
  8387. "type": "boolean",
  8388. "x-go-name": "Archived"
  8389. },
  8390. "default_branch": {
  8391. "description": "sets the default branch for this repository.",
  8392. "type": "string",
  8393. "x-go-name": "DefaultBranch"
  8394. },
  8395. "description": {
  8396. "description": "a short description of the repository.",
  8397. "type": "string",
  8398. "x-go-name": "Description"
  8399. },
  8400. "has_issues": {
  8401. "description": "either `true` to enable issues for this repository or `false` to disable them.",
  8402. "type": "boolean",
  8403. "x-go-name": "HasIssues"
  8404. },
  8405. "has_pull_requests": {
  8406. "description": "either `true` to allow pull requests, or `false` to prevent pull request.",
  8407. "type": "boolean",
  8408. "x-go-name": "HasPullRequests"
  8409. },
  8410. "has_wiki": {
  8411. "description": "either `true` to enable the wiki for this repository or `false` to disable it.",
  8412. "type": "boolean",
  8413. "x-go-name": "HasWiki"
  8414. },
  8415. "ignore_whitespace_conflicts": {
  8416. "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.",
  8417. "type": "boolean",
  8418. "x-go-name": "IgnoreWhitespaceConflicts"
  8419. },
  8420. "name": {
  8421. "description": "name of the repository",
  8422. "type": "string",
  8423. "uniqueItems": true,
  8424. "x-go-name": "Name"
  8425. },
  8426. "private": {
  8427. "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.",
  8428. "type": "boolean",
  8429. "x-go-name": "Private"
  8430. },
  8431. "website": {
  8432. "description": "a URL with more information about the repository.",
  8433. "type": "string",
  8434. "x-go-name": "Website"
  8435. }
  8436. },
  8437. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8438. },
  8439. "EditTeamOption": {
  8440. "description": "EditTeamOption options for editing a team",
  8441. "type": "object",
  8442. "required": [
  8443. "name"
  8444. ],
  8445. "properties": {
  8446. "description": {
  8447. "type": "string",
  8448. "x-go-name": "Description"
  8449. },
  8450. "name": {
  8451. "type": "string",
  8452. "x-go-name": "Name"
  8453. },
  8454. "permission": {
  8455. "type": "string",
  8456. "enum": [
  8457. "read",
  8458. "write",
  8459. "admin"
  8460. ],
  8461. "x-go-name": "Permission"
  8462. },
  8463. "units": {
  8464. "type": "array",
  8465. "items": {
  8466. "type": "string"
  8467. },
  8468. "x-go-name": "Units",
  8469. "example": [
  8470. "repo.code",
  8471. "repo.issues",
  8472. "repo.ext_issues",
  8473. "repo.wiki",
  8474. "repo.pulls",
  8475. "repo.releases",
  8476. "repo.ext_wiki"
  8477. ]
  8478. }
  8479. },
  8480. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8481. },
  8482. "EditUserOption": {
  8483. "description": "EditUserOption edit user options",
  8484. "type": "object",
  8485. "required": [
  8486. "email"
  8487. ],
  8488. "properties": {
  8489. "active": {
  8490. "type": "boolean",
  8491. "x-go-name": "Active"
  8492. },
  8493. "admin": {
  8494. "type": "boolean",
  8495. "x-go-name": "Admin"
  8496. },
  8497. "allow_create_organization": {
  8498. "type": "boolean",
  8499. "x-go-name": "AllowCreateOrganization"
  8500. },
  8501. "allow_git_hook": {
  8502. "type": "boolean",
  8503. "x-go-name": "AllowGitHook"
  8504. },
  8505. "allow_import_local": {
  8506. "type": "boolean",
  8507. "x-go-name": "AllowImportLocal"
  8508. },
  8509. "email": {
  8510. "type": "string",
  8511. "format": "email",
  8512. "x-go-name": "Email"
  8513. },
  8514. "full_name": {
  8515. "type": "string",
  8516. "x-go-name": "FullName"
  8517. },
  8518. "location": {
  8519. "type": "string",
  8520. "x-go-name": "Location"
  8521. },
  8522. "login_name": {
  8523. "type": "string",
  8524. "x-go-name": "LoginName"
  8525. },
  8526. "max_repo_creation": {
  8527. "type": "integer",
  8528. "format": "int64",
  8529. "x-go-name": "MaxRepoCreation"
  8530. },
  8531. "must_change_password": {
  8532. "type": "boolean",
  8533. "x-go-name": "MustChangePassword"
  8534. },
  8535. "password": {
  8536. "type": "string",
  8537. "x-go-name": "Password"
  8538. },
  8539. "prohibit_login": {
  8540. "type": "boolean",
  8541. "x-go-name": "ProhibitLogin"
  8542. },
  8543. "source_id": {
  8544. "type": "integer",
  8545. "format": "int64",
  8546. "x-go-name": "SourceID"
  8547. },
  8548. "website": {
  8549. "type": "string",
  8550. "x-go-name": "Website"
  8551. }
  8552. },
  8553. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8554. },
  8555. "Email": {
  8556. "description": "Email an email address belonging to a user",
  8557. "type": "object",
  8558. "properties": {
  8559. "email": {
  8560. "type": "string",
  8561. "format": "email",
  8562. "x-go-name": "Email"
  8563. },
  8564. "primary": {
  8565. "type": "boolean",
  8566. "x-go-name": "Primary"
  8567. },
  8568. "verified": {
  8569. "type": "boolean",
  8570. "x-go-name": "Verified"
  8571. }
  8572. },
  8573. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8574. },
  8575. "FileCommitResponse": {
  8576. "type": "object",
  8577. "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.",
  8578. "properties": {
  8579. "author": {
  8580. "$ref": "#/definitions/CommitUser"
  8581. },
  8582. "committer": {
  8583. "$ref": "#/definitions/CommitUser"
  8584. },
  8585. "html_url": {
  8586. "type": "string",
  8587. "x-go-name": "HTMLURL"
  8588. },
  8589. "message": {
  8590. "type": "string",
  8591. "x-go-name": "Message"
  8592. },
  8593. "parents": {
  8594. "type": "array",
  8595. "items": {
  8596. "$ref": "#/definitions/CommitMeta"
  8597. },
  8598. "x-go-name": "Parents"
  8599. },
  8600. "sha": {
  8601. "type": "string",
  8602. "x-go-name": "SHA"
  8603. },
  8604. "tree": {
  8605. "$ref": "#/definitions/CommitMeta"
  8606. },
  8607. "url": {
  8608. "type": "string",
  8609. "x-go-name": "URL"
  8610. }
  8611. },
  8612. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8613. },
  8614. "FileDeleteResponse": {
  8615. "description": "FileDeleteResponse contains information about a repo's file that was deleted",
  8616. "type": "object",
  8617. "properties": {
  8618. "commit": {
  8619. "$ref": "#/definitions/FileCommitResponse"
  8620. },
  8621. "content": {
  8622. "type": "object",
  8623. "x-go-name": "Content"
  8624. },
  8625. "verification": {
  8626. "$ref": "#/definitions/PayloadCommitVerification"
  8627. }
  8628. },
  8629. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8630. },
  8631. "FileLinksResponse": {
  8632. "description": "FileLinksResponse contains the links for a repo's file",
  8633. "type": "object",
  8634. "properties": {
  8635. "git": {
  8636. "type": "string",
  8637. "x-go-name": "GitURL"
  8638. },
  8639. "html": {
  8640. "type": "string",
  8641. "x-go-name": "HTMLURL"
  8642. },
  8643. "self": {
  8644. "type": "string",
  8645. "x-go-name": "Self"
  8646. }
  8647. },
  8648. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8649. },
  8650. "FileResponse": {
  8651. "description": "FileResponse contains information about a repo's file",
  8652. "type": "object",
  8653. "properties": {
  8654. "commit": {
  8655. "$ref": "#/definitions/FileCommitResponse"
  8656. },
  8657. "content": {
  8658. "$ref": "#/definitions/ContentsResponse"
  8659. },
  8660. "verification": {
  8661. "$ref": "#/definitions/PayloadCommitVerification"
  8662. }
  8663. },
  8664. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8665. },
  8666. "GPGKey": {
  8667. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  8668. "type": "object",
  8669. "properties": {
  8670. "can_certify": {
  8671. "type": "boolean",
  8672. "x-go-name": "CanCertify"
  8673. },
  8674. "can_encrypt_comms": {
  8675. "type": "boolean",
  8676. "x-go-name": "CanEncryptComms"
  8677. },
  8678. "can_encrypt_storage": {
  8679. "type": "boolean",
  8680. "x-go-name": "CanEncryptStorage"
  8681. },
  8682. "can_sign": {
  8683. "type": "boolean",
  8684. "x-go-name": "CanSign"
  8685. },
  8686. "created_at": {
  8687. "type": "string",
  8688. "format": "date-time",
  8689. "x-go-name": "Created"
  8690. },
  8691. "emails": {
  8692. "type": "array",
  8693. "items": {
  8694. "$ref": "#/definitions/GPGKeyEmail"
  8695. },
  8696. "x-go-name": "Emails"
  8697. },
  8698. "expires_at": {
  8699. "type": "string",
  8700. "format": "date-time",
  8701. "x-go-name": "Expires"
  8702. },
  8703. "id": {
  8704. "type": "integer",
  8705. "format": "int64",
  8706. "x-go-name": "ID"
  8707. },
  8708. "key_id": {
  8709. "type": "string",
  8710. "x-go-name": "KeyID"
  8711. },
  8712. "primary_key_id": {
  8713. "type": "string",
  8714. "x-go-name": "PrimaryKeyID"
  8715. },
  8716. "public_key": {
  8717. "type": "string",
  8718. "x-go-name": "PublicKey"
  8719. },
  8720. "subkeys": {
  8721. "type": "array",
  8722. "items": {
  8723. "$ref": "#/definitions/GPGKey"
  8724. },
  8725. "x-go-name": "SubsKey"
  8726. }
  8727. },
  8728. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8729. },
  8730. "GPGKeyEmail": {
  8731. "description": "GPGKeyEmail an email attached to a GPGKey",
  8732. "type": "object",
  8733. "properties": {
  8734. "email": {
  8735. "type": "string",
  8736. "x-go-name": "Email"
  8737. },
  8738. "verified": {
  8739. "type": "boolean",
  8740. "x-go-name": "Verified"
  8741. }
  8742. },
  8743. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8744. },
  8745. "GitBlobResponse": {
  8746. "description": "GitBlobResponse represents a git blob",
  8747. "type": "object",
  8748. "properties": {
  8749. "content": {
  8750. "type": "string",
  8751. "x-go-name": "Content"
  8752. },
  8753. "encoding": {
  8754. "type": "string",
  8755. "x-go-name": "Encoding"
  8756. },
  8757. "sha": {
  8758. "type": "string",
  8759. "x-go-name": "SHA"
  8760. },
  8761. "size": {
  8762. "type": "integer",
  8763. "format": "int64",
  8764. "x-go-name": "Size"
  8765. },
  8766. "url": {
  8767. "type": "string",
  8768. "x-go-name": "URL"
  8769. }
  8770. },
  8771. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8772. },
  8773. "GitEntry": {
  8774. "description": "GitEntry represents a git tree",
  8775. "type": "object",
  8776. "properties": {
  8777. "mode": {
  8778. "type": "string",
  8779. "x-go-name": "Mode"
  8780. },
  8781. "path": {
  8782. "type": "string",
  8783. "x-go-name": "Path"
  8784. },
  8785. "sha": {
  8786. "type": "string",
  8787. "x-go-name": "SHA"
  8788. },
  8789. "size": {
  8790. "type": "integer",
  8791. "format": "int64",
  8792. "x-go-name": "Size"
  8793. },
  8794. "type": {
  8795. "type": "string",
  8796. "x-go-name": "Type"
  8797. },
  8798. "url": {
  8799. "type": "string",
  8800. "x-go-name": "URL"
  8801. }
  8802. },
  8803. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8804. },
  8805. "GitHook": {
  8806. "description": "GitHook represents a Git repository hook",
  8807. "type": "object",
  8808. "properties": {
  8809. "content": {
  8810. "type": "string",
  8811. "x-go-name": "Content"
  8812. },
  8813. "is_active": {
  8814. "type": "boolean",
  8815. "x-go-name": "IsActive"
  8816. },
  8817. "name": {
  8818. "type": "string",
  8819. "x-go-name": "Name"
  8820. }
  8821. },
  8822. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8823. },
  8824. "GitObject": {
  8825. "type": "object",
  8826. "title": "GitObject represents a Git object.",
  8827. "properties": {
  8828. "sha": {
  8829. "type": "string",
  8830. "x-go-name": "SHA"
  8831. },
  8832. "type": {
  8833. "type": "string",
  8834. "x-go-name": "Type"
  8835. },
  8836. "url": {
  8837. "type": "string",
  8838. "x-go-name": "URL"
  8839. }
  8840. },
  8841. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8842. },
  8843. "GitTreeResponse": {
  8844. "description": "GitTreeResponse returns a git tree",
  8845. "type": "object",
  8846. "properties": {
  8847. "page": {
  8848. "type": "integer",
  8849. "format": "int64",
  8850. "x-go-name": "Page"
  8851. },
  8852. "sha": {
  8853. "type": "string",
  8854. "x-go-name": "SHA"
  8855. },
  8856. "total_count": {
  8857. "type": "integer",
  8858. "format": "int64",
  8859. "x-go-name": "TotalCount"
  8860. },
  8861. "tree": {
  8862. "type": "array",
  8863. "items": {
  8864. "$ref": "#/definitions/GitEntry"
  8865. },
  8866. "x-go-name": "Entries"
  8867. },
  8868. "truncated": {
  8869. "type": "boolean",
  8870. "x-go-name": "Truncated"
  8871. },
  8872. "url": {
  8873. "type": "string",
  8874. "x-go-name": "URL"
  8875. }
  8876. },
  8877. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8878. },
  8879. "Hook": {
  8880. "description": "Hook a hook is a web hook when one repository changed",
  8881. "type": "object",
  8882. "properties": {
  8883. "active": {
  8884. "type": "boolean",
  8885. "x-go-name": "Active"
  8886. },
  8887. "config": {
  8888. "type": "object",
  8889. "additionalProperties": {
  8890. "type": "string"
  8891. },
  8892. "x-go-name": "Config"
  8893. },
  8894. "created_at": {
  8895. "type": "string",
  8896. "format": "date-time",
  8897. "x-go-name": "Created"
  8898. },
  8899. "events": {
  8900. "type": "array",
  8901. "items": {
  8902. "type": "string"
  8903. },
  8904. "x-go-name": "Events"
  8905. },
  8906. "id": {
  8907. "type": "integer",
  8908. "format": "int64",
  8909. "x-go-name": "ID"
  8910. },
  8911. "type": {
  8912. "type": "string",
  8913. "x-go-name": "Type"
  8914. },
  8915. "updated_at": {
  8916. "type": "string",
  8917. "format": "date-time",
  8918. "x-go-name": "Updated"
  8919. }
  8920. },
  8921. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8922. },
  8923. "Identity": {
  8924. "description": "Identity for a person's identity like an author or committer",
  8925. "type": "object",
  8926. "properties": {
  8927. "email": {
  8928. "type": "string",
  8929. "format": "email",
  8930. "x-go-name": "Email"
  8931. },
  8932. "name": {
  8933. "type": "string",
  8934. "x-go-name": "Name"
  8935. }
  8936. },
  8937. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8938. },
  8939. "Issue": {
  8940. "description": "Issue represents an issue in a repository",
  8941. "type": "object",
  8942. "properties": {
  8943. "assignee": {
  8944. "$ref": "#/definitions/User"
  8945. },
  8946. "assignees": {
  8947. "type": "array",
  8948. "items": {
  8949. "$ref": "#/definitions/User"
  8950. },
  8951. "x-go-name": "Assignees"
  8952. },
  8953. "body": {
  8954. "type": "string",
  8955. "x-go-name": "Body"
  8956. },
  8957. "closed_at": {
  8958. "type": "string",
  8959. "format": "date-time",
  8960. "x-go-name": "Closed"
  8961. },
  8962. "comments": {
  8963. "type": "integer",
  8964. "format": "int64",
  8965. "x-go-name": "Comments"
  8966. },
  8967. "created_at": {
  8968. "type": "string",
  8969. "format": "date-time",
  8970. "x-go-name": "Created"
  8971. },
  8972. "due_date": {
  8973. "type": "string",
  8974. "format": "date-time",
  8975. "x-go-name": "Deadline"
  8976. },
  8977. "id": {
  8978. "type": "integer",
  8979. "format": "int64",
  8980. "x-go-name": "ID"
  8981. },
  8982. "labels": {
  8983. "type": "array",
  8984. "items": {
  8985. "$ref": "#/definitions/Label"
  8986. },
  8987. "x-go-name": "Labels"
  8988. },
  8989. "milestone": {
  8990. "$ref": "#/definitions/Milestone"
  8991. },
  8992. "number": {
  8993. "type": "integer",
  8994. "format": "int64",
  8995. "x-go-name": "Index"
  8996. },
  8997. "original_author": {
  8998. "type": "string",
  8999. "x-go-name": "OriginalAuthor"
  9000. },
  9001. "original_author_id": {
  9002. "type": "integer",
  9003. "format": "int64",
  9004. "x-go-name": "OriginalAuthorID"
  9005. },
  9006. "pull_request": {
  9007. "$ref": "#/definitions/PullRequestMeta"
  9008. },
  9009. "state": {
  9010. "$ref": "#/definitions/StateType"
  9011. },
  9012. "title": {
  9013. "type": "string",
  9014. "x-go-name": "Title"
  9015. },
  9016. "updated_at": {
  9017. "type": "string",
  9018. "format": "date-time",
  9019. "x-go-name": "Updated"
  9020. },
  9021. "url": {
  9022. "type": "string",
  9023. "x-go-name": "URL"
  9024. },
  9025. "user": {
  9026. "$ref": "#/definitions/User"
  9027. }
  9028. },
  9029. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9030. },
  9031. "IssueDeadline": {
  9032. "description": "IssueDeadline represents an issue deadline",
  9033. "type": "object",
  9034. "properties": {
  9035. "due_date": {
  9036. "type": "string",
  9037. "format": "date-time",
  9038. "x-go-name": "Deadline"
  9039. }
  9040. },
  9041. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9042. },
  9043. "IssueLabelsOption": {
  9044. "description": "IssueLabelsOption a collection of labels",
  9045. "type": "object",
  9046. "properties": {
  9047. "labels": {
  9048. "description": "list of label IDs",
  9049. "type": "array",
  9050. "items": {
  9051. "type": "integer",
  9052. "format": "int64"
  9053. },
  9054. "x-go-name": "Labels"
  9055. }
  9056. },
  9057. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9058. },
  9059. "Label": {
  9060. "description": "Label a label to an issue or a pr",
  9061. "type": "object",
  9062. "properties": {
  9063. "color": {
  9064. "type": "string",
  9065. "x-go-name": "Color",
  9066. "example": "00aabb"
  9067. },
  9068. "description": {
  9069. "type": "string",
  9070. "x-go-name": "Description"
  9071. },
  9072. "id": {
  9073. "type": "integer",
  9074. "format": "int64",
  9075. "x-go-name": "ID"
  9076. },
  9077. "name": {
  9078. "type": "string",
  9079. "x-go-name": "Name"
  9080. },
  9081. "url": {
  9082. "type": "string",
  9083. "x-go-name": "URL"
  9084. }
  9085. },
  9086. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9087. },
  9088. "MarkdownOption": {
  9089. "description": "MarkdownOption markdown options",
  9090. "type": "object",
  9091. "properties": {
  9092. "Context": {
  9093. "description": "Context to render\n\nin: body",
  9094. "type": "string"
  9095. },
  9096. "Mode": {
  9097. "description": "Mode to render\n\nin: body",
  9098. "type": "string"
  9099. },
  9100. "Text": {
  9101. "description": "Text markdown to render\n\nin: body",
  9102. "type": "string"
  9103. },
  9104. "Wiki": {
  9105. "description": "Is it a wiki page ?\n\nin: body",
  9106. "type": "boolean"
  9107. }
  9108. },
  9109. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9110. },
  9111. "MergePullRequestOption": {
  9112. "description": "MergePullRequestForm form for merging Pull Request",
  9113. "type": "object",
  9114. "required": [
  9115. "Do"
  9116. ],
  9117. "properties": {
  9118. "Do": {
  9119. "type": "string",
  9120. "enum": [
  9121. "merge",
  9122. "rebase",
  9123. "rebase-merge",
  9124. "squash"
  9125. ]
  9126. },
  9127. "MergeMessageField": {
  9128. "type": "string"
  9129. },
  9130. "MergeTitleField": {
  9131. "type": "string"
  9132. }
  9133. },
  9134. "x-go-name": "MergePullRequestForm",
  9135. "x-go-package": "code.gitea.io/gitea/modules/auth"
  9136. },
  9137. "MigrateRepoForm": {
  9138. "description": "MigrateRepoForm form for migrating repository",
  9139. "type": "object",
  9140. "required": [
  9141. "clone_addr",
  9142. "uid",
  9143. "repo_name"
  9144. ],
  9145. "properties": {
  9146. "auth_password": {
  9147. "type": "string",
  9148. "x-go-name": "AuthPassword"
  9149. },
  9150. "auth_username": {
  9151. "type": "string",
  9152. "x-go-name": "AuthUsername"
  9153. },
  9154. "clone_addr": {
  9155. "type": "string",
  9156. "x-go-name": "CloneAddr"
  9157. },
  9158. "description": {
  9159. "type": "string",
  9160. "x-go-name": "Description"
  9161. },
  9162. "issues": {
  9163. "type": "boolean",
  9164. "x-go-name": "Issues"
  9165. },
  9166. "labels": {
  9167. "type": "boolean",
  9168. "x-go-name": "Labels"
  9169. },
  9170. "milestones": {
  9171. "type": "boolean",
  9172. "x-go-name": "Milestones"
  9173. },
  9174. "mirror": {
  9175. "type": "boolean",
  9176. "x-go-name": "Mirror"
  9177. },
  9178. "private": {
  9179. "type": "boolean",
  9180. "x-go-name": "Private"
  9181. },
  9182. "pull_requests": {
  9183. "type": "boolean",
  9184. "x-go-name": "PullRequests"
  9185. },
  9186. "releases": {
  9187. "type": "boolean",
  9188. "x-go-name": "Releases"
  9189. },
  9190. "repo_name": {
  9191. "type": "string",
  9192. "x-go-name": "RepoName"
  9193. },
  9194. "uid": {
  9195. "type": "integer",
  9196. "format": "int64",
  9197. "x-go-name": "UID"
  9198. },
  9199. "wiki": {
  9200. "type": "boolean",
  9201. "x-go-name": "Wiki"
  9202. }
  9203. },
  9204. "x-go-package": "code.gitea.io/gitea/modules/auth"
  9205. },
  9206. "Milestone": {
  9207. "description": "Milestone milestone is a collection of issues on one repository",
  9208. "type": "object",
  9209. "properties": {
  9210. "closed_at": {
  9211. "type": "string",
  9212. "format": "date-time",
  9213. "x-go-name": "Closed"
  9214. },
  9215. "closed_issues": {
  9216. "type": "integer",
  9217. "format": "int64",
  9218. "x-go-name": "ClosedIssues"
  9219. },
  9220. "description": {
  9221. "type": "string",
  9222. "x-go-name": "Description"
  9223. },
  9224. "due_on": {
  9225. "type": "string",
  9226. "format": "date-time",
  9227. "x-go-name": "Deadline"
  9228. },
  9229. "id": {
  9230. "type": "integer",
  9231. "format": "int64",
  9232. "x-go-name": "ID"
  9233. },
  9234. "open_issues": {
  9235. "type": "integer",
  9236. "format": "int64",
  9237. "x-go-name": "OpenIssues"
  9238. },
  9239. "state": {
  9240. "$ref": "#/definitions/StateType"
  9241. },
  9242. "title": {
  9243. "type": "string",
  9244. "x-go-name": "Title"
  9245. }
  9246. },
  9247. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9248. },
  9249. "Organization": {
  9250. "description": "Organization represents an organization",
  9251. "type": "object",
  9252. "properties": {
  9253. "avatar_url": {
  9254. "type": "string",
  9255. "x-go-name": "AvatarURL"
  9256. },
  9257. "description": {
  9258. "type": "string",
  9259. "x-go-name": "Description"
  9260. },
  9261. "full_name": {
  9262. "type": "string",
  9263. "x-go-name": "FullName"
  9264. },
  9265. "id": {
  9266. "type": "integer",
  9267. "format": "int64",
  9268. "x-go-name": "ID"
  9269. },
  9270. "location": {
  9271. "type": "string",
  9272. "x-go-name": "Location"
  9273. },
  9274. "username": {
  9275. "type": "string",
  9276. "x-go-name": "UserName"
  9277. },
  9278. "visibility": {
  9279. "type": "string",
  9280. "x-go-name": "Visibility"
  9281. },
  9282. "website": {
  9283. "type": "string",
  9284. "x-go-name": "Website"
  9285. }
  9286. },
  9287. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9288. },
  9289. "PRBranchInfo": {
  9290. "description": "PRBranchInfo information about a branch",
  9291. "type": "object",
  9292. "properties": {
  9293. "label": {
  9294. "type": "string",
  9295. "x-go-name": "Name"
  9296. },
  9297. "ref": {
  9298. "type": "string",
  9299. "x-go-name": "Ref"
  9300. },
  9301. "repo": {
  9302. "$ref": "#/definitions/Repository"
  9303. },
  9304. "repo_id": {
  9305. "type": "integer",
  9306. "format": "int64",
  9307. "x-go-name": "RepoID"
  9308. },
  9309. "sha": {
  9310. "type": "string",
  9311. "x-go-name": "Sha"
  9312. }
  9313. },
  9314. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9315. },
  9316. "PayloadCommit": {
  9317. "description": "PayloadCommit represents a commit",
  9318. "type": "object",
  9319. "properties": {
  9320. "added": {
  9321. "type": "array",
  9322. "items": {
  9323. "type": "string"
  9324. },
  9325. "x-go-name": "Added"
  9326. },
  9327. "author": {
  9328. "$ref": "#/definitions/PayloadUser"
  9329. },
  9330. "committer": {
  9331. "$ref": "#/definitions/PayloadUser"
  9332. },
  9333. "id": {
  9334. "description": "sha1 hash of the commit",
  9335. "type": "string",
  9336. "x-go-name": "ID"
  9337. },
  9338. "message": {
  9339. "type": "string",
  9340. "x-go-name": "Message"
  9341. },
  9342. "modified": {
  9343. "type": "array",
  9344. "items": {
  9345. "type": "string"
  9346. },
  9347. "x-go-name": "Modified"
  9348. },
  9349. "removed": {
  9350. "type": "array",
  9351. "items": {
  9352. "type": "string"
  9353. },
  9354. "x-go-name": "Removed"
  9355. },
  9356. "timestamp": {
  9357. "type": "string",
  9358. "format": "date-time",
  9359. "x-go-name": "Timestamp"
  9360. },
  9361. "url": {
  9362. "type": "string",
  9363. "x-go-name": "URL"
  9364. },
  9365. "verification": {
  9366. "$ref": "#/definitions/PayloadCommitVerification"
  9367. }
  9368. },
  9369. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9370. },
  9371. "PayloadCommitVerification": {
  9372. "description": "PayloadCommitVerification represents the GPG verification of a commit",
  9373. "type": "object",
  9374. "properties": {
  9375. "payload": {
  9376. "type": "string",
  9377. "x-go-name": "Payload"
  9378. },
  9379. "reason": {
  9380. "type": "string",
  9381. "x-go-name": "Reason"
  9382. },
  9383. "signature": {
  9384. "type": "string",
  9385. "x-go-name": "Signature"
  9386. },
  9387. "verified": {
  9388. "type": "boolean",
  9389. "x-go-name": "Verified"
  9390. }
  9391. },
  9392. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9393. },
  9394. "PayloadUser": {
  9395. "description": "PayloadUser represents the author or committer of a commit",
  9396. "type": "object",
  9397. "properties": {
  9398. "email": {
  9399. "type": "string",
  9400. "format": "email",
  9401. "x-go-name": "Email"
  9402. },
  9403. "name": {
  9404. "description": "Full name of the commit author",
  9405. "type": "string",
  9406. "x-go-name": "Name"
  9407. },
  9408. "username": {
  9409. "type": "string",
  9410. "x-go-name": "UserName"
  9411. }
  9412. },
  9413. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9414. },
  9415. "Permission": {
  9416. "description": "Permission represents a set of permissions",
  9417. "type": "object",
  9418. "properties": {
  9419. "admin": {
  9420. "type": "boolean",
  9421. "x-go-name": "Admin"
  9422. },
  9423. "pull": {
  9424. "type": "boolean",
  9425. "x-go-name": "Pull"
  9426. },
  9427. "push": {
  9428. "type": "boolean",
  9429. "x-go-name": "Push"
  9430. }
  9431. },
  9432. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9433. },
  9434. "PublicKey": {
  9435. "description": "PublicKey publickey is a user key to push code to repository",
  9436. "type": "object",
  9437. "properties": {
  9438. "created_at": {
  9439. "type": "string",
  9440. "format": "date-time",
  9441. "x-go-name": "Created"
  9442. },
  9443. "fingerprint": {
  9444. "type": "string",
  9445. "x-go-name": "Fingerprint"
  9446. },
  9447. "id": {
  9448. "type": "integer",
  9449. "format": "int64",
  9450. "x-go-name": "ID"
  9451. },
  9452. "key": {
  9453. "type": "string",
  9454. "x-go-name": "Key"
  9455. },
  9456. "key_type": {
  9457. "type": "string",
  9458. "x-go-name": "KeyType"
  9459. },
  9460. "read_only": {
  9461. "type": "boolean",
  9462. "x-go-name": "ReadOnly"
  9463. },
  9464. "title": {
  9465. "type": "string",
  9466. "x-go-name": "Title"
  9467. },
  9468. "url": {
  9469. "type": "string",
  9470. "x-go-name": "URL"
  9471. },
  9472. "user": {
  9473. "$ref": "#/definitions/User"
  9474. }
  9475. },
  9476. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9477. },
  9478. "PullRequest": {
  9479. "description": "PullRequest represents a pull request",
  9480. "type": "object",
  9481. "properties": {
  9482. "assignee": {
  9483. "$ref": "#/definitions/User"
  9484. },
  9485. "assignees": {
  9486. "type": "array",
  9487. "items": {
  9488. "$ref": "#/definitions/User"
  9489. },
  9490. "x-go-name": "Assignees"
  9491. },
  9492. "base": {
  9493. "$ref": "#/definitions/PRBranchInfo"
  9494. },
  9495. "body": {
  9496. "type": "string",
  9497. "x-go-name": "Body"
  9498. },
  9499. "closed_at": {
  9500. "type": "string",
  9501. "format": "date-time",
  9502. "x-go-name": "Closed"
  9503. },
  9504. "comments": {
  9505. "type": "integer",
  9506. "format": "int64",
  9507. "x-go-name": "Comments"
  9508. },
  9509. "created_at": {
  9510. "type": "string",
  9511. "format": "date-time",
  9512. "x-go-name": "Created"
  9513. },
  9514. "diff_url": {
  9515. "type": "string",
  9516. "x-go-name": "DiffURL"
  9517. },
  9518. "due_date": {
  9519. "type": "string",
  9520. "format": "date-time",
  9521. "x-go-name": "Deadline"
  9522. },
  9523. "head": {
  9524. "$ref": "#/definitions/PRBranchInfo"
  9525. },
  9526. "html_url": {
  9527. "type": "string",
  9528. "x-go-name": "HTMLURL"
  9529. },
  9530. "id": {
  9531. "type": "integer",
  9532. "format": "int64",
  9533. "x-go-name": "ID"
  9534. },
  9535. "labels": {
  9536. "type": "array",
  9537. "items": {
  9538. "$ref": "#/definitions/Label"
  9539. },
  9540. "x-go-name": "Labels"
  9541. },
  9542. "merge_base": {
  9543. "type": "string",
  9544. "x-go-name": "MergeBase"
  9545. },
  9546. "merge_commit_sha": {
  9547. "type": "string",
  9548. "x-go-name": "MergedCommitID"
  9549. },
  9550. "mergeable": {
  9551. "type": "boolean",
  9552. "x-go-name": "Mergeable"
  9553. },
  9554. "merged": {
  9555. "type": "boolean",
  9556. "x-go-name": "HasMerged"
  9557. },
  9558. "merged_at": {
  9559. "type": "string",
  9560. "format": "date-time",
  9561. "x-go-name": "Merged"
  9562. },
  9563. "merged_by": {
  9564. "$ref": "#/definitions/User"
  9565. },
  9566. "milestone": {
  9567. "$ref": "#/definitions/Milestone"
  9568. },
  9569. "number": {
  9570. "type": "integer",
  9571. "format": "int64",
  9572. "x-go-name": "Index"
  9573. },
  9574. "patch_url": {
  9575. "type": "string",
  9576. "x-go-name": "PatchURL"
  9577. },
  9578. "state": {
  9579. "$ref": "#/definitions/StateType"
  9580. },
  9581. "title": {
  9582. "type": "string",
  9583. "x-go-name": "Title"
  9584. },
  9585. "updated_at": {
  9586. "type": "string",
  9587. "format": "date-time",
  9588. "x-go-name": "Updated"
  9589. },
  9590. "url": {
  9591. "type": "string",
  9592. "x-go-name": "URL"
  9593. },
  9594. "user": {
  9595. "$ref": "#/definitions/User"
  9596. }
  9597. },
  9598. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9599. },
  9600. "PullRequestMeta": {
  9601. "description": "PullRequestMeta PR info if an issue is a PR",
  9602. "type": "object",
  9603. "properties": {
  9604. "merged": {
  9605. "type": "boolean",
  9606. "x-go-name": "HasMerged"
  9607. },
  9608. "merged_at": {
  9609. "type": "string",
  9610. "format": "date-time",
  9611. "x-go-name": "Merged"
  9612. }
  9613. },
  9614. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9615. },
  9616. "Reference": {
  9617. "type": "object",
  9618. "title": "Reference represents a Git reference.",
  9619. "properties": {
  9620. "object": {
  9621. "$ref": "#/definitions/GitObject"
  9622. },
  9623. "ref": {
  9624. "type": "string",
  9625. "x-go-name": "Ref"
  9626. },
  9627. "url": {
  9628. "type": "string",
  9629. "x-go-name": "URL"
  9630. }
  9631. },
  9632. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9633. },
  9634. "Release": {
  9635. "description": "Release represents a repository release",
  9636. "type": "object",
  9637. "properties": {
  9638. "assets": {
  9639. "type": "array",
  9640. "items": {
  9641. "$ref": "#/definitions/Attachment"
  9642. },
  9643. "x-go-name": "Attachments"
  9644. },
  9645. "author": {
  9646. "$ref": "#/definitions/User"
  9647. },
  9648. "body": {
  9649. "type": "string",
  9650. "x-go-name": "Note"
  9651. },
  9652. "created_at": {
  9653. "type": "string",
  9654. "format": "date-time",
  9655. "x-go-name": "CreatedAt"
  9656. },
  9657. "draft": {
  9658. "type": "boolean",
  9659. "x-go-name": "IsDraft"
  9660. },
  9661. "id": {
  9662. "type": "integer",
  9663. "format": "int64",
  9664. "x-go-name": "ID"
  9665. },
  9666. "name": {
  9667. "type": "string",
  9668. "x-go-name": "Title"
  9669. },
  9670. "prerelease": {
  9671. "type": "boolean",
  9672. "x-go-name": "IsPrerelease"
  9673. },
  9674. "published_at": {
  9675. "type": "string",
  9676. "format": "date-time",
  9677. "x-go-name": "PublishedAt"
  9678. },
  9679. "tag_name": {
  9680. "type": "string",
  9681. "x-go-name": "TagName"
  9682. },
  9683. "tarball_url": {
  9684. "type": "string",
  9685. "x-go-name": "TarURL"
  9686. },
  9687. "target_commitish": {
  9688. "type": "string",
  9689. "x-go-name": "Target"
  9690. },
  9691. "url": {
  9692. "type": "string",
  9693. "x-go-name": "URL"
  9694. },
  9695. "zipball_url": {
  9696. "type": "string",
  9697. "x-go-name": "ZipURL"
  9698. }
  9699. },
  9700. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9701. },
  9702. "RepoCommit": {
  9703. "type": "object",
  9704. "title": "RepoCommit contains information of a commit in the context of a repository.",
  9705. "properties": {
  9706. "author": {
  9707. "$ref": "#/definitions/CommitUser"
  9708. },
  9709. "committer": {
  9710. "$ref": "#/definitions/CommitUser"
  9711. },
  9712. "message": {
  9713. "type": "string",
  9714. "x-go-name": "Message"
  9715. },
  9716. "tree": {
  9717. "$ref": "#/definitions/CommitMeta"
  9718. },
  9719. "url": {
  9720. "type": "string",
  9721. "x-go-name": "URL"
  9722. }
  9723. },
  9724. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9725. },
  9726. "RepoTopicOptions": {
  9727. "description": "RepoTopicOptions a collection of repo topic names",
  9728. "type": "object",
  9729. "properties": {
  9730. "topics": {
  9731. "description": "list of topic names",
  9732. "type": "array",
  9733. "items": {
  9734. "type": "string"
  9735. },
  9736. "x-go-name": "Topics"
  9737. }
  9738. },
  9739. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9740. },
  9741. "Repository": {
  9742. "description": "Repository represents a repository",
  9743. "type": "object",
  9744. "properties": {
  9745. "allow_merge_commits": {
  9746. "type": "boolean",
  9747. "x-go-name": "AllowMerge"
  9748. },
  9749. "allow_rebase": {
  9750. "type": "boolean",
  9751. "x-go-name": "AllowRebase"
  9752. },
  9753. "allow_rebase_explicit": {
  9754. "type": "boolean",
  9755. "x-go-name": "AllowRebaseMerge"
  9756. },
  9757. "allow_squash_merge": {
  9758. "type": "boolean",
  9759. "x-go-name": "AllowSquash"
  9760. },
  9761. "archived": {
  9762. "type": "boolean",
  9763. "x-go-name": "Archived"
  9764. },
  9765. "avatar_url": {
  9766. "type": "string",
  9767. "x-go-name": "AvatarURL"
  9768. },
  9769. "clone_url": {
  9770. "type": "string",
  9771. "x-go-name": "CloneURL"
  9772. },
  9773. "created_at": {
  9774. "type": "string",
  9775. "format": "date-time",
  9776. "x-go-name": "Created"
  9777. },
  9778. "default_branch": {
  9779. "type": "string",
  9780. "x-go-name": "DefaultBranch"
  9781. },
  9782. "description": {
  9783. "type": "string",
  9784. "x-go-name": "Description"
  9785. },
  9786. "empty": {
  9787. "type": "boolean",
  9788. "x-go-name": "Empty"
  9789. },
  9790. "fork": {
  9791. "type": "boolean",
  9792. "x-go-name": "Fork"
  9793. },
  9794. "forks_count": {
  9795. "type": "integer",
  9796. "format": "int64",
  9797. "x-go-name": "Forks"
  9798. },
  9799. "full_name": {
  9800. "type": "string",
  9801. "x-go-name": "FullName"
  9802. },
  9803. "has_issues": {
  9804. "type": "boolean",
  9805. "x-go-name": "HasIssues"
  9806. },
  9807. "has_pull_requests": {
  9808. "type": "boolean",
  9809. "x-go-name": "HasPullRequests"
  9810. },
  9811. "has_wiki": {
  9812. "type": "boolean",
  9813. "x-go-name": "HasWiki"
  9814. },
  9815. "html_url": {
  9816. "type": "string",
  9817. "x-go-name": "HTMLURL"
  9818. },
  9819. "id": {
  9820. "type": "integer",
  9821. "format": "int64",
  9822. "x-go-name": "ID"
  9823. },
  9824. "ignore_whitespace_conflicts": {
  9825. "type": "boolean",
  9826. "x-go-name": "IgnoreWhitespaceConflicts"
  9827. },
  9828. "mirror": {
  9829. "type": "boolean",
  9830. "x-go-name": "Mirror"
  9831. },
  9832. "name": {
  9833. "type": "string",
  9834. "x-go-name": "Name"
  9835. },
  9836. "open_issues_count": {
  9837. "type": "integer",
  9838. "format": "int64",
  9839. "x-go-name": "OpenIssues"
  9840. },
  9841. "original_url": {
  9842. "type": "string",
  9843. "x-go-name": "OriginalURL"
  9844. },
  9845. "owner": {
  9846. "$ref": "#/definitions/User"
  9847. },
  9848. "parent": {
  9849. "$ref": "#/definitions/Repository"
  9850. },
  9851. "permissions": {
  9852. "$ref": "#/definitions/Permission"
  9853. },
  9854. "private": {
  9855. "type": "boolean",
  9856. "x-go-name": "Private"
  9857. },
  9858. "size": {
  9859. "type": "integer",
  9860. "format": "int64",
  9861. "x-go-name": "Size"
  9862. },
  9863. "ssh_url": {
  9864. "type": "string",
  9865. "x-go-name": "SSHURL"
  9866. },
  9867. "stars_count": {
  9868. "type": "integer",
  9869. "format": "int64",
  9870. "x-go-name": "Stars"
  9871. },
  9872. "updated_at": {
  9873. "type": "string",
  9874. "format": "date-time",
  9875. "x-go-name": "Updated"
  9876. },
  9877. "watchers_count": {
  9878. "type": "integer",
  9879. "format": "int64",
  9880. "x-go-name": "Watchers"
  9881. },
  9882. "website": {
  9883. "type": "string",
  9884. "x-go-name": "Website"
  9885. }
  9886. },
  9887. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9888. },
  9889. "SearchResults": {
  9890. "description": "SearchResults results of a successful search",
  9891. "type": "object",
  9892. "properties": {
  9893. "data": {
  9894. "type": "array",
  9895. "items": {
  9896. "$ref": "#/definitions/Repository"
  9897. },
  9898. "x-go-name": "Data"
  9899. },
  9900. "ok": {
  9901. "type": "boolean",
  9902. "x-go-name": "OK"
  9903. }
  9904. },
  9905. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9906. },
  9907. "ServerVersion": {
  9908. "description": "ServerVersion wraps the version of the server",
  9909. "type": "object",
  9910. "properties": {
  9911. "version": {
  9912. "type": "string",
  9913. "x-go-name": "Version"
  9914. }
  9915. },
  9916. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9917. },
  9918. "StateType": {
  9919. "description": "StateType issue state type",
  9920. "type": "string",
  9921. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9922. },
  9923. "Status": {
  9924. "description": "Status holds a single Status of a single Commit",
  9925. "type": "object",
  9926. "properties": {
  9927. "context": {
  9928. "type": "string",
  9929. "x-go-name": "Context"
  9930. },
  9931. "created_at": {
  9932. "type": "string",
  9933. "format": "date-time",
  9934. "x-go-name": "Created"
  9935. },
  9936. "creator": {
  9937. "$ref": "#/definitions/User"
  9938. },
  9939. "description": {
  9940. "type": "string",
  9941. "x-go-name": "Description"
  9942. },
  9943. "id": {
  9944. "type": "integer",
  9945. "format": "int64",
  9946. "x-go-name": "ID"
  9947. },
  9948. "status": {
  9949. "$ref": "#/definitions/StatusState"
  9950. },
  9951. "target_url": {
  9952. "type": "string",
  9953. "x-go-name": "TargetURL"
  9954. },
  9955. "updated_at": {
  9956. "type": "string",
  9957. "format": "date-time",
  9958. "x-go-name": "Updated"
  9959. },
  9960. "url": {
  9961. "type": "string",
  9962. "x-go-name": "URL"
  9963. }
  9964. },
  9965. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9966. },
  9967. "StatusState": {
  9968. "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"",
  9969. "type": "string",
  9970. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9971. },
  9972. "Tag": {
  9973. "description": "Tag represents a repository tag",
  9974. "type": "object",
  9975. "properties": {
  9976. "commit": {
  9977. "$ref": "#/definitions/CommitMeta"
  9978. },
  9979. "id": {
  9980. "type": "string",
  9981. "x-go-name": "ID"
  9982. },
  9983. "name": {
  9984. "type": "string",
  9985. "x-go-name": "Name"
  9986. },
  9987. "tarball_url": {
  9988. "type": "string",
  9989. "x-go-name": "TarballURL"
  9990. },
  9991. "zipball_url": {
  9992. "type": "string",
  9993. "x-go-name": "ZipballURL"
  9994. }
  9995. },
  9996. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9997. },
  9998. "Team": {
  9999. "description": "Team represents a team in an organization",
  10000. "type": "object",
  10001. "properties": {
  10002. "description": {
  10003. "type": "string",
  10004. "x-go-name": "Description"
  10005. },
  10006. "id": {
  10007. "type": "integer",
  10008. "format": "int64",
  10009. "x-go-name": "ID"
  10010. },
  10011. "name": {
  10012. "type": "string",
  10013. "x-go-name": "Name"
  10014. },
  10015. "organization": {
  10016. "$ref": "#/definitions/Organization"
  10017. },
  10018. "permission": {
  10019. "type": "string",
  10020. "enum": [
  10021. "none",
  10022. "read",
  10023. "write",
  10024. "admin",
  10025. "owner"
  10026. ],
  10027. "x-go-name": "Permission"
  10028. },
  10029. "units": {
  10030. "type": "array",
  10031. "items": {
  10032. "type": "string"
  10033. },
  10034. "x-go-name": "Units",
  10035. "example": [
  10036. "repo.code",
  10037. "repo.issues",
  10038. "repo.ext_issues",
  10039. "repo.wiki",
  10040. "repo.pulls",
  10041. "repo.releases",
  10042. "repo.ext_wiki"
  10043. ]
  10044. }
  10045. },
  10046. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10047. },
  10048. "TimeStamp": {
  10049. "description": "TimeStamp defines a timestamp",
  10050. "type": "integer",
  10051. "format": "int64",
  10052. "x-go-package": "code.gitea.io/gitea/modules/timeutil"
  10053. },
  10054. "TopicName": {
  10055. "description": "TopicName a list of repo topic names",
  10056. "type": "object",
  10057. "properties": {
  10058. "topics": {
  10059. "type": "array",
  10060. "items": {
  10061. "type": "string"
  10062. },
  10063. "x-go-name": "TopicNames"
  10064. }
  10065. },
  10066. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10067. },
  10068. "TopicResponse": {
  10069. "description": "TopicResponse for returning topics",
  10070. "type": "object",
  10071. "properties": {
  10072. "created": {
  10073. "type": "string",
  10074. "format": "date-time",
  10075. "x-go-name": "Created"
  10076. },
  10077. "id": {
  10078. "type": "integer",
  10079. "format": "int64",
  10080. "x-go-name": "ID"
  10081. },
  10082. "repo_count": {
  10083. "type": "integer",
  10084. "format": "int64",
  10085. "x-go-name": "RepoCount"
  10086. },
  10087. "topic_name": {
  10088. "type": "string",
  10089. "x-go-name": "Name"
  10090. },
  10091. "updated": {
  10092. "type": "string",
  10093. "format": "date-time",
  10094. "x-go-name": "Updated"
  10095. }
  10096. },
  10097. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10098. },
  10099. "TrackedTime": {
  10100. "description": "TrackedTime worked time for an issue / pr",
  10101. "type": "object",
  10102. "properties": {
  10103. "created": {
  10104. "type": "string",
  10105. "format": "date-time",
  10106. "x-go-name": "Created"
  10107. },
  10108. "id": {
  10109. "type": "integer",
  10110. "format": "int64",
  10111. "x-go-name": "ID"
  10112. },
  10113. "issue_id": {
  10114. "type": "integer",
  10115. "format": "int64",
  10116. "x-go-name": "IssueID"
  10117. },
  10118. "time": {
  10119. "description": "Time in seconds",
  10120. "type": "integer",
  10121. "format": "int64",
  10122. "x-go-name": "Time"
  10123. },
  10124. "user_id": {
  10125. "type": "integer",
  10126. "format": "int64",
  10127. "x-go-name": "UserID"
  10128. }
  10129. },
  10130. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10131. },
  10132. "UpdateFileOptions": {
  10133. "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)",
  10134. "type": "object",
  10135. "required": [
  10136. "sha",
  10137. "content"
  10138. ],
  10139. "properties": {
  10140. "author": {
  10141. "$ref": "#/definitions/Identity"
  10142. },
  10143. "branch": {
  10144. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  10145. "type": "string",
  10146. "x-go-name": "BranchName"
  10147. },
  10148. "committer": {
  10149. "$ref": "#/definitions/Identity"
  10150. },
  10151. "content": {
  10152. "description": "content must be base64 encoded",
  10153. "type": "string",
  10154. "x-go-name": "Content"
  10155. },
  10156. "from_path": {
  10157. "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL",
  10158. "type": "string",
  10159. "x-go-name": "FromPath"
  10160. },
  10161. "message": {
  10162. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  10163. "type": "string",
  10164. "x-go-name": "Message"
  10165. },
  10166. "new_branch": {
  10167. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  10168. "type": "string",
  10169. "x-go-name": "NewBranchName"
  10170. },
  10171. "sha": {
  10172. "description": "sha is the SHA for the file that already exists",
  10173. "type": "string",
  10174. "x-go-name": "SHA"
  10175. }
  10176. },
  10177. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10178. },
  10179. "User": {
  10180. "description": "User represents a user",
  10181. "type": "object",
  10182. "properties": {
  10183. "avatar_url": {
  10184. "description": "URL to the user's avatar",
  10185. "type": "string",
  10186. "x-go-name": "AvatarURL"
  10187. },
  10188. "created": {
  10189. "type": "string",
  10190. "format": "date-time",
  10191. "x-go-name": "Created"
  10192. },
  10193. "email": {
  10194. "type": "string",
  10195. "format": "email",
  10196. "x-go-name": "Email"
  10197. },
  10198. "full_name": {
  10199. "description": "the user's full name",
  10200. "type": "string",
  10201. "x-go-name": "FullName"
  10202. },
  10203. "id": {
  10204. "description": "the user's id",
  10205. "type": "integer",
  10206. "format": "int64",
  10207. "x-go-name": "ID"
  10208. },
  10209. "is_admin": {
  10210. "description": "Is the user an administrator",
  10211. "type": "boolean",
  10212. "x-go-name": "IsAdmin"
  10213. },
  10214. "language": {
  10215. "description": "User locale",
  10216. "type": "string",
  10217. "x-go-name": "Language"
  10218. },
  10219. "last_login": {
  10220. "type": "string",
  10221. "format": "date-time",
  10222. "x-go-name": "LastLogin"
  10223. },
  10224. "login": {
  10225. "description": "the user's username",
  10226. "type": "string",
  10227. "x-go-name": "UserName"
  10228. }
  10229. },
  10230. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10231. },
  10232. "UserHeatmapData": {
  10233. "description": "UserHeatmapData represents the data needed to create a heatmap",
  10234. "type": "object",
  10235. "properties": {
  10236. "contributions": {
  10237. "type": "integer",
  10238. "format": "int64",
  10239. "x-go-name": "Contributions"
  10240. },
  10241. "timestamp": {
  10242. "$ref": "#/definitions/TimeStamp"
  10243. }
  10244. },
  10245. "x-go-package": "code.gitea.io/gitea/models"
  10246. },
  10247. "WatchInfo": {
  10248. "description": "WatchInfo represents an API watch status of one repository",
  10249. "type": "object",
  10250. "properties": {
  10251. "created_at": {
  10252. "type": "string",
  10253. "format": "date-time",
  10254. "x-go-name": "CreatedAt"
  10255. },
  10256. "ignored": {
  10257. "type": "boolean",
  10258. "x-go-name": "Ignored"
  10259. },
  10260. "reason": {
  10261. "type": "object",
  10262. "x-go-name": "Reason"
  10263. },
  10264. "repository_url": {
  10265. "type": "string",
  10266. "x-go-name": "RepositoryURL"
  10267. },
  10268. "subscribed": {
  10269. "type": "boolean",
  10270. "x-go-name": "Subscribed"
  10271. },
  10272. "url": {
  10273. "type": "string",
  10274. "x-go-name": "URL"
  10275. }
  10276. },
  10277. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10278. }
  10279. },
  10280. "responses": {
  10281. "AccessToken": {
  10282. "description": "AccessToken represents an API access token.",
  10283. "headers": {
  10284. "id": {
  10285. "type": "integer",
  10286. "format": "int64"
  10287. },
  10288. "name": {
  10289. "type": "string"
  10290. },
  10291. "sha1": {
  10292. "type": "string"
  10293. },
  10294. "token_last_eight": {
  10295. "type": "string"
  10296. }
  10297. }
  10298. },
  10299. "AccessTokenList": {
  10300. "description": "AccessTokenList represents a list of API access token.",
  10301. "schema": {
  10302. "type": "array",
  10303. "items": {
  10304. "$ref": "#/definitions/AccessToken"
  10305. }
  10306. }
  10307. },
  10308. "AnnotatedTag": {
  10309. "description": "AnnotatedTag",
  10310. "schema": {
  10311. "$ref": "#/definitions/AnnotatedTag"
  10312. }
  10313. },
  10314. "Attachment": {
  10315. "description": "Attachment",
  10316. "schema": {
  10317. "$ref": "#/definitions/Attachment"
  10318. }
  10319. },
  10320. "AttachmentList": {
  10321. "description": "AttachmentList",
  10322. "schema": {
  10323. "type": "array",
  10324. "items": {
  10325. "$ref": "#/definitions/Attachment"
  10326. }
  10327. }
  10328. },
  10329. "Branch": {
  10330. "description": "Branch",
  10331. "schema": {
  10332. "$ref": "#/definitions/Branch"
  10333. }
  10334. },
  10335. "BranchList": {
  10336. "description": "BranchList",
  10337. "schema": {
  10338. "type": "array",
  10339. "items": {
  10340. "$ref": "#/definitions/Branch"
  10341. }
  10342. }
  10343. },
  10344. "Comment": {
  10345. "description": "Comment",
  10346. "schema": {
  10347. "$ref": "#/definitions/Comment"
  10348. }
  10349. },
  10350. "CommentList": {
  10351. "description": "CommentList",
  10352. "schema": {
  10353. "type": "array",
  10354. "items": {
  10355. "$ref": "#/definitions/Comment"
  10356. }
  10357. }
  10358. },
  10359. "Commit": {
  10360. "description": "Commit",
  10361. "schema": {
  10362. "$ref": "#/definitions/Commit"
  10363. }
  10364. },
  10365. "CommitList": {
  10366. "description": "CommitList",
  10367. "schema": {
  10368. "type": "array",
  10369. "items": {
  10370. "$ref": "#/definitions/Commit"
  10371. }
  10372. },
  10373. "headers": {
  10374. "X-HasMore": {
  10375. "type": "boolean",
  10376. "description": "True if there is another page"
  10377. },
  10378. "X-Page": {
  10379. "type": "integer",
  10380. "format": "int64",
  10381. "description": "The current page"
  10382. },
  10383. "X-PageCount": {
  10384. "type": "integer",
  10385. "format": "int64",
  10386. "description": "Total number of pages"
  10387. },
  10388. "X-PerPage": {
  10389. "type": "integer",
  10390. "format": "int64",
  10391. "description": "Commits per page"
  10392. },
  10393. "X-Total": {
  10394. "type": "integer",
  10395. "format": "int64",
  10396. "description": "Total commit count"
  10397. }
  10398. }
  10399. },
  10400. "ContentsListResponse": {
  10401. "description": "ContentsListResponse",
  10402. "schema": {
  10403. "type": "array",
  10404. "items": {
  10405. "$ref": "#/definitions/ContentsResponse"
  10406. }
  10407. }
  10408. },
  10409. "ContentsResponse": {
  10410. "description": "ContentsResponse",
  10411. "schema": {
  10412. "$ref": "#/definitions/ContentsResponse"
  10413. }
  10414. },
  10415. "DeployKey": {
  10416. "description": "DeployKey",
  10417. "schema": {
  10418. "$ref": "#/definitions/DeployKey"
  10419. }
  10420. },
  10421. "DeployKeyList": {
  10422. "description": "DeployKeyList",
  10423. "schema": {
  10424. "type": "array",
  10425. "items": {
  10426. "$ref": "#/definitions/DeployKey"
  10427. }
  10428. }
  10429. },
  10430. "EmailList": {
  10431. "description": "EmailList",
  10432. "schema": {
  10433. "type": "array",
  10434. "items": {
  10435. "$ref": "#/definitions/Email"
  10436. }
  10437. }
  10438. },
  10439. "EmptyRepository": {
  10440. "description": "EmptyRepository",
  10441. "schema": {
  10442. "$ref": "#/definitions/APIError"
  10443. }
  10444. },
  10445. "FileDeleteResponse": {
  10446. "description": "FileDeleteResponse",
  10447. "schema": {
  10448. "$ref": "#/definitions/FileDeleteResponse"
  10449. }
  10450. },
  10451. "FileResponse": {
  10452. "description": "FileResponse",
  10453. "schema": {
  10454. "$ref": "#/definitions/FileResponse"
  10455. }
  10456. },
  10457. "GPGKey": {
  10458. "description": "GPGKey",
  10459. "schema": {
  10460. "$ref": "#/definitions/GPGKey"
  10461. }
  10462. },
  10463. "GPGKeyList": {
  10464. "description": "GPGKeyList",
  10465. "schema": {
  10466. "type": "array",
  10467. "items": {
  10468. "$ref": "#/definitions/GPGKey"
  10469. }
  10470. }
  10471. },
  10472. "GitBlobResponse": {
  10473. "description": "GitBlobResponse",
  10474. "schema": {
  10475. "$ref": "#/definitions/GitBlobResponse"
  10476. }
  10477. },
  10478. "GitHook": {
  10479. "description": "GitHook",
  10480. "schema": {
  10481. "$ref": "#/definitions/GitHook"
  10482. }
  10483. },
  10484. "GitHookList": {
  10485. "description": "GitHookList",
  10486. "schema": {
  10487. "type": "array",
  10488. "items": {
  10489. "$ref": "#/definitions/GitHook"
  10490. }
  10491. }
  10492. },
  10493. "GitTreeResponse": {
  10494. "description": "GitTreeResponse",
  10495. "schema": {
  10496. "$ref": "#/definitions/GitTreeResponse"
  10497. }
  10498. },
  10499. "Hook": {
  10500. "description": "Hook",
  10501. "schema": {
  10502. "$ref": "#/definitions/Hook"
  10503. }
  10504. },
  10505. "HookList": {
  10506. "description": "HookList",
  10507. "schema": {
  10508. "type": "array",
  10509. "items": {
  10510. "$ref": "#/definitions/Hook"
  10511. }
  10512. }
  10513. },
  10514. "Issue": {
  10515. "description": "Issue",
  10516. "schema": {
  10517. "$ref": "#/definitions/Issue"
  10518. }
  10519. },
  10520. "IssueDeadline": {
  10521. "description": "IssueDeadline",
  10522. "schema": {
  10523. "$ref": "#/definitions/IssueDeadline"
  10524. }
  10525. },
  10526. "IssueList": {
  10527. "description": "IssueList",
  10528. "schema": {
  10529. "type": "array",
  10530. "items": {
  10531. "$ref": "#/definitions/Issue"
  10532. }
  10533. }
  10534. },
  10535. "Label": {
  10536. "description": "Label",
  10537. "schema": {
  10538. "$ref": "#/definitions/Label"
  10539. }
  10540. },
  10541. "LabelList": {
  10542. "description": "LabelList",
  10543. "schema": {
  10544. "type": "array",
  10545. "items": {
  10546. "$ref": "#/definitions/Label"
  10547. }
  10548. }
  10549. },
  10550. "MarkdownRender": {
  10551. "description": "MarkdownRender is a rendered markdown document",
  10552. "schema": {
  10553. "type": "string"
  10554. }
  10555. },
  10556. "Milestone": {
  10557. "description": "Milestone",
  10558. "schema": {
  10559. "$ref": "#/definitions/Milestone"
  10560. }
  10561. },
  10562. "MilestoneList": {
  10563. "description": "MilestoneList",
  10564. "schema": {
  10565. "type": "array",
  10566. "items": {
  10567. "$ref": "#/definitions/Milestone"
  10568. }
  10569. }
  10570. },
  10571. "Organization": {
  10572. "description": "Organization",
  10573. "schema": {
  10574. "$ref": "#/definitions/Organization"
  10575. }
  10576. },
  10577. "OrganizationList": {
  10578. "description": "OrganizationList",
  10579. "schema": {
  10580. "type": "array",
  10581. "items": {
  10582. "$ref": "#/definitions/Organization"
  10583. }
  10584. }
  10585. },
  10586. "PublicKey": {
  10587. "description": "PublicKey",
  10588. "schema": {
  10589. "$ref": "#/definitions/PublicKey"
  10590. }
  10591. },
  10592. "PublicKeyList": {
  10593. "description": "PublicKeyList",
  10594. "schema": {
  10595. "type": "array",
  10596. "items": {
  10597. "$ref": "#/definitions/PublicKey"
  10598. }
  10599. }
  10600. },
  10601. "PullRequest": {
  10602. "description": "PullRequest",
  10603. "schema": {
  10604. "$ref": "#/definitions/PullRequest"
  10605. }
  10606. },
  10607. "PullRequestList": {
  10608. "description": "PullRequestList",
  10609. "schema": {
  10610. "type": "array",
  10611. "items": {
  10612. "$ref": "#/definitions/PullRequest"
  10613. }
  10614. }
  10615. },
  10616. "Reference": {
  10617. "description": "Reference",
  10618. "schema": {
  10619. "$ref": "#/definitions/Reference"
  10620. }
  10621. },
  10622. "ReferenceList": {
  10623. "description": "ReferenceList",
  10624. "schema": {
  10625. "type": "array",
  10626. "items": {
  10627. "$ref": "#/definitions/Reference"
  10628. }
  10629. }
  10630. },
  10631. "Release": {
  10632. "description": "Release",
  10633. "schema": {
  10634. "$ref": "#/definitions/Release"
  10635. }
  10636. },
  10637. "ReleaseList": {
  10638. "description": "ReleaseList",
  10639. "schema": {
  10640. "type": "array",
  10641. "items": {
  10642. "$ref": "#/definitions/Release"
  10643. }
  10644. }
  10645. },
  10646. "Repository": {
  10647. "description": "Repository",
  10648. "schema": {
  10649. "$ref": "#/definitions/Repository"
  10650. }
  10651. },
  10652. "RepositoryList": {
  10653. "description": "RepositoryList",
  10654. "schema": {
  10655. "type": "array",
  10656. "items": {
  10657. "$ref": "#/definitions/Repository"
  10658. }
  10659. }
  10660. },
  10661. "SearchResults": {
  10662. "description": "SearchResults",
  10663. "schema": {
  10664. "$ref": "#/definitions/SearchResults"
  10665. }
  10666. },
  10667. "ServerVersion": {
  10668. "description": "ServerVersion",
  10669. "schema": {
  10670. "$ref": "#/definitions/ServerVersion"
  10671. }
  10672. },
  10673. "Status": {
  10674. "description": "Status",
  10675. "schema": {
  10676. "$ref": "#/definitions/Status"
  10677. }
  10678. },
  10679. "StatusList": {
  10680. "description": "StatusList",
  10681. "schema": {
  10682. "type": "array",
  10683. "items": {
  10684. "$ref": "#/definitions/Status"
  10685. }
  10686. }
  10687. },
  10688. "Tag": {
  10689. "description": "Tag",
  10690. "schema": {
  10691. "$ref": "#/definitions/Tag"
  10692. }
  10693. },
  10694. "TagList": {
  10695. "description": "TagList",
  10696. "schema": {
  10697. "type": "array",
  10698. "items": {
  10699. "$ref": "#/definitions/Tag"
  10700. }
  10701. }
  10702. },
  10703. "Team": {
  10704. "description": "Team",
  10705. "schema": {
  10706. "$ref": "#/definitions/Team"
  10707. }
  10708. },
  10709. "TeamList": {
  10710. "description": "TeamList",
  10711. "schema": {
  10712. "type": "array",
  10713. "items": {
  10714. "$ref": "#/definitions/Team"
  10715. }
  10716. }
  10717. },
  10718. "TopicListResponse": {
  10719. "description": "TopicListResponse",
  10720. "schema": {
  10721. "type": "array",
  10722. "items": {
  10723. "$ref": "#/definitions/TopicResponse"
  10724. }
  10725. }
  10726. },
  10727. "TopicNames": {
  10728. "description": "TopicNames",
  10729. "schema": {
  10730. "$ref": "#/definitions/TopicName"
  10731. }
  10732. },
  10733. "TrackedTime": {
  10734. "description": "TrackedTime",
  10735. "schema": {
  10736. "$ref": "#/definitions/TrackedTime"
  10737. }
  10738. },
  10739. "TrackedTimeList": {
  10740. "description": "TrackedTimeList",
  10741. "schema": {
  10742. "type": "array",
  10743. "items": {
  10744. "$ref": "#/definitions/TrackedTime"
  10745. }
  10746. }
  10747. },
  10748. "User": {
  10749. "description": "User",
  10750. "schema": {
  10751. "$ref": "#/definitions/User"
  10752. }
  10753. },
  10754. "UserHeatmapData": {
  10755. "description": "UserHeatmapData",
  10756. "schema": {
  10757. "type": "array",
  10758. "items": {
  10759. "$ref": "#/definitions/UserHeatmapData"
  10760. }
  10761. }
  10762. },
  10763. "UserList": {
  10764. "description": "UserList",
  10765. "schema": {
  10766. "type": "array",
  10767. "items": {
  10768. "$ref": "#/definitions/User"
  10769. }
  10770. }
  10771. },
  10772. "WatchInfo": {
  10773. "description": "WatchInfo",
  10774. "schema": {
  10775. "$ref": "#/definitions/WatchInfo"
  10776. }
  10777. },
  10778. "empty": {
  10779. "description": "APIEmpty is an empty response"
  10780. },
  10781. "error": {
  10782. "description": "APIError is error format response",
  10783. "headers": {
  10784. "message": {
  10785. "type": "string"
  10786. },
  10787. "url": {
  10788. "type": "string"
  10789. }
  10790. }
  10791. },
  10792. "forbidden": {
  10793. "description": "APIForbiddenError is a forbidden error response",
  10794. "headers": {
  10795. "message": {
  10796. "type": "string"
  10797. },
  10798. "url": {
  10799. "type": "string"
  10800. }
  10801. }
  10802. },
  10803. "notFound": {
  10804. "description": "APINotFound is a not found empty response"
  10805. },
  10806. "parameterBodies": {
  10807. "description": "parameterBodies",
  10808. "schema": {
  10809. "$ref": "#/definitions/RepoTopicOptions"
  10810. }
  10811. },
  10812. "redirect": {
  10813. "description": "APIRedirect is a redirect response"
  10814. },
  10815. "validationError": {
  10816. "description": "APIValidationError is error format response related to input validation",
  10817. "headers": {
  10818. "message": {
  10819. "type": "string"
  10820. },
  10821. "url": {
  10822. "type": "string"
  10823. }
  10824. }
  10825. }
  10826. },
  10827. "securityDefinitions": {
  10828. "AccessToken": {
  10829. "type": "apiKey",
  10830. "name": "access_token",
  10831. "in": "query"
  10832. },
  10833. "AuthorizationHeaderToken": {
  10834. "description": "API tokens must be prepended with \"token\" followed by a space.",
  10835. "type": "apiKey",
  10836. "name": "Authorization",
  10837. "in": "header"
  10838. },
  10839. "BasicAuth": {
  10840. "type": "basic"
  10841. },
  10842. "SudoHeader": {
  10843. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  10844. "type": "apiKey",
  10845. "name": "Sudo",
  10846. "in": "header"
  10847. },
  10848. "SudoParam": {
  10849. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  10850. "type": "apiKey",
  10851. "name": "sudo",
  10852. "in": "query"
  10853. },
  10854. "Token": {
  10855. "type": "apiKey",
  10856. "name": "token",
  10857. "in": "query"
  10858. }
  10859. },
  10860. "security": [
  10861. {
  10862. "BasicAuth": []
  10863. },
  10864. {
  10865. "Token": []
  10866. },
  10867. {
  10868. "AccessToken": []
  10869. },
  10870. {
  10871. "AuthorizationHeaderToken": []
  10872. },
  10873. {
  10874. "SudoParam": []
  10875. },
  10876. {
  10877. "SudoHeader": []
  10878. }
  10879. ]
  10880. }