-
Notifications
You must be signed in to change notification settings - Fork 114
42 lines (40 loc) · 1.38 KB
/
apm-agent-meta-issue-action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: "APM Agents meta issue handler"
on:
issues:
types: [opened]
permissions:
contents: read
jobs:
meta-issue-handler:
runs-on: ubuntu-latest
steps:
- name: Get token
id: get_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
permissions: >-
{
"issues": "write",
"members": "read"
}
- name: Check team membership for user
uses: elastic/[email protected]
id: checkUserMember
with:
username: ${{ github.actor }}
team: 'observability'
usernamesToExclude: |
apmmachine
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
- name: Create sub issues
if: steps.checkUserMember.outputs.isTeamMember == 'true' && contains(github.event.issue.labels.*.name, 'meta') && contains(github.event.issue.labels.*.name, 'apm-agents')
uses: elastic/[email protected]
id: create_sub_issues
with:
token: ${{ steps.get_token.outputs.token }}
metaIssue: "${{ toJSON(github.event.issue) }}"
bodyRegex: "(.*)(<!---repos-start--->.*<!---repos-end--->)(.*)"
labelsToExclude: "meta,apm-agents"
specLabels: "spec-poc,apm-agents"