-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Labels
enhancementa request to improve CLIa request to improve CLIgh-releaserelating to the gh release commandrelating to the gh release commandhelp wantedContributions welcomeContributions welcome
Description
Describe the bug
gh release view
with JSON parser outputs node_id instead of id.
The number 58125145 expected to be printed instead of the string MWDDFDc6UmVFzZTU4MTQ1. See logs
GH version:
$ ~/tmp/gh_2.52.0_linux_amd64/bin/gh --version
gh version 2.52.0 (2024-06-24)
https://github.com/cli/cli/releases/tag/v2.52.0
Steps to reproduce the behavior
- Create GH release including a git tag
- Run
gh api repos/<USER>/<REPO>/releases
to list your releases - Run
gh release view <GIT_TAG> --json id
- Compare numbers of the expected release ID with the wrongly outputed node_id
Expected vs actual behavior
I would expect the id number containing multiple digits which can be used for requesting GHES release API. Currently node_id is outputed.
Logs
$ ~/tmp/gh_2.52.0_linux_amd64/bin/gh release view --json id
{
"id": "MWDDFDc6UmVFzZTU4MTQ1"
}
$ ~/tmp/gh_2.52.0_linux_amd64/bin/gh api repos/<USER>/<REPO>/releases/58125145
{
"url": "https://<GHES-URL>/api/v3/repos/<USER>/<REPO>/releases/58125145",
"assets_url": "https://<GHES-URL>/api/v3/repos/<USER>/<REPO>/releases/58125145/assets",
"upload_url": "https://<GHES-URL>/api/uploads/repos/<USER>/<REPO>/releases/58125145/assets{?name,label}",
"html_url": "https://<GHES-URL>/<USER>/<REPO>/releases/tag/<tag-name>",
"id": 58125145,
"author": {
"login": "<GH_USER>",
"id": 3954313,
"node_id": "MDQ6VXNlcjM5NTEz",
"avatar_url": "https://avatars.<GHES-URL>/u/3954313?",
"gravatar_id": "",
"url": "https://<GHES-URL>/api/v3/users/<GH_USER>",
"html_url": "https://<GHES-URL>/<GH_USER>",
"followers_url": "https://<GHES-URL>/api/v3/users/<GH_USER>/followers",
"following_url": "https://<GHES-URL>/api/v3/users/<GH_USER>/following{/other_user}",
"gists_url": "https://<GHES-URL>/api/v3/users/<GH_USER>/gists{/gist_id}",
"starred_url": "https://<GHES-URL>/api/v3/users/<GH_USER>/starred{/owner}{/repo}",
"subscriptions_url": "https://<GHES-URL>/api/v3/users/<GH_USER>/subscriptions",
"organizations_url": "https://<GHES-URL>/api/v3/users/<GH_USER>/orgs",
"repos_url": "https://<GHES-URL>/api/v3/users/<GH_USER>/repos",
"events_url": "https://<GHES-URL>/api/v3/users/<GH_USER>/events{/privacy}",
"received_events_url": "https://<GHES-URL>/api/v3/users/<GH_USER>/received_events",
"type": "User",
"site_admin": false
},
"node_id": "MWDDFDc6UmVFzZTU4MTQ1",
"tag_name": "<tag-name>",
"target_commitish": "de6754364b3528a7ed7301cad3a4c6297e899022",
"name": "<tag-name>",
"draft": false,
"prerelease": false,
"created_at": "2024-06-26T08:07:12Z",
"published_at": "2024-06-10T11:20:43Z",
"assets": [],
"tarball_url": "https://<GHES-URL>/api/v3/repos/<USER>/<REPO>/tarball/<tag-name>",
"zipball_url": "https://<GHES-URL>/api/v3/repos/<USER>/<REPO>/zipball/<tag-name>",
"body": "## changelog xxx"
}
$ ~/tmp/gh_2.52.0_linux_amd64/bin/gh release view --json apiUrl
{
"apiUrl": "https://<GHES-URL>/api/v3/repos/<USER>/<REPO>/releases/58125145"
}
Metadata
Metadata
Assignees
Labels
enhancementa request to improve CLIa request to improve CLIgh-releaserelating to the gh release commandrelating to the gh release commandhelp wantedContributions welcomeContributions welcome