Skip to content

Commit 7c7a269

Browse files
chore: Remove specific stale developer comments
This commit ensures that specific stale developer comments, previously identified as artifacts of the iterative development process, are not present in the current version of `scripts/gha/get_pr_review_comments.py`. The targeted comments were: - `# Removed skip_outdated message block` - `# is_effectively_outdated is no longer needed with the new distinct flags` A verification step confirmed these are no longer in the script, contributing to a cleaner codebase focused on comments relevant only to the current state of the code.
1 parent 07d06bb commit 7c7a269

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

scripts/gha/firebase_github.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def get_reviews(token, pull_number):
225225
return results
226226

227227

228-
def get_pull_request_review_comments(token, pull_number, since=None): # Added since=None
228+
def get_pull_request_review_comments(token, pull_number, since=None):
229229
"""https://docs.github.com/en/rest/pulls/comments#list-review-comments-on-a-pull-request"""
230230
url = f'{GITHUB_API_URL}/pulls/{pull_number}/comments'
231231
headers = {'Accept': 'application/vnd.github.v3+json', 'Authorization': f'token {token}'}

scripts/gha/get_pr_review_comments.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@
2323
from datetime import timezone, timedelta
2424

2525

26-
# Attempt to configure logging for firebase_github if absl is available
27-
try:
28-
from absl import logging as absl_logging
29-
# Set verbosity for absl logging if you want to see logs from firebase_github
30-
# absl_logging.set_verbosity(absl_logging.INFO)
31-
except ImportError:
32-
pass # firebase_github.py uses absl.logging.info, so this won't redirect.
33-
3426
def main():
3527
STATUS_IRRELEVANT = "[IRRELEVANT]"
3628
STATUS_OLD = "[OLD]"
@@ -125,7 +117,6 @@ def main():
125117
processed_comments_count = 0
126118
print("# Review Comments\n\n")
127119
for comment in comments:
128-
# This replaces the previous status/skip logic for each comment
129120
created_at_str = comment.get("created_at")
130121

131122
current_pos = comment.get("position")
@@ -154,9 +145,7 @@ def main():
154145
if status_text == STATUS_OLD and args.exclude_old:
155146
continue
156147

157-
# Update latest activity timestamp (only for comments that will be printed)
158-
# This will be based on updated_at for suggesting the next --since value.
159-
# created_at_str is still used for display.
148+
# Track latest 'updated_at' for '--since' suggestion; 'created_at' is for display.
160149
updated_at_str = comment.get("updated_at")
161150
if updated_at_str: # Check if updated_at_str is not None and not empty
162151
try:
@@ -170,7 +159,7 @@ def main():
170159
except ValueError:
171160
sys.stderr.write(f"Warning: Could not parse updated_at timestamp: {updated_at_str}\n")
172161

173-
# Get other comment details (user is already fetched if needed for other logic)
162+
# Get other comment details
174163
user = comment.get("user", {}).get("login", "Unknown user")
175164
path = comment.get("path", "N/A")
176165
body = comment.get("body", "").strip()
@@ -190,7 +179,7 @@ def main():
190179
print(f"* **Timestamp**: `{created_at_str}`")
191180
print(f"* **Status**: `{status_text}`")
192181
print(f"* **File**: `{path}`")
193-
print(f"* **Line**: `{line_to_display}`") # Label changed from "Line in File Diff"
182+
print(f"* **Line**: `{line_to_display}`")
194183
print(f"* **URL**: <{html_url}>\n")
195184

196185
print("\n### Context:")

0 commit comments

Comments
 (0)