summaryrefslogtreecommitdiffstats
path: root/modules/convert/convert.go
Commit message (Collapse)AuthorAgeFilesLines
* Prevent merge of outdated PRs on protected branches (#11012)65432020-04-161-0/+1
| | | | | | | | | | | | | | | | * Block PR on Outdated Branch * finalize * cleanup * fix typo and sentences thanks @guillep2k Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* [API] Get a single commit via Ref (#10915)65432020-04-071-1/+0
| | | | | | | | | * GET /repos/:owner/:repo/commits/:ref * add Validation Checks * Fix & Extend TEST * add two new tast cases
* Allow to set protected file patterns that can not be changed under no ↵Lauris BH2020-03-271-0/+1
| | | | | conditions (#10806) Co-Authored-By: zeripath <art27@cantab.net>
* Fix branch api canPush and canMerge (#10776)Lunny Xiao2020-03-201-23/+31
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix bug on branch API (#10767)Lunny Xiao2020-03-191-3/+7
|
* adds API endpoints to manage OAuth2 Application (list/create/delete) (#10437)Gustavo Marin2020-02-291-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | * add API endpoint to create OAuth2 Application. * move endpoint to /user. Add swagger documentations and proper response type. * change json tags to snake_case. add CreateOAuth2ApplicationOptions to swagger docs. * change response status to Created (201) * add methods to list OAuth2 apps and delete an existing OAuth2 app by ID. * add APIFormat convert method and file header * fixed header * hide secret on oauth2 application list * add Created time to API response * add API integration tests for create/list/delete OAuth2 applications. Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Add API branch protection endpoint (#9311)David Svantesson2020-02-121-17/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add API branch protection endpoint * lint * Change to use team names instead of ids. * Status codes. * fix * Fix * Add new branch protection options (BlockOnRejectedReviews, DismissStaleApprovals, RequireSignedCommits) * Do xorm query directly * fix xorm GetUserNamesByIDs * Add some tests * Improved GetTeamNamesByID * http status created for CreateBranchProtection * Correct status code in integration test Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Allow repo admin to merge PR regardless of review status (#9611)David Svantesson2020-01-111-1/+1
| | | | * Allow repo admin to merge even if review is not ok.
* [Bug] [API] Add language to user api (#9215)65432019-11-301-0/+1
| | | | | | | | * add language to user api * OK Co-Authored-By: Lauris BH <lauris@nix.lv>
* Fix what information is shown about user in API. (#9115)David Svantesson2019-11-241-7/+7
| | | | | | * Fix what information is shown about user in API. * Use Email directly, as KeepEmailPrivate is already handled.
* Team permission to create repository in organization (#8312)David Svantesson2019-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add team permission setting to allow creating repo in organization. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add test case for creating repo when have team creation access. Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * build error: should omit comparison to bool constant Signed-off-by: David Svantesson <davidsvantesson@gmail.com> * Add comment on exported functions * Fix fixture consistency, fix existing unit tests * Fix boolean comparison in xorm query. * addCollaborator and changeCollaborationAccessMode separate steps More clear to use different if-cases. * Create and commit xorm session * fix * Add information of create repo permission in team sidebar * Add migration step * Clarify that repository creator will be administrator. * Fix some things after merge * Fix language text that use html * migrations file * Create repository permission -> Create repositories * fix merge * fix review comments
* Update branch API endpoint to show effective branch protection. (#9031)David Svantesson2019-11-161-3/+21
| | | | | | * Add API endpoint for displaying effective branch protection. * Add status checks.
* Move code.gitea.io/gitea/routers/api/v1/convert to ↵Lunny Xiao2019-11-101-0/+312
code.gitea.io/gitea/modules/convert (#8892) * Move code.gitea.io/gitea/routers/api/v1/convert to code.gitea.io/gitea/modules/convert * fix fmt