diff --git a/.github/workflows/commentcommand.yml b/.github/workflows/commentcommand.yml index cec0330..140b599 100644 --- a/.github/workflows/commentcommand.yml +++ b/.github/workflows/commentcommand.yml @@ -18,20 +18,21 @@ jobs: git config user.name "GitHub Actions" git config user.email "actions@github.com" - - name: Create new branch + - name: Set branch name run: | BRANCH_NAME="cba-branch-${{ github.event.issue.number }}-${{ github.run_id }}" - git checkout -b $BRANCH_NAME - echo "New branch created: $BRANCH_NAME" - - name: Push new branch - run: | - git push origin $BRANCH_NAME + - name: Create new branch + uses: peterjgrainger/action-create-branch@v2.2.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + branch: 'release-notes' - name: Create Pull Request - uses: peter-evans/create-pull-request@v6 + uses: peter-evans/create-pull-request@v3 with: - title: 'PR From Issue' - body: 'closes #${{ github.event.issue.number }}' + title: 'Merge branch $BRANCH_NAME into main' + body: 'This PR is created from a comment on issue #${{ github.event.issue.number }}' branch: $BRANCH_NAME base: main