Files
Bubberstation/.github/workflows/codeowner_reviews.yml
Gamer025 63d91d7ab4 Only notify codeowners on non draft PRs (#71545)
## About The Pull Request
As requested by Mothblocks the codeowner action will now only parse PRs
that are not drafted.
This is done to align with Githubs default behavior of assigning
codeowners.

The workflow will now also run when a PR is marked as ready for review
(undrafted).
## Why It's Good For The Game
Annoys the codeowners less often
2022-11-27 23:01:16 -08:00

30 lines
800 B
YAML

name: Codeowner Reviews
# Controls when the workflow will run
on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
assign-users:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so the job can access it
- uses: actions/checkout@v3
#Parse the Codeowner file on non draft PRs
- name: CodeOwnersParser
if: github.event.pull_request.draft == false
id: CodeOwnersParser
uses: tgstation/CodeOwnersParser@v1
#Request reviews
- name: Request reviews
if: steps.CodeOwnersParser.outputs.owners != ''
uses: tgstation/RequestReviewFromUser@v1
with:
separator: ' '
users: ${{ steps.CodeOwnersParser.outputs.owners }}