Skip to content

Ricardo Cuauro

Ricardo Cuauro #6

name: Issue filtering
concurrency:
group: one-at-a-time
cancel-in-progress: false
on:
issues:
types: [opened]
permissions:
contents: read
issues: write
jobs:
add-signature:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Auto-close known signatures
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUMBER: ${{ github.event.issue.number }}
USER: ${{ github.event.issue.user.login }}
run: |
if grep -qi "@$USER" ./README.md; then
gh issue close --comment "El usuario $USER ya ha firmado. No se considerará esta solicitud" "$NUMBER"
else
gh issue comment "$NUMBER" --body "Se ha recibido la firma exitosamente. Esperando a un mantenedor..."
fi