fix: don't push release commit to protected main branch - #65
Draft
farhan wants to merge 1 commit into
Draft
Conversation
The Release workflow failed because python-semantic-release attempts to push a version/changelog commit back to `main`, but `main` is a protected branch that requires the "openedx/cla" status check. A bot push cannot satisfy that check, so the push is rejected with GH006 and the release job fails. Set `commit: "false"` on the python-semantic-release action so it no longer creates or pushes a commit to the branch. The package version is derived from git tags via setuptools-scm, so no in-repo commit is needed; the action still creates and pushes the tag and the GitHub Release, and publishing to PyPI is unaffected. Tags are not subject to branch protection, so the release completes without admin changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65 +/- ##
=======================================
Coverage 82.17% 82.17%
=======================================
Files 48 48
Lines 1419 1419
Branches 110 110
=======================================
Hits 1166 1166
Misses 221 221
Partials 32 32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Release workflow fails on
mainat the Run Semantic Release step:python-semantic-releasetries to push a version/changelog commit back tomain.mainis a protected branch requiring theopenedx/clastatus check, which a bot push cannot satisfy, so the push is rejected and the release job fails.Fix
Set
commit: "false"on thepython-semantic-releaseaction so it no longer creates or pushes a commit to the branch.The package version is derived from git tags via
setuptools-scm, so no in-repo commit is required. The action still:This requires no branch-protection/admin changes.
Notes
openedx/clarequirement onmainfor bot pushes is the root cause; the alternative fix (bypass CLA for the release actor) needs repo-admin access.🤖 Generated with Claude Code