Skip to content

Skip build workflows on PRs only changing .pre-commit-config.yaml - #351

Merged
christophfroehlich merged 1 commit into
ros-controls:masterfrom
christophfroehlich:exclude-precommit-config-from-builds
Dec 1, 2026
Merged

christophfroehlich merged 1 commit into
ros-controls:masterfrom
christophfroehlich:exclude-precommit-config-from-builds

Conversation

@christophfroehlich

Copy link
Copy Markdown
Member

.pre-commit-config.yaml matches the '**.yaml' path filter of the build workflows, so the monthly pre-commit bump PRs trigger the full build matrix although only the pre-commit workflow is relevant.

This adds '!.pre-commit-config.yaml' right after '**.yaml' (order matters for negated patterns). PRs changing only .pre-commit-config.yaml now run only the pre-commit workflow; PRs that also touch other matching files still run all builds.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@christophfroehlich christophfroehlich added backport-humble Triggers PR backport to ROS 2 humble. backport-jazzy Triggers PR backport to ROS 2 jazzy. labels Dec 1, 2026
@christophfroehlich
christophfroehlich requested a balanced review from Copilot December 1, 2026 07:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the workflow-filter changes intended to reduce unnecessary CI runs on pre-commit configuration updates.

No open issues 🎉

What changed in this PR

This PR reduces unnecessary CI work for monthly pre-commit updates by excluding .pre-commit-config.yaml from build and documentation workflow path filters across Rolling, Jazzy, and Humble.

Changes:

  • Adds the exclusion immediately after each broad YAML inclusion in 28 workflows.
  • Preserves triggers when other changed files match the existing filters.
  • Also excludes configuration-only pushes where these filters apply; pre-commit workflows and schedules remain unchanged.
File Description
.github/​workflows/​rolling-source-build.yml Excludes pre-commit-only pushes from source builds.
.github/​workflows/​rolling-semi-binary-downstream-build.yml Excludes pre-commit-only changes from downstream builds.
.github/​workflows/​rolling-semi-binary-build.yml Excludes pre-commit-only changes from semi-binary builds.
.github/​workflows/​rolling-semi-binary-build-win.yml Excludes pre-commit-only changes from Windows builds.
.github/​workflows/​rolling-semi-binary-build-deprecation-werror.yml Excludes pre-commit-only changes from deprecation-checking builds.
.github/​workflows/​rolling-rhel-semi-binary-build.yml Excludes pre-commit-only changes from RHEL builds.
.github/​workflows/​rolling-debian-build.yml Excludes pre-commit-only changes from Debian builds.
.github/​workflows/​rolling-coverage-build.yml Excludes pre-commit-only changes from coverage builds.
.github/​workflows/​rolling-compatibility-build.yml Excludes pre-commit-only changes from compatibility builds.
.github/​workflows/​rolling-check-docs.yml Excludes pre-commit-only changes from documentation checks.
.github/​workflows/​rolling-binary-build.yml Excludes pre-commit-only changes from binary builds.
.github/​workflows/​rolling-abi-compatibility.yml Excludes pre-commit-only changes from ABI checks.
.github/​workflows/​jazzy-source-build.yml Excludes pre-commit-only pushes from source builds.
.github/​workflows/​jazzy-semi-binary-downstream-build.yml Excludes pre-commit-only changes from downstream builds.
.github/​workflows/​jazzy-semi-binary-build.yml Excludes pre-commit-only changes from semi-binary builds.
.github/​workflows/​jazzy-rhel-semi-binary-build.yml Excludes pre-commit-only changes from RHEL builds.
.github/​workflows/​jazzy-debian-build.yml Excludes pre-commit-only changes from Debian builds.
.github/​workflows/​jazzy-coverage-build.yml Excludes pre-commit-only changes from coverage builds.
.github/​workflows/​jazzy-binary-build.yml Excludes pre-commit-only changes from binary builds.
.github/​workflows/​jazzy-abi-compatibility.yml Excludes pre-commit-only changes from ABI checks.
.github/​workflows/​humble-source-build.yml Excludes pre-commit-only pushes from source builds.
.github/​workflows/​humble-semi-binary-downstream-build.yml Excludes pre-commit-only changes from downstream builds.
.github/​workflows/​humble-semi-binary-build.yml Excludes pre-commit-only changes from semi-binary builds.
.github/​workflows/​humble-rhel-semi-binary-build.yml Excludes pre-commit-only changes from RHEL builds.
.github/​workflows/​humble-debian-build.yml Excludes pre-commit-only changes from Debian builds.
.github/​workflows/​humble-coverage-build.yml Excludes pre-commit-only changes from coverage builds.
.github/​workflows/​humble-binary-build.yml Excludes pre-commit-only changes from binary builds.
.github/​workflows/​humble-abi-compatibility.yml Excludes pre-commit-only changes from ABI checks.

Review effort: Balanced

@christophfroehlich
christophfroehlich merged commit 84f5825 into ros-controls:master Dec 1, 2026
10 of 35 checks passed
christophfroehlich added a commit that referenced this pull request Dec 1, 2026
…ckport #351) (#353)

Skip build workflows on PRs only changing .pre-commit-config.yaml (#351)


(cherry picked from commit 84f5825)

Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
christophfroehlich added a commit that referenced this pull request Dec 1, 2026
…ckport #351) (#354)

Skip build workflows on PRs only changing .pre-commit-config.yaml (#351)


(cherry picked from commit 84f5825)

Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-humble Triggers PR backport to ROS 2 humble. backport-jazzy Triggers PR backport to ROS 2 jazzy.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants