diff --git a/.github/workflows/easy-cp.yml b/.github/workflows/easy-cp.yml index c10499f1c7..738872428c 100644 --- a/.github/workflows/easy-cp.yml +++ b/.github/workflows/easy-cp.yml @@ -57,12 +57,26 @@ jobs: - name: Create PR on CP success if: ${{ steps.attempt-cp.conclusion == 'success' }} working-directory: ./flutter + id: create-pr run: | git push https://${{ env.GITHUB_TOKEN }}@github.com/flutteractionsbot/flutter cp-${CHANNEL}-${COMMIT_SHA} - gh pr create --title "[CP-${CHANNEL}]${PR_TITLE}" --body-file ../PULL_REQUEST_CP_TEMPLATE.md --base ${RELEASE_BRANCH} --label "cp: review" --repo flutter/flutter --head flutteractionsbot:cp-${CHANNEL}-${COMMIT_SHA} + { + echo 'PR_URL<> "$GITHUB_ENV" env: GITHUB_TOKEN: ${{ secrets.FLUTTERACTIONSBOT_CP_TOKEN }} PR_TITLE: ${{ github.event.pull_request.title }} + - name: Leave Comment on CP success + if: ${{ steps.create-pr.conclusion == 'success' }} + run: | + echo $PR_URL + NEW_PR_NUMBER="${PR_URL##*/}" + SUCCESS_MSG=" @${{ github.actor }} please fill out the PR description above, afterwards the release team will review this request." + gh pr comment $NEW_PR_NUMBER -R flutter/flutter -b "${SUCCESS_MSG}" + env: + GITHUB_TOKEN: ${{ secrets.FLUTTERACTIONSBOT_CP_TOKEN }} - name: Leave Comment on CP failure if: ${{ failure() && steps.attempt-cp.conclusion == 'failure' }} run: |