From 018fe25e97f85208d7a5bf8ee951d9f32ad6a44a Mon Sep 17 00:00:00 2001 From: Paulo V T Silva Date: Tue, 13 Aug 2024 17:17:04 -0300 Subject: [PATCH] add new workflow --- .github/workflows/base-workflows.yml | 13 +++++++++++++ .github/workflows/example.yml | 21 --------------------- 2 files changed, 13 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/base-workflows.yml delete mode 100644 .github/workflows/example.yml diff --git a/.github/workflows/base-workflows.yml b/.github/workflows/base-workflows.yml new file mode 100644 index 0000000..191046b --- /dev/null +++ b/.github/workflows/base-workflows.yml @@ -0,0 +1,13 @@ +name: Base Actions + +on: + issue_comment: + types: [created] + pull_request: + +jobs: + assignes: + uses: devhatt/workflows/.github/workflows/auto-assign.yml@main + with: + repository: ${{github.repository}} + pr_number: ${{github.event.pull_request.number}} diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml deleted file mode 100644 index f388bcb..0000000 --- a/.github/workflows/example.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Auto-assign on comment - -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"