Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses the issue of the "sweep" label not being removed when a failure occurs.
The changes made in this PR are in the
on_ticket
function in thesweepai/handlers/on_ticket.py
file. Code has been added to remove the "sweep" label at the points where a failure can occur. This is done by fetching the "sweep" label object using theget_label
method and then calling theremove_from_labels
method.Additionally, a case has been handled where the "sweep" label does not exist. This is done by catching the exception raised by the
get_label
method and logging a message.This change will ensure that the "sweep" label is removed from the issue when a failure occurs, providing a more accurate representation of the issue's status.
Fixes #152.
To checkout this PR branch, run the following command in your terminal: