From c326bc27627227b67712e55cf7de6b42c3605f09 Mon Sep 17 00:00:00 2001 From: Saksham Sharma Date: Wed, 14 Aug 2024 12:54:38 +0530 Subject: [PATCH] test: ci test --- .github/workflows/pr-title-spell-check.yml | 24 +++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pr-title-spell-check.yml b/.github/workflows/pr-title-spell-check.yml index 792450c05..eb4c5c3dd 100644 --- a/.github/workflows/pr-title-spell-check.yml +++ b/.github/workflows/pr-title-spell-check.yml @@ -28,17 +28,13 @@ jobs: 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."); - } + name: Check assignee + run: | + response=$(curl -L \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/${GITHUB_REPOSITORY}/assignees) + + echo "$response" > response.log +