Skip to content

Commit

Permalink
fix relative imports and --target setting
Browse files Browse the repository at this point in the history
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
  • Loading branch information
salexspb committed Aug 8, 2024
1 parent 3f1e8e5 commit 246ab18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/stack_pr/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .cli import main
from stack_pr.cli import main

if __name__ == "__main__":
main()
6 changes: 3 additions & 3 deletions src/stack_pr/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@
import re
from subprocess import SubprocessError

from .git import (
from stack_pr.git import (
branch_exists,
check_gh_installed,
get_current_branch_name,
get_gh_username,
get_uncommitted_changes,
)
from .shell_commands import get_command_output, run_shell_command
from stack_pr.shell_commands import get_command_output, run_shell_command
from typing import List, NamedTuple, Optional, Pattern

# A bunch of regexps for parsing commit messages and PR descriptions
Expand Down Expand Up @@ -743,7 +743,7 @@ def deduce_base(args: CommonArgs) -> CommonArgs:
if args.base:
return args
deduced_base = get_command_output(
["git", "merge-base", args.head, f"{args.remote}/main"]
["git", "merge-base", args.head, f"{args.remote}/{args.target}"]
)
return CommonArgs(deduced_base, args.head, args.remote, args.target)

Expand Down

0 comments on commit 246ab18

Please sign in to comment.