From 37438fe829d15f15bb5023472f80d989b8a8a835 Mon Sep 17 00:00:00 2001 From: Vadim Zolotokrylin Date: Thu, 14 May 2026 10:55:08 +0800 Subject: [PATCH 1/2] feat(command): submit PR time via @holdex bot --- .claude/commands/submit-time.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .claude/commands/submit-time.md diff --git a/.claude/commands/submit-time.md b/.claude/commands/submit-time.md new file mode 100644 index 0000000..38a3b72 --- /dev/null +++ b/.claude/commands/submit-time.md @@ -0,0 +1,27 @@ +Post a `@holdex pr submit-time` comment on a pull request to record time spent. + +## Input + +Time is provided as `$ARGUMENTS` (e.g. `2h30m`, `1h`, `45m`, `1.5h`). + +If `$ARGUMENTS` is empty, ask the user for the time before proceeding. + +Validate the format — accepted patterns: `15m`, `1h`, `2h30m`, `1.5h`. If the format is invalid, tell the user and stop. + +## Resolve the PR + +Detect the current PR from the git worktree: + +```bash +gh pr list --head "$(git branch --show-current)" --json number,url,title --limit 1 +``` + +If no PR is found for the current branch, ask the user for the PR number or URL. + +## Post the comment + +```bash +gh pr comment --repo --body "@holdex pr submit-time $ARGUMENTS" +``` + +Confirm the comment was posted and show the PR URL. From fcb1c94f39e4dc6361848a5bedd8bc2635e9313c Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Thu, 14 May 2026 07:34:32 +0000 Subject: [PATCH 2/2] fix: apply CodeRabbit auto-fixes Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit --- .claude/commands/submit-time.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude/commands/submit-time.md b/.claude/commands/submit-time.md index 38a3b72..e7d1a2f 100644 --- a/.claude/commands/submit-time.md +++ b/.claude/commands/submit-time.md @@ -21,7 +21,7 @@ If no PR is found for the current branch, ask the user for the PR number or URL. ## Post the comment ```bash -gh pr comment --repo --body "@holdex pr submit-time $ARGUMENTS" +gh pr comment --body "@holdex pr submit-time $ARGUMENTS" ``` Confirm the comment was posted and show the PR URL.