Skip to content

Add release immutability support to repository plugin#1008

Draft
Copilot wants to merge 2 commits into
main-enterprisefrom
copilot/add-enable-release-immutability
Draft

Add release immutability support to repository plugin#1008
Copilot wants to merge 2 commits into
main-enterprisefrom
copilot/add-enable-release-immutability

Conversation

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

The repository plugin had no support for GitHub's release immutability feature, which prevents assets and tags from being modified after a release is published. This adds releases.immutable as an enforceable setting via safe-settings.

Changes

  • lib/plugins/repository.js

    • Added releases to ignorableFields (not a repos.update param; handled separately)
    • Extracts this.releases in constructor, removes it from this.settings before API calls
    • New updateReleaseImmutability() method: calls PUT /repos/{owner}/{repo}/releases/immutability to enable, DELETE to disable; supports nop/dry-run mode
    • sync() calls updateReleaseImmutability() in both changed and unchanged repo branches
  • test/unit/lib/plugins/repository.test.js

    • Added github.request mock; fixed mock repo data to include owner.login/name
    • Removed a pre-existing it.only that was silently skipping all other tests
    • New tests for enable, disable, and absent releases config
  • Docs: Added releases.immutable to settings.yml sample and 1. repository-settings.md

Usage

repository:
  releases:
    immutable: true   # PUT /repos/{owner}/{repo}/releases/immutability
    # immutable: false  # DELETE /repos/{owner}/{repo}/releases/immutability

Copilot AI changed the title [WIP] Add option to enable release immutability Add release immutability support to repository plugin Jun 24, 2026
Copilot AI requested a review from decyjphr June 24, 2026 02:40
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.

2 participants