Skip to content

Commit 4b27caa

Browse files
committed
build: remove permissions and only checkout scripts
We use a custom PAT token for the script, so don't need elevated permissions on the GITHUB_TOKEN. We also don't need the full git history here, but instead can only checkout the scripts directory. --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent b6a6575 commit 4b27caa

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/generate_pr_commit_message.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ permissions:
3030
# Allow read-only access to the repository contents:
3131
contents: read
3232

33-
# Allow write access to issues, assignees, labels, and milestones:
34-
issues: write
35-
36-
# Allow write access to pull requests:
37-
pull-requests: write
38-
3933
# Workflow jobs:
4034
jobs:
4135

@@ -62,8 +56,10 @@ jobs:
6256
# Pin action to full length commit SHA
6357
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6458
with:
65-
# Fetch all commits to ensure we have the full commit history:
66-
fetch-depth: 0
59+
# Ensure we have access to the scripts directory:
60+
sparse-checkout: |
61+
.github/workflows/scripts
62+
sparse-checkout-cone-mode: false
6763

6864
# Generate commit message:
6965
- name: 'Generate commit message'

0 commit comments

Comments
 (0)