Skip to content

Commit

Permalink
Remove the commenting attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Jul 22, 2024
1 parent 9fcd9c4 commit 42d3d70
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:

permissions:
contents: read
pull-requests: write

jobs:
format_code:
Expand All @@ -22,35 +21,6 @@ jobs:
clangformat: 17.0.5

- name: Run clang-format
id: clang_format
run: |
find include src -name '*.h' -o -name '*.cc' | xargs clang-format -i -style=file -fallback-style=none
git diff | tee fmt.patch
if [ -s fmt.patch ]; then
exit 1
fi
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
if: failure() && steps.clang_format.outcome == 'failure'
with:
github-token: ${{ secrets.KEY }}
script: |
const fs = require('fs');
const patch = fs.readFileSync('fmt.patch', { encoding: 'utf8' });
const comment = `clang-format 17.0.5 found issues in the formatting in your code:
<details>
<summary>
View the diff from clang-format:
</summary>
\`\`\`diff
${patch}
\`\`\`
</details>
`;
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
git diff --exit-code

0 comments on commit 42d3d70

Please sign in to comment.