Merge ~emmabrostrom/ols-jenkaas:pre-merge-bot-comment into ols-jenkaas:main
Status: | Merged |
---|---|
Merged at revision: | cd489a7cbf69b2b3a809dbe8c78aa3a139c44468 |
Proposed branch: | ~emmabrostrom/ols-jenkaas:pre-merge-bot-comment |
Merge into: | ols-jenkaas:main |
Diff against target: |
38 lines (+11/-7) 1 file modified
olsjenkaas/commands.py (+11/-7) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Maximiliano Bertacchini | Approve | ||
Review via email:
|
Commit message
Refactor pre-merge command to exclude certain bot comments
The command was only looking at the most recent bot comment, regardless
of if it had to do with pre-merge CI, which this update fixes. Additionally,
refactored the function a bit to enhance readability and ease of list
comprehension.
Description of the change
This update was due to an issue realized in this MP: https:/
The bot recognized a previous bot comment that did not have to do with pre-merge CI
as a pre-merge CI command to search for the commit hash. There was no commit hash to be found
(as expected), but pre-merge CI was ran again as a result.
This update makes sure that only bot comments related to pre-merge CI
are parsed for their commit hash.
Tested in ols-jenkaas VM
Particularly looking for feedback if anyone has an idea of what to do merge_ci_ comment_ match() instead of having it be a staticmethod. recent_ commit_ seen_by_ bot() should be kept static, so not sure if
with is_pre_
get_most_
there is a better way to call a function within that.