Skip to content

Combine reports from all @phlexbot format workflows#380

Merged
greenc-FNAL merged 14 commits intomainfrom
maintenance/phlexbot-format-rollup
Mar 4, 2026
Merged

Combine reports from all @phlexbot format workflows#380
greenc-FNAL merged 14 commits intomainfrom
maintenance/phlexbot-format-rollup

Conversation

@greenc-FNAL
Copy link
Contributor

@greenc-FNAL greenc-FNAL commented Mar 3, 2026

  • Dedicated new workflow format-all.yaml is the sole responder to @phlexbot format instead of multiple "fix" workflows.
  • Specific "fix" workflows are called via workflow_call and results combined into a single comment to reduce clutter in the PR conversation history.
  • The handle-fix-commit reusable action will skip posting generated comments when called via workflow_call, allowing multiple messages to be consolidated into a single PR comment.

@greenc-FNAL greenc-FNAL changed the title maintenance/phlexbot format rollup Combine reports from all @phlexbot format workflows Mar 3, 2026
@greenc-FNAL greenc-FNAL changed the title Combine reports from all @phlexbot format workflows Combine reports from all @phlexbot format workflows Mar 3, 2026
@greenc-FNAL greenc-FNAL changed the title Combine reports from all @phlexbot format workflows Combine reports from all @phlexbot format workflows Mar 3, 2026
@greenc-FNAL
Copy link
Contributor Author

@phlexbot format

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic header-guards fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic markdownlint fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic jsonnetfmt fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic cmake-format fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic clang-format fixes were necessary.

@greenc-FNAL greenc-FNAL force-pushed the maintenance/phlexbot-format-rollup branch from 9beb8c9 to 6beb6a4 Compare March 3, 2026 22:42
@greenc-FNAL
Copy link
Contributor Author

@phlexbot format

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic header-guards fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic jsonnetfmt fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic cmake-format fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Automatic markdownlint fixes pushed (commit 2387e51).
⚠️ Note: Some issues may require manual review and fixing.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic clang-format fixes were necessary.

@greenc-FNAL
Copy link
Contributor Author

@phlexbot format

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic header-guards fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic cmake-format fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic jsonnetfmt fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic markdownlint fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic clang-format fixes were necessary.

@greenc-FNAL
Copy link
Contributor Author

@phlexbot format

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic header-guards fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic jsonnetfmt fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic clang-format fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic cmake-format fixes were necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic markdownlint fixes were necessary.

@greenc-FNAL
Copy link
Contributor Author

@phlexbot format

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

No automatic header-guards fixes were necessary.

greenc-FNAL and others added 11 commits March 4, 2026 11:43
- Dedicated new workflow `format-all.yaml` is the sole responder to
  `@phlexbot format` instead of multiple "fix" workflows.
- Specific "fix" workflows are called via `workflow_call` and results
  combined into a single comment to reduce clutter in the PR
  conversation history.
- The `handle-fix-commit` reusable action will skip posting generated
  comments when called via `workflow_call`, allowing multiple messages
  to be consolidated into a single PR comment.
- Indicate workflow completion on invocation comment
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…uards run script, failure reporting

Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
…docs

- Replace `inputs.skip-comment` with `github.event_name == 'workflow_call' && inputs.skip-comment || 'false'` in all 7 fix workflows so that issue_comment triggers don't access the unavailable inputs context
- Remove redundant `&& inputs.skip-comment != 'true'` from reaction step conditions that already gate on `github.event_name == 'issue_comment'`
- Update format-all.yaml patch message to include artifact name and apply instructions
- Update REUSABLE_WORKFLOWS.md: change skip-comment examples from boolean true to string "true", and type descriptions from boolean to string

Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ssage

Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
@greenc-FNAL greenc-FNAL force-pushed the maintenance/phlexbot-format-rollup branch from 915029e to ad80dea Compare March 4, 2026 17:43
@greenc-FNAL greenc-FNAL requested a review from Copilot March 4, 2026 17:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.

Comments suppressed due to low confidence (1)

.github/actions/handle-fix-commit/action.yaml:66

  • When this composite action runs under workflow_call, the event payload typically won't include a PR number, so actions-comment-pull-request can fail unless the caller remembered to set skip-comment: 'true'. Consider making comment steps also conditional on a PR context being present (or on github.event_name != 'workflow_call'), or add an explicit PR number input that can be passed through to the comment action.
    - name: No changes to apply
      if: steps.check_changes.outputs.changes == 'false' && inputs.skip-comment != 'true'
      uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
      with:
        message: "No automatic ${{ inputs.tool }} fixes were necessary."

Wrap listForIssueComment call in try/catch so a transient API error does
not fail the workflow. Narrow the bot-match predicate from the broad
r.user.type === 'Bot' to r.user && r.user.login === 'github-actions[bot]'
so only the reaction posted by phlexbot's pre-check step is removed.

Use destructured { data: reactions } assignment for consistency with
format-all.yaml.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 9 comments.

format-all.yaml reads changes/pushed/commit_sha_short/patch_name from
needs.<job>.outputs.* for each called fix workflow. GitHub Actions only
surfaces these to the caller when they are explicitly re-exported under
on.workflow_call.outputs; job-level outputs alone are not visible to
calling workflows.

Add on.workflow_call.outputs sections to all seven fix workflows,
mapping to the corresponding apply-job outputs.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

The Get PR maintainer_can_modify property step uses context.issue.number,
which is only populated when the root trigger is an issue_comment event.
When a fix workflow is triggered via workflow_dispatch, context.issue.number
is undefined, causing the pulls.get API call to fail whenever formatting
changes are found.

Note: workflow_call from format-all.yaml (triggered by issue_comment) is
not affected — GitHub propagates the event payload to called workflows so
context.issue.number is populated there. The bug is specific to the
workflow_dispatch path.

Default to 'false' for maintainer_can_modify when no PR context is
available. The commit path's first condition (same-repo check) still
allows pushes to proceed correctly for workflow_dispatch runs.
@greenc-FNAL greenc-FNAL requested a review from knoepfel March 4, 2026 18:47
@knoepfel
Copy link
Member

knoepfel commented Mar 4, 2026

@greenc-FNAL, this PR increases the number of lines of code by ~900. What is the principal benefit of this PR?

@knoepfel
Copy link
Member

knoepfel commented Mar 4, 2026

@greenc-FNAL, this PR increases the number of lines of code by ~900. What is the principal benefit of this PR?

Response from Chris offline:

The principal benefit is that it allows the application of @phlexbot format to be orchestrated such that all the results are collected and combined as a single, comprehensive comment instead of (now) seven. This will substantially reduce the conversational clutter one gets on a PR when @phlexbot format is invoked multiple times, occasionally leading significant user-produced comments to be folded out of visibility before they are seen or addressed.

@greenc-FNAL greenc-FNAL merged commit 103c08c into main Mar 4, 2026
59 checks passed
@greenc-FNAL greenc-FNAL deleted the maintenance/phlexbot-format-rollup branch March 10, 2026 16:19
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.

4 participants