-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a53437
commit 93c187f
Showing
1 changed file
with
10 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,12 +35,8 @@ jobs: | |
id: pr_author | ||
run: echo "::set-output name=author::${{ github.event.pull_request.user.login }}" | ||
|
||
- name: Debug PR Author | ||
run: | | ||
echo "PR Author: ${{ steps.pr_author.outputs.author }}" | ||
- name: Assign Reviewers | ||
id: assign_reviewers | ||
if: github.actor != steps.pr_author.outputs.author # Exclude the author | ||
run: | | ||
author="${{ steps.pr_author.outputs.author }}" | ||
if [[ "$author" == "stardustmeg" ]]; then | ||
|
@@ -56,28 +52,13 @@ jobs: | |
echo "Author not found." | ||
exit 1 | ||
fi | ||
echo "::set-output name=first_reviewer::${first_reviewer}" | ||
echo "::set-output name=second_reviewer::${second_reviewer}" | ||
- name: Debug Reviewers | ||
run: | | ||
echo "First Reviewer: ${{ steps.assign_reviewers.outputs.first_reviewer }}" | ||
echo "Second Reviewer: ${{ steps.assign_reviewers.outputs.second_reviewer }}" | ||
echo "First Reviewer: $first_reviewer" | ||
echo "Second Reviewer: $second_reviewer" | ||
- name: Request First Reviewer | ||
if: github.actor != steps.pr_author.outputs.author # Exclude the author | ||
uses: octokit/[email protected] | ||
with: | ||
route: POST /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers | ||
mediaType: '{"previews":["luke-cage"]}' | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
reviewers: ${{ steps.assign_reviewers.outputs.first_reviewer }} | ||
|
||
- name: Request Second Reviewer | ||
if: github.actor != steps.pr_author.outputs.author # Exclude the author | ||
uses: octokit/[email protected] | ||
with: | ||
route: POST /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers | ||
mediaType: '{"previews":["luke-cage"]}' | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
reviewers: ${{ steps.assign_reviewers.outputs.second_reviewer }} | ||
# Request both reviewers | ||
octokit/[email protected] | ||
with: | ||
route: POST /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers | ||
mediaType: '{"previews":["luke-cage"]}' | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
reviewers: $first_reviewer, $second_reviewer |