Skip to content

Commit 7e182aa

Browse files
fix: Adjust 'next command' timestamp increment to 2 seconds
This commit modifies the "suggest next command" feature in `scripts/gha/get_pr_review_comments.py`. The time added to the last processed comment's timestamp (for the `--since` parameter in the suggested command) has been changed from 1 second to 2 seconds. This adjustment provides a slightly larger buffer to more reliably exclude already seen comments when fetching subsequent comments, addressing potential timestamp granularity or query resolution behavior observed with the GitHub API. The `since` parameter for the relevant API endpoint filters by `created_at`, and this change is a heuristic improvement for that existing logic.
1 parent 24a03ea commit 7e182aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/gha/get_pr_review_comments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def main():
202202
if latest_created_at_obj:
203203
try:
204204
# Ensure it's UTC before adding timedelta, then format
205-
next_since_dt = latest_created_at_obj.astimezone(timezone.utc) + timedelta(seconds=1)
205+
next_since_dt = latest_created_at_obj.astimezone(timezone.utc) + timedelta(seconds=2)
206206
next_since_str = next_since_dt.strftime('%Y-%m-%dT%H:%M:%SZ')
207207

208208
new_cmd_args = [sys.argv[0]]

0 commit comments

Comments
 (0)