Skip to content
Open
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
10 changes: 10 additions & 0 deletions git-grok
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ T = TypeVar("T")
class Main:
settings: Settings | None = None
in_rebase_interactive: InRebaseInteractiveData | None = None
draft: bool = False
debug: bool = False
debug_force_push_branches: bool = False
debug_skip_update_existing_prs: bool = False
Expand Down Expand Up @@ -353,6 +354,12 @@ class Main:
action="store_true",
help="if passed, forces all branches to be re-created and re-pushed",
)
parser.add_argument(
"--draft",
default=False,
action="store_true",
help="create pull requests as drafts",
)
args = parser.parse_args()

self.settings_load()
Expand All @@ -361,6 +368,7 @@ class Main:
os.environ.get(INTERNAL_IN_REBASE_INTERACTIVE_VAR, "")
)

self.draft = args.draft
self.debug = args.debug
self.debug_force_push_branches = args.debug_force_push_branches
self.debug_skip_update_existing_prs = bool(
Expand Down Expand Up @@ -645,6 +653,7 @@ class Main:
if self.debug_force_push_branches
else []
),
*(["--draft"] if self.draft else []),
]
)
todo = "".join(
Expand Down Expand Up @@ -931,6 +940,7 @@ class Main:
"gh",
"pr",
"create",
*(["--draft"] if self.draft else []),
"--base",
base_branch,
"--head",
Expand Down