-
Notifications
You must be signed in to change notification settings - Fork 83
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
Won't automerge the PR. HttpError: Unprocessable Entity: "Can not approve your own pull request" #46
Comments
I currently don't have any branch protection rules (although I plan to add them). It seems like with config 1, my user is creating and trying to approve the PRs, while with config 2 the PRs are being created and tried to be approved by |
HI @tairosonloa if i remember correctly we introduced two new options in #24. One is the EDIT: just noticed that |
Both tokens have been merged into one in v1.4 to fix another issue. This might have broken the auto approve. Try using v1.3. For the time being. |
@tgymnich if i can help somehow in fixing this just let me know 👍 |
The following config is working, as you suggested: jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: tgymnich/fork-sync@v1.3
with:
owner: mikecao
github_token: ${{ secrets.GITHUB_TOKEN }}
personal_token: ${{ secrets.GH_PERSONAL_TOKEN }}
head: master
base: production
merge_method: merge
pr_title: Fork Sync
auto_approve: true |
Hi there. I see v1.5.0 is out now. Is it still recommended to use v1.3 if we're still running into this issue? |
Yes v1.3 is still recommended for automerge when an approval is required. I still need to find the time to find out if there is an API to approve/merge your own PR when an approval is required. If there is no way I might even undo the changes up to v1.5 |
According to the discussion here https://gh.neting.ccmunity/t/do-not-require-owner-approval-if-the-pull-request-is-from-an-owner/369/66 it seems that reviewing/approving your own PR is currently not possible even if you're a code owner or admin. I can remember that for repo admins there is a possibility to merge a PR even if required checks (like builds, reviews, ...) haven't been passed, yet. It's inside of the dropdown of the merge button. If there was an api for that we might could bypass all merge checks for the github action user. Unfortunately i didn't find anything in the docs https://docs.github.com/en/rest/reference/pulls#merge-a-pull-request so not sure if that's possible 😢 |
@R0Wi thanks for those insights. The next version of fork sync should probably then reintroduce the v1.3 behavior. |
I did the very same, but the workflow still fails:
And I have to merge it manually |
I run into the same thing frequently on several different repos. Sometimes it works, sometimes it doesn't. I've basically just stopped using this action now because it is creating more chaos than it's solving. |
So now you are syncing manually? |
For now, yes. |
I suppose you are already set the |
Yep, that's was the first thing in 1.4, under Settings -> Secrets -> Repository secrets |
Hi @tairosonloa, how are you? Just wondering if you have any updates on this case? |
I didn't get around fixing this yet. Using v1.3 is still the recommend way to solve this issue. |
Many thanks for the reply. Look forward to the update in the later time :) |
Still using 1.3, yep. Same config that #46 (comment) |
I'm still having this issue on v1.4 with this config: https://github.com/SebTM/YubiKey-Guide/blob/sync/.github/workflows/sync.yml |
Read the issue before commenting @SebTM, please. Version 1.4 has this error. The solution is to use version 1.3 as I explained above, or use version 1.6 after PR #71 was merged. |
Thanks for the hint, I got into this especially as the |
there seem to be a bug in later versions: tgymnich/fork-sync#46
Hi! 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:
Error 1:
Config 2:
Error 2:
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)
The text was updated successfully, but these errors were encountered: