Skip to content

Add explicit permissions for new GH actions #6119

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

Merged
merged 1 commit into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/api-surface-area-review-verification.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: API Surface Area Review Verification

permissions:
contents: read
pull-requests: read

on:
pull_request:
types: [ opened, synchronize, reopened, labeled, unlabeled ]
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/changelog-verification.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Changelog verification

permissions:
contents: read
pull-requests: read

on:
pull_request:
types: [ opened, synchronize, reopened, labeled, unlabeled ]
Expand All @@ -12,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Check for changelog entry
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog') }}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'changelog-not-required') }}
run: |
git fetch origin ${{ github.base_ref }} --depth 1 && \
git diff remotes/origin/${{ github.base_ref }} --name-only | grep -P "\.changes/next-release/*[a-zA-Z0-9_-]+\.json"
Expand All @@ -21,5 +25,5 @@ jobs:
run: |
echo "::error ::No new/updated changelog entry found in /.changes/next-release directory. Please either:"
echo "::error ::* Add a changelog entry (see CONTRIBUTING.md for instructions) –or–"
echo "::error ::* Add the 'no-changelog' label to this PR (in rare cases not warranting a changelog entry)"
echo "::error ::* Add the 'changelog-not-required' label to this PR (in rare cases not warranting a changelog entry)"
exit 1
Loading