Commit graph

125 commits

Author SHA1 Message Date
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
930115813c Merge pull request 'add a tools directory including a "done-last-week" script' (#27) from done-last-week into main
Reviewed-on: #27
2025-07-20 12:28:26 -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
8a92bf2637 fix test directory to match updated dependency representation 2025-07-20 11:55:29 -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
8b41f1ebc6 add a tools directory including a "done-last-week" script
This script lists issues that were marked `Done` between "midnight at
the start of the second most recent Monday" and "midnight at the start
of the most recent Monday".

    $ ./tools/done-last-week
    Done:
    8c73c9fd5bc4f551ee5069035ae6e866       migrate the Todo list into entomologist
    75cefad80aacbf23fc7b9c24a75aa236  🗨️ 4  # implement `ent comment ISSUE [DESCRIPTION]` (👉 seb)
    7da3bd5b72de0a05936b094db5d24304  🗨️ 1  implement `ent edit ${COMMENT}` (👉 seb)
    198a7d56a19f0579fbc04f2ee9cc234f       fix ignoring unknown file in issues directory: "README.md"
    e089400e8a9e11fe9bf10d50b2f889d7       add `ent sync` to keep local `entomologist-data` branch in sync with remote
    a26da230276d317e85f9fcca41c19d2e       `ent edit ${ISSUE}` with no change fails (👉 seb)
    317ea8ccac1d414cde55771321bdec30  🗨️ 2  allow multiple read-only ent processes simultaneously (👉 seb)
    da435e5e298b28dc223f9dcfe62a9140       add user control over state transitions (👉 lex)
    fd81241f795333b64e7911cfb1b57c8f       commit messages in the `entomologist-data` branch could be better (👉 seb)
    093e87e8049b93bfa2d8fcd544cae75f       add optional 'assignee' to issue (👉 seb)
    793bda8b9726b0336d97e856895907f8       `ent list` should have a consistent sort order (👉 seb)
    af53c561b36e9b2709b939f81daee534       use git author info to attribute issues and comments to people (👉 seb)
    9e69a30ad6965d7488514584c97ac63c       teach `ent list FILTER` to filter by assignee (👉 seb)
    a5ac277614ea4d13f78031abb25ea7d6       `ent new` and `ent comment`: detect empty issue descriptions & comments (👉 seb)
    7d2d236668872cf11f167ac0462f8751  🗨️ 1  add `ent tag ISSUE [[-]TAG]` (👉 seb)
    54f0eb67b05aa10763c86869ce840f33       `ent sync` should report what changes got fetched & what changes will be pushed (👉 seb)
    4e314a8590864fa76d22758e1785ae35       don't spawn an editor if stdin & stdout aren't a terminal (👉 seb)
    d3a705245bd69aa56524b80b5ae0bc26  🗨️ 1  move IssuesDatabase out of binary and into library (👉 sigil-03)
2025-07-19 20:29:06 -06:00
seb
6a1e438c94 Merge pull request 'skip unparsable issues' (#26) from skip-unparsable-issues into main
Reviewed-on: #26
2025-07-19 20:28:36 -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
d3ba28f4d4 Merge pull request 'CLI: Print ID on new' (#23) from 03/print-id-on-new into main
Reviewed-on: #23
2025-07-17 12:02: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
seb
e0d9d45a6a Merge pull request 'Add ID field to Issue Struct' (#22) from 03/move-id-into-issue into main
Reviewed-on: #22
2025-07-15 15:04:38 -06:00
733100fefb add the ID field back into the Issue struct 2025-07-15 10:53:52 -06:00
seb
59ef0dd757 Merge pull request 'move entomologist database to new library file' (#21) from 03/issues-db-into-library into main
Reviewed-on: #21
2025-07-13 21:52:24 -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
seb
603693151e Merge pull request 'add support for tags :-)' (#18) from tags into main
Reviewed-on: #18
2025-07-12 16:12:07 -06:00
8d5105e4d5 flesh out the README some 2025-07-12 14:54:48 -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
seb
928e592722 Merge pull request 'cleanups-and-show-log-in-ent-sync' (#17) from cleanups-and-show-log-in-ent-sync into main
Reviewed-on: #17
2025-07-11 20:28:57 -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
seb
0d6c43d266 Merge pull request 'handle read-only operations' (#16) from read-only-ops into main
Reviewed-on: #16
2025-07-11 10:11:42 -06:00