// GetReposURL returns the ReposURL field if it's non-nil, zero value otherwise.
760844
func (u *User) GetReposURL() string {
	if u == nil || u.ReposURL == nil {
		return ""
	}
	return *u.ReposURL
}
609709
func (r *Repository) GetMirrorURL() string {
	if r == nil || r.MirrorURL == nil {
		return ""
	}
	return *r.MirrorURL
}
1201273
func GetAbsURL(req *http.Request) url.URL {
	var result url.URL

	if req.URL.IsAbs() {
		return *req.URL
	}

	if domain := req.Header.Get("Origin"); domain != "" {
		parseResult, _ := url.Parse(domain)
		result = *parseResult
	}

	result.Parse(req.RequestURI)
	return result
}
781181
func (r *Repository) GetKeysURL() string {
	if r == nil || r.KeysURL == nil {
		return ""
	}
	return *r.KeysURL
}
151725
func (r *Repository) GetGitURL() string {
	if r == nil || r.GitURL == nil {
		return ""
	}
	return *r.GitURL
}
1019010
func (r *Repository) GetBranchesURL() string {
	if r == nil || r.BranchesURL == nil {
		return ""
	}
	return *r.BranchesURL
}
628707
func (client Client) GetRepository(projectKey, repositorySlug string) (Repository, error) {
	retry := retry.New(3, retry.DefaultBackoffFunc)

	var r Repository
	work := func() error {
		req, err := http.NewRequest("GET", fmt.Sprintf("%s/rest/api/1.0/projects/%s/repos/%s", client.baseURL.String(), projectKey, repositorySlug), nil)
		if err != nil {
			return err
		}
		req.Header.Set("Accept", "application/json")
		// use credentials if we have them.  If not, the repository must be public.
		if client.userName != "" && client.password != "" {
			req.SetBasicAuth(client.userName, client.password)
		}

		responseCode, data, err := client.consumeResponse(req)
		if err != nil {
			return err
		}

		if responseCode != http.StatusOK {
			reason := "unhandled reason"
			switch {
			case responseCode == http.StatusNotFound:
				reason = "Not found"
			case responseCode == http.StatusUnauthorized:
				reason = "Unauthorized"
			}
			return errorResponse{StatusCode: responseCode, Reason: reason}
		}

		err = json.Unmarshal(data, &r)
		if err != nil {
			return err
		}
		return nil
	}

	return r, retry.Try(work)
}
810290
func (r *Repository) GetReleasesURL() string {
	if r == nil || r.ReleasesURL == nil {
		return ""
	}
	return *r.ReleasesURL
}
990700
func (db *db) GetRepository(ctx context.Context, repoURL string) (*appsv1.Repository, error) {
	s, err := db.settingsMgr.GetSettings()
	if err != nil {
		return nil, err
	}

	index := getRepositoryIndex(s, repoURL)
	if index < 0 {
		return nil, status.Errorf(codes.NotFound, "repo '%s' not found", repoURL)
	}

	repo, err := db.credentialsToRepository(s.Repositories[index])

	if err != nil {
		return nil, err
	}

	if !repo.HasCredentials() {
		index := getRepositoryCredentialIndex(s, repoURL)
		if index >= 0 {

			credential, err := db.credentialsToRepository(s.RepositoryCredentials[index])

			if err != nil {
				return nil, err
			} else {
				log.WithFields(log.Fields{"repoURL": repo.Repo, "credUrl": credential.Repo}).Info("copying credentials")
				repo.CopyCredentialsFrom(*credential)
			}
		}
	}

	return repo, err
}
1062360
func (r *Repository) GetDownloadsURL() string {
	if r == nil || r.DownloadsURL == nil {
		return ""
	}
	return *r.DownloadsURL
}
132743
func (c *Client) GetRepository(name string) (repository, error) {
	url := fmt.Sprintf("/repository/%s?:name=%s", name, name)
	b, err := c.get(url)
	if err != nil {
		return repository{}, err
	}
	var r repository
	if err := json.Unmarshal(b, &r); err != nil {
		return repository{}, fmt.Errorf("Caught error decoding returned json: %s", err.Error())
	}
	return r, nil
}
969508
func (i *Installation) GetAccessTokensURL() string {
	if i == nil || i.AccessTokensURL == nil {
		return ""
	}
	return *i.AccessTokensURL
}
447592
func (t *Team) GetMembersURL() string {
	if t == nil || t.MembersURL == nil {
		return ""
	}
	return *t.MembersURL
}
443609
func (o *Organization) GetMembersURL() string {
	if o == nil || o.MembersURL == nil {
		return ""
	}
	return *o.MembersURL
}
522304
func (r *Repository) GetGitTagsURL() string {
	if r == nil || r.GitTagsURL == nil {
		return ""
	}
	return *r.GitTagsURL
}
373737
func (r *RepoStats) GetRootRepos() int {
	if r == nil || r.RootRepos == nil {
		return 0
	}
	return *r.RootRepos
}
596419
func (r *Repository) GetURL() string {
	if r == nil || r.URL == nil {
		return ""
	}
	return *r.URL
}