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>

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.
Steps to reproduce the behavior
gh set agh set a✓ Created variable a for xxx/yyyIf you do the same for an environment level or organisation level variable it correctly returns the Updated response.
Logs