Skip to content

Commit

Permalink
Update pr-convention.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alankritdabral authored Dec 29, 2023
1 parent df97af5 commit a1820e7
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/pr-convention.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,19 @@ jobs:
id: suggest-title
if: failure()
run: |
echo "SUGGESTED_TITLE=feat(<optional_scope>): <title>" >> $GITHUB_ENV
# Extract the current PR title
current_title="${{ github.event.pull_request.title }}"
# Parse the current PR title
IFS=':' read -r -a parts <<< "$current_title"
type="${parts[0]}"
description="${parts[1]}"

# Generate a new title
suggested_title="$type(new_scope): $description"

# Set the new title as an output
echo "SUGGESTED_TITLE=$suggested_title" >> $GITHUB_ENV
suggest-title:
runs-on: ubuntu-latest
needs: title-check
Expand Down

0 comments on commit a1820e7

Please sign in to comment.