Skip to content

Commit

Permalink
(CI)(organization-packages) debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Sep 19, 2023
1 parent 4f6da4d commit 4ffe1bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ci/organization-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ done
echo -e "\e[35m\e[1mORGANIZATION = ${ORGANIZATION}\e[0m"
echo -e "\e[35m\e[1mPACKAGE_TYPE = ${PACKAGE_TYPE}\e[0m"

echo -e "\e[1mgh api -H \"Accept: application/vnd.github+json\" -H \"X-GitHub-Api-Version: 2022-11-28\" /orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1 | jq -rc '.[].name'\e[0m"
output=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /orgs/"${ORGANIZATION}"/packages?package_type="${PACKAGE_TYPE}"&per_page=100&page=1)
echo -e "\e[1mgh api -H \"Accept: application/vnd.github+json\" -H \"X-GitHub-Api-Version: 2022-11-28\" \"/orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1\" | jq -rc '.[].name'\e[0m"
output=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" "/orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1")
echo -e "return value: $?"
echo -e "output: ${output}"
packages=$(jq -rc '.[].name' <<< "${output}")
echo -e "packages:\n${packages}"
echo -e "\e[1mcurl -L -H \"Accept: application/vnd.github+json\" -H \"Authorization: Bearer \${GH_TOKEN}\" -H \"X-GitHub-Api-Version: 2022-11-28\" https://api.github.com/orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1 | jq -rc '.[].name'\e0m"
output=$(curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${GH_TOKEN}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/orgs/"${ORGANIZATION}"/packages?package_type="${PACKAGE_TYPE}"&per_page=100&page=1)
echo -e "\e[1mcurl -L -H \"Accept: application/vnd.github+json\" -H \"Authorization: Bearer \${GH_TOKEN}\" -H \"X-GitHub-Api-Version: 2022-11-28\" \"https://api.github.com/orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1\" | jq -rc '.[].name'\e0m"
output=$(curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${GH_TOKEN}" -H "X-GitHub-Api-Version: 2022-11-28" "https://api.github.com/orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1")
echo -e "return value: $?"
echo -e "output: ${output}"
packages=$(jq -rc '.[].name' <<< "${output}")
echo -e "packages:\n${packages}
echo -e "packages:\n${packages}"

echo -e "\e[35m\e[1mpackages:\e[0m"
for pkg in ${packages}
Expand Down

0 comments on commit 4ffe1bd

Please sign in to comment.