File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,10 @@ fine-grained token with the following permissions:
3636## 📦 Inputs
3737
3838| Name | Description | Required | Default |
39- | ------------------------| -------------------------------------------------------------------------------------------------------| ----------| ------------------------|
40- | ` token ` | GitHub Personal Access Token (Fine-Grained with: Repository custom properties ` Read and Write ` scope) | ✅ Yes | — |
41- | ` repo-properties.yaml ` | File should be located in the root-level directory. | ✅ Yes | ` repo-properties.yaml ` |
39+ | ------------------------| -------------------------------------------------------------------------------------------------------| -------| ------------------------|
40+ | ` token ` | GitHub Personal Access Token (Fine-Grained with: Repository custom properties ` Read and Write ` scope) | ✅ | — |
41+ | ` repo-properties.yaml ` | File should be located in the root-level directory. | ✅ | ` repo-properties.yaml ` |
42+ | ` sleep-length ` | Time (seconds) to sleep between API calls | - | ` 1 second `
4243
4344---
4445
5455 - uses : PandasWhoCode/update-custom-properties@v1
5556 with :
5657 token : ${{ secrets.GH_CUSTOM_PROPERTIES_TOKEN }}
58+ sleep-length : ' 5'
5759` ` `
5860
5961---
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ inputs:
1010 token :
1111 description : ' Personal Access Token'
1212 required : true
13+ sleep-length :
14+ description : ' Time to sleep (sec) between API calls'
15+ required : false
16+ default : ' 0'
1317
1418runs :
1519 using : " composite"
3842 shell : bash
3943 env :
4044 GH_TOKEN : ${{ inputs.token }}
45+ SLEEP_LENGTH : ${{ inputs.sleep-length }}
4146 run : |
4247 # Input files
4348 REPO_NAMES_FILE="repo-names.txt"
8590 fi
8691 # API Call here
8792 gh api --method PATCH -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/${ORG_NAME}/${REPO_NAME}/properties/values -f "properties[][property_name]=${key}" -f "properties[][value]=${value}"
93+ sleep "${SLEEP_LENGTH}"
8894 done
8995 done < "${REPO_NAMES_FILE}"
9096 echo "Successfully set custom properties!"
You can’t perform that action at this time.
0 commit comments