Won't automerge the PR. HttpError: Unprocessable Entity: "Can not approve your own pull request"
See original GitHub issueHi! First thanks for your job. I’m facing a strange issue here that I cannot get rid of. I finally achieved to get the workflow running as it is creating a PR to Sync the repo. However, PR won’t be automerged and the GitHub Actions will fail. I tried two different configs, with different errors:
Config 1:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: tgymnich/fork-sync@v1.4
with:
owner: mikecao
token: ${{ secrets.GH_PERSONAL_TOKEN }} # with public repo access
head: master
base: production
merge_method: merge
pr_title: Fork Sync
auto_approve: true
Error 1:
Run tgymnich/fork-sync@v1.4
with:
owner: mikecao
token: ***
head: master
base: production
merge_method: merge
pr_title: Fork Sync
auto_approve: true
request failed after 4 retries with a delay of 60
Error: Failed to create or merge pull request: HttpError: Unprocessable Entity: "Can not approve your own pull request"
Config 2:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: tgymnich/fork-sync@v1.4
with:
owner: mikecao
token: ${{ secrets.GITHUB_TOKEN }} # not my personal token
head: master
base: production
merge_method: merge
pr_title: Fork Sync
Error 2:
Run tgymnich/fork-sync@v1.4
with:
owner: mikecao
token: ***
head: master
base: production
merge_method: merge
pr_title: Fork Sync
auto_approve: false
request failed after 4 retries with a delay of 60
Error: Failed to create or merge pull request: HttpError: Unprocessable Entity: "Can not approve your own pull request"
Do you know what could be the problem? If it is about a misconfiguration from my side, I will be happy to open a PR updating the documentation when I realize of my error.
Owner repo: https://github.com/mikecao/umami My repo: https://github.com/tairosonloa/umami (you can see there some manually closed PR that the GitHub Action created while I was testing)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:22 (7 by maintainers)
Top Results From Across the Web
How to allow only the pull request author to merge it?
The problem is that if User B has a right to commit, you cannot remove its access to the merge button. The only...
Read more >octokit/rest.js
For the API endpoints that do not have a matching method, such as the root endpoint or legacy endpoints, you can send custom...
Read more >GitHub PR Auto Merge EXPLAINED - YouTube
GitHub recently announced the possibility to automatically merge a Pull Request into the main branch. This is a game changer feature, ...
Read more >Merging Pull Requests in GitHub Has Never Been EASIER
Merging code into a branch could be a really time consuming task, and can create merge hell, but today I have the solution...
Read more >Error 422 The change you requested was rejected on login
Something went wrong while fetching related merge requests.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The following config is working, as you suggested:
Thanks for the hint, I got into this especially as the
README.mdstill show’s v1.4 maybe this should be updated to a placeholder to look into releases what I missed - sorry!