Skip to content

Commit

Permalink
Update add-reviewer.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
KomissarMaria authored Nov 6, 2024
1 parent a255d07 commit 91a4ed1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/add-reviewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ name: Add Reviewer for Freezed Branches
on:
pull_request:
branches:
- 'v*.*' # Targets branches with names like v1.10, v1.11, etc.
- 'v*.*' # Matches branches like v1.10, v1.11, etc.

jobs:
add-reviewer:
runs-on: ubuntu-latest
steps:
- name: Add Reviewer
uses: octokit/request-action@v2
with:
route: POST /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers
reviewers: KomisarMariia
- name: Add KomisarMariia as a reviewer
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
run: |
pr_number=${{ github.event.pull_request.number }}
repo=${{ github.repository }}
curl -s -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/repos/$repo/pulls/$pr_number/requested_reviewers \
-d '{"reviewers":["KomisarMariia"]}'

0 comments on commit 91a4ed1

Please sign in to comment.