Commit 5514186
authored
Serve the advisor default branch from config instead of a repos.get call (#8582)
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.14.0)
(oldest at bottom):
* #8584
* __->__ #8582
* #8580
* #8579
* #8578
* #8576
**Impact:** AI CI Advisor auto-dispatch path (Dr.CI cron)
**Risk:** low
## What
Adds a `defaultBranch` field to `AdvisorRepoConfig` and reads it in
`dispatchAdvisorWorkflow` instead of looking the default branch up via
the GitHub `repos.get` REST call on every dispatch.
## Why
The PyTorchBot GitHub App installation intermittently hits its shared
hourly REST rate limit, causing random 403s. This drops one
installation-token call per advisor dispatch (~12k/mo) by moving a value
that never changes into the per-repo config, which is already the single
source of truth for advisor settings.
Signed-off-by: Jean Schmidt <contato@jschmidt.me>1 parent bc357a4 commit 5514186
2 files changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| 60 | + | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | | - | |
| 190 | + | |
193 | 191 | | |
194 | 192 | | |
195 | 193 | | |
| |||
0 commit comments