Commit graph

36 commits

Author SHA1 Message Date
William Martin
d4cd79e28c Use int64 for GitHub database IDs and add lint check
Change all struct fields representing GitHub database IDs from int to
int64 to match the API spec and prevent potential overflow on 32-bit
architectures.

Add a custom go/analysis linter (idtype-checker) that flags struct
fields with ID-like names or JSON tags using int instead of int64,
integrated into make lint.

Closes #9247

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-13 13:16:43 +02:00
Andy Feller
d2cd14b4cd Remove out of scope changes, update list commands
After discussing this with the team, the `gh config` changes to display `accessible_colors` have been removed from this branch being outside of acceptance criteria.  This will be moved to a separate issue along with any other work needed to finalize the public preview such as `gh help` entries for `GH_ACCESSIBLE_COLORS` environment variable.

List commands that use ColorScheme.Gray have been updated to use ColorScheme.Muted.
2025-03-31 11:58:30 -04:00
William Martin
1d38230675
Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
Sam Coe
5023b61909
Remove uses of FuzzyAgoAbbr in tables (#8222) 2023-10-22 17:33:49 +02:00
Heath Stewart
7738b6187c
Add headers to all tables (#8157) 2023-10-20 11:20:02 +02:00
Kousik Mitra
4668810cbe
Enhance ssh-key list to show signing ssh keys also 2023-04-05 19:22:28 +05:30
Kousik Mitra
0d8b5ab9d7
Add option to add ssh singing key 2023-04-05 19:22:28 +05:30
vaindil
7006d3f0a5 move SSH key errors out of upload function 2023-03-31 13:47:25 -04:00
vaindil
0e5e7de9af don't parse key bytes twice 2023-03-30 16:36:56 -04:00
vaindil
f21f1ca4ef check SSH key existence before uploading 2023-03-29 17:32:25 -04:00
Sam Coe
c9a2d85793
Cleanup config.AuthToken and config.DefaultHost methods (#7049) 2023-02-28 00:24:45 +00:00
Damien Sedgwick
bab1b00c39
Rename --confirm flag to --yes for various destructive commands (#6915) 2023-01-26 12:48:21 +01:00
Mislav Marohnić
3fe5026d39
Migrate to tableprinter from go-gh (#6346) 2022-10-17 15:15:39 +02:00
Natthakit Susanthitanon
5962bc4383
Add ssh-key delete command (#6273) 2022-10-12 08:22:22 +00:00
Natthakit Susanthitanon
1a759ecd4b
Add header and id column to the gh ssh-key list output (#6270) 2022-09-22 14:07:57 +04:00
Sam Coe
e7102f9d84
Migrate to go-gh text package (#6236) 2022-09-14 09:23:55 +04:00
Sam Coe
cacff4ad6d
Use go-gh config package (#5771) 2022-06-23 11:50:04 +00:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Roshan Padaki
13342cb272
Don't error on list commands when no results found (#5479)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-04-25 17:55:52 +00:00
Christian Gregg
c5dbf20ed4
Alias list as ls for all commands (#5214)
I always get tripped up whenever trying to list my codespaces, adding
`ls` as an alias to `list` feels natural enough.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-02-17 13:53:42 +01:00
Kevin Lee
0d143ca89c
Consistent punctuation in command usages (#5139)
* Fix spelling and grammatical errors in command docs
* Add periods for consistency across the long command descriptions
* Format imports
2022-01-31 10:56:12 +00:00
Sam Coe
d3076463aa
Rename gpg-key and ssh-key files to fit golang common practices (#5074) 2022-01-21 16:51:16 +02:00
Des Preston
bdd95e11ab
Don't swallow duplicate key error (#4807) 2021-11-25 13:22:42 +01:00
Alan Donovan
f4491c7a80 Add FlagErrorf; encapsulate FlagError.error 2021-10-21 11:40:20 -04:00
Sam
a02d423687
Merge pull request #3822 from owenvoke/feature/gpg-key
feat: add GPG key management commands
2021-10-18 11:36:44 -07:00
Mislav Marohnić
64a19ee71f Remove OAuth scopes checking logic from ssh-key commands
Scopes checking is now handled on the HTTP client level for all commands.
2021-10-14 18:36:55 +02:00
Sam Coe
78067e0a89
Merge branch 'trunk' into feature/gpg-key 2021-09-13 14:50:56 -07:00
Sam Coe
7e920a3b66
Add some small UX polish 2021-09-13 14:43:10 -07:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Mislav Marohnić
b70b0402eb
Merge pull request #3200 from cli/table-widths
Ensure that table printer always uses all available width in the terminal
2021-03-30 16:54:13 +02:00
Sam
9ec1e21d4c
Default to GHES host if only GHES is authenticated (#3286) 2021-03-30 16:51:00 +02:00
Mislav Marohnić
fc2cdd99b1 Ensure that ssh-key list uses the full width of the terminal
Due to a bug in its truncate function, the width of the table would
sometimes be off-by-one.
2021-03-11 19:04:57 +01:00
Mislav Marohnić
1a9e42ed55 Add ssh-key add command and publish ssh-key 2021-02-17 19:46:59 +01:00
Mislav Marohnić
10b1314dc1 Hide ssh-key command until it's ready for prime-time 2021-01-21 17:55:44 +01:00
Mislav Marohnić
4a2cc8d2a4 Simplify ssh-key list
Do not require nor request `read:public_key` scope by default.
2021-01-20 20:23:57 +01:00
edualb
e26a1b98a1 add ssh-key command 2021-01-20 20:23:38 +01:00