Skip to content

Commit

Permalink
Try typos PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
airwoodix committed Nov 28, 2024
1 parent cf6e70e commit 8f236a6
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on: pull_request

jobs:
main:
permissions:
pull-requests: write
runs-on: ubuntu-latest
name: My workflow
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true

- name: Spell check
id: spell-check
run: |
status=0
uv run typos > typos-output || status=$?
if [[ ${status} -ne 0 ]]; then
echo "failed=true" >> "${GITHUB_OUTPUT}"
exit 0
fi
exit ${status}
- name: Spell check comment
uses: thollander/actions-comment-pull-request@v3
with:
comment-tag: spell-check-failed-comment
message: |
Spell check failed:
$(cat typos-output)
mode: ${{ steps.spell-check.outputs.failed == 'true' && 'upsert' || 'delete' }}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Python-generated files
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info

# Virtual environments
.venv
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
6 changes: 6 additions & 0 deletions hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def main():
print("recieve")


if __name__ == "__main__":
main()
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[project]
name = "gh-typos-comment"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"typos>=1.28.1",
]
30 changes: 30 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8f236a6

Please sign in to comment.