diff --git a/.github/workflows/pospell-on-demand.yml b/.github/workflows/pospell-on-demand.yml new file mode 100644 index 0000000000..16e48dec90 --- /dev/null +++ b/.github/workflows/pospell-on-demand.yml @@ -0,0 +1,46 @@ +name: pospell +on: + issue_comment: + types: + - created + +jobs: + fix-spell: + name: Fix spelling + runs-on: ubuntu-latest + if: | + github.event.comment.body == 'run-powrap' + && github.event.issue.pull_request + steps: + - name: Confirmar ejecucion + uses: actions/github-script@v6 + with: + script: | + const {owner, repo} = context.issue + github.reactions.createForIssueComment({ + owner, + repo, + comment_id: context.payload.comment.id, + content: "+1", + }); + - uses: actions/checkout@v3 + - name: Preparar Python v3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + cache: "pip" + - name: Instalar dependencias + run: | + sudo apt-get update + sudo apt-get install -y hunspell hunspell-es gettext + python -m pip install -r requirements.txt + - name: Ejecutar Powrap + run: powrap --quiet **/*.po + - name: Revisar con Pospell + run: python scripts/check_spell.py + continue-on-error: true + - name: Commit & Push changes + uses: actions-js/push@master + with: + message: "auto: spell check" + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pospell.yml b/.github/workflows/pospell.yml new file mode 100644 index 0000000000..d0bcf844f2 --- /dev/null +++ b/.github/workflows/pospell.yml @@ -0,0 +1,44 @@ +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' }} + steps: + - name: Confirm process + uses: actions/github-script@v6 + with: + script: | + const {owner, repo} = context.issue + github.reactions.createForIssueComment({ + owner, + repo, + comment_id: context.payload.comment.id, + content: "+1", + }); + - uses: actions/checkout@v3 + - name: Preparar Python v3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + cache: "pip" + - name: Instalar dependencias + run: | + sudo apt-get update + sudo apt-get install -y hunspell hunspell-es gettext + python -m pip install -r requirements.txt + - name: Powrap + run: powrap --quiet **/*.po + - name: Pospell + run: python scripts/check_spell.py + - name: Commit & Push changes + uses: actions-js/push@master + with: + message: "auto: spell check" + github_token: ${{ secrets.GITHUB_TOKEN }}