File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -20,23 +20,25 @@ jobs:
20
20
uses : actions/github-script@v6
21
21
with :
22
22
script : |
23
+ const github = require('@actions/github');
24
+ const context = github.context;
23
25
const comment = context.payload.comment.body;
24
26
const match = comment.match(/\/backport to release\/v(.*)/);
25
27
26
28
if (match) {
27
29
const version = match[1];
28
30
const label = `Backport-${version}.x-Consider`;
29
31
console.log(label);
32
+
33
+ github.issues.addLabels({
34
+ owner: context.repo.owner,
35
+ repo: context.repo.repo,
36
+ issue_number: context.issue.number,
37
+ labels: [label]
38
+ });
30
39
} else {
31
40
throw new Error("No version found in comment");
32
41
}
33
-
34
- github.issues.addLabels({
35
- owner: context.repo.owner,
36
- repo: context.repo.repo,
37
- issue_number: context.issue.number,
38
- labels: [label]
39
- })
40
42
backport :
41
43
if : ${{ contains(github.event.comment.body, '/backport to') || github.event_name == 'schedule' }}
42
44
uses : dotnet/arcade/.github/workflows/backport-base.yml@main
You can’t perform that action at this time.
0 commit comments