Skip to content

Commit

Permalink
Dat 16952 (#167)
Browse files Browse the repository at this point in the history
* fix(get_draft_release.sh): filter draft release by version name to ensure correct release is retrieved
fix(get_draft_release.sh): correctly extract upload URL from draft release object

* fix(get_draft_release.sh): update API request to fetch only the latest draft release to improve efficiency and accuracy in retrieving draft releases.

* fix(get_draft_release.sh): adjust jq query to return entire object instead of just id to fix draft release retrieval bug
  • Loading branch information
jandroav authored Feb 19, 2024
1 parent 825cadd commit 82373cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/get_draft_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RELEASE=$(curl -s \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/releases?per_page=1" |
jq -r 'if .[].draft == true then .[].id else empty end')
jq -r 'if .[].draft == true then .[] else empty end')

if [[ "${#RELEASE}" -eq 0 ]]; then
echo "Draft release not found."
Expand Down

0 comments on commit 82373cd

Please sign in to comment.