Skip to content

Commit

Permalink
Adding list-custom-property-values-for-organization-repositories.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
gm3dmo committed Jan 11, 2024
1 parent 5e09228 commit aecfe96
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions list-custom-property-values-for-organization-repositories.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
. ./.gh-api-examples.conf

# https://docs.github.com/en/enterprise-cloud@latest/rest/orgs/custom-properties?apiVersion=2022-11-28#list-custom-property-values-for-organization-repositories
# GET /orgs/{org}/properties/values


# If the script is passed an argument $1 use that as the name
if [ -z "$1" ]
then
org=$org
else
org=$1
fi


curl ${curl_custom_flags} \
-H "X-GitHub-Api-Version: ${github_api_version}" \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
"${GITHUB_API_BASE_URL}/orgs/${org}/properties/values"

# use this for querying a repo:
# "${GITHUB_API_BASE_URL}/orgs/${org}/properties/values?repository_query=repo-2404480%20in:name"

0 comments on commit aecfe96

Please sign in to comment.