Combine reports from all @phlexbot format workflows#380
Conversation
@phlexbot format workflows
@phlexbot format workflows@phlexbot format workflows
|
@phlexbot format |
|
No automatic header-guards fixes were necessary. |
|
No automatic markdownlint fixes were necessary. |
|
No automatic jsonnetfmt fixes were necessary. |
|
No automatic cmake-format fixes were necessary. |
|
No automatic clang-format fixes were necessary. |
9beb8c9 to
6beb6a4
Compare
|
@phlexbot format |
|
No automatic header-guards fixes were necessary. |
|
No automatic jsonnetfmt fixes were necessary. |
|
No automatic cmake-format fixes were necessary. |
|
Automatic markdownlint fixes pushed (commit 2387e51). |
|
No automatic clang-format fixes were necessary. |
|
@phlexbot format |
|
No automatic header-guards fixes were necessary. |
|
No automatic cmake-format fixes were necessary. |
|
No automatic jsonnetfmt fixes were necessary. |
|
No automatic markdownlint fixes were necessary. |
|
No automatic clang-format fixes were necessary. |
|
@phlexbot format |
|
No automatic header-guards fixes were necessary. |
|
No automatic jsonnetfmt fixes were necessary. |
|
No automatic clang-format fixes were necessary. |
|
No automatic cmake-format fixes were necessary. |
|
No automatic markdownlint fixes were necessary. |
|
@phlexbot format |
|
No automatic header-guards fixes were necessary. |
- 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>
915029e to
ad80dea
Compare
There was a problem hiding this comment.
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, soactions-comment-pull-requestcan fail unless the caller remembered to setskip-comment: 'true'. Consider making comment steps also conditional on a PR context being present (or ongithub.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.
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.
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, this PR increases the number of lines of code by ~900. What is the principal benefit of this PR? |
Response from Chris offline:
|
format-all.yamlis the sole responder to@phlexbot formatinstead of multiple "fix" workflows.workflow_calland results combined into a single comment to reduce clutter in the PR conversation history.handle-fix-commitreusable action will skip posting generated comments when called viaworkflow_call, allowing multiple messages to be consolidated into a single PR comment.