Skip to content

Commit

Permalink
cmd/cueckoo: fix change ID pattern
Browse files Browse the repository at this point in the history
Without the parens around the pattern, this will match any
git commit that starts with 4 decimal digits. I suspect
that wasn't the intention.

Signed-off-by: Roger Peppe <[email protected]>
Change-Id: Id270f9a1a050dd7d63122ae7dcd96db926d1f1f5
Reviewed-on: https://review.gerrithub.io/c/cue-sh/tools/+/1176396
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Daniel Martí <[email protected]>
  • Loading branch information
rogpeppe committed Feb 2, 2024
1 parent 556379a commit 3762cbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/cueckoo/cmd/cltrigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func newCLTrigger(cmd *Command, cfg *config, b builder) *cltrigger {
// We only really care about CL numbers and Change-ID identifiers from git commit trailers,
// since those are what a human user is most likely going to find useful.
// The long forms, like "project~branch~I1234..." are far too cumbersome.
var rxChangeID = regexp.MustCompile(`^[1-9][0-9]{3,}|I[0-9a-f]{40}$`)
var rxChangeID = regexp.MustCompile(`^([1-9][0-9]{3,}|I[0-9a-f]{40})$`)

func (c *cltrigger) run() (err error) {
var changeIDs []revision
Expand Down

0 comments on commit 3762cbe

Please sign in to comment.