Skip to content

Commit 88c17ff

Browse files
authored
fix(ci): use globs in update-lockfiles workflow for missing konflux lockfile (#522)
## Summary - The `update-lockfiles` workflow fails with `fatal: pathspec 'distribution/requirements-lock-konflux.txt' did not match any files` because the file was removed from this repo (moved to the downstream fork) - Switches `git diff`, `git add`, and the PR body file list to use `distribution/requirements-lock*.txt` globs so the workflow handles whichever lockfiles exist - The workflow now works in both this repo (only `requirements-lock.txt`) and the downstream fork (both lockfiles) ## Test plan - [ ] Trigger the `update-lockfiles` workflow manually via `workflow_dispatch` and verify it completes without the pathspec error - [ ] Verify the generated PR body lists the correct lockfile(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) ## Summary by CodeRabbit * **Chores** * Automated lockfile updates now detect and stage all matching distribution lockfiles. * Pull requests created by the workflow now list the specific lockfiles that changed. Approved-by: derekhiggins Approved-by: Artemon-line
2 parents 503715f + 1698acd commit 88c17ff

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/update-lockfiles.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Check for changes
3131
id: changes
3232
run: |
33-
if git diff --quiet distribution/requirements-lock.txt distribution/requirements-lock-konflux.txt; then
33+
if git diff --quiet -- distribution/requirements-lock*.txt; then
3434
echo "changed=false" >> "$GITHUB_OUTPUT"
3535
echo "No lockfile changes detected"
3636
else
@@ -63,7 +63,7 @@ jobs:
6363
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
6464
run: |
6565
git checkout -B "$BRANCH"
66-
git add distribution/requirements-lock.txt distribution/requirements-lock-konflux.txt
66+
git add -- distribution/requirements-lock*.txt
6767
git diff --cached --quiet && { echo "No changes to commit"; exit 0; }
6868
git commit -m "chore: update dependency lockfiles"
6969
git remote set-url origin "https://x-access-token:${RELEASE_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
@@ -76,6 +76,8 @@ jobs:
7676
run: |
7777
PR_URL=$(gh pr list --head "$BRANCH" --state open --json url --jq '.[0].url' 2>/dev/null || echo "")
7878
79+
FILE_LIST=$(git diff-tree --no-commit-id --name-only -r HEAD -- 'distribution/requirements-lock*.txt' | sed "s|.*|- \`&\`|")
80+
7981
BODY=$(cat <<EOF
8082
## Automated lockfile update
8183
@@ -86,8 +88,7 @@ jobs:
8688
This PR regenerates the pinned dependency lockfiles to pick up upstream package changes.
8789
8890
### Updated files
89-
- \`distribution/requirements-lock.txt\`
90-
- \`distribution/requirements-lock-konflux.txt\`
91+
${FILE_LIST}
9192
9293
> This PR was auto-generated by the [update-lockfiles workflow](${WORKFLOW_URL}).
9394
> Review the dependency changes and merge when ready.

0 commit comments

Comments
 (0)