func (o *RetestingOptions) AddFlags(fs *flag.FlagSet) {
	fs.StringVar(&o.RetestingBranch, "retesting-branch", defaultRetestingBranch, "Retesting target branch.")
	fs.IntVar(&o.Retry, "retry", defaultRetestingTimes, "Retry testing times.")
	fs.Var(&o.Contexts, "require-contexts", "Required requireContexts that must be green to merge.")
	fs.DurationVar(&o.Timeout, "timeout", defaultTimeOut, "Test timeout time.")
}
AddFlags injects retesting options into the given FlagSet.
package rerere
import (
	"encoding/json"
	"errors"
	"flag"
	"fmt"
	"io/ioutil"
	"time"
	"github.com/sirupsen/logrus"
	"k8s.io/apimachinery/pkg/util/sets"
	prowflagutil "k8s.io/test-infra/prow/flagutil"
	"k8s.io/test-infra/prow/github"
	"k8s.io/test-infra/prow/pod-utils/downwardapi"
)
const (
	defaultRetestingBranch = "rerere"
	defaultRetestingTimes = 3
	defaultTimeOut = time.Minute * 15
	defaultRetestingLogFileName = ".rerere.json"
)
var defaultCheckPeriod = time.Minute * 1
const (
	checkRunStatusCompleted = "completed"
	checkRunConclusionNeutral = "neutral"
	checkRunConclusionSuccess = "success"
)
type mockCheck = func(log *logrus.Entry, ghc githubClient,
	contexts prowflagutil.Strings, retestingBranch string, org string, repo string) (bool, error)
var check = checkContexts
type RetestingLog struct {
	Job               *downwardapi.JobSpec `json:"job,omitempty"`
	Options           *RetestingOptions    `json:"options,omitempty"`
	CurrentRetryTimes int                  `json:"current_retry_times,omitempty"`
	Time              time.Time            `json:"time,omitempty"`
}
type RetestingOptions struct {
	RetestingBranch string               `json:"retesting-branch,omitempty"`
	Retry           int                  `json:"retry,omitempty"`
	Contexts        prowflagutil.Strings `json:"require_contexts,omitempty"`
	Timeout         time.Duration        `json:"timeout,omitempty"`
}