Skip to content

Commit 22177bd

Browse files
authored
fix: improve placeholder prompt detection (#72)
1 parent b82ec1f commit 22177bd

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ pipx install git-draft[openai]
2121

2222
## Next steps
2323

24+
* MCP bot.
2425
* Mechanism for reporting feedback from a bot, and possibly allowing user to
2526
interactively respond.
26-
* Add MCP bot.
27-
* Store configuration in `gitconfig` as `draft.*` entries. This can be used for
28-
example to set a unique repo ID, and default bot to use per repo (or more
29-
widely via shared `gitconfig` files).

src/git_draft/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def main() -> None: # noqa: PLR0912 PLR0915
210210
editable = False
211211
prompt = edit(
212212
text=drafter.latest_draft_prompt() or _PROMPT_PLACEHOLDER
213-
)
213+
).strip()
214214
if not prompt or prompt == _PROMPT_PLACEHOLDER:
215215
raise ValueError("Aborting: empty or placeholder prompt")
216216
else:

src/git_draft/drafter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _draft_ref(folio_id: int, suffix: int | str) -> str:
4343
return f"refs/drafts/{folio_id}/{suffix}"
4444

4545

46-
_FOLIO_BRANCH_NAMESPACE = "drafts"
46+
_FOLIO_BRANCH_NAMESPACE = "draft"
4747

4848
_FOLIO_UPSTREAM_BRANCH_SUFFIX = "+"
4949

0 commit comments

Comments
 (0)