We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b92c488 commit 4976a6fCopy full SHA for 4976a6f
.github/workflows/run-clang-format.yml
@@ -12,5 +12,20 @@ jobs:
12
fetch-depth: 0
13
ref: ${{ github.event.pull_request.head.sha }}
14
- name: Run clang-format
15
- shell: bash
16
- run: git clang-format-16 --diff ${{ github.base_ref }}
+ run: |
+ {
17
+ echo 'CLANG_FORMAT_DIFF<<EOF'
18
+ git clang-format-16 --diff origin/${{ github.base_ref }} || true
19
+ echo EOF
20
+ } >> "$GITHUB_ENV"
21
+ - uses: actions/github-script@v7
22
+ with:
23
+ script: |
24
+ console.log(process.env)
25
+ const { CLANG_FORMAT_DIFF } = process.env
26
+ github.rest.issues.createComment({
27
+ issue_number: context.issue.number,
28
+ owner: context.repo.owner,
29
+ repo: context.repo.repo,
30
+ body: '```diff\n' + CLANG_FORMAT_DIFF + '\n```\n'
31
+ })
0 commit comments