Skip to content

fix: workflow exclusions by full path#91

Merged
joshjohanning merged 2 commits into
mainfrom
joshjohanning/exclude-workflows-by-path
May 20, 2026
Merged

fix: workflow exclusions by full path#91
joshjohanning merged 2 commits into
mainfrom
joshjohanning/exclude-workflows-by-path

Conversation

@joshjohanning

Copy link
Copy Markdown
Owner

Workflow exclusions previously matched reusable workflows by basename only, so excluding a common filename such as ci.yml could unintentionally skip identically named workflows in other repositories during recursive traversal.

This fixes the existing exclude-workflows behavior 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.yml now scopes the exclusion to that reusable workflow, while ci.yml still 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.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 20, 2026 22:04
@joshjohanning joshjohanning changed the title Fix workflow exclusions by full path fix: workflow exclusions by full path May 20, 2026
@joshjohanning joshjohanning linked an issue May 20, 2026 that may be closed by this pull request

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 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

Comment thread src/index.js Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@joshjohanning joshjohanning merged commit ebb71f0 into main May 20, 2026
4 checks passed
@joshjohanning joshjohanning deleted the joshjohanning/exclude-workflows-by-path branch May 20, 2026 22:25
@github-actions

Copy link
Copy Markdown

📦 Draft Release Created

A draft release v2.5.6 has been created for this PR.

🔗 View Draft Release

Next Steps

  • Review the release notes
  • Publish the release to make it permanent

This is an automated reminder from the publish-github-action workflow.

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.

Exclude workflows by full path not just filename

2 participants