Skip to content

ci: auto-apply clang-tidy fixes on push/schedule via persistent autofix PR - #2813

Open
wdconinc with Copilot wants to merge 5 commits into
mainfrom
copilot/clang-tidy-fixes
Open

ci: auto-apply clang-tidy fixes on push/schedule via persistent autofix PR#2813
wdconinc with Copilot wants to merge 5 commits into
mainfrom
copilot/clang-tidy-fixes

Conversation

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Briefly, what does this PR introduce? Please link to any relevant presentations or discussions.

On push and schedule, clang-tidy previously produced diagnostics/artifacts but did not apply fixes or maintain an autofix PR lifecycle. This change makes clang-tidy apply fixes and route them through a stable branch/PR that is updated on subsequent runs.

  • Clang-tidy execution change
    • Enables in-place autofix for non-PR runs by adding -fix -format to the all-files invocation.
  • Autofix PR lifecycle
    • Adds a create-pull-request step for push/schedule.
    • Uses a stable branch name: clang-tidy-${{ github.ref_name }}.
    • Targets the source branch (base: ${{ github.ref_name }}), so existing PRs are updated; missing ones are created.
  • PR metadata
    • Uses dedicated bot token, deterministic commit message, and generated PR title/body tied to the workflow run.
- name: Run clang-tidy on all files
  if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
  run: run-clang-tidy -p build -fix -format -export-fixes clang_tidy_fixes.yaml -extra-arg='-std=c++20'

- name: Create/Update clang-tidy Pull Request
  if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
  with:
    branch: clang-tidy-${{ github.ref_name }}
    base: ${{ github.ref_name }}

What is the urgency of this PR?

  • High (please describe reason below)
  • Medium
  • Low

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue #__)
  • Optimization (issue #__)
  • Updated parameters, constants (issue #__)
  • Updated documentation
  • other: __

Please check if any of the following apply

  • This PR requires changes to geometry (epic PR: __)
  • This PR requires changes to EDM4eic (EDM PR: __)
  • This PR introduces breaking changes. Please describe changes users need to make below.
  • This PR changes default behavior. Please describe changes below.
  • AI was used in preparing this PR. Please describe usage below.

AI was used to draft and apply the workflow update and prepare this PR summary.

@wdconinc
wdconinc marked this pull request as ready for review July 30, 2026 01:38
Copilot AI review requested due to automatic review settings July 30, 2026 01:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the linux-eic-shell GitHub Actions workflow so that, on push and schedule, clang-tidy runs with in-place autofix enabled and the resulting changes are routed through a persistent “autofix” pull request branch that is updated on subsequent runs.

Changes:

  • Run clang-tidy on all files with -fix -format for push/schedule events.
  • Add a peter-evans/create-pull-request step to create/update a stable clang-tidy-${{ github.ref_name }} PR targeting the source branch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/linux-eic-shell.yml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 30, 2026 17:40
@wdconinc
wdconinc requested review from a team and removed request for Copilot July 30, 2026 17:42
@wdconinc
wdconinc enabled auto-merge July 30, 2026 17:43
Copilot AI review requested due to automatic review settings August 1, 2026 18:37
auto-merge was automatically disabled August 1, 2026 18:37

Head branch was pushed to by a user without write access

This comment was marked as low quality.

Copilot AI review requested due to automatic review settings August 1, 2026 19:06

This comment was marked as low quality.

@wdconinc

wdconinc commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Works per #2820. Not saying that's what we should merge, but it gives the set of suggestions we think we should enforce in PRs, so we should adjust clang-tidy config if not correct.

Copilot AI review requested due to automatic review settings August 2, 2026 14:53
@wdconinc
wdconinc removed the request for review from Copilot August 2, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants