Skip to content

Commit 8857bc6

Browse files
authored
Declare permissions for labeler-train workflow. Parse the pull_page_size input. (#11083)
1 parent 5aaa82b commit 8857bc6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/labeler-train.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ on:
4545
required: true
4646
default: "staging"
4747

48+
permissions:
49+
issues: read
50+
pull-requests: read
51+
actions: write
52+
4853
jobs:
4954
# Without specifying a pageSize of 1 for downloading pull requests, the requests time out
5055
# Directly invoking the individual workflows until https://github.com/dotnet/issue-labeler/issues/97 is addressed
@@ -68,10 +73,6 @@ jobs:
6873
# threshold: 0.40
6974

7075
build-predictor:
71-
permissions:
72-
issues: read
73-
pull-requests: read
74-
actions: write
7576
uses: dotnet/issue-labeler/.github/workflows/build-predictor.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1
7677

7778
labeler-download-issues:
@@ -115,7 +116,7 @@ jobs:
115116
with:
116117
data_cache_key: ${{ inputs.cache_key_suffix }}
117118
pull_limit: ${{ inputs.data_limit && fromJSON(inputs.data_limit) || 0 }}
118-
page_size: ${{ inputs.pull_page_size }}
119+
page_size: ${{ inputs.pull_page_size && fromJSON(inputs.pull_page_size) || 1 }}
119120
label_prefix: "area-"
120121

121122
labeler-train-pulls:

0 commit comments

Comments
 (0)