-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinggh-variablerelating to the gh variable commandrelating to the gh variable commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
When updating an existing repo variable the return message is Created instead of Updated. This behaviour isn't observed for Environment or Organisation variables, only repo variables.
gh --version
gh version 2.44.1 (2024-02-16)
https://github.com/cli/cli/releases/tag/v2.44.1
Steps to reproduce the behavior
- Be inside a git repo in the command line
- Create a new variable for the repo with
gh set a - Update the variable using
gh set a - Return message is
✓ Created variable a for xxx/yyy
If you do the same for an environment level or organisation level variable it correctly returns the Updated response.
Logs
PS C:\Users\Dean\Projects\TEMPO> gh variable list
no variables found
PS C:\Users\Dean\Projects\TEMPO> gh variable list --env devo
no variables found
PS C:\Users\Dean\Projects\TEMPO> gh variable set a
? Paste your variable a
? Paste your variable a
✓ Created variable a for Naedish/TEMPO
PS C:\Users\Dean\Projects\TEMPO> gh variable set a
? Paste your variable a
? Paste your variable a
✓ Created variable a for Naedish/TEMPO
PS C:\Users\Dean\Projects\TEMPO> gh variable set a --env devo
? Paste your variable a
? Paste your variable a
✓ Created variable a for Naedish/TEMPO environment devo
PS C:\Users\Dean\Projects\TEMPO> gh variable set a --env devo
? Paste your variable a
? Paste your variable a
✓ Updated variable a for Naedish/TEMPO environment devo
PS C:\Users\Dean\Projects\TEMPO>

Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggh-variablerelating to the gh variable commandrelating to the gh variable commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic