Skip to content

Enable issue comment invocation for clang-tidy-check workflow#342

Merged
knoepfel merged 2 commits intomainfrom
maintenance/clang-tidy-triggers
Feb 23, 2026
Merged

Enable issue comment invocation for clang-tidy-check workflow#342
knoepfel merged 2 commits intomainfrom
maintenance/clang-tidy-triggers

Conversation

@greenc-FNAL
Copy link
Contributor

This commit enhances the clang-tidy-check workflow to support on-demand
invocation via issue comments using '@phlexbot tidy-check', providing
developers with a convenient way to run clang-tidy checks without
waiting for automatic PR triggers.

Changes:

  • Add issue_comment trigger with authorization check restricting access
    to OWNER, COLLABORATOR, and MEMBER roles following established
    security patterns from clang-tidy-fix workflow

  • Integrate get-pr-info action in pre-check job to extract PR details
    (ref, repo, base SHA, PR number) from issue comment events

  • Update permissions to include pull-requests: write for posting
    comments on PRs

  • Enhance clang-tidy-pr-comments job to support both pull_request and
    issue_comment event types with proper PR number resolution

  • Add summary comment when triggered via issue comment that includes:

    • Total count of issues found
    • Breakdown of issues by check type sorted by frequency
    • Reference to inline comments for details
    • Suggestion to use '@phlexbot tidy-fix' for auto-fixing

The workflow now supports three invocation methods:

  1. Automatic execution on pull requests
  2. Manual execution via workflow_dispatch
  3. On-demand execution via '@phlexbot tidy-check' comment on PRs

This provides developers with flexibility to run clang-tidy checks
on-demand while maintaining existing automatic PR checking behavior.

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

Adds an on-demand invocation path for the existing clang-tidy check workflow so developers can trigger it from PR comments (in addition to the existing pull_request and workflow_dispatch triggers).

Changes:

  • Add issue_comment trigger with an authorization gate and command parsing for @…bot tidy-check
  • Use the get-pr-info action to resolve PR checkout info (ref/repo/base SHA) when triggered by comments
  • Extend the comment-posting job to work for both pull_request and issue_comment events and add a summarized results comment

greenc-FNAL and others added 2 commits February 20, 2026 11:41
This commit enhances the clang-tidy-check workflow to support on-demand
invocation via issue comments using '@phlexbot tidy-check', providing
developers with a convenient way to run clang-tidy checks without
waiting for automatic PR triggers.

Changes:

- Add issue_comment trigger with authorization check restricting access
  to OWNER, COLLABORATOR, and MEMBER roles following established
  security patterns from clang-tidy-fix workflow

- Integrate get-pr-info action in pre-check job to extract PR details
  (ref, repo, base SHA, PR number) from issue comment events

- Update permissions to include pull-requests: write for posting
  comments on PRs

- Enhance clang-tidy-pr-comments job to support both pull_request and
  issue_comment event types with proper PR number resolution

- Add summary comment when triggered via issue comment that includes:
  - Total count of issues found
  - Breakdown of issues by check type sorted by frequency
  - Reference to inline comments for details
  - Suggestion to use '@phlexbot tidy-fix' for auto-fixing

The workflow now supports three invocation methods:
1. Automatic execution on pull requests
2. Manual execution via workflow_dispatch
3. On-demand execution via '@phlexbot tidy-check' comment on PRs

This provides developers with flexibility to run clang-tidy checks
on-demand while maintaining existing automatic PR checking behavior.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@greenc-FNAL greenc-FNAL force-pushed the maintenance/clang-tidy-triggers branch from 6e84140 to 2a523f9 Compare February 20, 2026 17:41
@knoepfel knoepfel merged commit 02060e9 into main Feb 23, 2026
59 of 60 checks passed
@knoepfel knoepfel deleted the maintenance/clang-tidy-triggers branch February 23, 2026 18: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.

3 participants