Skip to content

fix(release): apply PSR v10.5.3 bug mitigations to reusable workflow#184

Merged
williaby merged 1 commit into
mainfrom
chore/fix-psr-release-bugs
May 28, 2026
Merged

fix(release): apply PSR v10.5.3 bug mitigations to reusable workflow#184
williaby merged 1 commit into
mainfrom
chore/fix-psr-release-bugs

Conversation

@williaby
Copy link
Copy Markdown
Collaborator

Summary

  • PSR 422 bug: vcs_release: "false" + separate gh release create dist/* step — avoids the github3 boolean serialization bug that returns 422 from GitHub Releases API
  • Detached HEAD bug: SHA-pinned checkout + git checkout -B "$HEAD_BRANCH" step for workflow_run callers — PSR requires an attached branch to match [tool.semantic_release.branches] config
  • Branch ruleset bypass: commit: "false" so PSR only pushes tags; tag refs are exempt from branch rulesets, no bypass actor needed
  • Fork security: fork-owner verification step (S7631) for workflow_run callers
  • Default safety: publish-to-pypi default flipped from true to false — callers must now opt in explicitly

Validated against

End-to-end validation on ByronWilliamsCPA/.claude (release v0.14.0, 2026-05-28). All five mitigations confirmed working.

Test plan

  • Merge PR
  • Verify python-release.yml is updated on main
  • Trigger a release in a downstream repo — confirm tag push succeeds and GitHub Release is created via gh release create

Generated with Claude Code

PSR v10.5.3 has two bugs affecting the no-PyPI release pattern:

1. 422 on GitHub Release creation: github3 library serializes draft/prerelease
   as JSON strings rather than booleans. Fix: vcs_release: "false" + separate
   gh release create step that types booleans correctly.

2. Detached HEAD prevents branch matching: actions/checkout with ref: <sha>
   leaves HEAD detached; PSR needs an attached branch to match branches config.
   Fix: git checkout -B "$HEAD_BRANCH" after checkout.

Also adds:
- Fork verification step for workflow_run callers (S7631)
- SHA-pinned checkout (ref: workflow_run.head_sha || github.sha)
- commit: "false" so PSR only pushes tags (branch rulesets exempt tag refs)
- publish-to-pypi default changed from true to false

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 28, 2026 04:33
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Warning

Review limit reached

@williaby, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 37 minutes and 45 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0d7a7b60-0b6b-49a4-949a-85f7aa15cf06

📥 Commits

Reviewing files that changed from the base of the PR and between e75a86b and 291f541.

📒 Files selected for processing (1)
  • .github/workflows/python-release.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/fix-psr-release-bugs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@williaby williaby enabled auto-merge (squash) May 28, 2026 04:34
@williaby williaby merged commit 74c633a into main May 28, 2026
22 of 23 checks passed
@williaby williaby deleted the chore/fix-psr-release-bugs branch May 28, 2026 04:34
@sonarqubecloud
Copy link
Copy Markdown

@williaby williaby review requested due to automatic review settings May 28, 2026 04:54
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