Skip to content

Commit

Permalink
action: tag safe-to-test for Pull Requests belong to Elastic employees (
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Feb 2, 2024
1 parent 7d0cb7d commit cbf8fbb
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/bench-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: bench-diff
on:
push:
pull_request_target:
types: [labeled]
types: [labeled, synchronize]

permissions:
contents: read
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/label-elastic-pull-requests.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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"]
})

0 comments on commit cbf8fbb

Please sign in to comment.