// IsUpToDate checks whether Repository is configured with given RepositoryParameters.
IsUpToDate checks whether Repository is configured with given RepositoryParameters.
// IsUpToDate checks whether Repository is configured with given RepositoryParameters .
func IsUpToDate(rp *v1alpha1.RepositoryParameters, observed *github.Repository, name string) (bool, error) {
	generated, err := copystructure.Copy(observed)
	if err != nil {
		return true, errors.Wrap(err, errCheckUpToDate)
	}
	clone, ok := generated.(*github.Repository)
	if !ok {
		return true, errors.New(errCheckUpToDate)
	}
	desired := OverrideParameters(*rp, *clone, name)
	return cmp.Equal(
		desired,
		*observed,
		cmpopts.IgnoreFields(github.Repository{}, "AutoInit"),
	), nil
}
func IsUpToDate ( rp * v1alpha1 . RepositoryParameters , observed * github . Repository , name string ) ( bool , error ) { generated , err := copystructure . Copy ( observed ) if err != nil { return true , errors . Wrap ( err , errCheckUpToDate ) } clone , ok := generated . ( * github . Repository ) if ! ok { return true , errors . New ( errCheckUpToDate ) } desired := OverrideParameters ( * rp , * clone , name ) return cmp . Equal ( desired , * observed , cmpopts . IgnoreFields ( github . Repository { } , " " ) , ) , nil }
IsUpToDate checks whether Repository is configured with given RepositoryParameters.
IsUpToDate checks whether Repository is configured with given RepositoryParameters .