You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/pullvet/README.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,26 +13,29 @@ Just give me a simple Golang program that reads GitHub Actions v2 event json fil
13
13
## Usage
14
14
15
15
```
16
-
Usage of bin/pullvet:
16
+
$ bin/actions pullvet -help
17
+
Usage of pullvet:
17
18
-any-milestone
18
19
If set, pullvet fails whenever the pull request misses a milestone
19
20
-label value
20
21
Required label. When provided multiple times, pullvet succeeds if one or more of required labels exist
22
+
-label-match value
23
+
Regexp pattern to match label name against. If set, pullvet tries to find the label matches any of patterns and fail if none matched.
21
24
-milestone string
22
25
If set, pullvet fails whenever the pull request misses a milestone
26
+
-milestone-match value
27
+
Regexp pattern to match milestone title against. If set, pullvet tries to find the milestone matches any of patterns and fail if none matched.
23
28
-note
24
29
Require a note with the specified title. pullvet fails whenever the pr misses the note in the pr description. A note can be written in Markdown as: **<title>**:
25
30
`
26
31
<body>
27
32
```
28
-
-note-regex
29
-
Regexp pattern of each note(including the title and the body). Default: [\*]*([^\*:]+)[\*]*:\s`
Copy file name to clipboardExpand all lines: pkg/pullvet/pullvet.go
+47-3Lines changed: 47 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,9 @@ type Command struct {
23
23
labels cmd.StringSlice
24
24
noteTitles cmd.StringSlice
25
25
26
+
labelMatches cmd.StringSlice
27
+
milestoneMatches cmd.StringSlice
28
+
26
29
noteRegexstring
27
30
28
31
milestonestring
@@ -45,13 +48,15 @@ func New() *Command {
45
48
}
46
49
47
50
func (c*Command) AddFlags(fs*flag.FlagSet) {
48
-
fs.BoolVar(&c.requireAny, "require-any", true, "If set, pullvet fails whenever the pull request was unable to fullfill all the requirements. Default: true")
49
-
fs.BoolVar(&c.requireAll, "require-all", false, "If set, pullvet fails whenever the pull request was unable to fullfill any of the requirements. Default: false")
51
+
fs.BoolVar(&c.requireAny, "require-any", true, "If set, pullvet fails whenever the pull request was unable to fullfill all the requirements")
52
+
fs.BoolVar(&c.requireAll, "require-all", false, "If set, pullvet fails whenever the pull request was unable to fullfill any of the requirements")
50
53
fs.Var(&c.labels, "label", "Required label. When provided multiple times, pullvet succeeds if one or more of required labels exist")
51
54
fs.BoolVar(&c.anyMilestone, "any-milestone", false, "If set, pullvet fails whenever the pull request misses a milestone")
52
55
fs.StringVar(&c.milestone, "milestone", "", "If set, pullvet fails whenever the pull request misses a milestone")
56
+
fs.Var(&c.labelMatches, "label-match", "Regexp pattern to match label name against. If set, pullvet tries to find the label matches any of patterns and fail if none matched.")
57
+
fs.Var(&c.milestoneMatches, "milestone-match", "Regexp pattern to match milestone title against. If set, pullvet tries to find the milestone matches any of patterns and fail if none matched.")
53
58
fs.Var(&c.noteTitles, "note", "Require a note with the specified title. pullvet fails whenever the pr misses the note in the pr description. A note can be written in Markdown as: **<title>**:\n```\n<body>\n```")
54
-
fs.StringVar(&c.noteRegex, "note-regex", defaultNoteRegex, "Regexp pattern of each note(including the title and the body). Default: "+defaultNoteRegex)
59
+
fs.StringVar(&c.noteRegex, "note-regex", defaultNoteRegex, "Regexp pattern of each note(including the title and the body)")
0 commit comments