diff --git a/.github/workflows/bench-diff.yml b/.github/workflows/bench-diff.yml index df5647cb..5f6cdc05 100644 --- a/.github/workflows/bench-diff.yml +++ b/.github/workflows/bench-diff.yml @@ -2,7 +2,7 @@ name: bench-diff on: push: pull_request_target: - types: [labeled] + types: [labeled, synchronize] permissions: contents: read diff --git a/.github/workflows/label-elastic-pull-requests.yml b/.github/workflows/label-elastic-pull-requests.yml new file mode 100644 index 00000000..1d8ea00d --- /dev/null +++ b/.github/workflows/label-elastic-pull-requests.yml @@ -0,0 +1,28 @@ +name: "label-elastic-pull-requests" + +on: + pull_request_target: + types: [opened] + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - name: Check team membership for user + uses: elastic/get-user-teams-membership@1.1.0 + id: checkUserMember + with: + username: ${{ github.actor }} + team: 'apm' + GITHUB_TOKEN: ${{ secrets.APM_TECH_USER_TOKEN }} + - name: Add safe-to-test label + uses: actions/github-script@v7 + if: steps.checkUserMember.outputs.isTeamMember == 'true' + with: + script: | + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ["safe-to-test"] + }) \ No newline at end of file