-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Created an automated version via Github Issues (#8)
- Loading branch information
Showing
5 changed files
with
105 additions
and
28 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: 'Firmar el acuerdo' | ||
description: 'Sigue los pasos para formar parte del equipo de ingeniería de JavaScript Chile.' | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: Agradecemos enormemente tu interés en formar parte de nuestro equipo de ingeniería. Para completar tu aplicación, debes haber leído y comprometerte a cumplir nuestro [Código de Conducta](https://github.com/jsconfcl/code_of_conduct) y aceptar nuestros [Principios de Ingeniería](https://eng.jschile.org/JSChile-Principios-de-Ingenier-a-7c87246f2dac49f38b42dd509238f9fb). Si aún no lo has hecho, por favor, hazlo antes de continuar. | ||
|
||
- type: markdown | ||
attributes: | ||
value: Para terminar tu aplicación, por favor, ingresa tu nombre y apellido en el título de esta solicitud. Ten en cuenta que el uso de mayúsculas se preservará en la firma, además, esta quedará inmortalizada en el README, pudiéndo ser modificada solo con la asistencia de un administrador. | ||
|
||
- type: checkboxes | ||
id: agreement | ||
attributes: | ||
label: He leído y me comprometo a | ||
options: | ||
- label: Seguir y hacer cumplir el Código de Conducta de JavaScript Chile. | ||
required: true | ||
- label: Guiarme por los Principios de Ingeniería de JavaScript Chile. | ||
required: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Accept new signature | ||
|
||
concurrency: | ||
group: one-at-a-time | ||
cancel-in-progress: false | ||
|
||
on: | ||
issues: | ||
types: [closed] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
add-signature: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor != github.event.issue.user.login }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Add the signment of user | ||
if: ${{ github.actor != 'github-actions[bot]' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NUMBER: ${{ github.event.issue.number }} | ||
USER: ${{ github.event.issue.user.login }} | ||
NAME: ${{ github.event.issue.title }} | ||
ID: ${{ github.event.issue.user.id }} | ||
run: | | ||
sed -i 's;### Con 💛 JSCL.Eng;'"| $NAME | [@$USER](https://github.com/$USER) |"';' ./README.md | ||
echo "### Con 💛 JSCL.Eng" >> ./README.md | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "$USER" | ||
git add . | ||
git commit -m "feat: Acuerdo firmado por $USER en la issue #$NUMBER" | ||
git push origin main | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
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 |
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