Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/stacky/stacky.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ def create_gh_pr(b: StackBranch, prefix: str):
)


def generate_stack_string(forest: BranchesTreeForest) -> str:
def generate_stack_string(forest: BranchesTreeForest, current_branch: StackBranch) -> str:
"""Generate a string representation of the PR stack"""
stack_lines = []

Expand All @@ -987,7 +987,10 @@ def add_branch_to_stack(b: StackBranch, depth: int):
if b.open_pr_info:
pr_info = f" (#{b.open_pr_info['number']})"

stack_lines.append(f"{indent}- {b.name}{pr_info}")
# Add arrow indicator for current branch (the one this PR represents)
current_indicator = " ← (CURRENT PR)" if b.name == current_branch.name else ""

stack_lines.append(f"{indent}- {b.name}{pr_info}{current_indicator}")

def traverse_tree(tree: BranchesTree, depth: int):
for _, (branch, children) in tree.items():
Expand Down Expand Up @@ -1051,7 +1054,7 @@ def add_or_update_stack_comment(branch: StackBranch, forest: BranchesTreeForest)
)

current_body = pr_data.get("body", "")
stack_string = generate_stack_string(forest)
stack_string = generate_stack_string(forest, branch)

if not stack_string:
return
Expand Down