From b8ee5cc9137d311cd996c392bc4210a48a44c509 Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Fri, 7 Jul 2023 13:25:28 -0700 Subject: [PATCH 1/3] bug(ci): fix dependabot-assignments --- .github/workflows/dependabot-assignments.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependabot-assignments.yml b/.github/workflows/dependabot-assignments.yml index 5afa8c093..be2170d02 100644 --- a/.github/workflows/dependabot-assignments.yml +++ b/.github/workflows/dependabot-assignments.yml @@ -12,6 +12,15 @@ jobs: if: ${{ github.actor == 'dependabot[bot]' }} steps: - name: Assign team to PR - run: gh pr edit "$PR_URL" --add-reviewer "cmu-delphi/code-reviewers" + # 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.owner }}/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers \ + -d '{"team_reviewers":["code-reviewers"]}' env: - PR_URL: ${{github.event.pull_request.html_url}} \ No newline at end of file + PR_URL: ${{github.event.pull_request.html_url}} From 3444edd266239eeffc227ccd653ad06d199641ba Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Fri, 7 Jul 2023 13:28:47 -0700 Subject: [PATCH 2/3] bug(ci): remove unused var from dependabot --- .github/workflows/dependabot-assignments.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/dependabot-assignments.yml b/.github/workflows/dependabot-assignments.yml index be2170d02..ed29c2e04 100644 --- a/.github/workflows/dependabot-assignments.yml +++ b/.github/workflows/dependabot-assignments.yml @@ -20,7 +20,5 @@ jobs: -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.owner }}/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers \ + https://api.github.com/repos${{ github.owner }}/${{ github.repository }}/pulls/${{github.event.pull_request.number}}/requested_reviewers \ -d '{"team_reviewers":["code-reviewers"]}' - env: - PR_URL: ${{github.event.pull_request.html_url}} From 07d47ef32d06efe9a5a7ac26eb16602f61af3900 Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Fri, 7 Jul 2023 13:44:32 -0700 Subject: [PATCH 3/3] Update .github/workflows/dependabot-assignments.yml Co-authored-by: Katie Mazaitis --- .github/workflows/dependabot-assignments.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependabot-assignments.yml b/.github/workflows/dependabot-assignments.yml index ed29c2e04..90414bd6a 100644 --- a/.github/workflows/dependabot-assignments.yml +++ b/.github/workflows/dependabot-assignments.yml @@ -20,5 +20,5 @@ jobs: -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.owner }}/${{ github.repository }}/pulls/${{github.event.pull_request.number}}/requested_reviewers \ + https://api.github.com/repos/${{ github.repository }}/pulls/${{github.event.pull_request.number}}/requested_reviewers \ -d '{"team_reviewers":["code-reviewers"]}'