Skip to content

Commit

Permalink
ci: add check for assignee
Browse files Browse the repository at this point in the history
  • Loading branch information
PritishBudhiraja committed Aug 14, 2024
1 parent b46dce2 commit d64d17a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/check-assignee.yml
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.');
}

0 comments on commit d64d17a

Please sign in to comment.