Resolve issue comment handling regressions#135
Merged
knoepfel merged 4 commits intoFramework-R-D:mainfrom Dec 1, 2025
Merged
Conversation
Contributor
greenc-FNAL
commented
Nov 25, 2025
- bugfix: Refactor issue-comment triggers in 'fix' workflows
- refactor: Improve robustness of issue-comment triggers
This commit fixes a bug where issue comment triggers (e.g., '@phlexbot format') were no longer functional. The root cause was a fragile shell script in the 'parse-command' job of the 'fix' workflows. The script has been replaced with a more robust and idiomatic GitHub Actions expression in a job-level 'if' condition. This new approach is more reliable, efficient, and easier to maintain. The following workflows have been refactored: - .github/workflows/clang-tidy-fix.yaml - .github/workflows/clang-format-fix.yaml - .github/workflows/cmake-format-fix.yaml
This commit refactors the GitHub Actions workflows that are triggered by issue comments to be more robust, secure, and maintainable. The key changes are: - Replaced fragile shell scripts with idiomatic job-level `if` conditions using the `startsWith()` function. - Fixed a security vulnerability in `cmake-build.yaml` by adding a permission check to ensure that only collaborators and owners can trigger builds. - Removed the issue comment trigger from `clang-tidy-check.yaml` to simplify the workflow and align it with the other "check" workflows. These changes fix the original bug where issue comment triggers were not working, and they also improve the overall quality and consistency of the CI system.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors issue-comment triggered workflows to improve robustness by consolidating authorization and trigger phrase checks into job-level if conditions, eliminating redundant shell script steps. It also extracts PR information retrieval into a reusable composite action.
Key changes:
- Consolidated authorization and trigger validation into declarative job-level
ifconditions across "fix" workflows - Replaced custom
should_runoutput checks with GitHub's nativeneeds.<job>.result == 'success'pattern - Created reusable
get-pr-infocomposite action to eliminate code duplication - Removed issue_comment trigger from clang-tidy-check.yaml (check workflow now only handles pull_request events)
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/cmake-format-fix.yaml | Refactored to use job-level authorization/trigger checks; references new get-pr-info action |
| .github/workflows/cmake-build.yaml | Consolidated issue_comment trigger validation into job-level condition; removed redundant shell script check |
| .github/workflows/clang-tidy-fix.yaml | Refactored to use job-level authorization/trigger checks; references new get-pr-info action |
| .github/workflows/clang-tidy-check.yaml | Removed issue_comment trigger entirely; simplified to handle only pull_request and workflow_dispatch events |
| .github/workflows/clang-format-fix.yaml | Refactored to use job-level authorization/trigger checks; references new get-pr-info action |
| .github/actions/get-pr-info/action.yaml | New composite action to fetch PR details from issue_comment context using github-script |
knoepfel
approved these changes
Dec 1, 2025
greenc-FNAL
pushed a commit
that referenced
this pull request
Dec 1, 2025
This commit aligns the `python-check.yaml` and `python-fix.yaml` workflows with the consistency improvements and standards established in PR #135. Key changes include: - Refactoring `python-fix.yaml` to use a single-job design, moving the trigger logic into a job-level `if` condition. - Correcting the `uses` syntax for internal reusable actions to use the full repository path and pin to `@main`, resolving a syntax error (`@main@main`).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.