From 20379642df131f5e3812ef66ecceee390222c2be Mon Sep 17 00:00:00 2001 From: mojafa Date: Fri, 31 Jan 2025 22:43:39 +0300 Subject: [PATCH] updated pr policy checker with gh pr Signed-off-by: mojafa --- .github/workflows/content-check.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/content-check.yml b/.github/workflows/content-check.yml index a208cc65..3a3dc36d 100644 --- a/.github/workflows/content-check.yml +++ b/.github/workflows/content-check.yml @@ -4,6 +4,8 @@ on: [pull_request] permissions: pull-requests: write + contents: read + issues: write jobs: content-compliance: @@ -55,9 +57,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \ - -d '{"body": "Hi @${{ github.event.pull_request.user.login }}, our policy allows contributors to work on one issue at a time. Please complete or close your existing pull requests before creating a new one."}' + gh pr comment ${{ github.event.pull_request.number }} \ + --body "Hi @${{ github.event.pull_request.user.login }}, our policy allows contributors to work on one issue at a time. Please complete or close your existing pull requests before creating a new one." exit 1 - name: File Naming and Folder Structure Compliance