Skip to content

ci: link the opened PR, and explain the PR-permission failure - #84

Merged
tsvikas merged 1 commit into
mainfrom
ci/explain-pr-permission
Oct 26, 2026
Merged

tsvikas merged 1 commit into
mainfrom
ci/explain-pr-permission

Conversation

@tsvikas

@tsvikas tsvikas commented Oct 26, 2026

Copy link
Copy Markdown
Owner

When create-pull-request fails because the repo doesn't allow Actions to open PRs, GitHub's error only links to the REST docs, which don't say how to fix it.
This adds two steps after "Create Pull Request", in the generated deps-update.yml and in update-template-pins.yml:

  • Explain a failure to create the pull request: on failure, an error annotation (and a step-summary line) that links to the repo's /settings/actions page and names the checkbox to enable under "Workflow permissions".
  • Link the pull request: when a PR is created or updated, a notice titled Pull request created/Pull request updated with its URL, shown on the run's summary page.

The action does not expose its error message, so the hint is phrased conditionally ("If the error is …").

Testing

Ran the generated deps-update.yml (with the uv/audit steps replaced by a dummy file change) on a throwaway public repo:

  • With the setting off: the PR step failed, the hint annotation appeared next to GitHub's error with the correct settings link, and the link step was skipped.
  • With the setting on: the PR was opened, and a Pull request created notice showed its URL.

update-template-pins.yml gets the identical steps but was not run.

🤖 Generated with Claude Code

When create-pull-request fails, add an error annotation that links to the
repo's Actions settings and says which checkbox to enable, since GitHub's
error only links to the REST docs. When it creates or updates a PR, add a
notice with the PR link.

Applies to the generated deps-update workflow and to update-template-pins.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@tsvikas
tsvikas merged commit 479b2cb into main Oct 26, 2026
5 checks passed
@tsvikas
tsvikas deleted the ci/explain-pr-permission branch October 26, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant