Ricardo Cuauro #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |