Commit graph

45 commits

Author SHA1 Message Date
3df76b89df rename Issue and Comment timestamp to creation_time
This is to make room for a second timestamp that records when the issue
was marked Done.
2025-07-16 21:50:44 -06:00
20c17f281b ent list FILTER: the filter now takes multiple strings
This is instead of a single big string with chunks separated by ":".

":" is used in RFC 3339 date-time strings (like "2025-07-16 21:23:44
-06:00"), so it's inconvenient to reserve ":" to be the chunk separator.

I'm not super wedded to this new Vec<String> way of doing the filter,
but it seems fine and convenient for now.
2025-07-16 21:50:44 -06:00
d2df1bc1e8 move entomologist database to new library file
fixes: d3a705245bd69aa56524b80b5ae0bc26
2025-07-13 14:06:04 -06:00
9d4409c008 ent list: add filtering based on tags 2025-07-12 14:24:40 -06:00
28db7669f4 ent: better ent list --help 2025-07-12 14:24:20 -06:00
88025c5dae add `ent tag ISSUE [[-]TAG] 2025-07-12 12:28:59 -06:00
4307fc8941 ent list: show tags 2025-07-12 12:28:59 -06:00
65316da0bd teach ent edit to edit Comments as well as Issues 2025-07-11 20:30:50 -06:00
d642004ee0 refactor ent comment
Instead of a two-step process handled by the application
(`Issue::new_comment()` and `Comment::set_description()` or
`Comment::edit_description()`), make a simpler-to-use single-step
`Issue::add_comment()`.

Move the implementation details from Issue to Comment.

Better log message when adding a comment.
2025-07-11 13:07:47 -06:00
1c8d994fd9 better ent assign log message 2025-07-11 12:49:58 -06:00
1477322f81 Issue: refactor to simplify & make better git log messages
This starts cleaning up the Issue API.

* Start separating the public API from the internal API.

* Make `Issue::new()` and `Issue::edit_description()` better behaved,
  simpler, reduce code duplication, and also produce better git log
  messages.

* Update `ent` to call the changed `new()` function.

* Add some comments documenting the Issue API.

* `ent new` and `ent edit` now use the editor specified by the EDITOR
  environment variable, if any.  Defaults to `vi` if unspecified.
2025-07-11 11:50:26 -06:00
ce36626b7a ent: handle issue database source & worktrees better
This makes each command in `handle_command()` handle its own issues
database.  The commands that only need read-only access to the issues
make a detached worktree, while the commands that need read-write access
make a normal worktree with the `entomologist-data` branch checked out.

This lets us run any number of read-only operations (like `ent list`,
`ent show`, etc), even when a long-lived read-write operation (like
`ent new` or `ent edit`) is running.

Fixes `ent 317ea8ccac1d414cde55771321bdec30`.
2025-07-10 13:04:55 -06:00
6ea0b98963 ent show: blank line between comment header and description
This makes it a little easier to read.
2025-07-10 10:01:33 -06:00
e09e4b9cb7 simplify ent new 2025-07-09 22:36:24 -06:00
acf539c683 handle user abort in ent comment
The user saving an empty description is a normal user-initiated abort,
not an error.
2025-07-09 22:36:24 -06:00
a199fbc7f7 handle aborts in ent edit ISSUE
The user saving an empty description file is a normal user-initiated
abort, not an error.
2025-07-09 22:36:24 -06:00
da35631f2d update right-speech-bubble to use left-speech-bubble
right-speech-bubble is not part of the recommended unicode
emoji presentation set, but left-speech-bubble is and therefore, it's
more commonly supported
2025-07-09 12:51:39 -06:00
df7b5c6aa4 add ent list filter by assignee
I'm not sure about the filter format...

There are two independent filters: "state" and "assignee".  The "state"
filter defaults to including issues whose state is InProgress, Blocked,
Backlog, or New.  The "assignee" filter defaults to including all issues,
assigned or not.

The two filters can be independently overridden by the `ent list
FILTER` command.  FILTER is a string containing chunks separated by
":", like the PATH environment variable.  Each chunk is of the form
"name=value[,value...]".  "name" can be either "state" or "assignee".

The "value" arguments to the "state" filter must be one of the valid
states, or it's a parse error.

The "value" arguments to the "assignee" filter are used to
string-compare against the issues "assignee" field, exact matches are
accepted and everything else is rejected.  A special assignee filter of
the empty string matches issues that don't have an assignee.

Some examples:

* `ent list` shows issues in the states listed above, and don't filter
  based on assignee at all.

* `ent list assignee=seb` shows issues in the states listed above,
  but only if the assignee is "seb".

* `ent list assignee=seb,` shows issues in the states listed above,
  but only if the assignee is "seb" or if there is no assignee.

* `ent list state=done` shows all issues in the Done state.

* `ent list state=done:assignee=seb` shows issues in the Done state that
  are assigned to "seb".
2025-07-09 10:20:23 -06:00
a676bd9cdd ent list: show assignee, if any 2025-07-08 20:59:02 -06:00
d21b811bee add ent assign ISSUE PERSON 2025-07-08 20:59:02 -06:00
645062d10c add optional 'assignee' to Issue 2025-07-08 20:59:02 -06:00
400e0ca26f ent list: show comment count for each issue 2025-07-08 20:59:02 -06:00
ba57f629e3 make ent list sort issues first by state, then by ctime 2025-07-08 20:59:02 -06:00
e8b37cd86a add author and timestamp to Issue 2025-07-08 20:59:02 -06:00
7acd94f7c0 add author to Comment 2025-07-08 20:59:02 -06:00
be362517fb give Comment a timestamp, display in chronological order
This commit makes a couple of changes:

- `ent show ISSUE` now displays the Issue's Comments in chronological
  order

- the Comment struct now includes a timestamp, which is the Author Time
  of the oldest commit that touches the comment's directory

- the Issue struct now stores its Comments in a sorted Vec, not in
  a HashMap

- The Comment's uuid moved into the Comment struct itself, instead of
  being the key in the Issue's HashMap of Comments
2025-07-08 18:42:14 -06:00
seb
431c67d43d Merge pull request 'ent list now accepts a filter, default "state=New,Backlog,Blocked,InProgress"' (#10) from filter-list into main
Reviewed-on: #10
2025-07-08 18:41:19 -06:00
2106c69271 ent sync: report success if it all worked 2025-07-08 11:10:03 -06:00
9c54a92152 add ent sync
In a worktree with the `entomologist-data` branch checked out in it:
1. `git fetch REMOTE`
2. `git merge REMOTE/BRANCH`
3. `git push REMOTE BRANCH`

Pretty straight-forward.  If anything goes wrong we error out and ask
the human to help.
2025-07-08 10:50:37 -06:00
7d9284bf91 ent list now accepts a filter, default "state=New,Backlog,Blocked,InProgress" 2025-07-07 23:46:14 -06:00
cd4eb82067 remove a useless debug message 2025-07-07 22:33:29 -06:00
8ac4ca4c54 add ent comment, to add a comment on an issue 2025-07-07 21:16:08 -06:00
9870d42fdc ent show: include comments 2025-07-07 21:16:08 -06:00
035c150f4c ent: better error reporting 2025-07-07 18:17:34 -06:00
4307ab98a0 better interface to looking up issue 2025-07-07 18:13:46 -06:00
b789a3d293 ent show: show dependencies, if any 2025-07-07 18:13:46 -06:00
bcc8ba4f21 update CLI to have optional state control 2025-07-07 16:49:25 -06:00
0f46eb7817 add State command to CLI 2025-07-07 13:29:09 -06:00
seb
343e43a762 Merge pull request 'Use Logging Crate To Avoid STDOUT Spam' (#5) from 03/logging into main
Reviewed-on: #5
2025-07-07 12:45:33 -06:00
1e5d328ab4 add logging crate to reduce unnecessary stdout spam 2025-07-07 12:31:09 -06:00
3f2d3b1520 add ent show 2025-07-06 00:22:30 -06:00
ba0862f5a6 add ent edit 2025-07-06 00:22:30 -06:00
09373cda56 add ent new 2025-07-06 00:22:30 -06:00
559e70077e "title" is just the first line of "description" now 2025-07-05 22:40:28 -06:00
26c98591b5 start adding ent binary 2025-07-05 21:20:44 -06:00