File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ const (
4040
4141var (
4242 labelRe = regexp .MustCompile (`(?mi)^/hold(\s.*)?$` )
43- labelCancelRe = regexp .MustCompile (`(?mi)^/(remove-hold|hold\s+cancel|unhold)\s* $` )
43+ labelCancelRe = regexp .MustCompile (`(?mi)^/(remove-hold|hold\s+cancel|unhold)(\s.*)? $` )
4444)
4545
4646type hasLabelFunc func (label string , issueLabels []github.Label ) bool
Original file line number Diff line number Diff line change @@ -93,8 +93,8 @@ func TestHandle(t *testing.T) {
9393 isPR : true ,
9494 },
9595 {
96- name : "requested hold cancel with whitespace " ,
97- body : "/hold cancel " ,
96+ name : "requested hold cancel with a reason " ,
97+ body : "/hold cancel further review has happened and I have whitespace " ,
9898 hasLabel : true ,
9999 shouldLabel : false ,
100100 shouldUnlabel : true ,
@@ -117,8 +117,8 @@ func TestHandle(t *testing.T) {
117117 isPR : true ,
118118 },
119119 {
120- name : "requested unhold with whitespace " ,
121- body : "/unhold " ,
120+ name : "requested unhold with a reason " ,
121+ body : "/unhold further review has happened and I have whitespace " ,
122122 hasLabel : true ,
123123 shouldLabel : false ,
124124 shouldUnlabel : true ,
You can’t perform that action at this time.
0 commit comments