diff --git a/.github/workflows/create_pull_request.yml b/.github/workflows/create_pull_request.yml index cff80e9d6..f43061366 100644 --- a/.github/workflows/create_pull_request.yml +++ b/.github/workflows/create_pull_request.yml @@ -21,15 +21,29 @@ jobs: git push origin ${{ github.event.client_payload.ReleaseBranchName }}-docs - name: Create pull request for ${{ github.event.client_payload.ReleaseBranchName }} + id: create-pr uses: actions/github-script@v2 with: github-token: ${{secrets.GITHUB_TOKEN}} script: | - github.pulls.create({ + let response = await github.pulls.create({ owner: context.repo.owner, repo: context.repo.repo, title: "${{ github.event.client_payload.PullRequestTitle }}", head: "${{ github.event.client_payload.ReleaseBranchName }}-docs", base: "${{ github.event.client_payload.PullRequestBase }}", body: `${{ github.event.client_payload.PullRequestBody }}` - }); \ No newline at end of file + }); + return response.data.number + + - name: Request reviewers + uses: actions/github-script@v2 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.pulls.requestReviewers({ + owner: context.repo.owner + repo: context.repo.repo + pull_number: ${{ steps.create-pr.outputs.result }} + team_reviewers: ['virtual-environments-akvelon'] + }) \ No newline at end of file