Skip to content

Commit

Permalink
fixup! build: add create release proposal action
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS committed Nov 22, 2024
1 parent af9a43f commit 63c8308
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/actions/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ BRANCH=$(git branch --show-current)
# Get the PR URL for the current branch in the repository
PR_URL=$(gh pr list --repo "$REPO" --head "$BRANCH" --json url -q ".[0].url")

# Get the last commit message
LAST_COMMIT_MSG=$(git log -1 --pretty=%B)

# Replace "TODO" with the PR URL in the last commit
git commit --amend --no-edit -m "$(git log -1 --pretty=%B | sed "s|PR-URL: TODO|PR-URL: $PR_URL|")"
git commit --amend --no-edit -m "$(echo "$LAST_COMMIT_MSG" | sed "s|PR-URL: TODO|PR-URL: $PR_URL|")" || true

# Force-push the amended commit
git push --force
Expand Down

0 comments on commit 63c8308

Please sign in to comment.