@@ -53,7 +53,7 @@ Please consider [sponsoring the project](https://github.com/sponsors/srvaroa) if
53
53
### How to trigger action
54
54
55
55
To trigger the action on events, add a file ` .github/workflows/main.yml `
56
- to your repository:
56
+ to your repository:
57
57
58
58
``` yaml
59
59
name : Label PRs
@@ -294,7 +294,7 @@ With this config, the behaviour changes:
294
294
295
295
# # Conditions
296
296
297
- Below are the conditions currently supported in label matchers, in
297
+ Below are the conditions currently supported in label matchers, in
298
298
alphabetical order. Some important considerations :
299
299
300
300
* Conditions evaluate only when they are explicitly added in
@@ -308,20 +308,29 @@ alphabetical order. Some important considerations:
308
308
309
309
# ## Age (PRs and Issues) <a name="age" />
310
310
311
- This condition is satisfied when the age of the PR or Issue are larger than
312
- the given one. The age is calculated from the creation date.
311
+ This condition evaluates the creation date of the PR or Issue.
313
312
314
- If you're looking to evaluate on the modification date of the issue or PR,
313
+ If you're looking to evaluate on the modification date of the issue or PR,
315
314
check on <a href="#last-modified" ></a>
316
315
317
316
This condition is best used when with a <a href="#schedule">schedule trigger</a>.
318
317
319
- Example :
318
+ Examples :
319
+
320
+ ` ` ` yaml
321
+ age-range:
322
+ at-most: 1d
323
+ ` ` `
324
+
325
+ Will label PRs or issues that were created at most one day ago.
320
326
321
327
` ` ` yaml
322
- age: 1d
328
+ age-range:
329
+ at-least: 1w
323
330
` ` `
324
331
332
+ Will label PRs or issues that were created at least one week ago.
333
+
325
334
The syntax for values is based on a number, followed by a suffix :
326
335
327
336
* s: seconds
@@ -412,7 +421,7 @@ This condition is satisfied when any of the PR files matches on the
412
421
given regexs.
413
422
414
423
` ` ` yaml
415
- files:
424
+ files:
416
425
- "cmd\\ /.*_tests.go"
417
426
- ".*\\ /subfolder\\ /.*\\ .md"
418
427
` ` `
@@ -425,9 +434,9 @@ and therefore must be escaped itself to appear as a literal in the regex.
425
434
426
435
# ## Last Modified (PRs and Issues) <a name="last-modified" />
427
436
428
- This condition evaluates the modification date of the PR or Issue.
437
+ This condition evaluates the modification date of the PR or Issue.
429
438
430
- If you're looking to evaluate on the creation date of the issue or PR,
439
+ If you're looking to evaluate on the creation date of the issue or PR,
431
440
check on <a href="#age" ></a>
432
441
433
442
This condition is best used when with a <a href="#schedule">schedule trigger</a>.
@@ -462,19 +471,19 @@ For example, `2d` means 2 days, `4w` means 4 weeks, and so on.
462
471
463
472
This condition is satisfied when the [mergeable
464
473
state](https://developer.github.com/v3/pulls/#response-1) matches that
465
- of the PR.
474
+ of the PR.
466
475
467
476
` ` ` yaml
468
477
mergeable: True
469
478
` ` `
470
479
471
- Will match if the label is mergeable.
480
+ Will match if the label is mergeable.
472
481
473
482
` ` ` yaml
474
483
mergeable: False
475
484
` ` `
476
485
477
- Will match if the label is not mergeable.
486
+ Will match if the label is not mergeable.
478
487
479
488
# ## Size (PRs only) <a name="size" />
480
489
@@ -518,7 +527,7 @@ file or a Regex expression:
518
527
size:
519
528
exclude-files: ["yarn.lock", "\\ /root\\ /.+\\ /test.md"]
520
529
above: 100
521
- ` ` `
530
+ ` ` `
522
531
523
532
This condition will apply the `L` label if the diff is above 100 lines,
524
533
but NOT taking into account changes in `yarn.lock`, or any `test.md`
0 commit comments