diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d8c030f1..87463e5e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -32,12 +32,13 @@ ], "containerEnv": { "HOST_HOME": "${localEnv:HOME}", - "HOST_INPUT_DIR": "${localEnv:HOME}/ankidecks" + "HOST_INPUT_DIR": "${localEnv:HOME}/ankidecks", + "ENV": "devcontainer" }, "features": { "ghcr.io/devcontainers/features/github-cli:1": {} }, - "postStartCommand": "inv install && export ENV=dev-container" + "postStartCommand": "inv install && gt user pager --disable" // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, // Use 'forwardPorts' to make a list of ports inside the container available locally. diff --git a/personal_mnemonic_medium/subtasks/graphite.py b/personal_mnemonic_medium/subtasks/graphite.py index a326f36a..5f2766c3 100644 --- a/personal_mnemonic_medium/subtasks/graphite.py +++ b/personal_mnemonic_medium/subtasks/graphite.py @@ -7,13 +7,14 @@ def submit_pr(c: inv.Context): c.run("gt sync --delete --force") c.run("gt submit --stack --restack -m --no-edit --publish") - c.run("gt log -s") + c.run("gt log short") def create_branch_from_issue(c: inv.Context, selected_issue: GithubIssue): sanitised_title = sanitise_issue_title(selected_issue.title) branch_title = f"{selected_issue.number}-{sanitised_title}" - c.run(f"gt create {branch_title}") - c.run( - f"git commit --allow-empty -m $'{selected_issue.title}.\n\nFixes #{selected_issue.number}'" + first_commit_str = ( + f"$'{selected_issue.title}.\n\nFixes #{selected_issue.number}'" ) + c.run(f"gt create {branch_title} --all -m {first_commit_str}") + c.run(f"git commit --allow-empty -m {first_commit_str}")