Skip to content

Commit

Permalink
test: ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
Saksham Sharma authored and Saksham Sharma committed Aug 14, 2024
1 parent 93226b6 commit c326bc2
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/pr-title-spell-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c326bc2

Please sign in to comment.