fix: allow nightly scan when PR creation is blocked - #9
Conversation
Handle GitHub Actions PR creation/edit permission failures by surfacing a manual PR link in the workflow summary instead of failing after the results branch is pushed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the nightly scan GitHub Actions workflow to gracefully handle repositories where GITHUB_TOKEN can push the results branch but is blocked from creating/updating PRs, by emitting a manual PR link in the workflow summary instead of failing the run.
Changes:
- Add a helper to write a workflow summary and warnings when PR creation/update is blocked by GitHub policy.
- Wrap
gh pr create/gh pr editto detect the “not permitted to create or approve pull requests” error and degrade gracefully. - Preserve failure behavior for other unexpected
gh prerrors.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Copilot please review after last commit |
The previous review feedback is addressed in commit |
Summary
Handle the repository limitation where GitHub Actions can push the nightly results branch with
GITHUB_TOKENbut cannot create or update pull requests.Relates to #6
Changes
nightly-scan-resultsas beforegh prfailures by still failing the jobWhy
The latest nightly run failed after successfully pushing the results branch with:
This change keeps the nightly scan usable until a GitHub App or different permission model is available.