From a29a99f3fea3ca77433581dc7d1a6de8a8f7e17e Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja Date: Wed, 14 Aug 2024 11:50:44 +0530 Subject: [PATCH] ci: add check for assignee --- .github/workflows/check-assignee.yml | 21 --------------------- .github/workflows/pr-title-spell-check.yml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/check-assignee.yml diff --git a/.github/workflows/check-assignee.yml b/.github/workflows/check-assignee.yml deleted file mode 100644 index 4a08c2d21..000000000 --- a/.github/workflows/check-assignee.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Check Assignee - -on: - pull_request: - types: [opened, edited, assigned] - -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; - 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."); - } diff --git a/.github/workflows/pr-title-spell-check.yml b/.github/workflows/pr-title-spell-check.yml index 424b18127..d92ebb78b 100644 --- a/.github/workflows/pr-title-spell-check.yml +++ b/.github/workflows/pr-title-spell-check.yml @@ -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."); + }