diff --git a/.github/workflows/dependabot-assignments.yml b/.github/workflows/dependabot-assignments.yml index 5afa8c093..90414bd6a 100644 --- a/.github/workflows/dependabot-assignments.yml +++ b/.github/workflows/dependabot-assignments.yml @@ -12,6 +12,13 @@ jobs: if: ${{ github.actor == 'dependabot[bot]' }} steps: - name: Assign team to PR - run: gh pr edit "$PR_URL" --add-reviewer "cmu-delphi/code-reviewers" - env: - PR_URL: ${{github.event.pull_request.html_url}} \ No newline at end of file + # This is a workaround a limitation in the GitHub CLI. + # Can probably simplify after this issue is closed: + # https://github.com/cli/cli/issues/4844 + run: | + curl -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/${{ github.repository }}/pulls/${{github.event.pull_request.number}}/requested_reviewers \ + -d '{"team_reviewers":["code-reviewers"]}'