Skip to content

fix: don't push release commit to protected main branch - #65

Draft
farhan wants to merge 1 commit into
mainfrom
fix/release-no-branch-commit
Draft

fix: don't push release commit to protected main branch#65
farhan wants to merge 1 commit into
mainfrom
fix/release-no-branch-commit

Conversation

@farhan

@farhan farhan commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Problem

The Release workflow fails on main at the Run Semantic Release step:

remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: - Required status check "openedx/cla" is expected.
 ! [remote rejected] main -> main (protected branch hook declined)
GitCommandError: Cmd('git') failed ... cmdline: git push origin main

python-semantic-release tries to push a version/changelog commit back to main. main is a protected branch requiring the openedx/cla status check, which a bot push cannot satisfy, so the push is rejected and the release job fails.

Fix

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 required. The action still:

  • creates and pushes the tag (tags are not subject to branch protection),
  • creates the GitHub Release,
  • and the downstream PyPI publish job is unaffected.

This requires no branch-protection/admin changes.

Notes

  • Draft PR — please confirm the approach before merge.
  • The openedx/cla requirement on main for bot pushes is the root cause; the alternative fix (bypass CLA for the release actor) needs repo-admin access.

🤖 Generated with Claude Code

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

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.17%. Comparing base (dc44893) to head (ad60d41).

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           
Flag Coverage Δ
unittests 82.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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