So I have the next code, that returns me the array with 2 parents of merge commit:
mergeCommit, _, err := app.Github.Git.GetCommit(owner, repoName, c.String("merge-commit"))
if err != nil {
return err
}
What i need to do is add the line, that will check if the entered commit is an actually merge one. It should have exactly 2 parent commits, in other way it is not a merge commit. But unfortunately I can`t write it :( Please help somebody, if can.
Aucun commentaire:
Enregistrer un commentaire