// parseArgsRemoteInt is similar to parseArgsStringInt except that it uses the
// string argument as a remote and returns the project name for that remote
parseArgsRemoteInt is similar to parseArgsStringInt except that it uses the
string argument as a remote and returns the project name for that remote
// parseArgsRemoteInt is similar to parseArgsStringInt except that it uses the // string argument as a remote and returns the project name for that remote
func parseArgsRemoteInt(args []string) (string, int64, error) {
	if !git.InsideGitRepo() {
		return "", 0, nil
	}
	remote, num, err := parseArgsStr(args)
	if err != nil {
		return "", 0, err
	}
	if strings.Contains(remote, "/") {
		project, err := lab.FindProject(remote)
		if err == nil {
			return project.PathWithNamespace, int64(project.ID), nil
		}
	}
	ok, err := git.IsRemote(remote)
	if err != nil {
		return "", 0, err
	} else if !ok && remote != "" {
		switch len(args) {
		case 1:
			return "", 0, errors.Errorf("%s is not a valid remote or number", args[0])
		default:
			return "", 0, errors.Errorf("%s is not a valid remote", args[0])
		}
	}
	if err != nil || remote == "" {
		remote = forkedFromRemote
	}
	rn, err := git.PathWithNameSpace(remote)
	if err != nil {
		return "", 0, err
	}
	return rn, num, nil
}
func parseArgsRemoteInt ( args [ ] string ) ( string , int64 , error ) { if ! git . InsideGitRepo ( ) { return " " , 0 , nil } remote , num , err := parseArgsStr ( args ) if err != nil { return " " , 0 , err } if strings . Contains ( remote , " " ) { project , err := lab . FindProject ( remote ) if err == nil { return project . PathWithNamespace , int64 ( project . ID ) , nil } } ok , err := git . IsRemote ( remote ) if err != nil { return " " , 0 , err } else if ! ok && remote != " " { switch len ( args ) { case 1 : return " " , 0 , errors . Errorf ( " " , args [ 0 ] ) default : return " " , 0 , errors . Errorf ( " " , args [ 0 ] ) } } if err != nil || remote == " " { remote = forkedFromRemote } rn , err := git . PathWithNameSpace ( remote ) if err != nil { return " " , 0 , err } return rn , num , nil }
parseArgsRemoteInt is similar to parseArgsStringInt except that it uses the
string argument as a remote and returns the project name for that remote
parseArgsRemoteInt is similar to parseArgsStringInt except that it uses the string argument as a remote and returns the project name for that remote
// check if fullPath