Skip build workflow for PRs with empty diffs#2479
Merged
Conversation
Agent-Logs-Url: https://github.com/nicklockwood/SwiftFormat/sessions/dafe86eb-bb2e-4a5f-9d2d-4d4cade47fa4 Co-authored-by: calda <1811727+calda@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Skip build workflow for pull requests with empty diff
Skip build workflow for PRs with empty diffs
Mar 28, 2026
Collaborator
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2479 +/- ##
========================================
Coverage 95.29% 95.29%
========================================
Files 167 167
Lines 25337 25337
========================================
+ Hits 24145 24146 +1
+ Misses 1192 1191 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
calda
added a commit
that referenced
this pull request
Apr 11, 2026
Co-authored-by: calda <1811727+calda@users.noreply.github.com>
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.

Empty PRs (e.g. from GitHub Copilot with no actual changes) were triggering the full
buildCI matrix unnecessarily..github/workflows/build.yml: Added acheck-for-changesgate job withif: github.event_name != 'pull_request' || github.event.pull_request.changed_files > 0. All 7 build jobs now declareneeds: check-for-changes— when the gate is skipped (empty-diff PR), GitHub Actions automatically skips all dependents. Push events tomain/developare unaffected.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.