Skip to content
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

Add pull-requests read permission to the release-notes-check workflow #289

Merged
merged 1 commit into from
Jul 10, 2024
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
2 changes: 2 additions & 0 deletions .github/workflows/release-notes-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
check-release-notes:
name: Check release notes are updated
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Check for a release notes update
if: github.event_name == 'pull_request'
Expand Down
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@
- Fix credentials not being passed to the `test-installation` job in the CI workflow.
- Make sure credentials are configured for all jobs that check out the repository in the CI workflow.
- Disable the new `check-class-attributes` check in pydoclint 0.5.3, as we use a different way to document class attributes.
- Fix permissions issues with the `release-notes-check` workflow when the repository Actions configuration is set up without full access.
19 changes: 19 additions & 0 deletions cookiecutter/migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,5 +246,24 @@ echo "========================================================================"
echo "Disabling new pydoclint's check-class-attributes check in "
sed -i "/^allow-init-docstring/a check-class-attributes = false" pyproject.toml

echo "========================================================================"

echo "Adding pull-requests read permission to the release-notes-check workflow"
patch --merge -p1 <<'EOF'
diff --git a/.github/workflows/release-notes-check.yml b/.github/workflows/release-notes-check.yml
index 1e35c1a..e97886b 100644
--- a/.github/workflows/release-notes-check.yml
+++ b/.github/workflows/release-notes-check.yml
@@ -17,6 +17,8 @@ jobs:
check-release-notes:
name: Check release notes are updated
runs-on: ubuntu-latest
+ permissions:
+ pull-requests: read
steps:
- name: Check for a release notes update
if: github.event_name == 'pull_request'
EOF

# Add a separation line like this one after each migration step.
echo "========================================================================"
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
check-release-notes:
name: Check release notes are updated
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Check for a release notes update
if: github.event_name == 'pull_request'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
check-release-notes:
name: Check release notes are updated
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Check for a release notes update
if: github.event_name == 'pull_request'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
check-release-notes:
name: Check release notes are updated
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Check for a release notes update
if: github.event_name == 'pull_request'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
check-release-notes:
name: Check release notes are updated
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Check for a release notes update
if: github.event_name == 'pull_request'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
check-release-notes:
name: Check release notes are updated
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Check for a release notes update
if: github.event_name == 'pull_request'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
check-release-notes:
name: Check release notes are updated
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Check for a release notes update
if: github.event_name == 'pull_request'
Expand Down