Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forked repo: ability to update branch on PR level by maintainers #17728

Closed
StanislavKharchenko opened this issue Nov 19, 2021 · 3 comments · Fixed by #18002
Closed

Forked repo: ability to update branch on PR level by maintainers #17728

StanislavKharchenko opened this issue Nov 19, 2021 · 3 comments · Fixed by #18002
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Milestone

Comments

@StanislavKharchenko
Copy link

StanislavKharchenko commented Nov 19, 2021

Feature Description

If branch was outdated then author of PR could click "Update branch" so it will be syncronized with upstream.
This option will be also very useful for reviewers/approvers.
When reviewer approving PR, the branch could become outdated. The approver should ask author to click to "Update branch".
Found merged PR, but I'm not sure that it about what we need:
#16125

So, steps are following:

  1. Branch has restriction to merge in case if it outdated;
  2. User#1 created a PR and assigned to reviewer;
  3. Reviewer (maintainer of upstream repo) make approval; at this time base branch (upstream) got changes so PR became outdated;
  4. Reviewer can't merge and should ask author to perform "Update branch". In this step we need to grant access to reviewers to make update PR branch by himself.

This should be similar to "Allow edits from maintainers" option on GitHub

Screenshots

No response

@Gusted
Copy link
Contributor

Gusted commented Nov 20, 2021

Just to get it clear:

In other words, if the creator of the PR(maybe anyone who can assign a reviewer) assigns a reviewer. That reviewer should have the permission to perform the "Update Branch" action. But that reviewer doesn't have write permissions in that repo where the PR is made?

@qwerty287
Copy link
Contributor

As far as I understand this, it seems to be something like the "Allow edits from maintainers" option on GitHub. On GH, this means that everyone that has write access to the base repo can edit, push and update to the head branch (but only the head branch, the other branches are still read-only as long as they are not added as collaborators). You can select this if you create a new PR on GitHub from a forked repo.

Step 7 on this site: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Nov 22, 2021
@StanislavKharchenko
Copy link
Author

Yes,
it should be like "Allow edits from maintainers" from GH.

@StanislavKharchenko StanislavKharchenko changed the title Update branch on PR level by reviewers Forked repo: ability to update branch on PR level by maintainers Nov 22, 2021
6543 added a commit that referenced this issue Apr 28, 2022
Adds a feature [like GitHub has](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) (step 7).
If you create a new PR from a forked repo, you can select (and change later, but only if you are the PR creator/poster) the "Allow edits from maintainers" option.
Then users with write access to the base branch get more permissions on this branch:
* use the update pull request button
* push directly from the command line (`git push`)
* edit/delete/upload files via web UI
* use related API endpoints

You can't merge PRs to this branch with this enabled, you'll need "full" code write permissions.

This feature has a pretty big impact on the permission system. I might forgot changing some things or didn't find security vulnerabilities. In this case, please leave a review or comment on this PR.

Closes #17728

Co-authored-by: 6543 <6543@obermui.de>
@lunny lunny added this to the 1.17.0 milestone Apr 28, 2022
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this issue Aug 24, 2022
Adds a feature [like GitHub has](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) (step 7).
If you create a new PR from a forked repo, you can select (and change later, but only if you are the PR creator/poster) the "Allow edits from maintainers" option.
Then users with write access to the base branch get more permissions on this branch:
* use the update pull request button
* push directly from the command line (`git push`)
* edit/delete/upload files via web UI
* use related API endpoints

You can't merge PRs to this branch with this enabled, you'll need "full" code write permissions.

This feature has a pretty big impact on the permission system. I might forgot changing some things or didn't find security vulnerabilities. In this case, please leave a review or comment on this PR.

Closes go-gitea#17728

Co-authored-by: 6543 <6543@obermui.de>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants