Skip to content

[2.5] ci: Fix empty pathspec error in sync-branches workflow #15111

Merged
acolombier merged 1 commit into
mixxxdj:2.5from
Hapsa21:fix-for-2.5-v2
Jul 21, 2025
Merged

[2.5] ci: Fix empty pathspec error in sync-branches workflow #15111
acolombier merged 1 commit into
mixxxdj:2.5from
Hapsa21:fix-for-2.5-v2

Conversation

@Hapsa21
Copy link
Copy Markdown
Contributor

@Hapsa21 Hapsa21 commented Jul 18, 2025

This PR targets the 2.5 branch as requested by @daschuer.

It resolves the "empty string is not a valid pathspec" error in the sync-branches workflow.

The workflow was failing when triggered by a commit on a branch that is not a source key in the ACTIVE_VERSIONS map (e.g., the main branch). This caused the TO_BRANCH variable to be empty, leading to a crash when git checkout was called.

This fix adds a preliminary step to check if the triggering branch is a valid source. If not, the sync and merge steps are gracefully skipped.

Fixes #15098

@Hapsa21 Hapsa21 force-pushed the fix-for-2.5-v2 branch 5 times, most recently from 8766bfe to 9da1a0c Compare July 18, 2025 17:48
Copy link
Copy Markdown
Member

@acolombier acolombier left a comment

Choose a reason for hiding this comment

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

The Sync Branches uses a workflow_call trigger so instead of triggering a no-op, the release workflow should skip calling Sync Branches. This use to be the initial behaviour but I believe this was changed somehow.

contents: write
pull-requests: write
steps:
# Using an app is the recommended way to allow recursive operations.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please leave this note. THis is something we should look at addressing soon rather than relying on a hardcoded PAT.

Copy link
Copy Markdown
Member

@acolombier acolombier left a comment

Choose a reason for hiding this comment

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

LGTM! Let merge and see if this fixes the issue

@acolombier acolombier enabled auto-merge July 21, 2025 20:50
@acolombier acolombier merged commit b361dcc into mixxxdj:2.5 Jul 21, 2025
15 checks passed
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