fix: workflow exclusions by full path#91
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes exclude-workflows matching for reusable workflows so exclusions can be scoped by full workflow path (optionally including @ref) instead of only matching by basename, preventing unintended skips during recursive traversal.
Changes:
- Added workflow reference normalization and updated exclusion logic to support path-scoped patterns (while keeping bare-filename behavior).
- Updated pattern matching to allow dot-path globs (e.g., matching
.github/...) and adjusted local workflow exclusion filtering to use the shared exclusion helper. - Updated docs/metadata, added tests for path-scoped exclusions and glob path matching, and bumped the patch version to
2.5.6.
Show a summary per file
| File | Description |
|---|---|
src/index.js |
Implements path-aware reusable-workflow exclusion handling and updates glob matching behavior. |
__tests__/index.test.js |
Adds unit tests covering path-scoped exclusions and glob path patterns. |
README.md |
Documents the new path-scoped exclusion behavior and updates examples. |
action.yml |
Updates input description to describe path-scoped exclusions. |
package.json |
Bumps version to 2.5.6. |
package-lock.json |
Updates lockfile version fields to 2.5.6. |
badges/coverage.svg |
Updates coverage badge to reflect latest coverage. |
Copilot's findings
- Files reviewed: 5/7 changed files
- Comments generated: 1
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📦 Draft Release CreatedA draft release v2.5.6 has been created for this PR. Next Steps
|
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.
Workflow exclusions previously matched reusable workflows by basename only, so excluding a common filename such as
ci.ymlcould unintentionally skip identically named workflows in other repositories during recursive traversal.This fixes the existing
exclude-workflowsbehavior by keeping bare filename patterns backward-compatible while allowing patterns with/to match the full workflow path without the@ref. For example,owner/repo/.github/workflows/ci.ymlnow scopes the exclusion to that reusable workflow, whileci.ymlstill excludes that filename everywhere.Also updates the action metadata and README examples, adds tests for path-scoped exclusions and glob path matching, and bumps the patch version to
2.5.6.