From a7bb9c2506bdc9054aae3baebac6f0ccfeb4dfed Mon Sep 17 00:00:00 2001 From: Jeff Handley Date: Wed, 12 Mar 2025 14:06:30 -0700 Subject: [PATCH 1/2] Declare permissions for labeler-train workflow and parse pull_page_size --- .github/workflows/labeler-train.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/labeler-train.yml b/.github/workflows/labeler-train.yml index 635423cc7dd..f83662f5ea7 100644 --- a/.github/workflows/labeler-train.yml +++ b/.github/workflows/labeler-train.yml @@ -45,6 +45,11 @@ on: required: true default: "staging" +permissions: + issues: read + pull-requests: read + actions: write + jobs: # Without specifying a pageSize of 1 for downloading pull requests, the requests time out # Directly invoking the individual workflows until https://github.com/dotnet/issue-labeler/issues/97 is addressed @@ -111,7 +116,7 @@ jobs: with: data_cache_key: ${{ inputs.cache_key_suffix }} pull_limit: ${{ inputs.data_limit && fromJSON(inputs.data_limit) || 0 }} - page_size: ${{ inputs.pull_page_size }} + page_size: ${{ inputs.pull_page_size && fromJSON(inputs.pull_page_size) || 1 }} label_prefix: "area-" labeler-train-pulls: From 81670b92e24d4c5fbab21d041df77458ddefd2a3 Mon Sep 17 00:00:00 2001 From: Jeff Handley Date: Wed, 12 Mar 2025 14:43:56 -0700 Subject: [PATCH 2/2] Remove redundant permissions --- .github/workflows/labeler-train.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/labeler-train.yml b/.github/workflows/labeler-train.yml index 1e35a341e15..2acfe17fe9c 100644 --- a/.github/workflows/labeler-train.yml +++ b/.github/workflows/labeler-train.yml @@ -73,10 +73,6 @@ jobs: # threshold: 0.40 build-predictor: - permissions: - issues: read - pull-requests: read - actions: write uses: dotnet/issue-labeler/.github/workflows/build-predictor.yml@f0c098669828a134c0313adf3f58c1909e555d86 # v1.0.1 labeler-download-issues: