Skip to content

Commit 89efe08

Browse files
authored
Merge pull request #2 from erickisos/erickisos-patch-1
Update check_spell.py
2 parents 8a35070 + a298acd commit 89efe08

File tree

3 files changed

+6
-54
lines changed

3 files changed

+6
-54
lines changed

.github/workflows/pospell-on-demand.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@ name: pospell
22
on:
33
issue_comment:
44
types:
5+
- edited
56
- created
67

78
jobs:
89
fix-spell:
910
name: Fix spelling
1011
runs-on: ubuntu-latest
11-
if: |
12-
github.event.comment.body == 'run-powrap'
13-
&& github.event.issue.pull_request
12+
if: ${{ github.event.issue.pull_request && github.event.comment.body == 'pospell-fix' }}
1413
steps:
1514
- name: Confirmar ejecucion
1615
uses: actions/github-script@v6
1716
with:
1817
script: |
19-
const {owner, repo} = context.issue
20-
github.reactions.createForIssueComment({
21-
owner,
22-
repo,
18+
await github.rest.issues.createForIssueComment({
19+
context.repo.owner,
20+
context.repo.repo,
2321
comment_id: context.payload.comment.id,
2422
content: "+1",
2523
});

.github/workflows/pospell.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

scripts/check_spell.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
# Write merged dictionary file
2323
output_filename = tempfile.mktemp(suffix="_merged_dict.txt")
2424
with open(output_filename, "w") as f:
25-
for e in entries:
26-
f.write(e)
27-
f.write("\n")
25+
f.writelines(entries)
2826

2927
# Run pospell either against all files or the file given on the command line
3028
po_files = sys.argv[1:]

0 commit comments

Comments
 (0)