Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a function to find the
/git-artifacts
PR comment for a given co…
…mmit SHA To update the `/git-artifacts` comment when cascading `git-artifacts-<arch>` runs are triggered, we need a way to get from the commit SHA (which is part of the `check_run.completed` webhook) to the corresponding PR comment ID. Here, we introduce a function to do that, by using GitHub API's search functionality. The commit SHA is given verbatim, which should be good enough according to the documentation at https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests#search-by-commit-sha Further, we make use of the text match metadata (https://docs.github.com/en/rest/search/search#text-match-metadata) to match the desired PR comment and to extract the PR comment ID. Signed-off-by: Johannes Schindelin <[email protected]>
- Loading branch information