Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

GitHub Actions does not support using both paths and paths-ignore on the same event. All SDK test workflows were violating this constraint.

Changes

Consolidated path filtering in 4 workflows:

  • nodejs-sdk-tests.yml
  • dotnet-sdk-tests.yml
  • go-sdk-tests.yml
  • python-sdk-tests.yml

Replaced paths-ignore with negated patterns in paths using ! prefix:

# Before
on:
  pull_request:
    paths:
      - 'nodejs/**'
      - 'test/**'
    paths-ignore:
      - '**/*.md'
      - '**/LICENSE*'

# After
on:
  pull_request:
    paths:
      - 'nodejs/**'
      - 'test/**'
      - '!**/*.md'
      - '!**/LICENSE*'

Pattern order follows spec: positive patterns first, then negative patterns. Filtering behavior unchanged.

Original prompt

per the github actions doc:

You cannot use paths and paths-ignore to filter the same event in a single workflow. If you want to both include and exclude path patterns for a single event, use the paths filter prefixed with the ! character to indicate which paths should be excluded.

If you define a path with the ! character, you must also define at least one path without the ! character. If you only want to exclude paths, use paths-ignore instead.

The order that you define paths patterns matters:

A matching negative pattern (prefixed with !) after a positive match will exclude the path.
A matching positive pattern after a negative match will include the path again.
This example runs anytime the push event includes a file in the sub-project directory or its subdirectories, unless the file is in the sub-project/docs directory. For example, a push that changed sub-project/index.js or sub-project/src/index.js will trigger a workflow run, but a push changing only sub-project/docs/readme.md will not.

on:
push:
paths:
- 'sub-project/'
- '!sub-project/docs/
'

update the sdk tests workflows


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…ths-ignore

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Copilot AI changed the title [WIP] Update GitHub actions to handle path filters correctly Consolidate path filters in SDK test workflows per GitHub Actions spec Jan 30, 2026
Copilot AI requested a review from friggeri January 30, 2026 22:33
@friggeri friggeri marked this pull request as ready for review January 30, 2026 22:33
@friggeri friggeri requested a review from a team as a code owner January 30, 2026 22:33
Copilot AI review requested due to automatic review settings January 30, 2026 22:33
@friggeri friggeri merged commit b0448f8 into main Jan 30, 2026
13 checks passed
@friggeri friggeri deleted the copilot/update-github-actions-paths branch January 30, 2026 22:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates GitHub Actions SDK test workflows to comply with the GitHub Actions spec that disallows using paths and paths-ignore together for the same event.

Changes:

  • Removed paths-ignore from the SDK test workflows’ pull_request triggers.
  • Added equivalent negated patterns (!…) under paths, with positive patterns listed first to preserve filter precedence.
  • Applied the same consolidation approach across Node.js, Python, Go, and .NET SDK workflows.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
.github/workflows/nodejs-sdk-tests.yml Replaces paths-ignore with negated paths patterns for pull_request trigger filtering.
.github/workflows/python-sdk-tests.yml Replaces paths-ignore with negated paths patterns for pull_request trigger filtering.
.github/workflows/go-sdk-tests.yml Replaces paths-ignore with negated paths patterns for pull_request trigger filtering.
.github/workflows/dotnet-sdk-tests.yml Replaces paths-ignore with negated paths patterns for pull_request trigger filtering.

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

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.

2 participants