Skip to content

Fix SyncPRSummary action bot comments scanning and redundant API calls#28

Merged
shravanngoswamii merged 1 commit intosg-SyncPRSummaryfrom
jules-sync-pr-summary-fix-3439081147760001566
Mar 26, 2026
Merged

Fix SyncPRSummary action bot comments scanning and redundant API calls#28
shravanngoswamii merged 1 commit intosg-SyncPRSummaryfrom
jules-sync-pr-summary-fix-3439081147760001566

Conversation

@shravanngoswamii
Copy link
Copy Markdown
Member

This commit restores the functionality in the SyncPRSummary action to scan other bot comments for specific markers (like <!-- perf-results -->) when the input is empty. This fallback was accidentally lost during the PR #27 refactor but is needed for workflows that don't pass explicit inputs.

Additionally, this commit re-introduces the equality check before making updateComment API calls to prevent redundant updates when the content hasn't changed.


PR created automatically by Jules for task 3439081147760001566 started by @shravanngoswamii

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@shravanngoswamii
Copy link
Copy Markdown
Member Author

shravanngoswamii commented Mar 26, 2026

Can you explain me how SyncPRSummary will work after both PRs gets merged to main?

@google-labs-jules
Copy link
Copy Markdown

@jules Can you explain me how SyncPRSummary will work after both PRs gets merged to main?

Here's how SyncPRSummary will work once both PRs are merged:

  1. Separate Bot Comment instead of PR Body: Instead of editing the original pull request description (which could overwrite the author's edits, as discussed), the action will now create and maintain a single dedicated bot comment on the PR to consolidate CI outputs.

  2. Gathering Content: When a workflow triggers the action, it determines the content for each section (e.g., docs and perf) by checking the following sources in order of priority:

    • Explicit Input: The docs-content or perf-content passed directly into the action.
    • Fallback to Other Bot Comments (Restored Feature): If no explicit input is provided, the action will scan all existing comments on the PR left by GitHub Actions bots. It looks for specific HTML markers like <!-- perf-results --> to extract content automatically.
    • Previous State: If neither of the above are found, it reuses the content already present in its managed bot comment.
    • Default Fallback: If nothing is found, it uses the default "Pending" message.
  3. Updating the Comment: It pieces together the content for all sections and compares it against the existing managed bot comment. To avoid unnecessary "edited" spam and API calls, it will only update the comment if the resulting content is actually different.

This gives you the best of both worlds: no interference with the author's PR description, and a single, tidy bot comment that aggregates outputs from multiple CI workflows automatically.

@shravanngoswamii shravanngoswamii merged commit e3786a2 into sg-SyncPRSummary Mar 26, 2026
@shravanngoswamii shravanngoswamii deleted the jules-sync-pr-summary-fix-3439081147760001566 branch March 26, 2026 16:10
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.

1 participant