Skip to content

Commit

Permalink
Using github action contexts instead of gh CLI
Browse files Browse the repository at this point in the history
Co-authored-by: Nicola Soranzo <[email protected]>
  • Loading branch information
arash77 and nsoranzo committed Oct 14, 2024
1 parent f4ffa9d commit 9433ece
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr-title-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_NUMBER=${{ github.event.pull_request.number }}
TARGET_BRANCH=$(gh pr view $PR_NUMBER --json baseRefName -q .baseRefName)
PR_TITLE=$(gh pr view $PR_NUMBER --json title -q .title)
TARGET_BRANCH="${{ github.base_ref }}"
PR_TITLE="${{ github.event.pull_request.title }}"
VERSION=$(echo $TARGET_BRANCH | grep -oP '\d+\.\d+')
if [[ -n "$VERSION" && ! "$PR_TITLE" =~ ^\[$VERSION\] ]]; then
NEW_TITLE="[$VERSION] $PR_TITLE"
Expand Down

0 comments on commit 9433ece

Please sign in to comment.