What

Program must get data from git repository:

  • Files diff
  • Commit names and authors

How

Package design

  type Git interface {
    // Branches returns PR source and target branch
    Branches() (source, target string)
    // Commits returns PR commits
    Commits() []Commit
    // Changes returns PR repository files diff
    Changes() []FileChange
}
  

Few methods to create it:

  • InitPR creates diff between current and target branch (like PR diff)
  • InitLast creates diff for last N current branch commits