Skip to content

Commit 765b764

Browse files
committed
ci: prevent script injection in commit lint
1 parent d46c54d commit 765b764

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ jobs:
2424
with:
2525
python-version: "3.12"
2626
- name: Lint commit messages
27-
run: python .github/scripts/lintcommit.py --range "origin/${{ github.event.pull_request.base.ref }}..${{ github.event.pull_request.head.sha }}"
27+
env:
28+
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
29+
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
30+
run: python .github/scripts/lintcommit.py --range "${PR_BASE_SHA}..${PR_HEAD_SHA}"
2831

2932
build:
3033
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)