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 6741d0f commit a29a99f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/check-assignee.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/pr-title-spell-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,19 @@ jobs:
uses: crate-ci/typos@master
with:
files: ./pr_title.txt

check-assignee:
name: 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;
console.log("Assignees:", assignees);
if (assignees.length === 0) {
throw new Error('No assignee added. Please add an assignee to this issue or pull request.');
} else {
console.log("Assignee check passed.");
}

0 comments on commit a29a99f

Please sign in to comment.