Skip to content

Commit 0d8be21

Browse files
committed
switch to gh api
Signed-off-by: Andrew Brandt <[email protected]>
1 parent 4705292 commit 0d8be21

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

action.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,5 @@ runs:
3030
ORG_NAME=$(echo "$GITHUB_REPOSITORY" | cut -d'/' -f1)
3131
echo "Org name is: ${ORG_NAME}"
3232
echo "Fetching repos for organization: ${{ inputs.org }}"
33-
curl -s -H "Authorization: token ${{ inputs.token }}" \
34-
-H "Accept: application/vnd.github+json" \
35-
"https://api.github.com/orgs/${{ inputs.org }}/repos?per_page=100" |
36-
jq -r '.[].full_name' > repo-list.txt
33+
gh api --paginate "orgs/$ORG_NAME/repos" --jq '.[].full_name' > repo-list.txt
3734
echo "Repos written to repo-list.txt"

0 commit comments

Comments
 (0)