This repository has been archived on 2024-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
forgejo/routers/api/v1/repo
赵智超 dfa7291f8f
[Enhancement] Allow admin to merge pr with protected file changes (#12078)
* [Enhancement] Allow admin to merge pr with protected file changes

As tilte, show protected message in diff page and merge box.

Signed-off-by: a1012112796 <1012112796@qq.com>

* remove unused ver

* Update options/locale/locale_en-US.ini

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>

* Add TrN

* Apply suggestions from code review

* fix lint

* Update options/locale/locale_en-US.ini

Co-authored-by: zeripath <art27@cantab.net>

* Apply suggestions from code review

* move pr proteced files check to TestPatch
* Call TestPatch when protected branches settings changed

* Apply review suggestion @CirnoT

* move to service @lunny

* slightly restructure routers/private/hook.go

Adds a lot of comments and simplifies the logic

Signed-off-by: Andrew Thornton <art27@cantab.net>

* placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>

* skip duplicate protected files check

* fix check logic

* slight refactor of TestPatch

Signed-off-by: Andrew Thornton <art27@cantab.net>

* When checking for protected files changes in TestPatch use the temporary repository

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix introduced issue with hook

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove the check on PR index being greater than 0 as it unnecessary

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-13 14:50:57 -04:00
..
blob.go
branch.go [Enhancement] Allow admin to merge pr with protected file changes (#12078) 2020-10-13 14:50:57 -04:00
collaborators.go
commits.go Not using "ctx.ServerError" in api (#12907) 2020-09-20 21:20:14 +01:00
file.go Add better Swagger description and a example for GetArchive (#12743) 2020-09-06 12:23:47 -04:00
fork.go Not using "ctx.ServerError" in api (#12907) 2020-09-20 21:20:14 +01:00
git_hook.go
git_ref.go
hook.go Refactor: move Commit To APIFormat Code & Lot of StopWatch related things (#12729) 2020-09-18 20:09:26 +08:00
hook_test.go
issue.go Fixed count of filtered issues when api request. (#12275) 2020-09-24 19:30:40 -04:00
issue_comment.go
issue_label.go
issue_reaction.go
issue_stopwatch.go Refactor: move Commit To APIFormat Code & Lot of StopWatch related things (#12729) 2020-09-18 20:09:26 +08:00
issue_subscription.go
issue_tracked_time.go
key.go Improve error feedback for duplicate deploy keys (#13112) 2020-10-12 14:44:56 +01:00
label.go Not using "ctx.ServerError" in api (#12907) 2020-09-20 21:20:14 +01:00
language.go
main_test.go
migrate.go Adopt repositories (#12920) 2020-09-25 07:09:23 +03:00
milestone.go Not using "ctx.ServerError" in api (#12907) 2020-09-20 21:20:14 +01:00
mirror.go
pull.go [Enhancement] Allow admin to merge pr with protected file changes (#12078) 2020-10-13 14:50:57 -04:00
pull_review.go Not using "ctx.ServerError" in api (#12907) 2020-09-20 21:20:14 +01:00
release.go API: GetReleaseByID return 404 if not found (#12933) 2020-09-24 18:36:56 -04:00
release_attachment.go Attachments: Add extension support, allow all types for releases (#12465) 2020-10-05 01:49:33 -04:00
release_tags.go API: Get release by tags endpoint (#12932) 2020-09-25 20:11:43 +01:00
repo.go Add IsTemplate option in create repo ui and api (#12942) 2020-09-25 13:18:37 +08:00
repo_test.go
star.go
status.go
subscriber.go
tag.go
topic.go
transfer.go
tree.go