-
Notifications
You must be signed in to change notification settings - Fork 23
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
Octopilot fails to wait for Github checks to merge PR #268
Comments
Any plans to add support for GitHub auto-merge by the way? Maybe that could be nice addition to let GitHub merge PR when checks are done instead of doing it in code. |
I ran into similar problems with auto merging PRs. Maybe this will help others. First, I had to give the Github App used by octopilot read-only admin permissions to solve auth issues. Second, and this one was the most confusing to figure out: Github Workflows don't post "status" updates they post "checks" when completed/failed. Those are completely different APIs. You can get your Github Workflow to manually post a "status" as a work around. For example: on:
push:
branches:
- octopilot-*
permissions:
contents: read
statuses: write
jobs:
...
- name: Post a status check
uses: actions/github-script@v7
with:
script: |
github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.sha,
state: "success",
context: "<check name>"
});
Another thing I've observed is that Github Actions Workflows can't post status updates with the default token when triggered using I think this project should switch to the Github provided auto-merge PR feature. It would also mean not having to give this app read-only admin permissions. However, that's only available via GraphQL API AFAIK: https://docs.github.com/en/graphql/reference/mutations#enablepullrequestautomerge |
ok thanks for the details. I'll have a look at enabling auto-merge, and also using the checks API in addition to the status API. |
Hello. Have issue merging PR where Required Checks are defined on repository. Octopilot seems to determine PR can be merged before letting checks do its thing.
Please advise if I may be doing something wrong or what.
Thanks!
The text was updated successfully, but these errors were encountered: