Add support for organization Immutable Releases API by Not-Dhananjay-Mishra · Pull Request #3774 · google/go-github

@Not-Dhananjay-Mishra

Fixes: #3771.

This PR adds support for Organization Immutable Releases API

Implement

  • GET /orgs/{org}/settings/immutable-releases
  • PUT /orgs/{org}/settings/immutable-releases
  • GET /orgs/{org}/settings/immutable-releases/repositories
  • PUT /orgs/{org}/settings/immutable-releases/repositories
  • PUT /orgs/{org}/settings/immutable-releases/repositories/{repository_id}
  • DELETE /orgs/{org}/settings/immutable-releases/repositories/{repository_id}

issue - #3771

@Not-Dhananjay-Mishra

@Not-Dhananjay-Mishra

@codecov

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.45%. Comparing base (06b8b3a) to head (3c5fcd9).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3774      +/-   ##
==========================================
+ Coverage   91.41%   91.45%   +0.04%     
==========================================
  Files         187      188       +1     
  Lines       16822    16904      +82     
==========================================
+ Hits        15377    15459      +82     
  Misses       1257     1257              
  Partials      188      188              

☔ View full report in Codecov by Sentry.
📢 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.

gmlewis

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @Not-Dhananjay-Mishra!
Just a few issues to address, please, then we should be ready for a second LGTM+Approval from any other contributor to this repo.

@Not-Dhananjay-Mishra

@Not-Dhananjay-Mishra

@Not-Dhananjay-Mishra

@gmlewis and @zyfy29 Thanks for the suggestions, I’ve made some changes:
EnforcedRepositories string -> *string
SelectedRepositoriesIDs -> SelectedRepositoryIDs
in SetImmutableReleasesPolicy *ImmutableReleaseRepository -> ImmutableReleaseRepository
SetImmutableReleaseRepositories now accept directly repositoryIDs []int64 rather than SelectedRepositories struct
Made method descriptions in a single paragraph
and made a few other description tweaks

@Not-Dhananjay-Mishra

zyfy29

@Not-Dhananjay-Mishra

gmlewis

@Not-Dhananjay-Mishra

zyfy29

@Not-Dhananjay-Mishra

zyfy29

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

gmlewis

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was referenced

Feb 25, 2026