File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ require (
35
35
cloud.google.com/go/compute v1.23.3 // indirect
36
36
cloud.google.com/go/compute/metadata v0.2.3 // indirect
37
37
cloud.google.com/go/iam v1.1.5 // indirect
38
- github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
39
38
github.com/MakeNowJust/heredoc v1.0.0 // indirect
40
39
github.com/Masterminds/goutils v1.1.1 // indirect
41
40
github.com/Masterminds/semver/v3 v3.2.0 // indirect
Original file line number Diff line number Diff line change @@ -119,16 +119,24 @@ func (l *githubFromToPRLister) listPRs() ([]pr, error) {
119
119
return prs , nil
120
120
}
121
121
122
- var mergeCommitMessage = regexp .MustCompile (`(?m)^Merge pull request #(\d+) .*$` )
122
+ var (
123
+ mergeCommitMessage = regexp .MustCompile (`(?m)^Merge pull request #(\d+) .*$` )
124
+ tideSquashedCommitMessage = regexp .MustCompile (`(?m)^.+\(#(?P<number>\d+)\)$` )
125
+ )
123
126
124
127
func buildSetOfPRNumbers (commits []githubCommitNode ) map [string ]struct {} {
125
128
prNumbers := make (map [string ]struct {})
126
129
for _ , commit := range commits {
127
130
match := mergeCommitMessage .FindStringSubmatch (commit .Commit .Message )
128
- if len (match ) != 2 {
131
+ if len (match ) == 2 {
132
+ prNumbers [match [1 ]] = struct {}{}
129
133
continue
130
134
}
131
- prNumbers [match [1 ]] = struct {}{}
135
+
136
+ match = tideSquashedCommitMessage .FindStringSubmatch (commit .Commit .Message )
137
+ if len (match ) == 2 {
138
+ prNumbers [match [1 ]] = struct {}{}
139
+ }
132
140
}
133
141
134
142
return prNumbers
You can’t perform that action at this time.
0 commit comments