Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add-to-project workflow: add support to assign multiple teams as reviewers (comma separated without space) #42

Merged
20 changes: 12 additions & 8 deletions .github/workflows/add-to-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,26 @@ jobs:
steps:
- if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
run: |
gh api \
--method PUT \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/orgs/$OWNER/teams/$TEAM/repos/$OWNER/$REPO \
-f permission='push'
IFS=,
for TEAM in $TEAMS;
do
gh api \
--method PUT \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/orgs/$OWNER/teams/$TEAM/repos/$OWNER/$REPO \
-f permission='push'
done
env:
GITHUB_TOKEN: ${{ secrets.REPO_PAT }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
TEAM: ${{ inputs.reviewers-team != '' && inputs.reviewers-team || 'backend-devs' }}
TEAMS: ${{ inputs.reviewers-team != '' && inputs.reviewers-team || 'backend-devs,ops' }}
- if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
uses: rowi1de/[email protected]
with:
repo-token: ${{ secrets.REPO_PAT }}
teams: ${{ inputs.reviewers-team != '' && inputs.reviewers-team || 'backend-devs' }} # only works for GitHub Organisation/Teams
teams: ${{ inputs.reviewers-team != '' && inputs.reviewers-team || 'backend-devs,ops' }} # only works for GitHub Organisation/Teams
persons: ${{ inputs.reviewers-individuals }} # add individual persons here
include-draft: false # Draft PRs will be skipped (default: false)
skip-with-manual-reviewers: 1 # Skip this action, if the number of reviwers was already assigned (default: 0)
4 changes: 3 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# github-workflows Release Notes

## 0.0.2-dev - 2023-10-05
## 0.0.2-dev - 2023-10-06

### Features

- add-to-project workflow: set PR on creation to `🏗 In progress` and when ready
to `🔖 Ready` (PR #50 by @chicco785)
- markdown workflow: exclude `vendor` folder from links check (PR #47 by @tejo)
- markdown workflow: exclude `vendor` folder from checks (PR #46 by @tejo)
- add-to-project workflow: add support to assign multiple teams as reviewers
(comma separated without space) (PR #42 by @chicco785)
- add-to-project workflow: automatically add reviewers without need of
CODEOWNERS (PR #37 by @chicco785)
- add-to-project workflow: automatically assign pr to its creator (PR #36 by
Expand Down