Commit graph

39 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
Azeem Sajid
8b7fb231ec Remove trailing whitespace 2025-02-13 11:06:27 +05:00
William Martin
0ead3398a7 Bump golang ci lint to work with go 1.24 2025-01-21 17:55:39 +01:00
Tyler McGoffin
81591a09b8 Use go-gh/auth package for IsEnterprise, IsTenancy, and NormalizeHostname 2024-10-15 11:56:43 -07:00
Heath Stewart
81f3526740
Fix tests 2024-08-16 10:11:52 -07:00
William Martin
1d38230675
Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
Yukai Chou
b14da6c63f Wrap scopes 2023-11-23 07:22:57 +08:00
Yukai Chou
07a87ca8a4 Wrap special values and placeholders like - and $1 2023-11-23 07:09:29 +08:00
Yukai Chou
b70c28ba20 Misc docs improvements 2023-11-17 01:32:28 +08:00
Yukai Chou
896101678f Wrap cli commands in backticks uniformly 2023-11-17 01:32:00 +08:00
Yukai Chou
17d336e005 Wrap cli flags in backticks uniformly 2023-11-16 22:54:27 +08:00
Heath Stewart
7738b6187c
Add headers to all tables (#8157) 2023-10-20 11:20:02 +02:00
cawfeecake
aa231319ca
Add missing "ls" aliases to list commands (#7818) 2023-08-10 09:08:15 -07:00
vaindil
8ed632afb9
Allow --org parameter in lieu of a repo context for rulesets, add current_user_can_bypass to rs view (#7747) 2023-08-10 08:51:48 -07:00
vaindil
d82c1193b3 make IDs cyan, add prompter test 2023-07-06 14:56:55 -04:00
vaindil
ab921f96e6 split org/repo graphql queries, better tests 2023-07-05 15:13:09 -04:00
vaindil
069faef86c refactor graphql query a bit 2023-07-05 14:29:52 -04:00
vaindil
dcefe340ad add rs check tests 2023-07-05 13:57:19 -04:00
vaindil
159ac8ba0e fix merge errors 2023-07-05 13:57:19 -04:00
vaindil
77df68e11a misc cleanup 2023-07-05 13:57:19 -04:00
vaindil
e4aa5ba84c add ruleset check command 2023-07-05 13:57:19 -04:00
vaindil
5c5dcd2a80 initial view tests 2023-07-05 13:57:19 -04:00
vaindil
3add672132 list test updates 2023-07-05 13:57:19 -04:00
vaindil
2f7caf8502 update bypass response and parents logic, tests 2023-07-05 13:57:19 -04:00
vaindil
8328a0abdc update tests, add rules to view command 2023-07-05 13:57:19 -04:00
vaindil
f25b2af053 interactive ruleset selection, move shared logic 2023-07-05 13:57:19 -04:00
vaindil
ef30d875b5 gracefully handle missing admin:org scope 2023-07-05 13:57:19 -04:00
vaindil
8fa69c4915 don't allow both --repo and --org, add docs 2023-07-05 13:57:19 -04:00
vaindil
e91670edcc split ruleset types by API type 2023-07-05 13:57:19 -04:00
vaindil
3e6419237d allow getting parents, move list to shared package 2023-07-05 13:57:19 -04:00
vaindil
7f81645c78 basic ruleset view works 2023-07-05 13:57:19 -04:00
vaindil
5155844d7f updates, initial list test 2023-07-05 13:57:19 -04:00
vaindil
7b2c8aba8c refactor and support org rulesets 2023-07-05 13:57:19 -04:00
vaindil
bb9a9fa3c2 GQL query works but it's messy 2023-07-05 13:57:19 -04:00
vilmibm
a742e9f8df wip 2023-07-05 13:57:19 -04:00
vilmibm
24911ffa24 start on rs list 2023-07-05 13:57:19 -04:00
vilmibm
79113bd304 start writing up structs for rules API payloads 2023-07-05 13:57:19 -04:00
vilmibm
bcb4194692 WIP compute branch, call API 2023-07-05 13:57:19 -04:00
vilmibm
87fabebb68 start on gh rs 2023-07-05 13:57:19 -04:00