-
-
Notifications
You must be signed in to change notification settings - Fork 434
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
PRs fail to create due to Error: For same-org, cross-repo pulls, 'head_repo' is required: {"resource":"PullRequest","field":"head","code":"invalid"} #1459
Comments
I just encountered the same error. |
Following Similar issue - started 6-7 hours ago from the time of writing this message.
|
Didn't see any issues with GitHub Actions for today |
Thanks for the report. I'm looking into this. There haven't been any changes to the action that I think could have caused this, so it's likely to be a change with GitHub's API. @chachasikes The deprecation warning is unrelated. See #1336 |
This comment was marked as outdated.
This comment was marked as outdated.
Can confirm it's happening with v4 (I'm working with @chachasikes ) |
I can confirm the problem is still there with
And the same error as mentioned in OP:
The theory around it being an API seems plausible, our last working run was at |
I've created a GitHub support ticket because I'm fairly sure this is a change to the API they have made. I don't know if it's intentional, but if it is the documentation is incorrect and there was no warning. |
I'm unable to reproduce this issue. Please could you explain a bit more about your scenario.
|
@jbum & I reporting that our repo is public |
(Both repos are public, in an org account). Our first failure is here (a few hours before quantumfusion's last success): https://github.com/cagov/cannabis.ca.gov/actions/runs/3840800379 |
@jbum Thank you. So it looks like the repo for the workflow and where you are creating the pull request is the same. I wonder if the error is being caused because the workflow is triggered by |
Fwiw, I notice that the call right after "Attempting creation of pull request" is to octokit (which was updated some 7 hours ago, around the time the failures started for us?). We will try that thanks! |
The manual run also fails (tried it in a different public repo we've been testing on). https://github.com/cagov/odi-publishing-11ty-sandbox/actions/runs/3843544700 |
Octokit is a library in use by the action. But you are using |
Yes, understood. Don't think this is your issue. But I'm curious if anyone is successfully using the action at this point? |
All my tests are passing, so I think this is a very specific issue. I'm trying to figure out the exact scenario. Test run from a hour or so ago: |
I forked your test repo, made a few changes to ignore secrets I don't have, and it seems to work. |
Woah! Trying that. |
I also tried it in an org and that works, too. I don't have any idea what is going on. 🤔 |
I suspect our token has expired (still fails if I comment out committer). Will continue investigating that. Thank so much for helping us isolate it. You want way above and beyond. It is curious that a few folks experienced this specific error message today... |
It looks like you are using the default
That's why I would be surprised if this was just down to token expiration. Please let me know if you solve it. |
No, it is the same repository.
Yes
Yes, but also same repository, not remote
Generated via Github App using https://github.com/tibdex/github-app-token action. permissions:
contents: write
pull-requests: write
An organization account. |
The mysterious thing is that several other similar private repositories under the same organization account didn't fail and were just fine, using the exact same workflow (and same Github token generation via Github App). It seems isolated to one repository, I just can't figure out why. All the logs look the same and I cannot find any distinguishing factor in the workflow runs. |
👋🏼 @davereid-pfg We are trying different configurations of setting head_repo - but no luck yet. |
We're pretty sure it's not the token or committer at this point... |
Not seeing head_repo set anywhere in create-pull-request. It may be a bug coming from octokit. |
I just checked out the branch that was created in our workflow via this action locally for the repository and used |
@peter-evans I am having similar issue, my scenario it different than your test case, I checkout a different repo and use the action to create pr into that repo. This might help reproduce the issue |
Hey everyone, same issue for me. |
I am having also the same issue and the same scenario which @davereid-pfg has described. I am using a reusable workflow in all of the private repositories in which this action used and it is configured with a GitHub App. In some of the repositories it suddenly stopped working. |
I saw the exact same error pop up yesterday during our workflow |
Same issue appears in our public repo under our organization
|
I found this other issue by searching GitHub. It looks related. I'm keeping an eye out for similar issues: I haven't had a response from GitHub Support yet. |
GitHub engineering are now investigating. |
@peter-evans Changes have been made. Please can you retry and let us know if the behaviour persists. |
I have tried in one of the failing repositories. It is working again. |
its working thank you |
Apologies for the inconvenience. |
@gm3dmo Thank you for the fix! |
It was solved, thanks! |
solved, thanks |
Can confirm as well, resolved today without any changes. |
@chachasikes and I can confirm as well. Working. |
Thank you everyone who reported this, and @peter-evans for investigating and @gm3dmo for the fix! |
Closing as resolved. Thank you everyone! |
I'm not very sure if it's the same issue, here's my failed job: After I change it to the restful API, it works fine: |
getting same error Validation Failed: {"resource":"PullRequest","field":"head","code":"invalid"} it has been working all day too... |
it is happening in two of my repos that have been using it for months and just today has ran 4 hrs ago as well. in my third testing repo, it is working as well |
following up @peter-evans this is still happening unfortunately, do you have any suggestions? |
@krebemm did you get it working? |
@HarryZ10 yes but i ended up just using git cli instead of this action, it has been reliable so far. |
Subject of the issue
I have a workflow that is pushing the branch but failing to create the pull request due to a new error, when the action has worked before:
Steps to reproduce
Logs where the workflow fails:
I cannot link to the actual logs since it is a private repository.
The same exact workflow from Dec 22 succeeded:
I'm also not able to replicate this consistently. The same exact workflow works fine in another private repository, it seems to be this specific repository causing the issue.
The text was updated successfully, but these errors were encountered: