Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "sweep" label on failure #396

Closed
wants to merge 2 commits into from

Conversation

sweep-nightly[bot]
Copy link
Contributor

@sweep-nightly sweep-nightly bot commented Jul 10, 2023

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 the sweepai/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 the get_label method and then calling the remove_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:

git checkout sweep/remove-sweep-label-on-failure_1

Copy link
Contributor Author

@sweep-nightly sweep-nightly bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes required. The removal of the trailing blank line in sweepai/handlers/on_ticket.py is a good practice for keeping the code clean and consistent.

@wwzeng1 wwzeng1 deleted the branch dev July 14, 2023 21:57
@wwzeng1 wwzeng1 closed this Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant