Skip to content

Conversation

@Praveen2112
Copy link
Member

@Praveen2112 Praveen2112 commented Oct 24, 2025

Description

The path-filter CI job when run on master requires the repo to be checked out.

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## Section
* Fix some things. ({issue}`issuenumber`)

Summary by Sourcery

CI:

  • Insert actions/checkout@v5 as the first step in the path-filter job with a conditional ref expression for repository_dispatch events

@cla-bot cla-bot bot added the cla-signed label Oct 24, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented Oct 24, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The CI path-filter job has been updated to explicitly checkout the repository before running the filter action, using a conditional ref expression to support both pull_request and repository_dispatch events.

Sequence diagram for conditional repository checkout in path-filter job

sequenceDiagram
  participant CI as "CI Runner"
  participant GH as "GitHub Actions"
  participant Repo as "Repository"
  CI->>GH: Start path-filter job
  GH->>Repo: Checkout code (actions/checkout@v5)
  alt repository_dispatch event
    GH->>Repo: Checkout ref "refs/pull/{number}/head"
  else other events
    GH->>Repo: Checkout default branch
  end
  GH->>GH: Run dorny/paths-filter action
  GH->>CI: Output filter results
Loading

File-Level Changes

Change Details Files
Add repo checkout step preceding the path-filter action
  • Inserted actions/checkout@v5 at the start of the path-filter job steps
  • Added a conditional ref expression to resolve pull request SHA on repository_dispatch events
.github/workflows/ci.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@Praveen2112 Praveen2112 force-pushed the praveen/fix_ci_master branch from 1ef491c to 0d1e382 Compare October 24, 2025 16:42
@Praveen2112 Praveen2112 requested a review from findepi October 24, 2025 16:42
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Praveen2112 Praveen2112 force-pushed the praveen/fix_ci_master branch from 0d1e382 to 2ea1674 Compare October 24, 2025 16:44
docs: ${{ steps.filter.outputs.docs }}
non_docs: ${{ steps.filter.outputs.non_docs }}
steps:
- uses: actions/checkout@v5
Copy link
Member

Choose a reason for hiding this comment

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

This won't work correctly.
It will detect no changes, and then jobs won't run.

see

@findepi findepi requested a review from Copilot October 24, 2025 16:58
Copy link

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

This PR adds a repository checkout step to the path-filter CI job to ensure the repository is available before the path-filter action executes. This is particularly necessary when the workflow runs on the master branch.

Key Changes:

  • Added actions/checkout@v5 step before the path-filter action with conditional ref handling for repository_dispatch events

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

Comment on lines +58 to +61
ref: |
${{ github.event_name == 'repository_dispatch' &&
github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.args.named.sha &&
format('refs/pull/{0}/head', github.event.client_payload.pull_request.number) || '' }}
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

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

[nitpick] The multi-line conditional expression for the ref parameter is complex and difficult to parse. Consider extracting this logic into a separate step that sets an environment variable or output, making the checkout step's configuration clearer and easier to maintain.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants