Skip to content

Commit

Permalink
amend gh line
Browse files Browse the repository at this point in the history
  • Loading branch information
Zidious committed Oct 13, 2023
1 parent 0892151 commit f82bd14
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions .github/actions/get-version-number-and-issue-url-v1/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ runs:
shell: bash
run: |
issueUrl=$(gh issue list --repo ${{ github.repository }} --label release --state open --json url --jq '.[0].url')
if [ -z "$issueUrl" ]; then
echo "No issue URL found"
exit 1
fi
echo "Issue URL: $issueUrl"
echo "issue-url=$issueUrl" >> $GITHUB_OUTPUT
Expand All @@ -36,15 +32,9 @@ runs:
shell: bash
run: |
pullRequestID=$(gh pr list --repo ${{ github.repository }} --json number -s merged --base release --jq '.[0].number')
if [ -z "$pullRequestID" ]; then
echo "No pull request ID found"
exit 1
fi
echo "Found pull request ID: $pullRequestID"
echo "Pull request ID: $pullRequestID"
# Get the version number from the pull request title e.g. 1.33.7
versionNumber=$(gh pr view $pullRequestID --repo ${{ github.repository }} --json title --jq '.title' | grep -E -o '\d+.\d+.\d+')
versionNumber=$(gh pr view $pullRequestID --repo ${{ github.repository }} --json title --jq '.title' | grep -E -o '\d+.\d+.\d+' | awk '{print $NF}')
echo "version-number=$versionNumber" >> $GITHUB_OUTPUT

0 comments on commit f82bd14

Please sign in to comment.