Skip to content

Commit b074c3f

Browse files
committed
include permissions on all GitHub Actions workflows
1 parent 1cd73ab commit b074c3f

7 files changed

+23
-7
lines changed

Diff for: .github/workflows/add-to-project.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Add issues to API team project
2+
permissions:
3+
issues: write
4+
contents: read
25

36
on:
47
issues:
@@ -13,4 +16,4 @@ jobs:
1316
- uses: actions/add-to-project@main
1417
with:
1518
project-url: https://github.com/orgs/github/projects/8014
16-
github-token: ${{ secrets.ADD_TO_PROJECT_TOKEN }}
19+
github-token: ${{ secrets.ADD_TO_PROJECT_TOKEN }}

Diff for: .github/workflows/check-for-spammy-issues.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Check for Spammy Issues
2-
2+
permissions:
3+
issues: write
4+
pull-requests: write
5+
contents: read
36
# **What it does**: This action closes low value pull requests in the open-source repository.
47
# **Why we have it**: We get lots of spam in the open-source repository.
58
# **Who does it impact**: Open-source contributors.

Diff for: .github/workflows/copy-documentation-issue.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# When the `documentation` label is added for documentation issues,
2-
# this workflow copies the issue to the API team repo which can then
3-
# be transferred to the feature team that owns the problem endpoint
2+
# this workflow copies the issue to the API team repo which can then
3+
# be transferred to the feature team that owns the problem endpoint
44
# so they can resolve the documentation problem
55
# (we do not transfer the original issue so that the issue does not disappear for the contributor)
66

77
name: Copy documentation issue
8-
8+
permissions:
9+
issues: write
10+
contents: read
911
on:
1012
issues:
1113
types:

Diff for: .github/workflows/copy-feature-issue.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Copy feature issue
2+
permissions:
3+
issues: write
4+
contents: read
25

36
on:
47
issues:

Diff for: .github/workflows/linter.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Lint OpenAPI Descriptions
3+
permissions:
4+
contents: read
35

46
on:
57
- push

Diff for: .github/workflows/release-notifier.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Release Notifier
2+
permissions: {}
23
on:
34
release:
45
types:

Diff for: .github/workflows/release.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ on:
55
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
66

77
name: Release and Upload Assets
8-
8+
permissions:
9+
contents: write
10+
911
jobs:
1012
build:
1113
name: Release and Upload Assets
@@ -32,7 +34,7 @@ jobs:
3234
env:
3335
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3436
with:
35-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
37+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
3638
asset_path: ./descriptions.zip
3739
asset_name: descriptions.zip
3840
asset_content_type: application/zip

0 commit comments

Comments
 (0)