Skip to content

Commit 32ae3cc

Browse files
authored
Fixup pylock after dependabot PRs (#553)
## Summary <!-- Include a short paragraph of the changes introduced in this PR. If this PR requires additional context or rationale, explain why the changes are necessary. --> Dependabot seems to have recently added support for updating `uv` packages with CVEs but it does not update the pylock along with it. This PR adds a CI job to automatically commit a pylock update to dependabot PRs. ## Test Plan Can only be tested once merged --- - [x] "I certify that all code in this PR is my own, except as noted below." ## Use of AI - [ ] Includes AI-assisted code completion - [x] Includes code generated by an AI application - [ ] Includes AI-generated tests (NOTE: AI written tests should have a docstring that includes `## WRITTEN BY AI ##`)
2 parents f9f1e31 + 4503f01 commit 32ae3cc

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/dependabot.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Dependabot Pull Request
3+
on: pull_request
4+
jobs:
5+
dependabot:
6+
permissions:
7+
pull-requests: read
8+
runs-on: ubuntu-latest
9+
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository
10+
steps:
11+
- name: Fetch Dependabot metadata
12+
id: dependabot-metadata
13+
uses: dependabot/fetch-metadata@v2
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
ref: ${{ github.event.pull_request.head.ref }}
18+
- name: Update pylock
19+
run: |
20+
UV_FROZEN=1 ./scripts/generate_pylock.sh
21+
- name: Commit and Push changes
22+
run: |
23+
git config --global user.name "github-actions[bot]"
24+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
25+
26+
git add pylock.toml
27+
# Only commit if there are actually changes
28+
if ! git diff --cached --quiet; then
29+
git commit -m "auto-update pylock from dependabot"
30+
git push
31+
else
32+
echo "No changes to commit"
33+
fi

0 commit comments

Comments
 (0)