package com.google.graphgeckos.dashboard.fetchers;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)
public class CommitData {
  private final String commitHash;
  private final String timestamp;
  private final String branch;

  CommitData(String commitHash, String timestamp, String branch) {
    this.commitHash = commitHash;
    this.timestamp = timestamp;
    this.branch = branch;
  }

  public String getBranch() {
    return branch;
  }

  public String getCommitHash() {
    return commitHash;
  }

  public String getTimestamp() {
    return timestamp;
  }
}

@@ -106,16 +106,93 @@
 perties;
+%0Aimport com.fasterxml.jackson.annotation.JsonProperty;%0A%0Aimport java.util.Map;
 %0A%0A@JsonI
@@ -255,16 +255,44 @@
 tData %7B%0A
+  %0A  @JsonProperty(%22after%22)%0A
   privat
@@ -318,16 +318,17 @@
 itHash;%0A
+%0A
   privat
@@ -325,30 +325,24 @@
 %0A%0A  private 
-final 
 String times
@@ -346,16 +346,40 @@
 mestamp;
+%0A%0A  @JsonProperty(%22ref%22)
 %0A  priva
@@ -405,16 +405,173 @@
 nch;%0A%0A  
+@JsonProperty(%22repository%22)%0A  private void unpackTimestamp(Map%3CString, Object%3E repository) %7B%0A    timestamp = repository.get(%22updated-at%22).toString();%0A  %7D%0A%0A  
 CommitDa
@@ -594,26 +594,8 @@
 Hash
-, String timestamp
 , St
@@ -647,40 +647,8 @@
 sh;%0A
-    this.timestamp = timestamp;%0A
     
@@ -848,11 +848,158 @@
 amp;%0A  %7D
+%0A%0A  @Override%0A  public String toString() %7B%0A    return String.format(%22branch: %25s, comitHash: %25s, timestamp, %25s%22, branch, commitHash, timestamp);%0A  %7D
 %0A%7D%0A

create POJO for commit data