Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions .github/workflows/check_clang_format.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Check clang format

# N.B.: Runs with a read-only repo token. Safe(ish) to check out the
# submitted branch.
on: [pull_request]

jobs:
Expand All @@ -15,14 +17,7 @@ jobs:
clangFormatVersion: 12
style: Google

- uses: actions/github-script@v5
if: failure()
with:
script: |
console.log(context.issue.number)
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'It looks like some of your files have not been formatted properly. Please run `npm run format`.'
})
# The Report clang format workflow (report_clang_format.yml) will
# run (if required) after this one to post a comment to the PR.
# (Note that the version of that workflow run will be the one on
# the master (default) branch, not the PR target branch.)