Comments (4)
Great! Glad that worked for you.
Agreed. It might be nice to expose functionality to rebase the entire PR branch after resolving conflicts on the tip of the base branch, though.
I'll look into adding this back as an optional feature.
Just found the -multi version that addresses this well enough for our use-case.
I'm not sure what direction GitHub are going to take yet regarding multi-platform Actions support so I'm holding off making the -multi
version the main version of this action. There is a bit of background here: #40 (comment)
You are right though, the container version startup time could be improved by pushing it to DockerHub. I might do that regardless because someone could find it useful to run outside of GitHub Actions.
from create-pull-request.
Glad you find this action useful. Thank you for raising this issue.
When using the fixed-name branch strategy (BRANCH_SUFFIX: none
) the action needs to check out the remote branch to update it. I couldn't check out the branch without committing local changes first so it does a git rebase
afterwards. What I imagine is happening is that during the rebase (and because of force-pushed changes) cherry-picked commits resolve to an empty diff and throws the above warning. I'll try to reproduce this but still not sure exactly what "force-pushed to something else" means in practice.
One solution might be to use the --keep-empty
rebase option to allow empty commits to be made. Another solution might be to stop rebasing and instead git stash
the local changes, checkout the branch, and then git stash pop
to apply the local changes on top of the branch. If that pop resolves to an empty diff then the action can just exit without doing anything.
from create-pull-request.
@Xyene I've refactored the fixed-name branch strategy to not use rebase anymore. Having the branch rebased might be convenient in some cases, but I think it would be best to avoid using it by default because users of this action won't expect that.
So instead, when using fixed-name branch strategy the action does this:
- Stash the local changes
- Checkout the remote branch
- Pop the stash
- Resolve conflicts (if any) in favour of the stashed version
I think this method should prevent the kind of error you saw occur because if there are no changes to the branch after the stash is popped the action will just exit silently. If there are conflicts, they should all be resolved in favour of the stashed version, which is most likely correct.
Please test out release peter-evans/[email protected]
and let me know if it works for you.
from create-pull-request.
@peter-evans thanks, that seems to have worked well!
I'll try to reproduce this but still not sure exactly what "force-pushed to something else" means in practice.
In our case, it was a workflow that involves rebases that change history (e.g. renaming a commit to something more descriptive, or reordering commits to make more "sense" when reading the git log) on a feature branch, in order to keep the master log as clean as possible.
Having the branch rebased might be convenient in some cases, but I think it would be best to avoid using it by default because users of this action won't expect that.
Agreed. It might be nice to expose functionality to rebase the entire PR branch after resolving conflicts on the tip of the base branch, though. We immediately ran into a small issue where another action (using the workaround from #48) wasn't being triggered on the PR, since it was added in a later commit than where the branch was created. Of course, this just required a button press in Github's UI, but is one that would need to be constantly pressed by a human, who would then need to wait for checks to pass.
Unrelated, but what are your thoughts on uploading the built Docker image to Docker Hub? Currently it takes ~1 minute to build from scratch, which isn't that bad, but probably won't be getting any faster. (I guess there could be a Github Action for automatically pushing updates to Docker hub... meta ;) Just found the -multi
version that addresses this well enough for our use-case.
I'd be happy to contribute either of the above proposals if they're something you think would generally be useful, but I'll close this issue as it's now resolved 😃
from create-pull-request.
Related Issues (20)
- Error: Input 'token' not supplied. Unable to continue. HOT 1
- Changes from test folder doesn't added to the PR HOT 10
- Node version - Warning HOT 1
- Permission denied (publickey) HOT 1
- Merge conflict error for different files with different names
- Add branch-label as an output so it can be passed to other actions and easily commited to HOT 2
- PR still created with 0 files (no diffs) HOT 4
- [FEATURE] Add ability to enable auto-merge HOT 1
- Can't figure out how to include commits made during workflow HOT 2
- Action failing to update existing PRs on differently named fork HOT 3
- pr not generated HOT 1
- this works great!
- This works great
- This works great
- When the workflow is triggered with `base` and `branch`, the PR is not created HOT 1
- Syntax error line 17 HOT 2
- remote missing HOT 2
- How to always have open PR from dev to prod HOT 1
- Autosync PR out of date HOT 2
- Automatically delete body-path HOT 1
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 create-pull-request.