Skip to content

Commit ba31dea

Browse files
committed
gerritstatusupdater: add logic for handling Dispatch-Trailer
If we receive an event for a commit that contains a Dispatch-Trailer, then decode that trailer in preference to trying to parse information from the branch name for the event. There is a lot going on in this CL. Ideally it would have been split into separate CLs for easier review etc. However, we have no unit/integration tests for gerritstatusupdater. The only way we can test the thing is to hook it up locally using ngrok and fire some events through it with real CI builds on GitHub. Splitting up this CL into multiple CLs would have required doing that manual testing many times over. So hopefully the assurance that this has been tested heavily locally, in all three modes of GERRITSTATUSUPDATER_DISPATCH_TRAILER_MODE is sufficient assurance. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: I3a3a5a9b4e4efd3745e67b9ebd32badb950d95f5
1 parent 14e8ce0 commit ba31dea

File tree

5 files changed

+407
-81
lines changed

5 files changed

+407
-81
lines changed

go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ require (
77
github.com/andygrunwald/go-gerrit v0.0.0-20220917070846-2e881e2fb2b5
88
github.com/apex/gateway v1.1.2
99
github.com/aws/aws-lambda-go v1.32.1
10+
github.com/google/go-cmp v0.5.8
1011
github.com/google/go-github/v45 v45.2.0
1112
github.com/rogpeppe/testscript v1.1.0
1213
golang.org/x/mod v0.6.0-dev.0.20220818022119-ed83ed61efb9

go.sum

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs
2121
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
2222
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
2323
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
24+
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
2425
github.com/google/go-github/v45 v45.2.0 h1:5oRLszbrkvxDDqBCNj2hjDZMKmvexaZ1xw/FCD+K3FI=
2526
github.com/google/go-github/v45 v45.2.0/go.mod h1:FObaZJEDSTa/WGCzZ2Z3eoCDXWJKMenWWTrd8jrta28=
2627
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=

0 commit comments

Comments
 (0)