Skip to content

Add ff_only parameter to POST /repos/{owner}/{repo}/merge-upstream #34770

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

Merged
merged 3 commits into from
Jun 19, 2025

Conversation

dcermak
Copy link
Contributor

@dcermak dcermak commented Jun 18, 2025

The merge-upstream route was so far performing any kind of merge, even those that would create merge commits and thus make your branch diverge from upstream, requiring manual intervention via the git cli to undo the damage.

With the new optional parameter ff_only, we can instruct gitea to error out, if a non-fast-forward merge would be performed.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 18, 2025
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels Jun 18, 2025
@dcermak dcermak force-pushed the allow-ff-only-fork-updates branch from f5bc44e to 3863727 Compare June 18, 2025 14:30
@lunny lunny added this to the 1.25.0 milestone Jun 18, 2025
@wxiaoguang wxiaoguang added the type/enhancement An improvement of existing functionality label Jun 19, 2025
@dcermak dcermak force-pushed the allow-ff-only-fork-updates branch 2 times, most recently from 52d3777 to 7b9e4d8 Compare June 19, 2025 09:03
@dcermak dcermak force-pushed the allow-ff-only-fork-updates branch from 7b9e4d8 to b422cdf Compare June 19, 2025 11:12
The merge-upstream route was so far performing any kind of merge, even those
that would create merge commits and thus make your branch diverge from upstream,
requiring manual intervention via the git cli to undo the damage.

With the new optional parameter ff_only, we can instruct gitea to error out, if
a non-fast-forward merge would be performed.
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 19, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 19, 2025
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 19, 2025
@lunny lunny merged commit b8c9a0c into go-gitea:main Jun 19, 2025
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 19, 2025
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jun 20, 2025
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Add ff_only parameter to POST /repos/{owner}/{repo}/merge-upstream (go-gitea#34770)
  Add repo file tree item link behavior (go-gitea#34730)
  Fix tag target (go-gitea#34781)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants