diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/History/PartialCommitInfo.hs | 2 | ||||
-rw-r--r-- | app/Issue.hs | 2 | ||||
-rw-r--r-- | app/Issue/Provenance.hs | 1 | ||||
-rw-r--r-- | app/Main.hs | 52 |
4 files changed, 20 insertions, 37 deletions
diff --git a/app/History/PartialCommitInfo.hs b/app/History/PartialCommitInfo.hs index 4d0c506..5272057 100644 --- a/app/History/PartialCommitInfo.hs +++ b/app/History/PartialCommitInfo.hs @@ -38,6 +38,8 @@ getPartialCommitInfos = do -- -- - Should throw if no commits. -- - Should always be reversed? + -- + -- @difficulty easy commitHashes <- reverse <$> Git.getCommitHashes mapM getCommitInfoOf (map Commit commitHashes ++ [WorkingTree]) diff --git a/app/Issue.hs b/app/Issue.hs index 4326af1..2ada47b 100644 --- a/app/Issue.hs +++ b/app/Issue.hs @@ -39,6 +39,8 @@ data Issue = Issue -- TODO Make provenance obligatory -- -- I cannot think of instances where an issue exists without a provenance.. + -- + -- @difficulty easy provenance :: Maybe Provenance, start :: G.Position, end :: G.Position, diff --git a/app/Issue/Provenance.hs b/app/Issue/Provenance.hs index 4d69472..b5fd396 100644 --- a/app/Issue/Provenance.hs +++ b/app/Issue/Provenance.hs @@ -32,6 +32,7 @@ data Provenance = Provenance data Commit = Commit { -- TODO `T.Text` -> `CommitHash` + -- @difficulty easy hash :: T.Text, date :: UTCTime, author :: Author diff --git a/app/Main.hs b/app/Main.hs index 7604137..9cb90ca 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -128,6 +128,7 @@ -- tags. -- -- @topic tags +-- @topic markdown -- TODO Only separate generated tags with a blank line when description does not end with tags -- @@ -149,6 +150,7 @@ -- @row 42 -- ``` -- +-- @topic markdown -- @topic tags -- QUESTION Should automatically generated ids be random? @@ -223,6 +225,8 @@ -- either a prefix in the list view (e.g. 🏗️, 🐞, ...), or the list -- should be grouped by the type. -- +-- @difficulty easy +-- -- COMMENT I imagine emojis might be off-putting to some potential users. I -- would like a configuration option to disable emojis and display the marker -- instead. @@ -257,45 +261,13 @@ -- the preceding issue. -- -- `anissue show` should then show all comments below the current output. - --- TODO Add options to specify ordering of issues --- --- When running `anissue list` with the `--order-by` option, the list --- should be ordered accordingly. Possible values could be --- --- creation --- : the time when the issue was created --- --- update --- : the time when the issue was updated last -- --- title --- : lexicographically by title --- --- priority --- : by priority --- --- Additionally using `--reversed`, the order will be reversed. --- --- @topic options --- --- COMMENT `anissue list` now supports `--sort` which allows sorting by tags. --- To facilitate the first use-case, sorting by creation, an internal tag --- `@createdAt` has been added. Reversing is possible, ie. `--sort --- '-@createdAt'` --- --- Supposing we want to go this direction, I feel like all of the use-cases can --- be implemented using internal tags and adding support for a couple of data --- types within String-valued tags. (Sorting by `@createdAt` currently only --- works because date-based ordering coincides with string-based ordering on --- the used `YYYY-MM-DD` format.) --- --- What do you think? --- --- PS. Nothing prevents us later to extend functionality by special cases, --- should we dislike an internal `@title` tag. +-- @priority high + +-- TODO Add internal tag `@title` -- --- COMMENT I like this approach! :) +-- To support sorting issues by title, we should add an internal `@title` +-- tag. -- TODO Add command for (re)generating the cache -- @@ -370,6 +342,8 @@ -- issues tagged with them. By default the list should be ordered with the -- topics first which have the most issues. -- +-- @difficulty easy +-- -- COMMENT Maybe `anissue tags @topic` could serve that purpose? I imagine -- `anissue tags` (without a tag given) to list all tags. -- @@ -669,6 +643,8 @@ main = do -- -- We have to set `noPager` unconditionally to `True` for now, as not -- all output is `mdcat` compatible. + -- + -- @topic markdown putDoc colorize True width $ P.annotate (P.color P.Green) $ P.pretty $ @@ -707,6 +683,8 @@ main = do -- TODO Move `replaceText` to `Issue` -- TODO `replaceFile` hardcodes comment +-- +-- @difficulty easy replaceText :: Issue -> T.Text -> IO () replaceText issue s' = T.writeFile issue.file . replace (indent (comment s')) =<< T.readFile issue.file where |