-
Notifications
You must be signed in to change notification settings - Fork 491
36 lines (32 loc) · 1.36 KB
/
dxp-release-labeler.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
name: 'DXP Release Commenter'
on:
milestone:
types: [closed]
jobs:
labeler:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const jiraIssueMatch = context.payload.milestone.title.match(/^LPS-\d+/);
if (jiraIssueMatch) {
const LPS = jiraIssueMatch;
const issues = await github.issues.listForRepo({
milestone: context.payload.milestone.number,
owner: context.repo.owner,
repo: context.repo.repo,
state: 'closed'
});
if (issues.data) {
for (const issue of issues.data) {
await github.issues.createComment({
issue_number: issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `This issue has been merged and will be released in DXP at https://issues.liferay.com/browse/${LPS}`
});
}
}
}