Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
DheerajQblocks committed May 1, 2024
1 parent 835a09b commit 9fe1fcf
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/check_code_formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,19 @@ jobs:

- name: Check formatting
run: npm run format:check
continue-on-error: true # Continue to set status even if formatting check fails

- name: Set status
if: ${{ failure() }} # Only set status if previous step failed (i.e., formatting check failed)
uses: actions/github-script@v4
with:
script: |
github.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: github.sha,
state: 'failure',
context: 'Prettier Formatting Check',
description: 'Code formatting check with Prettier failed. Please fix the formatting issues.',
})
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9fe1fcf

Please sign in to comment.