Commit f773ed4 1 parent f92156b commit f773ed4 Copy full SHA for f773ed4
File tree 2 files changed +29
-0
lines changed
VKUI/complete-publish/src
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ async function run(): Promise<void> {
10
10
const workflow = new WorkflowHandler ( token , releaseTag ) ;
11
11
12
12
await workflow . processReleaseNotes ( latest === 'true' ) ;
13
+ await workflow . processIssuesByTagLabel ( ) ;
13
14
await workflow . processMilestone ( ) ;
14
15
15
16
if ( workflow . isProcessWithError ( ) ) {
Original file line number Diff line number Diff line change @@ -45,6 +45,19 @@ export class WorkflowHandler {
45
45
}
46
46
}
47
47
48
+ public async processIssuesByTagLabel ( ) {
49
+ try {
50
+ const issueNumbers = await this . getIssueNumbersByTagLabel ( ) ;
51
+
52
+ await this . commentOnIssues ( issueNumbers ) ;
53
+ } catch ( error ) {
54
+ if ( error instanceof Error ) {
55
+ core . error ( error . message ) ;
56
+ }
57
+ this . error = true ;
58
+ }
59
+ }
60
+
48
61
public async processReleaseNotes ( latest : boolean ) {
49
62
try {
50
63
const releaseNotes = await this . findReleaseNotes ( ) ;
@@ -115,6 +128,21 @@ export class WorkflowHandler {
115
128
} , [ ] ) ;
116
129
}
117
130
131
+ private async getIssueNumbersByTagLabel ( ) {
132
+ const issues = await this . gh . paginate ( this . gh . rest . issues . listForRepo , {
133
+ ...github . context . repo ,
134
+ state : 'all' ,
135
+ labels : this . releaseTag ,
136
+ } ) ;
137
+
138
+ return issues . reduce < number [ ] > ( ( issueNumbers , issue ) => {
139
+ if ( issue . state_reason !== IGNORED_STATE && ! issue . locked ) {
140
+ issueNumbers . push ( issue . number ) ;
141
+ }
142
+ return issueNumbers ;
143
+ } , [ ] ) ;
144
+ }
145
+
118
146
private async commentOnIssues ( issueNumbers : number [ ] ) {
119
147
core . debug ( `Processing the following linked issues: [${ issueNumbers } ]` ) ;
120
148
You can’t perform that action at this time.
0 commit comments