Skip to content

Commit 218c466

Browse files
committed
maybe fix commit triggers
1 parent 1be66dc commit 218c466

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

buildbot_nix/buildbot_nix/gitlab_project.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class NamespaceData(BaseModel):
3939

4040
class RepoData(BaseModel):
4141
id: int
42+
name: str
4243
name_with_namespace: str
4344
path: str
4445
path_with_namespace: str
@@ -86,7 +87,12 @@ def owner(self) -> str:
8687

8788
@property
8889
def name(self) -> str:
89-
return self.data.name_with_namespace
90+
# This needs to match what buildbot uses in change hooks to map an incoming change
91+
# to a project: https://github.com/buildbot/buildbot/blob/master/master/buildbot/www/hooks/gitlab.py#L45
92+
# I suspect this will result in clashes if you have identically-named projects in
93+
# different namespaces, as is totally valid in gitlab.
94+
# Using self.data.name_with_namespace would be more robust.
95+
return self.data.name
9096

9197
@property
9298
def url(self) -> str:

0 commit comments

Comments
 (0)