Implement methods for retrieving running jobs
Implement methods that yield respective jobs to be cancelled, i.e., after retriggering a Copr build, we should get a list of running Copr builds associated with the previous trigger.
[!WARNING] There is a possible issue with retriggering via comments (as they are not the same trigger, i.e., there would be a need to map the PR ID / current commit hash to the latest running builds/tests with the same commit hash).
Considering https://github.com/packit/packit/issues/2534, the methods should return lists of Copr build IDs or Testing Farm request IDs.
For the sake of this card, do not consider subsequent jobs. It will be handled by a follow-up issue.
TODO
- [x] Parse the revisions (commit hashes) from the respective events
- GitHub
- both push to branch and push to PR contain
beforeandafterwhich are SHA hashes of the commits
- both push to branch and push to PR contain
- GitLab
- For MRs there should be an
oldrevattribute - Pushes contain
beforeandafterin the same fashion as the GitHub
- For MRs there should be an
- GitHub
- [ ] Implement method that provides already running Copr build for the preceding event
- [ ] Implement method that provides already running Testing Farm runs for the preceding event
Hello, is this something i can work on
@elomscansio hello, thanks for your interest! But this issue is a priority for us and we already planned to work on this ourselves (and is also not very trivial as a starting point), so could you please choose something else? :) Generally, the good-first-issue labelled issues are more ideal for newcomers.