Skip to content

ci(release): stop committing release artifacts back to protected main - #3

Merged
asachs01 merged 1 commit into
mainfrom
ci/drop-release-commit-back-plugins
Oct 7, 2026
Merged

asachs01 merged 1 commit into
mainfrom
ci/drop-release-commit-back-plugins

Conversation

@asachs01

@asachs01 asachs01 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Why

This repo's release job runs semantic-release with @semantic-release/git, which pushes a chore(release) commit back to main. main is branch-protected (PR + 1 approval), so that push is rejected:

remote: error: GH006: Protected branch update failed for refs/heads/main.

It fails in the prepare step, before npm publish, so nothing gets published. The most recent release run that got that far was run 37086154268: it computed 1.0.2 and then hit GH006. There's no v1.0.2 tag.

What

Same fix as WYRE-AI/node-datto-saas-protection#59, matching node-threatlocker's config, which releases fine under branch protection:

  • .releaserc.json drops @semantic-release/changelog and @semantic-release/git. Remaining plugins: commit-analyzer, release-notes-generator, npm, github. branches is unchanged (main, develop, alpha).
  • Removes the @semantic-release/changelog and @semantic-release/git devDependencies and refreshes package-lock.json (npm 10).

Effects

  • package.json on main keeps showing 1.0.1. @semantic-release/npm sets the version in the published tarball at publish time.
  • The tag and GitHub Release come from semantic-release core and @semantic-release/github.
  • Release notes live on the Releases page. CHANGELOG.md stays as a historical file.

Release outcome

This is a ci: commit, so on its own it isn't releasable. On merge, the commit analyzer still sees the unreleased feat/fix commits since v1.0.1 and cuts 1.0.2.

Tests

npm ci, npm run lint, npm run build and npm test pass locally on Node 22.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Chores
    • Automated releases continue to publish to npm and GitHub.
    • Release publishing no longer generates a changelog or commits release files.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a2e5734b-6545-4365-b655-75c3277a7332
📥 Commits

Reviewing files that changed from the base of the PR and between 0540714 and c639699.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
📒 Files selected for processing (2)
  • .releaserc.json
  • package.json
💤 Files with no reviewable changes (2)
  • package.json
  • .releaserc.json

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.


📝 Walkthrough

Walkthrough

The release configuration removes the changelog and Git plugins. The npm and GitHub plugins remain configured. The corresponding development dependencies were also removed.

Changes

Release configuration

Layer / File(s) Summary
Remove changelog and Git plugins
.releaserc.json, package.json
The release configuration removes the changelog and Git plugins and their associated settings. package.json removes both plugins from development dependencies.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to c6396

The release configuration no longer includes the plugin that attempted to commit artifacts to protected main. No issue identified here prevents merging.

🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Changelog Entry ⚠️ Warning The PR changes release configuration without adding a corresponding CHANGELOG.md entry. The authoritative diff removes @semantic-release/changelog and @semantic-release/git from `.releaserc.json… Add a corresponding entry beneath ## [Unreleased] in CHANGELOG.md, under Changed, for the release configuration change.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: preventing release artifacts from being committed back to protected main.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Changelog Entry

Explanation

The PR changes release configuration without adding a corresponding CHANGELOG.md entry. The authoritative diff removes @semantic-release/changelog and @semantic-release/git from .releaserc.json and removes their development dependencies. This changes release configuration and release behaviour. The diff changes only .releaserc.json, package.json, and package-lock.json; it does not change CHANGELOG.md. The root file has an existing ## [Unreleased] section, but this PR adds no entry there.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@asachs01
asachs01 merged commit 128a793 into main Oct 7, 2026
4 checks passed
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant