Skip to content

Commit

Permalink
chore: automatically link post release pr to release ticket (#2009)
Browse files Browse the repository at this point in the history
* chore: automatically link post release pr to release ticket

* chore: fix typo
  • Loading branch information
saikumarrs authored Jan 20, 2025
1 parent 7fbfb65 commit 010491c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/draft-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,22 @@ jobs:
source_branch: ${{ steps.create-release.outputs.branch_name }}
destination_branch: 'main'
github_token: ${{ secrets.PAT }}
pr_title: 'chore(release): pull ${{ steps.create-release.outputs.branch_name }} into main'
pr_title: 'chore(release): merge ${{ steps.create-release.outputs.branch_name }} into main [${{ github.event.inputs.release_ticket_id }}]'
pr_body: |
:crown: *An automated PR*
:crown: **Automated Release PR**
This PR is created automatically by the GitHub Actions workflow to merge the release branch into the main branch.
This pull request was created automatically by the GitHub Actions workflow. It merges the release branch (`${{ steps.create-release.outputs.branch_name }}`) into the `main` branch.
This ensures that the latest release branch changes are incorporated into the `main` branch for production.
### Details
- **Release Version**: v$NEW_VERSION_VALUE
- **Release Branch**: `${{ steps.create-release.outputs.branch_name }}`
- **Related Ticket**: [${{ github.event.inputs.release_ticket_id }}](https://linear.app/rudderstack/issue/${{ github.event.inputs.release_ticket_id }})
---
Please review and merge when ready. :rocket:
Linear Ticket:
https://linear.app/rudderstack/issue/${{ github.event.inputs.release_ticket_id }}
- name: Delete hotfix release base branch
continue-on-error: true
Expand Down
21 changes: 19 additions & 2 deletions .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ jobs:
VERSION=${BRANCH_NAME#hotfix-}
VERSION=${VERSION#release/}
# Extract the ticket ID (case-insensitive match for -SDK-<ticket_number>)
RELEASE_TICKET_ID=$(echo "$BRANCH_NAME" | grep -oE '[sS][dD][kK]-[0-9]+')
echo "release_ticket_id=$RELEASE_TICKET_ID" >> $GITHUB_OUTPUT
# Remove the -SDK-<ticket_number> suffix case insensitively
VERSION=$(echo "$VERSION" | awk '{sub(/-[sS][dD][kK]-[0-9]+$/, ""); print}')
Expand Down Expand Up @@ -104,8 +109,20 @@ jobs:
source_branch: 'main'
destination_branch: 'develop'
github_token: ${{ secrets.PAT }}
pr_title: 'chore(release): pull main into develop post release v${{ steps.extract-version.outputs.release_version }}'
pr_body: ':crown: *An automated PR*'
pr_title: 'chore(release): merge main into develop after release v${{ steps.extract-version.outputs.release_version }} [${{ steps.extract-version.outputs.release_ticket_id }}]'
pr_body: |
:crown: **Automated Post-Release PR**
This pull request was created automatically by the GitHub Actions workflow. It merges changes from the `main` branch into the `develop` branch after a release has been completed.
This ensures that the `develop` branch stays up to date with all release-related changes from the `main` branch.
### Details
- **Release Version**: v${{ steps.extract-version.outputs.release_version }}
- **Related Ticket**: [${{ steps.extract-version.outputs.release_ticket_id }}](https://linear.app/rudderstack/issue/${{ steps.extract-version.outputs.release_ticket_id }})
---
Please review and merge it before closing the release ticket. :rocket:
- name: Send message to Slack channel
id: slack
Expand Down

0 comments on commit 010491c

Please sign in to comment.