Skip to content

Commit bd593c3

Browse files
committed
feat: use base repo name for mfe name
BB-9955
1 parent e4b545a commit bd593c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/models/request_models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ class PullRequest(BaseModel):
160160
author: str = Field(alias=AliasPath("user", "login"))
161161
body: str | None = None
162162
fork_name: str = Field(alias=AliasPath("head", "repo", "full_name"))
163+
repo_full_name: str = Field(alias=AliasPath("base", "repo", "full_name"))
163164
repo_name: str = Field(alias=AliasPath("base", "repo", "name"))
164165
repo_html_url: str = Field(alias=AliasPath("base", "repo", "html_url"))
165166
branch_name: str = Field(alias=AliasPath("head", "ref"))
@@ -243,7 +244,7 @@ def mfe_name(self) -> str:
243244
"""
244245
Returns a resonable MFE name based on the repository name.
245246
"""
246-
return self.fork_name.split(MFE_REPO_NAME_PREFIX, 1)[-1]
247+
return self.repo_full_name.split(MFE_REPO_NAME_PREFIX, 1)[-1]
247248

248249
def __str__(self) -> str:
249250
"""

0 commit comments

Comments
 (0)