Commit graph

107 commits

Author SHA1 Message Date
4683760942 test dir cleanup: rename test/0000/7792b063eef6d33e7da5dc1856750c14
Renaming everything also means they have new creation-times, since we're
now git logging a different file/dir.
2025-07-24 10:19:33 -06:00
ef8a648cf8 test dir cleanup: rename test/0000/3943fc5c173fdf41c0a22251593cd476
Renaming everything also means they have new creation-times, since we're
now git logging a different file/dir.
2025-07-24 10:19:22 -06:00
7abcf2e446 sort issue tags
This will be useful testing (and general consistency) when tags are
files in a directory instead of lines in a file, and thus subject to
random directory order.
2025-07-23 18:48:04 -06:00
e1287514f6 switch to pretty_assertions, makes it much easier to tell what blew up 2025-07-23 18:02:54 -06:00
eb7ac21ac8 half as many git log calls when reading a comment 2025-07-22 13:13:59 -06:00
c15736259c add git::git_log_oldest_author_timestamp(), saves us one git log
This cuts about 30% off the time to read the issues from
entomologist-data.
2025-07-22 13:04:54 -06:00
def729d43a ent done-time: speed up setting of done-time 2025-07-22 10:41:25 -06:00
e2a7c81a13 ent assign: speed up setting of assignee 2025-07-22 10:41:25 -06:00
cc1b378346 ent tag: speed up adding/removing tag 2025-07-22 10:41:25 -06:00
f60dd18c0a sort dependencies alphabetically after reading them
This is mostly to make the tests reliable.

Without this the dependencies are inserted into the vector in directory
order, which in my checkout of the repo did not match the alphabetical
order of the dependencies in the test.
2025-07-20 22:27:48 -06:00
44a6ac5110 Merge pull request 'ent done-time ISSUE TIME: report parse error instead of panicking' (#28) from fix-done-time-parsing into main
Reviewed-on: #28
2025-07-20 12:39:58 -06:00
2d8d0db4cb Merge pull request 'include tags in ent show' (#29) from ent-show-tags into main
Reviewed-on: #29
2025-07-20 12:38:02 -06:00
seb
24a99d2957 Merge pull request 'Add Dependency Management' (#25) from 03/dependencies-api into main
Reviewed-on: #25
2025-07-20 12:21:56 -06:00
c9dbec730c ent show: show tags, if any 2025-07-20 00:04:11 -06:00
0d9a893087 ent show: simplify logic
This simplifies the code flow and gets rid of two levels of indentation.
2025-07-20 00:03:18 -06:00
8af9c71ef6 ent done-time ISSUE TIME: report parse error instead of panicking 2025-07-19 21:10:14 -06:00
e79fc4917d Issues::new_from_dir(): move error message to stderr 2025-07-19 10:52:33 -06:00
c217434071 better error handling in comment and git
This replaces a bunch of `unwrap()` calls with error returns.
2025-07-19 10:38:15 -06:00
97a575316e Issues: skip & warn about any Issue that fails to parse
This lets us at least handle the other, valid issues, while informing
the user about the ones we don't understand.
2025-07-19 09:55:32 -06:00
2ba13ebaeb Issue: get rid of all unwraps
Make and return errors instead.
2025-07-19 09:55:32 -06:00
8319a4f118 add dependency API / fix dependency representation / dependency
management via CLI
2025-07-18 16:20:17 -06:00
seb
04b33eb70f Merge pull request 'completed Issues now know when they were marked Done' (#24) from done-time into main
Reviewed-on: #24
2025-07-18 10:21:42 -06:00
3e0ab7092e update CLI to print the issue ID when a new issue is created 2025-07-17 12:00:26 -06:00
a3077ca313 ent list FILTER: add filter "done-time=[START]..[END]" 2025-07-16 21:59:17 -06:00
bc2b1bd3c1 add API and CLI to get & set done-time of an issue 2025-07-16 21:51:27 -06:00
3b33ed41f5 Issue: add done_time field
This records the DateTime that the issue moved to the Done state (if any).
2025-07-16 21:50:44 -06:00
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
5e5508a2ee Issue: make a helper function to commit an Issue
This improves code reuse and streamlines the code a bit.
2025-07-16 21:50:42 -06:00
733100fefb add the ID field back into the Issue struct 2025-07-15 10:53:52 -06:00
61df7ede8f add better error handling 2025-07-13 14:21:28 -06:00
d2df1bc1e8 move entomologist database to new library file
fixes: d3a705245bd69aa56524b80b5ae0bc26
2025-07-13 14:06:04 -06:00
490f946ef6 don't open an editor is stdin or stdout is not a terminal 2025-07-13 10:38:52 -06:00
seb
3932baff3b Merge pull request 'make a reasonable readme' (#19) from readme into main
Reviewed-on: #19
2025-07-12 16:12:31 -06:00
3721483c2d git::sync(): more helpful error message when merge fails 2025-07-12 14:54:48 -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
2f1636db55 add Issue::add_tag() and Issue::remove_tag() 2025-07-12 12:28:59 -06:00
4307fc8941 ent list: show tags 2025-07-12 12:28:59 -06:00
b02807eaca Issue: add tags field 2025-07-12 12:28:53 -06:00
665f02cbe8 when changing state, include old state in git log message
Before this commit:
    change state of issue f3990ac13cd93a925f2a66e6a72eb0f2 to backlog

After this commit:
    change state of issue 406e2330695040fed5fdbcaae5d2b331, new -> inprogress
2025-07-12 10:02:51 -06:00
65316da0bd teach ent edit to edit Comments as well as Issues 2025-07-11 20:30:50 -06:00
08e0698418 git::sync(): show somewhat ugly git logs of stuff fetched and pushed 2025-07-11 13:09:23 -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
ab86e6369c Issue::set_state(): better git commit message 2025-07-11 11:50:33 -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
7b6efdf925 rename git::add_file() to just add(), it can add directories too 2025-07-11 10:17:11 -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