Skip to content
Merged
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
26 changes: 22 additions & 4 deletions .claude/commands/submit-time.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
Post a `@holdex pr submit-time` comment on a pull request to record time spent.
Post a `@holdex pr submit-time` or `@holdex pr add-time` comment on a pull request to record time spent.

Check warning on line 1 in .claude/commands/submit-time.md

View workflow job for this annotation

GitHub Actions / checks

MD041

First line in file should be a level 1 heading

Check warning on line 1 in .claude/commands/submit-time.md

View workflow job for this annotation

GitHub Actions / checks

MD013

Paragraph could be normalized to use line length of 80 characters

## Input

Time is provided as `$ARGUMENTS` (e.g. `2h30m`, `1h`, `45m`, `1.5h`).
Time is provided as `$ARGUMENTS` (e.g. `2h30m`, `1h`, `45m`, `1.5h`), optionally
prefixed with `add` to add time on top of a previous submission instead of
replacing it (e.g. `add 1h30m`).

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.
Determine which mode applies:

- No `add` prefix: **submit/update total time** — replaces any previously
recorded time for this PR with the given value.
- `add` prefix: **add time on top of the previous submission** — strip the
`add` prefix to get the time value.

Check warning on line 16 in .claude/commands/submit-time.md

View workflow job for this annotation

GitHub Actions / checks

MD013

List item could be normalized to use line length of 80 characters

Validate the time format — accepted patterns: `15m`, `1h`, `2h30m`, `1.5h`. If
the format is invalid, tell the user and stop.

## Resolve the PR

Expand All @@ -20,8 +30,16 @@

## Post the comment

Submit or update total time:

```bash
gh pr comment <PR_URL> --body "@holdex pr submit-time <TIME>"
```

Add time on top of the previous submission:

```bash
gh pr comment <PR_URL> --body "@holdex pr submit-time $ARGUMENTS"
gh pr comment <PR_URL> --body "@holdex pr add-time <TIME>"
```

Confirm the comment was posted and show the PR URL.
Loading