fw_lab_triage_helper: get master and prod autotest commits

TEST=executed the utility and inspected the output
BUG=b:142483690

Change-Id: I45a491d6b170dc6db2071695bb046faf5b857a3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crostestutils/+/1874241
Tested-by: Kevin Shelton <kmshelton@chromium.org>
Reviewed-by: Greg Edelston <gredelston@google.com>
Commit-Queue: Kevin Shelton <kmshelton@chromium.org>
diff --git a/provingground/firmware/fw_lab_triage_helper.go b/provingground/firmware/fw_lab_triage_helper.go
index ca1ac4b..c371adf 100644
--- a/provingground/firmware/fw_lab_triage_helper.go
+++ b/provingground/firmware/fw_lab_triage_helper.go
@@ -38,6 +38,8 @@
 // This is the TCP Port number on which an ssh server listens (in the test image).
 const sshServerPortNumber = 22
 
+const autotestBranchesGerritAPIEndpoint = "https://chromium-review.googlesource.com/a/projects/chromiumos%2Fthird_party%2Fautotest/branches/"
+
 type dut struct {
 	Hostname, Port, Labstation, Board, Model, Status, LockStatus, LockReason string
 }
@@ -99,6 +101,20 @@
 }
 
 func main() {
+	// TODO(kmshelton): Check that gob-curl exists in the user's environment.
+	// "gob-curl" is used instead of net/http due to the complexities of authenticating.
+	branches := [2]string{"master", "prod"}
+	for _, branch := range branches {
+		gerritCmd := exec.Command("gob-curl", autotestBranchesGerritAPIEndpoint+branch)
+		gerritCmdOut, err := gerritCmd.Output()
+		if err != nil {
+			log.Fatalf("gob-curl encountered: %s", err)
+		}
+		fmt.Println(string(gerritCmdOut))
+	}
+	// TODO(kmshelton): Lookup the timestamp associated with the last commits from
+	// the master and prod branches and then calculate the delta.
+
 	duts := []dut{}
 
 	poolPtr := flag.String("pool", "faft-cr50", "A pool of DUTs to operate on.")