about summary refs log tree commit diff
path: root/ops/besadii/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'ops/besadii/main.go')
-rw-r--r--ops/besadii/main.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/ops/besadii/main.go b/ops/besadii/main.go
index 7c1626c7450e..b31d3e426ae3 100644
--- a/ops/besadii/main.go
+++ b/ops/besadii/main.go
@@ -297,6 +297,12 @@ func ignoreFlags(ignore []string) {
 // Extract the username & email from Gerrit's uploader flag and set it
 // on the trigger struct, for display in Buildkite.
 func extractChangeUploader(uploader string, trigger *buildTrigger) error {
+	// Gerrit passes the uploader in another extra layer of quotes.
+	uploader, err := strconv.Unquote(uploader)
+	if err != nil {
+		return fmt.Errorf("failed to unquote email - forgot quotes on manual invocation?: %w", err)
+	}
+
 	// Extract the uploader username & email from the input passed by
 	// Gerrit (in RFC 5322 format).
 	addr, err := mail.ParseAddress(uploader)