Skip to content

Commit 054706a

Browse files
committed
Lock down workflow permissions
1 parent 2d7a873 commit 054706a

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/label-check.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
env:
1313
LABELS: ${{ join( github.event.pull_request.labels.*.name, ' ' ) }}
1414

15+
permissions: {}
16+
1517
jobs:
1618
check-type-label:
1719
name: ensure type label

.github/workflows/milestone-merged-prs.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
jobs:
1111
milestone_pr:
1212
name: attach to PR
13+
if: github.event.pull_request.merged == true
14+
permissions:
15+
contents: read
16+
issues: write
17+
pull-requests: read
1318
runs-on: ubuntu-latest
1419
steps:
1520
- uses: scientific-python/attach-next-milestone-action@bc07be829f693829263e57d5e8489f4e57d3d420

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
6+
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
77
hooks:
88
- id: check-added-large-files
99
- id: check-ast
@@ -19,14 +19,14 @@ repos:
1919
- id: trailing-whitespace
2020

2121
- repo: https://github.com/rbubley/mirrors-prettier
22-
rev: 5ba47274f9b181bce26a5150a725577f3c336011 # frozen: v3.6.2
22+
rev: 5ba47274f9b181bce26a5150a725577f3c336011 # frozen: v3.6.2
2323
hooks:
2424
- id: prettier
2525
types_or: [yaml, toml, markdown, css, scss, javascript, json]
2626
args: [--prose-wrap=preserve]
2727

2828
- repo: https://github.com/astral-sh/ruff-pre-commit
29-
rev: 9c89adb347f6b973f4905a4be0051eb2ecf85dea # frozen: v0.13.3
29+
rev: 9c89adb347f6b973f4905a4be0051eb2ecf85dea # frozen: v0.13.3
3030
hooks:
3131
- id: ruff
3232
args:

0 commit comments

Comments
 (0)