Skip to content

Commit

Permalink
Revert "add comments correctly"
Browse files Browse the repository at this point in the history
This reverts commit dc42452.
  • Loading branch information
AlexJameson committed Aug 22, 2024
1 parent dc42452 commit be2937e
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions .github/workflows/spellcheck-ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,13 @@ jobs:
echo "::set-output name=all_files::$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | tr '\n' ' ')"
- name: Run CSpell on all changed files
id: cspell_check
continue-on-error: true
run: |
output=""
for file in ${{ steps.files.outputs.all_files }}; do
if [ "$file" = ".github/workflows/spellcheck-ru.yml" ] || [ "$file" = "cspell.json" ]; then
echo "Skipping CSpell check for $file"
continue
fi
echo "Checking $file for spelling errors..."
result=$(cspell "$file" --config cspell.json)
if [ -n "$result" ]; then
output+="### Errors in $file:\n\\\\n$result\n\\\\n\n"
fi
done
echo "::set-output name=results::${output}"
- name: Post results as a PR comment
if: steps.cspell_check.outputs.results != ''
uses: actions/github-script@v5
with:
script: |
const output = ${{ steps.cspell_check.outputs.results }};
const prNumber = context.payload.pull_request.number;
const repoName = context.repo.repo;
const ownerName = context.repo.owner;
github.rest.issues.createComment({
owner: ownerName,
repo: repoName,
issue_number: prNumber,
body: output
});
cspell $file --config cspell.json --show-suggestions
done

0 comments on commit be2937e

Please sign in to comment.