-
Notifications
You must be signed in to change notification settings - Fork 1
Copier update: VCRpy #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3e94188
3cec520
97fb793
2bfd490
174b75d
ce2e0ab
e993c3e
b92d6db
a89e6be
2f4a637
247b1ab
c403fb2
3e52a6e
22d2253
3d469a5
61d611f
4ef67b3
52b80bc
4d3b5bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,14 +33,14 @@ jobs: | |
| steps: | ||
| - name: Checkout code during push | ||
| if: ${{ github.event_name == 'push' }} | ||
| uses: actions/checkout@v5.0.0 | ||
| uses: actions/checkout@v6.0.1 | ||
| with: | ||
| ref: ${{ github.ref_name }} # explicitly get the head of the branch, which will include any new commits pushed if this is a dependabot branch | ||
| persist-credentials: false | ||
|
|
||
| - name: Checkout code not during push | ||
| if: ${{ github.event_name != 'push' }} | ||
| uses: actions/checkout@v5.0.0 | ||
| uses: actions/checkout@v6.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
|
|
@@ -59,7 +59,7 @@ jobs: | |
| timeout-minutes: 8 # this is the amount of time this action will wait to attempt to acquire the mutex lock before failing, e.g. if other jobs are queued up in front of it | ||
|
|
||
| - name: Cache Pre-commit hooks | ||
| uses: actions/cache@v4.2.4 | ||
| uses: actions/cache@v4.3.0 | ||
| env: | ||
| cache-name: cache-pre-commit-hooks | ||
| with: | ||
|
|
@@ -69,4 +69,11 @@ jobs: | |
| ubuntu-24.04-py${{ inputs.python-version }}-node-${{ inputs.node-version}}-${{ env.cache-name }}- | ||
|
|
||
| - name: Run pre-commit | ||
| run: pre-commit run -a | ||
| run: | | ||
| pre-commit run -a || PRE_COMMIT_EXIT_CODE=$? | ||
| if [ -n "$PRE_COMMIT_EXIT_CODE" ]; then | ||
| echo "Pre-commit failed with exit code $PRE_COMMIT_EXIT_CODE" | ||
| echo "Showing git diff:" | ||
| git --no-pager diff | ||
| exit $PRE_COMMIT_EXIT_CODE | ||
| fi | ||
|
Comment on lines
71
to
+79
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quote The new failure-handling block is sensible, but shellcheck’s SC2086 warning is likely about unquoted You can address this with a minimal tweak: - pre-commit run -a || PRE_COMMIT_EXIT_CODE=$?
- if [ -n "$PRE_COMMIT_EXIT_CODE" ]; then
- echo "Pre-commit failed with exit code $PRE_COMMIT_EXIT_CODE"
+ pre-commit run -a || PRE_COMMIT_EXIT_CODE=$?
+ if [ -n "$PRE_COMMIT_EXIT_CODE" ]; then
+ echo "Pre-commit failed with exit code $PRE_COMMIT_EXIT_CODE"
echo "Showing git diff:"
git --no-pager diff
- exit $PRE_COMMIT_EXIT_CODE
+ exit "$PRE_COMMIT_EXIT_CODE"
fi🧰 Tools🪛 actionlint (1.7.9)72-72: shellcheck reported issue in this script: SC2086:info:6:8: Double quote to prevent globbing and word splitting (shellcheck) 🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Rsync-based sync is a nice simplification; drop redundant
rmlineThe new flow (fresh clone into a tmp dir,
rsync -avinto./$repoNamewith excludes, then cleanup) is much simpler and safer than the previous manual copy logic. One nit:sudo rm -rf "./$repoName"already removes the entire target directory; the subsequentsudo rm -rf "./$repoName/*.md"is redundant, and the quotes prevent glob expansion anyway. It can be removed to avoid confusion.Also applies to: 38-50, 52-56
🤖 Prompt for AI Agents