-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
StaleV9.kt
601 lines (589 loc) · 30.9 KB
/
StaleV9.kt
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
// This file was generated using action-binding-generator. Don't change it by hand, otherwise your
// changes will be overwritten with the next binding code regeneration.
// See https://github.com/typesafegithub/github-workflows-kt for more info.
@file:Suppress(
"DataClassPrivateConstructor",
"UNUSED_PARAMETER",
)
package io.github.typesafegithub.workflows.actions.actions
import io.github.typesafegithub.workflows.domain.actions.Action
import io.github.typesafegithub.workflows.domain.actions.RegularAction
import java.util.LinkedHashMap
import kotlin.Boolean
import kotlin.Float
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.collections.toList
import kotlin.collections.toTypedArray
/**
* Action: Close Stale Issues
*
* Close issues and pull requests with no recent activity
*
* [Action on GitHub](https://github.com/actions/stale)
*
* @param repoToken Token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`.
* @param staleIssueMessage The message to post on the issue when tagging it. If none provided, will
* not mark issues stale.
* @param stalePrMessage The message to post on the pull request when tagging it. If none provided,
* will not mark pull requests stale.
* @param closeIssueMessage The message to post on the issue when closing it. If none provided, will
* not comment when closing an issue.
* @param closePrMessage The message to post on the pull request when closing it. If none provided,
* will not comment when closing a pull requests.
* @param daysBeforeStale The number of days old an issue or a pull request can be before marking it
* stale. Set to -1 to never mark issues or pull requests as stale automatically.
* @param daysBeforeIssueStale The number of days old an issue can be before marking it stale. Set
* to -1 to never mark issues as stale automatically. Override "days-before-stale" option regarding
* only the issues.
* @param daysBeforePrStale The number of days old a pull request can be before marking it stale.
* Set to -1 to never mark pull requests as stale automatically. Override "days-before-stale" option
* regarding only the pull requests.
* @param daysBeforeClose The number of days to wait to close an issue or a pull request after it
* being marked stale. Set to -1 to never close stale issues or pull requests.
* @param daysBeforeIssueClose The number of days to wait to close an issue after it being marked
* stale. Set to -1 to never close stale issues. Override "days-before-close" option regarding only the
* issues.
* @param daysBeforePrClose The number of days to wait to close a pull request after it being marked
* stale. Set to -1 to never close stale pull requests. Override "days-before-close" option regarding
* only the pull requests.
* @param staleIssueLabel The label to apply when an issue is stale.
* @param closeIssueLabel The label to apply when an issue is closed.
* @param exemptIssueLabels The labels that mean an issue is exempt from being marked stale.
* Separate multiple labels with commas (eg. "label1,label2").
* @param closeIssueReason The reason to use when closing an issue.
* @param stalePrLabel The label to apply when a pull request is stale.
* @param closePrLabel The label to apply when a pull request is closed.
* @param exemptPrLabels The labels that mean a pull request is exempt from being marked as stale.
* Separate multiple labels with commas (eg. "label1,label2").
* @param exemptMilestones The milestones that mean an issue or a pull request is exempt from being
* marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2").
* @param exemptIssueMilestones The milestones that mean an issue is exempt from being marked as
* stale. Separate multiple milestones with commas (eg. "milestone1,milestone2"). Override
* "exempt-milestones" option regarding only the issues.
* @param exemptPrMilestones The milestones that mean a pull request is exempt from being marked as
* stale. Separate multiple milestones with commas (eg. "milestone1,milestone2"). Override
* "exempt-milestones" option regarding only the pull requests.
* @param exemptAllMilestones Exempt all issues and pull requests with milestones from being marked
* as stale. Default to false.
* @param exemptAllIssueMilestones Exempt all issues with milestones from being marked as stale.
* Override "exempt-all-milestones" option regarding only the issues.
* @param exemptAllPrMilestones Exempt all pull requests with milestones from being marked as stale.
* Override "exempt-all-milestones" option regarding only the pull requests.
* @param onlyLabels Only issues or pull requests with all of these labels are checked if stale.
* Defaults to `` (disabled) and can be a comma-separated list of labels.
* @param anyOfLabels Only issues or pull requests with at least one of these labels are checked if
* stale. Defaults to `` (disabled) and can be a comma-separated list of labels.
* @param anyOfIssueLabels Only issues with at least one of these labels are checked if stale.
* Defaults to `` (disabled) and can be a comma-separated list of labels. Override "any-of-labels"
* option regarding only the issues.
* @param anyOfPrLabels Only pull requests with at least one of these labels are checked if stale.
* Defaults to `` (disabled) and can be a comma-separated list of labels. Override "any-of-labels"
* option regarding only the pull requests.
* @param onlyIssueLabels Only issues with all of these labels are checked if stale. Defaults to
* `[]` (disabled) and can be a comma-separated list of labels. Override "only-labels" option regarding
* only the issues.
* @param onlyPrLabels Only pull requests with all of these labels are checked if stale. Defaults to
* `[]` (disabled) and can be a comma-separated list of labels. Override "only-labels" option regarding
* only the pull requests.
* @param operationsPerRun The maximum number of operations per run, used to control rate limiting
* (GitHub API CRUD related).
* @param removeStaleWhenUpdated Remove stale labels from issues and pull requests when they are
* updated or commented on.
* @param removeIssueStaleWhenUpdated Remove stale labels from issues when they are updated or
* commented on. Override "remove-stale-when-updated" option regarding only the issues.
* @param removePrStaleWhenUpdated Remove stale labels from pull requests when they are updated or
* commented on. Override "remove-stale-when-updated" option regarding only the pull requests.
* @param debugOnly Run the processor in debug mode without actually performing any operations on
* live issues.
* @param ascending The order to get issues or pull requests. Defaults to false, which is
* descending.
* @param deleteBranch Delete the git branch after closing a stale pull request.
* @param startDate The date used to skip the stale action on issue/pull request created before it
* (ISO 8601 or RFC 2822).
* @param exemptAssignees The assignees which exempt an issue or a pull request from being marked as
* stale. Separate multiple assignees with commas (eg. "user1,user2").
* @param exemptIssueAssignees The assignees which exempt an issue from being marked as stale.
* Separate multiple assignees with commas (eg. "user1,user2"). Override "exempt-assignees" option
* regarding only the issues.
* @param exemptPrAssignees The assignees which exempt a pull request from being marked as stale.
* Separate multiple assignees with commas (eg. "user1,user2"). Override "exempt-assignees" option
* regarding only the pull requests.
* @param exemptAllAssignees Exempt all issues and pull requests with assignees from being marked as
* stale. Default to false.
* @param exemptAllIssueAssignees Exempt all issues with assignees from being marked as stale.
* Override "exempt-all-assignees" option regarding only the issues.
* @param exemptAllPrAssignees Exempt all pull requests with assignees from being marked as stale.
* Override "exempt-all-assignees" option regarding only the pull requests.
* @param exemptDraftPr Exempt draft pull requests from being marked as stale. Default to false.
* @param enableStatistics Display some statistics at the end regarding the stale workflow (only
* when the logs are enabled).
* @param labelsToAddWhenUnstale A comma delimited list of labels to add when an issue or pull
* request becomes unstale.
* @param labelsToRemoveWhenStale A comma delimited list of labels to remove when an issue or pull
* request becomes stale.
* @param labelsToRemoveWhenUnstale A comma delimited list of labels to remove when an issue or pull
* request becomes unstale.
* @param ignoreUpdates Any update (update/comment) can reset the stale idle time on the issues and
* pull requests.
* @param ignoreIssueUpdates Any update (update/comment) can reset the stale idle time on the
* issues. Override "ignore-updates" option regarding only the issues.
* @param ignorePrUpdates Any update (update/comment) can reset the stale idle time on the pull
* requests. Override "ignore-updates" option regarding only the pull requests.
* @param includeOnlyAssigned Only the issues or the pull requests with an assignee will be marked
* as stale automatically.
* @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by
* the binding
* @param _customVersion Allows overriding action's version, for example to use a specific minor
* version, or a newer version that the binding doesn't yet know about
*/
public data class StaleV9 private constructor(
/**
* Token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`.
*/
public val repoToken: String? = null,
/**
* The message to post on the issue when tagging it. If none provided, will not mark issues
* stale.
*/
public val staleIssueMessage: String? = null,
/**
* The message to post on the pull request when tagging it. If none provided, will not mark pull
* requests stale.
*/
public val stalePrMessage: String? = null,
/**
* The message to post on the issue when closing it. If none provided, will not comment when
* closing an issue.
*/
public val closeIssueMessage: String? = null,
/**
* The message to post on the pull request when closing it. If none provided, will not comment
* when closing a pull requests.
*/
public val closePrMessage: String? = null,
/**
* The number of days old an issue or a pull request can be before marking it stale. Set to -1
* to never mark issues or pull requests as stale automatically.
*/
public val daysBeforeStale: Float? = null,
/**
* The number of days old an issue can be before marking it stale. Set to -1 to never mark
* issues as stale automatically. Override "days-before-stale" option regarding only the issues.
*/
public val daysBeforeIssueStale: String? = null,
/**
* The number of days old a pull request can be before marking it stale. Set to -1 to never mark
* pull requests as stale automatically. Override "days-before-stale" option regarding only the
* pull requests.
*/
public val daysBeforePrStale: StaleV9.Days? = null,
/**
* The number of days to wait to close an issue or a pull request after it being marked stale.
* Set to -1 to never close stale issues or pull requests.
*/
public val daysBeforeClose: Int? = null,
/**
* The number of days to wait to close an issue after it being marked stale. Set to -1 to never
* close stale issues. Override "days-before-close" option regarding only the issues.
*/
public val daysBeforeIssueClose: StaleV9.Days? = null,
/**
* The number of days to wait to close a pull request after it being marked stale. Set to -1 to
* never close stale pull requests. Override "days-before-close" option regarding only the pull
* requests.
*/
public val daysBeforePrClose: StaleV9.Days? = null,
/**
* The label to apply when an issue is stale.
*/
public val staleIssueLabel: String? = null,
/**
* The label to apply when an issue is closed.
*/
public val closeIssueLabel: String? = null,
/**
* The labels that mean an issue is exempt from being marked stale. Separate multiple labels
* with commas (eg. "label1,label2").
*/
public val exemptIssueLabels: List<String>? = null,
/**
* The reason to use when closing an issue.
*/
public val closeIssueReason: StaleV9.CloseIssueReason? = null,
/**
* The label to apply when a pull request is stale.
*/
public val stalePrLabel: String? = null,
/**
* The label to apply when a pull request is closed.
*/
public val closePrLabel: String? = null,
/**
* The labels that mean a pull request is exempt from being marked as stale. Separate multiple
* labels with commas (eg. "label1,label2").
*/
public val exemptPrLabels: List<String>? = null,
/**
* The milestones that mean an issue or a pull request is exempt from being marked as stale.
* Separate multiple milestones with commas (eg. "milestone1,milestone2").
*/
public val exemptMilestones: List<String>? = null,
/**
* The milestones that mean an issue is exempt from being marked as stale. Separate multiple
* milestones with commas (eg. "milestone1,milestone2"). Override "exempt-milestones" option
* regarding only the issues.
*/
public val exemptIssueMilestones: List<String>? = null,
/**
* The milestones that mean a pull request is exempt from being marked as stale. Separate
* multiple milestones with commas (eg. "milestone1,milestone2"). Override "exempt-milestones"
* option regarding only the pull requests.
*/
public val exemptPrMilestones: List<String>? = null,
/**
* Exempt all issues and pull requests with milestones from being marked as stale. Default to
* false.
*/
public val exemptAllMilestones: Boolean? = null,
/**
* Exempt all issues with milestones from being marked as stale. Override
* "exempt-all-milestones" option regarding only the issues.
*/
public val exemptAllIssueMilestones: Boolean? = null,
/**
* Exempt all pull requests with milestones from being marked as stale. Override
* "exempt-all-milestones" option regarding only the pull requests.
*/
public val exemptAllPrMilestones: Boolean? = null,
/**
* Only issues or pull requests with all of these labels are checked if stale. Defaults to ``
* (disabled) and can be a comma-separated list of labels.
*/
public val onlyLabels: List<String>? = null,
/**
* Only issues or pull requests with at least one of these labels are checked if stale. Defaults
* to `` (disabled) and can be a comma-separated list of labels.
*/
public val anyOfLabels: List<String>? = null,
/**
* Only issues with at least one of these labels are checked if stale. Defaults to `` (disabled)
* and can be a comma-separated list of labels. Override "any-of-labels" option regarding only the
* issues.
*/
public val anyOfIssueLabels: List<String>? = null,
/**
* Only pull requests with at least one of these labels are checked if stale. Defaults to ``
* (disabled) and can be a comma-separated list of labels. Override "any-of-labels" option
* regarding only the pull requests.
*/
public val anyOfPrLabels: List<String>? = null,
/**
* Only issues with all of these labels are checked if stale. Defaults to `[]` (disabled) and
* can be a comma-separated list of labels. Override "only-labels" option regarding only the
* issues.
*/
public val onlyIssueLabels: List<String>? = null,
/**
* Only pull requests with all of these labels are checked if stale. Defaults to `[]` (disabled)
* and can be a comma-separated list of labels. Override "only-labels" option regarding only the
* pull requests.
*/
public val onlyPrLabels: List<String>? = null,
/**
* The maximum number of operations per run, used to control rate limiting (GitHub API CRUD
* related).
*/
public val operationsPerRun: Int? = null,
/**
* Remove stale labels from issues and pull requests when they are updated or commented on.
*/
public val removeStaleWhenUpdated: Boolean? = null,
/**
* Remove stale labels from issues when they are updated or commented on. Override
* "remove-stale-when-updated" option regarding only the issues.
*/
public val removeIssueStaleWhenUpdated: Boolean? = null,
/**
* Remove stale labels from pull requests when they are updated or commented on. Override
* "remove-stale-when-updated" option regarding only the pull requests.
*/
public val removePrStaleWhenUpdated: Boolean? = null,
/**
* Run the processor in debug mode without actually performing any operations on live issues.
*/
public val debugOnly: Boolean? = null,
/**
* The order to get issues or pull requests. Defaults to false, which is descending.
*/
public val ascending: Boolean? = null,
/**
* Delete the git branch after closing a stale pull request.
*/
public val deleteBranch: Boolean? = null,
/**
* The date used to skip the stale action on issue/pull request created before it (ISO 8601 or
* RFC 2822).
*/
public val startDate: String? = null,
/**
* The assignees which exempt an issue or a pull request from being marked as stale. Separate
* multiple assignees with commas (eg. "user1,user2").
*/
public val exemptAssignees: List<String>? = null,
/**
* The assignees which exempt an issue from being marked as stale. Separate multiple assignees
* with commas (eg. "user1,user2"). Override "exempt-assignees" option regarding only the issues.
*/
public val exemptIssueAssignees: List<String>? = null,
/**
* The assignees which exempt a pull request from being marked as stale. Separate multiple
* assignees with commas (eg. "user1,user2"). Override "exempt-assignees" option regarding only the
* pull requests.
*/
public val exemptPrAssignees: List<String>? = null,
/**
* Exempt all issues and pull requests with assignees from being marked as stale. Default to
* false.
*/
public val exemptAllAssignees: Boolean? = null,
/**
* Exempt all issues with assignees from being marked as stale. Override "exempt-all-assignees"
* option regarding only the issues.
*/
public val exemptAllIssueAssignees: String? = null,
/**
* Exempt all pull requests with assignees from being marked as stale. Override
* "exempt-all-assignees" option regarding only the pull requests.
*/
public val exemptAllPrAssignees: Boolean? = null,
/**
* Exempt draft pull requests from being marked as stale. Default to false.
*/
public val exemptDraftPr: Boolean? = null,
/**
* Display some statistics at the end regarding the stale workflow (only when the logs are
* enabled).
*/
public val enableStatistics: Boolean? = null,
/**
* A comma delimited list of labels to add when an issue or pull request becomes unstale.
*/
public val labelsToAddWhenUnstale: List<String>? = null,
/**
* A comma delimited list of labels to remove when an issue or pull request becomes stale.
*/
public val labelsToRemoveWhenStale: List<String>? = null,
/**
* A comma delimited list of labels to remove when an issue or pull request becomes unstale.
*/
public val labelsToRemoveWhenUnstale: List<String>? = null,
/**
* Any update (update/comment) can reset the stale idle time on the issues and pull requests.
*/
public val ignoreUpdates: Boolean? = null,
/**
* Any update (update/comment) can reset the stale idle time on the issues. Override
* "ignore-updates" option regarding only the issues.
*/
public val ignoreIssueUpdates: Boolean? = null,
/**
* Any update (update/comment) can reset the stale idle time on the pull requests. Override
* "ignore-updates" option regarding only the pull requests.
*/
public val ignorePrUpdates: Boolean? = null,
/**
* Only the issues or the pull requests with an assignee will be marked as stale automatically.
*/
public val includeOnlyAssigned: Boolean? = null,
/**
* Type-unsafe map where you can put any inputs that are not yet supported by the binding
*/
public val _customInputs: Map<String, String> = mapOf(),
/**
* Allows overriding action's version, for example to use a specific minor version, or a newer
* version that the binding doesn't yet know about
*/
public val _customVersion: String? = null,
) : RegularAction<StaleV9.Outputs>("actions", "stale", _customVersion ?: "v9") {
public constructor(
vararg pleaseUseNamedArguments: Unit,
repoToken: String? = null,
staleIssueMessage: String? = null,
stalePrMessage: String? = null,
closeIssueMessage: String? = null,
closePrMessage: String? = null,
daysBeforeStale: Float? = null,
daysBeforeIssueStale: String? = null,
daysBeforePrStale: StaleV9.Days? = null,
daysBeforeClose: Int? = null,
daysBeforeIssueClose: StaleV9.Days? = null,
daysBeforePrClose: StaleV9.Days? = null,
staleIssueLabel: String? = null,
closeIssueLabel: String? = null,
exemptIssueLabels: List<String>? = null,
closeIssueReason: StaleV9.CloseIssueReason? = null,
stalePrLabel: String? = null,
closePrLabel: String? = null,
exemptPrLabels: List<String>? = null,
exemptMilestones: List<String>? = null,
exemptIssueMilestones: List<String>? = null,
exemptPrMilestones: List<String>? = null,
exemptAllMilestones: Boolean? = null,
exemptAllIssueMilestones: Boolean? = null,
exemptAllPrMilestones: Boolean? = null,
onlyLabels: List<String>? = null,
anyOfLabels: List<String>? = null,
anyOfIssueLabels: List<String>? = null,
anyOfPrLabels: List<String>? = null,
onlyIssueLabels: List<String>? = null,
onlyPrLabels: List<String>? = null,
operationsPerRun: Int? = null,
removeStaleWhenUpdated: Boolean? = null,
removeIssueStaleWhenUpdated: Boolean? = null,
removePrStaleWhenUpdated: Boolean? = null,
debugOnly: Boolean? = null,
ascending: Boolean? = null,
deleteBranch: Boolean? = null,
startDate: String? = null,
exemptAssignees: List<String>? = null,
exemptIssueAssignees: List<String>? = null,
exemptPrAssignees: List<String>? = null,
exemptAllAssignees: Boolean? = null,
exemptAllIssueAssignees: String? = null,
exemptAllPrAssignees: Boolean? = null,
exemptDraftPr: Boolean? = null,
enableStatistics: Boolean? = null,
labelsToAddWhenUnstale: List<String>? = null,
labelsToRemoveWhenStale: List<String>? = null,
labelsToRemoveWhenUnstale: List<String>? = null,
ignoreUpdates: Boolean? = null,
ignoreIssueUpdates: Boolean? = null,
ignorePrUpdates: Boolean? = null,
includeOnlyAssigned: Boolean? = null,
_customInputs: Map<String, String> = mapOf(),
_customVersion: String? = null,
) : this(repoToken=repoToken, staleIssueMessage=staleIssueMessage,
stalePrMessage=stalePrMessage, closeIssueMessage=closeIssueMessage,
closePrMessage=closePrMessage, daysBeforeStale=daysBeforeStale,
daysBeforeIssueStale=daysBeforeIssueStale, daysBeforePrStale=daysBeforePrStale,
daysBeforeClose=daysBeforeClose, daysBeforeIssueClose=daysBeforeIssueClose,
daysBeforePrClose=daysBeforePrClose, staleIssueLabel=staleIssueLabel,
closeIssueLabel=closeIssueLabel, exemptIssueLabels=exemptIssueLabels,
closeIssueReason=closeIssueReason, stalePrLabel=stalePrLabel, closePrLabel=closePrLabel,
exemptPrLabels=exemptPrLabels, exemptMilestones=exemptMilestones,
exemptIssueMilestones=exemptIssueMilestones, exemptPrMilestones=exemptPrMilestones,
exemptAllMilestones=exemptAllMilestones,
exemptAllIssueMilestones=exemptAllIssueMilestones,
exemptAllPrMilestones=exemptAllPrMilestones, onlyLabels=onlyLabels,
anyOfLabels=anyOfLabels, anyOfIssueLabels=anyOfIssueLabels, anyOfPrLabels=anyOfPrLabels,
onlyIssueLabels=onlyIssueLabels, onlyPrLabels=onlyPrLabels,
operationsPerRun=operationsPerRun, removeStaleWhenUpdated=removeStaleWhenUpdated,
removeIssueStaleWhenUpdated=removeIssueStaleWhenUpdated,
removePrStaleWhenUpdated=removePrStaleWhenUpdated, debugOnly=debugOnly,
ascending=ascending, deleteBranch=deleteBranch, startDate=startDate,
exemptAssignees=exemptAssignees, exemptIssueAssignees=exemptIssueAssignees,
exemptPrAssignees=exemptPrAssignees, exemptAllAssignees=exemptAllAssignees,
exemptAllIssueAssignees=exemptAllIssueAssignees,
exemptAllPrAssignees=exemptAllPrAssignees, exemptDraftPr=exemptDraftPr,
enableStatistics=enableStatistics, labelsToAddWhenUnstale=labelsToAddWhenUnstale,
labelsToRemoveWhenStale=labelsToRemoveWhenStale,
labelsToRemoveWhenUnstale=labelsToRemoveWhenUnstale, ignoreUpdates=ignoreUpdates,
ignoreIssueUpdates=ignoreIssueUpdates, ignorePrUpdates=ignorePrUpdates,
includeOnlyAssigned=includeOnlyAssigned, _customInputs=_customInputs,
_customVersion=_customVersion)
@Suppress("SpreadOperator")
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
*listOfNotNull(
repoToken?.let { "repo-token" to it },
staleIssueMessage?.let { "stale-issue-message" to it },
stalePrMessage?.let { "stale-pr-message" to it },
closeIssueMessage?.let { "close-issue-message" to it },
closePrMessage?.let { "close-pr-message" to it },
daysBeforeStale?.let { "days-before-stale" to it.toString() },
daysBeforeIssueStale?.let { "days-before-issue-stale" to it },
daysBeforePrStale?.let { "days-before-pr-stale" to it.integerValue.toString() },
daysBeforeClose?.let { "days-before-close" to it.toString() },
daysBeforeIssueClose?.let { "days-before-issue-close" to it.integerValue.toString() },
daysBeforePrClose?.let { "days-before-pr-close" to it.integerValue.toString() },
staleIssueLabel?.let { "stale-issue-label" to it },
closeIssueLabel?.let { "close-issue-label" to it },
exemptIssueLabels?.let { "exempt-issue-labels" to it.joinToString(",") },
closeIssueReason?.let { "close-issue-reason" to it.stringValue },
stalePrLabel?.let { "stale-pr-label" to it },
closePrLabel?.let { "close-pr-label" to it },
exemptPrLabels?.let { "exempt-pr-labels" to it.joinToString(",") },
exemptMilestones?.let { "exempt-milestones" to it.joinToString(",") },
exemptIssueMilestones?.let { "exempt-issue-milestones" to it.joinToString(",") },
exemptPrMilestones?.let { "exempt-pr-milestones" to it.joinToString(",") },
exemptAllMilestones?.let { "exempt-all-milestones" to it.toString() },
exemptAllIssueMilestones?.let { "exempt-all-issue-milestones" to it.toString() },
exemptAllPrMilestones?.let { "exempt-all-pr-milestones" to it.toString() },
onlyLabels?.let { "only-labels" to it.joinToString(",") },
anyOfLabels?.let { "any-of-labels" to it.joinToString(",") },
anyOfIssueLabels?.let { "any-of-issue-labels" to it.joinToString(",") },
anyOfPrLabels?.let { "any-of-pr-labels" to it.joinToString(",") },
onlyIssueLabels?.let { "only-issue-labels" to it.joinToString(",") },
onlyPrLabels?.let { "only-pr-labels" to it.joinToString(",") },
operationsPerRun?.let { "operations-per-run" to it.toString() },
removeStaleWhenUpdated?.let { "remove-stale-when-updated" to it.toString() },
removeIssueStaleWhenUpdated?.let { "remove-issue-stale-when-updated" to it.toString() },
removePrStaleWhenUpdated?.let { "remove-pr-stale-when-updated" to it.toString() },
debugOnly?.let { "debug-only" to it.toString() },
ascending?.let { "ascending" to it.toString() },
deleteBranch?.let { "delete-branch" to it.toString() },
startDate?.let { "start-date" to it },
exemptAssignees?.let { "exempt-assignees" to it.joinToString(",") },
exemptIssueAssignees?.let { "exempt-issue-assignees" to it.joinToString(",") },
exemptPrAssignees?.let { "exempt-pr-assignees" to it.joinToString(",") },
exemptAllAssignees?.let { "exempt-all-assignees" to it.toString() },
exemptAllIssueAssignees?.let { "exempt-all-issue-assignees" to it },
exemptAllPrAssignees?.let { "exempt-all-pr-assignees" to it.toString() },
exemptDraftPr?.let { "exempt-draft-pr" to it.toString() },
enableStatistics?.let { "enable-statistics" to it.toString() },
labelsToAddWhenUnstale?.let { "labels-to-add-when-unstale" to it.joinToString(",") },
labelsToRemoveWhenStale?.let { "labels-to-remove-when-stale" to it.joinToString(",") },
labelsToRemoveWhenUnstale?.let { "labels-to-remove-when-unstale" to it.joinToString(",")
},
ignoreUpdates?.let { "ignore-updates" to it.toString() },
ignoreIssueUpdates?.let { "ignore-issue-updates" to it.toString() },
ignorePrUpdates?.let { "ignore-pr-updates" to it.toString() },
includeOnlyAssigned?.let { "include-only-assigned" to it.toString() },
*_customInputs.toList().toTypedArray(),
).toTypedArray()
)
override fun buildOutputObject(stepId: String): Outputs = Outputs(stepId)
public sealed class Days(
public val integerValue: Int,
) {
public class Value(
requestedValue: Int,
) : StaleV9.Days(requestedValue)
public object Never : StaleV9.Days(-1)
}
public sealed class CloseIssueReason(
public val stringValue: String,
) {
public object Completed : StaleV9.CloseIssueReason("completed")
public object NotPlanned : StaleV9.CloseIssueReason("not_planned")
public class Custom(
customStringValue: String,
) : StaleV9.CloseIssueReason(customStringValue)
}
public class Outputs(
stepId: String,
) : Action.Outputs(stepId) {
/**
* List of all closed issues and pull requests.
*/
public val closedIssuesPrs: String = "steps.$stepId.outputs.closed-issues-prs"
/**
* List of all staled issues and pull requests.
*/
public val staledIssuesPrs: String = "steps.$stepId.outputs.staled-issues-prs"
}
}