diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 19a4e1f..d02123a 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -14,9 +14,11 @@ jobs: cla-assistant: runs-on: "ubuntu-latest" steps: + - uses: "actions/checkout@v4" + - name: "CLA Assistant" if: "(github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'" - uses: "cla-assistant/github-action@v2.1.3-beta" + uses: "cla-assistant/github-action@v2.4.0" env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" PERSONAL_ACCESS_TOKEN: "${{ secrets.PRO_ACCESS_TOKEN }}" @@ -26,4 +28,16 @@ jobs: path-to-signatures: "etc/cla-signatures/signatures.json" path-to-document: "https://github.com/keploy/writers-program/tree/main/.github/CLA.md" branch: "cla-signatures" - allowlist: "keploy-bot,renovate" \ No newline at end of file + allowlist: "keploy-bot,renovate" + + - name: "Post Failure Instructions" + if: failure() && github.event_name == 'pull_request_target' + run: | + gh pr comment ${{ github.event.pull_request.number }} --body "**The CLA check failed.** Please ensure you have: + - Signed the CLA by commenting **'I have read the CLA Document and I hereby sign the CLA.'** + - Used the correct email address in your commits (matches the one you used to sign the CLA). + + After fixing these issues, comment **'recheck'** to trigger the workflow again." + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +