mirror of
https://github.com/google/blockly.git
synced 2026-01-04 23:50:12 +01:00
fix: Don't crash when unable to post comment to PR (#5669)
... by not ever posting such comments from this workflow. There will be a separate PR for the other workflow that does post comments, because it needs to be in the master branch. Part of #5659.
This commit is contained in:
committed by
GitHub
parent
8a60734071
commit
f4381bb373
17
.github/workflows/check_clang_format.yml
vendored
17
.github/workflows/check_clang_format.yml
vendored
@@ -1,5 +1,7 @@
|
|||||||
name: Check clang format
|
name: Check clang format
|
||||||
|
|
||||||
|
# N.B.: Runs with a read-only repo token. Safe(ish) to check out the
|
||||||
|
# submitted branch.
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -15,14 +17,7 @@ jobs:
|
|||||||
clangFormatVersion: 12
|
clangFormatVersion: 12
|
||||||
style: Google
|
style: Google
|
||||||
|
|
||||||
- uses: actions/github-script@v5
|
# The Report clang format workflow (report_clang_format.yml) will
|
||||||
if: failure()
|
# run (if required) after this one to post a comment to the PR.
|
||||||
with:
|
# (Note that the version of that workflow run will be the one on
|
||||||
script: |
|
# the master (default) branch, not the PR target branch.)
|
||||||
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`.'
|
|
||||||
})
|
|
||||||
|
|||||||
Reference in New Issue
Block a user