From 1cd54060899796c03923bc7904f5f00390355b0e Mon Sep 17 00:00:00 2001 From: Paulo V T Silva Date: Fri, 23 Aug 2024 14:29:24 -0300 Subject: [PATCH] feat: insert new base workflows --- .github/workflows/auto-assign.yml | 21 --------------------- .github/workflows/base-workflows.yml | 11 +++++++++++ 2 files changed, 11 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/auto-assign.yml create mode 100644 .github/workflows/base-workflows.yml diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml deleted file mode 100644 index e6ef79fa..00000000 --- a/.github/workflows/auto-assign.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Auto Assign Issue - -on: - issue_comment: - types: [created] - -jobs: - auto-assign: - runs-on: ubuntu-latest - steps: - - name: Check for "EU QUERO!!!" comment - if: contains(github.event.comment.body, 'EU QUERO!!!') - run: | - # Extract the commenter's username - commenter=$(jq -r .comment.user.login $GITHUB_EVENT_PATH) - - # Add the commenter as an assignee to the issue using a Personal Access Token - echo "Assigning $commenter to the issue..." - curl -X POST -H "Authorization: token ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \ - -d "{\"assignees\": [\"$commenter\"]}" \ - "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees" diff --git a/.github/workflows/base-workflows.yml b/.github/workflows/base-workflows.yml new file mode 100644 index 00000000..fa4d29ef --- /dev/null +++ b/.github/workflows/base-workflows.yml @@ -0,0 +1,11 @@ +name: Base Actions + +on: + issue_comment: + types: [created] + pull_request: + +jobs: + assignes: + uses: devhatt/workflows/.github/workflows/auto-assign.yml@main + secrets: inherit