-
Notifications
You must be signed in to change notification settings - Fork 65
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
b46dce2
commit d64d17a
Showing
1 changed file
with
20 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Check Assignee | ||
|
||
on: | ||
issues: | ||
types: [opened, edited] | ||
pull_request: | ||
types: [opened, edited] | ||
|
||
jobs: | ||
check-assignee: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if assignee is added | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const assignees = context.payload.issue ? context.payload.issue.assignees : context.payload.pull_request.assignees; | ||
if (assignees.length === 0) { | ||
throw new Error('No assignee added. Please add an assignee to this issue or pull request.'); | ||
} |