func checkExistingStatus(gc gitHubClient, l *logrus.Entry, org, repo, sha string) (string, error) {
	statuses, err := gc.ListStatuses(org, repo, sha)
	if err != nil {
		return "", fmt.Errorf("error listing pull request statuses: %v", err)
	}

	existingStatus := ""
	for _, status := range statuses {
		if status.Context != dcoContextName {
			continue
		}
		existingStatus = status.State
		break
	}
	l.Debugf("Existing DCO status context status is %q", existingStatus)
	return existingStatus, nil
}
func checkExistingStatus(gc gitHubClient, l *logrus.Entry, org, repo, sha string) (string, error) {
	statuses, err := gc.ListStatuses(org, repo, sha)
	if err != nil {
		return "", fmt.Errorf("error listing pull request statuses: %v", err)
	}

	existingStatus := ""
	for _, status := range statuses {
		if status.Context != dcoContextName {
			continue
		}
		existingStatus = status.State
		break
	}
	l.Debugf("Existing DCO status context status is %q", existingStatus)
	return existingStatus, nil
}
func checkExistingStatus ( gc gitHubClient , l * logrus . Entry , org , repo , sha string ) ( string , error ) { statuses , err := gc . ListStatuses ( org , repo , sha ) if err != nil { return " " , fmt . Errorf ( " " , err ) } existingStatus := " " for _ , status := range statuses { if status . Context != dcoContextName { continue } existingStatus = status . State break } l . Debugf ( " " , existingStatus ) return existingStatus , nil }
// checkExistingStatus will retrieve the current status of the DCO context for
// the provided SHA.
checkExistingStatus will retrieve the current status of the DCO context for the provided SHA .