You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@bdehamer : Thanks for opening up this issue! ❤️ I see this relates to #11251 where the immutable field is being included in gh release view.
Is this solely to export it via --json isImmutable`? In other words, it is not expected to be including in the list output.
$ gh release list
TITLE TYPE TAG NAME PUBLISHED
GitHub CLI 2.75.0 Latest v2.75.0 about 2 days ago
GitHub CLI 2.74.2 v2.74.2 about 23 days ago
GitHub CLI 2.74.1 v2.74.1 about 1 month ago
GitHub CLI 2.74.0 v2.74.0 about 1 month ago
GitHub CLI 2.73.0 v2.73.0 about 1 month ago
GitHub CLI 2.72.0 v2.72.0 about 2 months ago
GitHub CLI 2.71.2 v2.71.2 about 2 months ago
GitHub CLI 2.71.1 v2.71.1 about 2 months ago
GitHub CLI 2.71.0 v2.71.0 about 2 months ago
GitHub CLI 2.70.0 v2.70.0 about 2 months ago
GitHub CLI 2.69.0 v2.69.0 about 3 months ago
GitHub CLI 2.68.1 v2.68.1 about 4 months ago
GitHub CLI 2.68.0 v2.68.0 about 4 months ago
GitHub CLI 2.67.0 v2.67.0 about 5 months ago
GitHub CLI 2.66.1 v2.66.1 about 5 months ago
GitHub CLI 2.66.0 v2.66.0 about 5 months ago
GitHub CLI 2.65.0 v2.65.0 about 6 months ago
GitHub CLI 2.64.0 v2.64.0 about 6 months ago
GitHub CLI 2.63.2 v2.63.2 about 7 months ago
GitHub CLI 2.63.1 v2.63.1 about 7 months ago
GitHub CLI 2.63.0 v2.63.0 about 7 months ago
GitHub CLI 2.62.0 v2.62.0 about 7 months ago
GitHub CLI 2.61.0 v2.61.0 about 8 months ago
GitHub CLI 2.60.1 v2.60.1 about 8 months ago
GitHub CLI 2.60.0 v2.60.0 about 8 months ago
GitHub CLI 2.59.0 v2.59.0 about 8 months ago
GitHub CLI 2.58.0 v2.58.0 about 9 months ago
GitHub CLI 2.57.0 v2.57.0 about 9 months ago
GitHub CLI 2.56.0 v2.56.0 about 10 months ago
GitHub CLI 2.55.0 v2.55.0 about 10 months ago
$ gh release list --json
Specify one or more comma-separated fields for`--json`:
createdAt
isDraft
isLatest
isPrerelease
name
publishedAt
tagName
This issue has been automatically marked as stale because it has not had any activity in the last 30 days,
and it will be closed in 30 days if no further activity occurs.
If you think this is a mistake, please comment on this issue to keep it open.
As a refresher on this, we need to do feature detection before making GraphQL API calls. If the Release.immutable field is present on the schema we can include the field. Otherwise, we should just leave IsImmutable to false (zero value) since on unsupported host versions, releases are not immutable. This is a leaking of business/backend logic into gh, but we have already done this for release view and we're confident that this is not going to break.
Required changes
A new feature detection method to inspect the Release object type using the query below and checks if the immutable field is on the schema.
Since the immutable field is only available on newer GH hosts, we might want to refactor the strongly-typed query back to plain string. This way we can dynamically modify the list of fields to fetch.
Acceptance Criteria
Given I'm using gh against github.com When I run gh release list -R OWNER/REPO Then I see no changes in the output structure
Given I'm using gh against github.com When I run gh release list -R OWNER/REPO --json name,isImmutable Then I see the isImmutable field is correctly assigned
Given I'm using gh against a GHES host that does not support immutable releases When I run gh release list -R OWNER/REPO --json name,isImmutable Then I see the isImmutable field is set to false for all entries
Given I'm using gh against a GHES host that supports immutable releases When I run gh release list -R OWNER/REPO --json name,isImmutable Then I see the isImmutable field is correctly assigned
Activity
andyfeller commentedon Jul 11, 2025
@bdehamer : Thanks for opening up this issue! ❤️ I see this relates to #11251 where the
immutablefield is being included ingh release view.Is this solely to export it via --json isImmutable`? In other words, it is not expected to be including in the list output.
bdehamer commentedon Jul 11, 2025
@andyfeller correct. For now, I'd just like to to be available in the json output.
There may come a time later where it makes sense to surface it as part of the normal output, but we're not quite ready for that yet.
github-actions commentedon Aug 11, 2025
This issue has been automatically marked as stale because it has not had any activity in the last 30 days,
and it will be closed in 30 days if no further activity occurs.
If you think this is a mistake, please comment on this issue to keep it open.
github-actions commentedon Sep 11, 2025
This issue has been automatically closed due to inactivity.
If you think this is a mistake, please comment on this issue.
babakks commentedon Oct 24, 2025
As a refresher on this, we need to do feature detection before making GraphQL API calls. If the
Release.immutablefield is present on the schema we can include the field. Otherwise, we should just leaveIsImmutabletofalse(zero value) since on unsupported host versions, releases are not immutable. This is a leaking of business/backend logic intogh, but we have already done this forrelease viewand we're confident that this is not going to break.Required changes
A new feature detection method to inspect the
Releaseobject type using the query below and checks if theimmutablefield is on the schema.The
release listcommand now has to instantiate a feature detector and provide the support status to the fetcher (see no 2).This is where we fetch the list of releases via GQL:
cli/pkg/cmd/release/list/http.go
Lines 38 to 49 in 85b73e4
And this is the
Releasestruct:cli/pkg/cmd/release/list/http.go
Lines 24 to 32 in 85b73e4
Since the
immutablefield is only available on newer GH hosts, we might want to refactor the strongly-typed query back to plain string. This way we can dynamically modify the list of fields to fetch.Acceptance Criteria
Given I'm using
ghagainstgithub.comWhen I run
gh release list -R OWNER/REPOThen I see no changes in the output structure
Given I'm using
ghagainstgithub.comWhen I run
gh release list -R OWNER/REPO --json name,isImmutableThen I see the
isImmutablefield is correctly assignedGiven I'm using
ghagainst a GHES host that does not support immutable releasesWhen I run
gh release list -R OWNER/REPO --json name,isImmutableThen I see the
isImmutablefield is set tofalsefor all entriesGiven I'm using
ghagainst a GHES host that supports immutable releasesWhen I run
gh release list -R OWNER/REPO --json name,isImmutableThen I see the
isImmutablefield is correctly assignedjoncrismuleon-bit commentedon Nov 8, 2025
|
joncrismuleon-bit commentedon Nov 8, 2025