Repository navigation
Test Louhi PoC with Status Update - #21
Conversation
FIX: b/518744224
There was a problem hiding this comment.
📋 Review Summary
This pull request effectively enhances the update_buganizer.py script by introducing the capability to not only comment on Buganizer issues but also to close them based on specific commit message tags. The changes are well-implemented, improving the automation and integration with Buganizer.
🔍 General Feedback
- The refactoring of the regex and the introduction of
extract_bug_actionsandmodify_buganizer_issuesignificantly improve the script's flexibility and power. - The use of the
:modifyendpoint for Buganizer API calls is a good practice for handling both comments and status updates in a single request.
| @@ -17,8 +17,8 @@ | |||
| BUGANIZER_API_KEY = os.getenv("BUGANIZER_API_KEY", "YOUR_PUBLIC_ONEPLATFORM_API_KEY_HERE") | |||
| BUGANIZER_API_URL = "https://issuetracker.corp.googleapis.com/v1/issues" | |||
|
|
|||
There was a problem hiding this comment.
[THOUGHT] The enhanced regex for TAG_REGEX to capture the tag type is a great improvement. It allows for more granular control over the Buganizer actions based on the commit message.
| """Extracts Buganizer IDs matching the required line-start syntax.""" | ||
| bug_ids = [] | ||
| def extract_bug_actions(commit_lines): | ||
| """Extracts Buganizer IDs and determines if they should be closed. |
There was a problem hiding this comment.
[THOUGHT] Refactoring post_comment_to_buganizer to modify_buganizer_issue and leveraging the :modify endpoint, along with the updated payload for status changes, is a robust and efficient way to interact with the Buganizer API. This ensures proper handling of both comments and status updates.
| @@ -36,14 +36,22 @@ def get_git_commits(): | |||
| print(f"Error reading git logs: {e.stderr}") | |||
There was a problem hiding this comment.
[THOUGHT] The extract_bug_actions function, returning a tuple of (bug_id, should_close), significantly improves the script's capability by enabling conditional bug closure based on commit message tags. This is a very useful enhancement.
Testing Louhi integration and Buganizer status update.
FIX: b/518744224