mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
On set/get of repo make sure forge_id is set and on fetch respected (#5717)
This commit is contained in:
@@ -56,6 +56,7 @@ type Opts struct {
|
||||
|
||||
// Gitlab implements "Forge" interface.
|
||||
type GitLab struct {
|
||||
id int64
|
||||
url string
|
||||
oAuthClientID string
|
||||
oAuthClientSecret string
|
||||
@@ -67,8 +68,9 @@ type GitLab struct {
|
||||
|
||||
// New returns a Forge implementation that integrates with Gitlab, an open
|
||||
// source Git service. See https://gitlab.com
|
||||
func New(opts Opts) (forge.Forge, error) {
|
||||
func New(id int64, opts Opts) (forge.Forge, error) {
|
||||
return &GitLab{
|
||||
id: id,
|
||||
url: opts.URL,
|
||||
oAuthClientID: opts.OAuthClientID,
|
||||
oAuthClientSecret: opts.OAuthClientSecret,
|
||||
@@ -782,7 +784,7 @@ func (g *GitLab) loadMetadataFromMergeRequest(ctx context.Context, tmpRepo *mode
|
||||
return pipeline, nil
|
||||
}
|
||||
|
||||
repo, err := _store.GetRepoNameFallback(tmpRepo.ForgeRemoteID, tmpRepo.FullName)
|
||||
repo, err := _store.GetRepoNameFallback(g.id, tmpRepo.ForgeRemoteID, tmpRepo.FullName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user