Skip to content

Commit

Permalink
Added get-a-release-by-tag-name.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mokshadharma committed Nov 21, 2023
1 parent 504f3c6 commit 2363172
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions get-a-release-by-tag-name.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
. ./.gh-api-examples.conf

# https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-a-release-by-tag-name
# GET /repos/{owner}/{repo}/releases/tags/{tag}


# If the script is passed an argument $1 use that as the name
if [ -z "$1" ]
then
tag=$tag
else
tag=$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}/repos/${owner}/${repo}/releases/tags/${tag}"

0 comments on commit 2363172

Please sign in to comment.