Comments (8)
Can you elaborate on why you need this specifically?
For example, we recently had a PR where the backport action failed when trying to cherry-pick the individual commits: NVIDIA/cccl#574 (comment)
(fyi, the instructions it prints for manually cherry-picking don't include the logic for skipping merge commits)
Trying to manually cherry-pick all of the PR commits was a bit of a pain. In contrast, when we just manually cherry-picked the squashed commit, it applied cleanly without any conflicts or issues: NVIDIA/cccl#663. It would be nice if the action had a way to automate this for us as we never care about preserving the individual commits in the PR we're backporting.
from backport-action.
Hi @Lawls91 👋 Thanks for reporting this.
It is currently not possible to cherry-pick the squashed commit. The action only cherry-picks the commits that exist on the merged pull request.
Previously the action did not work at all for pull requests that were merged using rebase or squash strategies, but I closed #46 when that was fixed and the action could cherry-pick the pull request commits for those cases.
Do you have a specific need to cherry-pick the squashed commit instead of the commits on the pull request?
My personal thoughts on this have always been that this way the reviewer of the backport pull request can review it in the same way that the original pull request was reviewed. I.e., it has all the individual commits and their messages.
from backport-action.
I must admit its been a week so I cant fully remember, but I feel like I was having issues with the backport picking up merge commits where main/master had been merged into the PR, but they shouldn't be part of the backport
I'll try and revisit this this week if I can and take another look
from backport-action.
Thanks @Lawls91! That's a great point!
There's another feature request that will help resolve that problem, which I plan to implement once I've completed #340:
Still, even with #341 implemented, there would be cases left where cherry-picking the resulting commit(s) (i.e. the squashed commit or the rebased commits) are preferable. So, eventually I hope to support this as well.
from backport-action.
I just ran into this as I started using this action. The problem if you squash PRs into main
and then backport only the cherry-picked commits to another branch is that the commits will no longer be the same, i.e., the release branch will have different commits from the same changes.
I don't see a great way around this problem though because if you just simply backported the squashed commit, then you run the risk of picking up merge commits from main
and end up merging changes you didn't intend to into your release branch...
from backport-action.
@jrhemstad Yes, the action only cherry-picks the commits that exist on the merged pull request, at this time.
you run the risk of picking up merge commits from main and end up merging changes you didn't intend to into your release branch
This would not be a risk if this action would support cherry-picking the squashed commit instead of the commits that exist on the merged pull request. However, it does not support this yet.
It seems you have a specific need for cherry-picking only the squashed commit. Can you elaborate on why you need this specifically? It may help me prioritize this over other issues.
from backport-action.
Ah yes, reduced chance of conflicts is definitely a benefit of cherry-picking a squashed commit. I see this feature (cherry-picking the resulting commits rather than the pull request's commits) as useful, but there are a few issues I'll prioritize over this at this time, like:
from backport-action.
@jrhemstad @Lawls91 v2.2.0
is out and adds experimental support to detect_merge_method
. I believe it resolves this issue for you. Please give it a try and let me know what you think.
from backport-action.
Related Issues (20)
- Automate release process
- Document action outputs
- [Feature Request] Support auto-deletion for branches if the backport PR is closed HOT 1
- Feature request: allow specifying mainline HOT 9
- Feature request : backport to all open feature branches HOT 8
- Use PAT in eat-your-own-dogfood workflow
- Support glob patterns in `target_branches` input
- Improve error message on workflow file changes HOT 5
- Support skipping merge commits HOT 3
- PRs created by backport-action should trigger the CI HOT 1
- ability to backport a PR to any repo, not necessarily a fork HOT 3
- support backport, committing conflicts HOT 4
- Instructions for manually cherry-picking are incorrect as they do not skip merge commits HOT 2
- Get The successful PR numbers as an output of the action HOT 1
- Improve the error messages
- Conflict resolution `draft_commit_conflicts` provides incorrect instructions
- Conflict resolve suggestion doesn't fetch commits to cherry-pick HOT 5
- Delete the backport branch after merge HOT 2
- Workflow dispatch support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from backport-action.