-
Notifications
You must be signed in to change notification settings - Fork 397
Github Action para ejecutar powrap fix con un comentario #1836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.13
Are you sure you want to change the base?
Changes from 19 commits
9f36e72
4784132
b60f901
94a5617
4c88e59
8a35070
5e8294d
e97b234
a298acd
89efe08
c6cd5c9
4660c60
48359fa
1f6c82f
ecc94e1
284a519
b620336
0e43eca
beb9bfe
75fd847
55fe5e7
0f8c793
fe0bbda
64a4e23
2bcf7ea
26e3093
da6981a
3f5ac33
b821192
bbef6e3
111a24d
c03192f
0b465a5
5f3b136
c609c52
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: pospell | ||
on: | ||
issue_comment: | ||
types: | ||
- edited | ||
- created | ||
|
||
jobs: | ||
fix-spell: | ||
name: Fix spelling | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.issue.pull_request && github.event.comment.body == 'pospell-fix' }} | ||
erickisos marked this conversation as resolved.
Show resolved
Hide resolved
erickisos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
steps: | ||
- name: Confirmar ejecucion | ||
continue-on-error: true | ||
run: | | ||
curl ${{github.event.comment.url}}/reactions \ | ||
-X POST \ | ||
-d '{"content":"+1"}' \ | ||
-H "Accept: application/vnd.github.squirrel-girl-preview+json" \ | ||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" | ||
- uses: actions/checkout@v3 | ||
- uses: awalsh128/cache-apt-pkgs-action@latest | ||
with: | ||
packages: hunspell hunspell-es gettext | ||
version: 1.0 | ||
- name: Preparar Python v3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: "pip" | ||
- name: Instalar dependencias | ||
run: python -m pip install -r requirements.txt | ||
- name: Ejecutar Powrap | ||
run: powrap --quiet **/*.po | ||
- name: Revisar con Pospell | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Como mencionaba en el otro PR, pospell no hace ningún cambio local en tus archivos, sólo chequea si la ortografía es correcta o no, y retorna con status 0 o distinto a 0 dependiendo de si encontró errores. Esto significa que hacer chequeo ortográfico no tiene incidencia alguna en el paso siguiente (hacer un commit con los cambios locales), por lo que encuentro que no tiene mucho sentido ejecutar pospell en primer lugar -- aparte que hace que la acción se demore más en terminar. En mi opinión la acción debería estar centrada solo en ejecutar powrap y hacer el commit con los cambios que este encuentre, nada más (al menos esa era mi intención al crear #1786). Por eso también insistía en que los nombres del archivo, de la acción, etc, estuvieran todos centrados en powrap, no en pospell. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh vaya, got it, déjame hacer esos cambios de una, la verdad no me había quedado claro 😅 |
||
run: python scripts/check_spell.py | ||
continue-on-error: true | ||
erickisos marked this conversation as resolved.
Show resolved
Hide resolved
erickisos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Commit & Push changes | ||
rtobar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
uses: actions-js/push@master | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tambien hay esta action que parece hacer el mismo, pero en el marketplace tiene 1k star ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hice el cambio solo para hacer la prueba, si vemos que no nos funciona as expected, le damos de vuelta a la que teníamos |
||
with: | ||
message: "auto: spell check" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
erickisos marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.