Skip to content

Commit 95a5ce9

Browse files
authored
Add branch name to PR title in arch migrators (#5438)
1 parent 3488f6d commit 95a5ce9

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

conda_forge_tick/migrators/arch.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,12 @@ def migrate(
185185
return muid
186186

187187
def pr_title(self, feedstock_ctx: FeedstockContext) -> str:
188-
return "Arch Migrator"
188+
title = "Arch Migrator"
189+
branch = feedstock_ctx.attrs.get("branch", "main")
190+
if branch not in ["main", "master"]:
191+
return f"[{branch}] " + title
192+
else:
193+
return title
189194

190195
def pr_body(
191196
self, feedstock_ctx: ClonedFeedstockContext, add_label_text: bool = False
@@ -362,7 +367,12 @@ def __init__(self, *args, **kwargs):
362367
super().__init__(*args, **kwargs)
363368

364369
def pr_title(self, feedstock_ctx: FeedstockContext) -> str:
365-
return "ARM OSX Migrator"
370+
title = "ARM OSX Migrator"
371+
branch = feedstock_ctx.attrs.get("branch", "main")
372+
if branch not in ["main", "master"]:
373+
return f"[{branch}] " + title
374+
else:
375+
return title
366376

367377
def pr_body(
368378
self, feedstock_ctx: ClonedFeedstockContext, add_label_text: bool = True
@@ -397,7 +407,12 @@ def __init__(self, *args, **kwargs):
397407
super().__init__(*args, **kwargs)
398408

399409
def pr_title(self, feedstock_ctx: FeedstockContext) -> str:
400-
return "Support Windows ARM64 platform"
410+
title = "Support Windows ARM64 platform"
411+
branch = feedstock_ctx.attrs.get("branch", "main")
412+
if branch not in ["main", "master"]:
413+
return f"[{branch}] " + title
414+
else:
415+
return title
401416

402417
def pr_body(
403418
self, feedstock_ctx: ClonedFeedstockContext, add_label_text: bool = True

0 commit comments

Comments
 (0)