Comments (6)
Thank you for raising this issue. I would really like to understand your use-case here and try and reproduce the problem. If you could provide more detail that would be great. e.g. (create-pull-request version, your entire workflow, your use-case, etc.) If it's in open source a link to the repository would be even better.
Just trying to guess based on the error message you provided. Are you trying to modify a workflow file during the execution of a workflow? There are definitely restrictions with this. You mentioned that the first run failed. What was the error message then?
If you try and modify workflow files and push them during the execution of a workflow you might see an error message like this:
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
cmdline: git push -f --set-upstream origin test-patches
stderr: 'To https://github.com/peter-evans/actions-playground
! [remote rejected] test-patches -> test-patches (refusing to allow an integration to create or update .github/workflows/create-pull-request.yml)
To get to the bottom of this issue I think we need to focus on the use-case you have and the error thrown the first time the action ran.
from create-pull-request.
I think this is what happened:
- I ran the action from a dummy, non-master branch. This opened a PR against the non-master branch (intended behavior, though I didn't realize this at the time)
- I then deleted the dummy branch since I was just pushing to it to trigger an action build and it did not have any actual changes in it
- GitHub automatically closed the PRs before I even saw them, since they were based on a now-deleted branch
So what I observed was "there are no PRs, and running the action again doesn't make PRs" but in reality I think everything did what it should have done.
I think what I wanted to do was pass PULL_REQUEST_BASE=master
in step 1 so that the PR got opened against master, not my dummy branch.
I think the only change I might ask for from this issue would be for the action to be a bit more verbose in logging what's going on. I threw a bunch of print statements in my fork of the action which is what helped me track down what happened.
I'll close this issue, thanks!
from create-pull-request.
Glad you figured it out. You're right, the logging could be much better. I will look into adding some more verbose and understandable messages.
from create-pull-request.
I ran into another case where this error message seemed wrong, in my case because there was already a PR open from a previous run which (sensibly) made the same change. I eventually realized this message was telling me that, based on the existing PR there were no new changes to commit. Perhaps in this case a message more like Repository has no modified or untracked files compared to existing PR. Skipping.
would be more clear.
from create-pull-request.
Thanks @danopia. You're right, it's not clear what the action is doing in that case. I'm working on adding clearer messages and detail about what the action is doing for the next release.
from create-pull-request.
Released a new version of the action today that has much clearer messages about what the action is doing.
from create-pull-request.
Related Issues (20)
- Update multiple repositories HOT 2
- ignore untracked HOT 2
- NO PR created and branch changes to new branch and updates from main HOT 5
- Required checks are not being triggered after the PR creation HOT 1
- 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
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.