Skip to content

Commit 495a5f8

Browse files
authored
fix relative imports and --target setting (#13)
1 parent 3f1e8e5 commit 495a5f8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/stack_pr/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .cli import main
1+
from stack_pr.cli import main
22

33
if __name__ == "__main__":
44
main()

src/stack_pr/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@
5353
import re
5454
from subprocess import SubprocessError
5555

56-
from .git import (
56+
from stack_pr.git import (
5757
branch_exists,
5858
check_gh_installed,
5959
get_current_branch_name,
6060
get_gh_username,
6161
get_uncommitted_changes,
6262
)
63-
from .shell_commands import get_command_output, run_shell_command
63+
from stack_pr.shell_commands import get_command_output, run_shell_command
6464
from typing import List, NamedTuple, Optional, Pattern
6565

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

0 commit comments

Comments
 (0)