gitsource: add repoinfo HTMLURL
This commit is contained in:
parent
6e8d467c80
commit
47b7c5040f
@ -392,6 +392,7 @@ func fromGiteaRepo(rr *gitea.Repository) *gitsource.RepoInfo {
|
||||
return &gitsource.RepoInfo{
|
||||
ID: strconv.FormatInt(rr.ID, 10),
|
||||
Path: path.Join(rr.Owner.UserName, rr.Name),
|
||||
HTMLURL: rr.HTMLURL,
|
||||
SSHCloneURL: rr.SSHURL,
|
||||
HTTPCloneURL: rr.CloneURL,
|
||||
}
|
||||
|
@ -387,6 +387,7 @@ func fromGithubRepo(rr *github.Repository) *gitsource.RepoInfo {
|
||||
return &gitsource.RepoInfo{
|
||||
ID: strconv.FormatInt(*rr.ID, 10),
|
||||
Path: path.Join(*rr.Owner.Login, *rr.Name),
|
||||
HTMLURL: *rr.HTMLURL,
|
||||
SSHCloneURL: *rr.SSHURL,
|
||||
HTTPCloneURL: *rr.CloneURL,
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ type Client struct {
|
||||
oauth2Secret string
|
||||
}
|
||||
|
||||
// fromCommitStatus converts a gitsource commit status to a gitea commit status
|
||||
// fromCommitStatus converts a gitsource commit status to a gitlab commit status
|
||||
func fromCommitStatus(status gitsource.CommitStatus) gitlab.BuildStateValue {
|
||||
switch status {
|
||||
case gitsource.CommitStatusPending:
|
||||
@ -279,6 +279,7 @@ func fromGitlabRepo(rr *gitlab.Project) *gitsource.RepoInfo {
|
||||
return &gitsource.RepoInfo{
|
||||
ID: strconv.Itoa(rr.ID),
|
||||
Path: rr.PathWithNamespace,
|
||||
HTMLURL: rr.WebURL,
|
||||
SSHCloneURL: rr.SSHURLToRepo,
|
||||
HTTPCloneURL: rr.HTTPURLToRepo,
|
||||
}
|
||||
|
@ -70,6 +70,7 @@ type Oauth2Source interface {
|
||||
type RepoInfo struct {
|
||||
ID string
|
||||
Path string
|
||||
HTMLURL string
|
||||
SSHCloneURL string
|
||||
HTTPCloneURL string
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user