RFR: 2347: SKARA Bot can't find the commit in GitHub if the commit isn't in the default branch
Erik Joelsson
erikj at openjdk.org
Fri Aug 9 20:08:40 UTC 2024
On Mon, 5 Aug 2024 21:53:01 GMT, Zhao Song <zsong at openjdk.org> wrote:
> When searching for a commit in GitHub, the Skara bot utilizes the /search/commits API to look for commits in the whole organization. However, this API has a limitation: it can only find commits in the default branch of each repository. Therefore, If the commit is not found using /search/commits, the bot should try to locate it in each repository.
This is really unfortunate and I don't have a better suggestion for solving it. However, this implementation is risky as it's very expensive when the hash can't be found. We have to iterate through every repo in the org. This means that if the user uses the wrong hash in a "Backport <hash>" title, we can end up spending a lot of time processing that.
OTOH, this is already what we do for GitLab.
-------------
Marked as reviewed by erikj (Lead).
PR Review: https://git.openjdk.org/skara/pull/1684#pullrequestreview-2230981423
More information about the skara-dev
mailing list