From 888fca77364577d3f5c7233f9e14c1ba7028316c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Fri, 13 Sep 2024 15:21:51 -0300 Subject: [PATCH 1/3] =?UTF-8?q?Adiciona=20bot=20para=20atribuir=20issues?= =?UTF-8?q?=20com=20coment=C3=A1rio=20(#403)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/comment-commands.yml | 21 +++++++++++++++++++++ CONTRIBUTING.md | 6 +----- CONTRIBUTING_EN.md | 4 +--- 3 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/comment-commands.yml diff --git a/.github/workflows/comment-commands.yml b/.github/workflows/comment-commands.yml new file mode 100644 index 00000000..174a3225 --- /dev/null +++ b/.github/workflows/comment-commands.yml @@ -0,0 +1,21 @@ +name: Comandos nos comentários +on: + issue_comment: + types: created + +permissions: + contents: read + issues: write + pull-requests: write + +jobs: + issue_assign: + runs-on: ubuntu-22.04 + if: (!github.event.issue.pull_request) && github.event.comment.body == 'bora' + concurrency: + group: ${{ github.actor }}-issue-assign + steps: + - run: | + echo "Issue ${{ github.event.issue.number }} atribuida a ${{ github.event.comment.user.login }}" + echo "Verifique [o guia de contribuição](https://github.com/melissawm/brutils-python/blob/main/CONTRIBUTING.md) para mais informações sobre como submeter sua Pull Request." + curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 93c2820c..26c4b8da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,11 +35,7 @@ Caso não tenha uma conta, siga os passos de [como criar de uma conta pessoal no Visite a [página de issues do brutils][brutils-issues] e encontre uma issue com a qual você gostaria de trabalhar e que ainda não tenha sido atribuída a ninguém. -Deixe um comentário na issue perguntando se você pode trabalhar nela. Algo como: "Olá, posso -trabalhar nessa issue?". - -Aguarde até que alguém atribua a issue a você. Uma vez atribuída, você pode prosseguir para a próxima -etapa. +Deixe um comentário na issue com conteúdo "bora!" Em seguida, um bot vai atribuir a issue a você. Uma vez atribuída, você pode prosseguir para a próxima etapa. Sinta-se à vontade para fazer qualquer pergunta na página da issue antes ou durante o processo de desenvolvimento. diff --git a/CONTRIBUTING_EN.md b/CONTRIBUTING_EN.md index aa0b00d3..d06cb212 100644 --- a/CONTRIBUTING_EN.md +++ b/CONTRIBUTING_EN.md @@ -32,9 +32,7 @@ Make sure you have a [GitHub account][github-join] and you are logged in with it Visit the [brutils issues page][brutils-issues] and find an issue you would like to work with and no one assigned to it yet. -Send a comment in the issue asking to work with it. Something like: "hey, can I work on this?". - -Wait until someone assign you to the ticket. Once you are assigned to it, you can move to the next +Send a comment in the issue with the content "bora!" This will trigger a bot that will assign you to the ticket. Once you are assigned to it, you can move to the next step. Please, feel free to ask any questions in the issue's page before or during the development From cd44d1bd5a43879d5324b4f990ec347a7a61c56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Fri, 13 Sep 2024 16:12:59 -0300 Subject: [PATCH 2/3] Melhora o bot bora para comentar na issue (#406) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Melhora o bot bora para comentar na issue Também corrige o bot para reagir ao comando bora! * Consertar endereço do repositorio --- .github/workflows/comment-commands.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/comment-commands.yml b/.github/workflows/comment-commands.yml index 174a3225..f7eb2d18 100644 --- a/.github/workflows/comment-commands.yml +++ b/.github/workflows/comment-commands.yml @@ -11,11 +11,18 @@ permissions: jobs: issue_assign: runs-on: ubuntu-22.04 - if: (!github.event.issue.pull_request) && github.event.comment.body == 'bora' + if: (!github.event.issue.pull_request) && github.event.comment.body == 'bora!' concurrency: group: ${{ github.actor }}-issue-assign steps: - run: | echo "Issue ${{ github.event.issue.number }} atribuida a ${{ github.event.comment.user.login }}" - echo "Verifique [o guia de contribuição](https://github.com/melissawm/brutils-python/blob/main/CONTRIBUTING.md) para mais informações sobre como submeter sua Pull Request." + echo "Verifique [o guia de contribuição](https://github.com/brazilian-utils/brutils-python/blob/main/CONTRIBUTING.md) para mais informações sobre como submeter sua Pull Request." curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees + + - name: Create or Update Comment + uses: peter-evans/create-or-update-comment@v4.0.0 + with: + body: | + Issue ${{ github.event.issue.number }} atribuida a ${{ github.event.comment.user.login }} :rocket:" + "Verifique [o guia de contribuição](https://github.com/brazilian-utils/brutils-python/blob/main/CONTRIBUTING.md) para mais informações sobre como submeter sua Pull Request." From 20c3bfd30fd98e72c61485edd2d6e4ab12f24274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Fri, 13 Sep 2024 16:45:53 -0300 Subject: [PATCH 3/3] Adicionar issue number no bot bora (#409) --- .github/workflows/comment-commands.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/comment-commands.yml b/.github/workflows/comment-commands.yml index f7eb2d18..ca6ca358 100644 --- a/.github/workflows/comment-commands.yml +++ b/.github/workflows/comment-commands.yml @@ -23,6 +23,7 @@ jobs: - name: Create or Update Comment uses: peter-evans/create-or-update-comment@v4.0.0 with: + issue-number: ${{ github.event.issue.number }} body: | Issue ${{ github.event.issue.number }} atribuida a ${{ github.event.comment.user.login }} :rocket:" "Verifique [o guia de contribuição](https://github.com/brazilian-utils/brutils-python/blob/main/CONTRIBUTING.md) para mais informações sobre como submeter sua Pull Request."