[FIX] use authenticated GitHub API to check maintainers in other branches - #357
[FIX] use authenticated GitHub API to check maintainers in other branches#357yajo wants to merge 1 commit into
Conversation
b066222 to
060b0c2
Compare
|
Could you take a look on red CI ? Thanks ! |
060b0c2 to
1480a4c
Compare
|
Done, was just formatting. |
|
Any chances to review this? cc @sbidoul |
|
And this is more important since https://github.com/orgs/community/discussions/206581 |
|
Looks good, but why keep the unauthenticated variant? This adds bloat for no reason that I can see. |
|
You mean to set the github token as required? |
|
Yes. But now that I think of it, I'm not even sure we have ever had a 429 on these requests. |
1480a4c to
39d489e
Compare
|
Well, I've changed it and now the token is required. |
a908905 to
fddf338
Compare
…rs in other branches When a maintainer tried to merge or rebase a migration PR, the bot looked for maintainers in other branches by downloading each addon manifest from raw.githubusercontent.com. That endpoint is unauthenticated and subject to rate limiting, transient errors and caching issues, which made the check fail intermittently (see OCA#226). Since the bot already requires a GitHub token for all its operations, keep only the authenticated GitHub Contents API path and drop the raw URL fallback. This removes unnecessary code and avoids preserving the very failure mode this fix addresses. Fixes OCA#226 Assisted-by: OpenCode + Kimi k2.7-code
fddf338 to
d4640cc
Compare
|
This patch makes sense in design: we all know Github has stricter rate limits on unauthenticated requests, and the bot was failing randomly. But we won't know if this is the real fix until this is merged and deployed. So could you please merge & deploy, and then we can reopen the issue if it still keeps happening? |
When a maintainer tried to merge or rebase a migration PR, the bot
looked for maintainers in other branches by downloading each addon
manifest from raw.githubusercontent.com. That endpoint is unauthenticated
and subject to rate limiting, transient errors and caching issues, which
made the check fail intermittently (see #226).
With this change, the authenticated GitHub session already used by the
bot is reused to read manifests via the GitHub Contents API. The previous
raw URL request is kept as a fallback in case the API is unavailable.
Fixes #226
Assisted-by: OpenCode + kimi-k2.7-code