mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-03-15 17:13:46 +01:00
Forge Github Org: Use login instead of name (#2104)
For "woodpecker-ci" the `name` is "Woodpecker CI" and the `login` is "woodpecker-ci" Fixes #2092 This was causing the organization lookup to fail, because it looks up using the `login`, when it did not find the organization, it would try to create it. The creation would fail, because it uses the `name`, and an organization with that `name` already exists. Resulting in: ``` pq: duplicate key value violates unique constraint "UQE_orgs_name" ```
This commit is contained in:
committed by
GitHub
parent
d09c418941
commit
8487ed92cd
@@ -717,7 +717,7 @@ func (g *GitLab) Org(ctx context.Context, u *model.User, owner string) (*model.O
|
||||
}
|
||||
|
||||
return &model.Org{
|
||||
Name: groups[0].Name,
|
||||
Name: groups[0].FullPath,
|
||||
Private: groups[0].Visibility != gitlab.PublicVisibility,
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user