Skip to content

Commit 3b83db0

Browse files
committed
build: update permissions and use sparse checkout
--- 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 2064bd2 commit 3b83db0

8 files changed

+23
-49
lines changed

.github/workflows/check_commit_metadata.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,10 @@ jobs:
5353
# Pin action to full length commit SHA
5454
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5555
with:
56-
# Specify whether to remove untracked files before checking out the repository:
57-
clean: true
58-
59-
# Limit clone depth to the most recent commit:
60-
fetch-depth: 1
61-
62-
# Specify whether to download Git-LFS files:
63-
lfs: false
56+
# Ensure we have access to the scripts directory:
57+
sparse-checkout: |
58+
.github/workflows/scripts
59+
sparse-checkout-cone-mode: false
6460
timeout-minutes: 10
6561

6662
# Extract commit metadata from commit messages as JSON:

.github/workflows/check_contributing_guidelines_acceptance.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ permissions:
5050
# Allow read-only access to the repository contents:
5151
contents: read
5252

53-
# Allow write access to pull requests:
54-
pull-requests: write
55-
5653
# Workflow jobs:
5754
jobs:
5855

@@ -75,14 +72,10 @@ jobs:
7572
# Pin action to full length commit SHA
7673
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7774
with:
78-
# Specify whether to remove untracked files before checking out the repository:
79-
clean: true
80-
81-
# Limit clone depth to the most recent commit:
82-
fetch-depth: 1
83-
84-
# Specify whether to download Git-LFS files:
85-
lfs: false
75+
# Ensure we have access to the scripts directory:
76+
sparse-checkout: |
77+
.github/workflows/scripts
78+
sparse-checkout-cone-mode: false
8679
timeout-minutes: 10
8780

8881
# Check contributing guidelines acceptance:

.github/workflows/create_address_commit_comment_issues.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,10 @@ jobs:
5555
# Pin action to full length commit SHA
5656
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5757
with:
58-
# Specify whether to remove untracked files before checking out the repository:
59-
clean: false
60-
61-
# Limit clone depth to the most recent commit:
62-
fetch-depth: 1
63-
64-
# Specify whether to download Git-LFS files:
65-
lfs: false
58+
# Ensure we have access to the scripts directory:
59+
sparse-checkout: |
60+
.github/workflows/scripts
61+
sparse-checkout-cone-mode: false
6662
timeout-minutes: 10
6763

6864
# Create issues from commit comments:

.github/workflows/good_first_issue.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ jobs:
4040
# Define job permissions:
4141
permissions:
4242
contents: read
43-
pull-requests: write
4443

4544
# Define the type of virtual host machine:
4645
runs-on: ubuntu-latest

.github/workflows/label_good_first_prs.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ jobs:
4343

4444
# Define job permissions:
4545
permissions:
46+
# Allow read-only access to the repository contents:
4647
contents: read
47-
pull-requests: write
4848

4949
# Define the type of virtual host machine:
5050
runs-on: ubuntu-latest
@@ -56,14 +56,10 @@ jobs:
5656
# Pin action to full length commit SHA
5757
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5858
with:
59-
# Specify whether to remove untracked files before checking out the repository:
60-
clean: true
61-
62-
# Limit clone depth to the most recent commit:
63-
fetch-depth: 1
64-
65-
# Specify whether to download Git-LFS files:
66-
lfs: false
59+
# Ensure we have access to the scripts directory:
60+
sparse-checkout: |
61+
.github/workflows/scripts
62+
sparse-checkout-cone-mode: false
6763
timeout-minutes: 10
6864

6965
# Check whether any of the referenced issues is a "Good First Issue":

.github/workflows/labeler.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
# Define job permissions:
5050
permissions:
5151
contents: read
52-
pull-requests: write
5352

5453
# Define the type of virtual host machine:
5554
runs-on: ubuntu-latest

.github/workflows/lint_pr_title.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ jobs:
6262
# Specify whether to remove untracked files before checking out the repository:
6363
clean: false
6464

65-
# Limit clone depth to the most recent 100 commits:
66-
fetch-depth: 100
65+
# Limit clone depth to the most recent commit:
66+
fetch-depth: 1
6767

6868
# Specify whether to download Git-LFS files:
6969
lfs: false

.github/workflows/too_many_good_first_prs.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ jobs:
4343
# Define job permissions:
4444
permissions:
4545
contents: read
46-
pull-requests: write
4746

4847
# Define the type of virtual host machine:
4948
runs-on: ubuntu-latest
@@ -55,14 +54,10 @@ jobs:
5554
# Pin action to full length commit SHA
5655
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5756
with:
58-
# Specify whether to remove untracked files before checking out the repository:
59-
clean: true
60-
61-
# Limit clone depth to the most recent commit:
62-
fetch-depth: 1
63-
64-
# Specify whether to download Git-LFS files:
65-
lfs: false
57+
# Ensure we have access to the scripts directory:
58+
sparse-checkout: |
59+
.github/workflows/scripts
60+
sparse-checkout-cone-mode: false
6661
timeout-minutes: 10
6762

6863
# Prevent contributors from opening too many "Good First PR"s:

0 commit comments

Comments
 (0)