From f92c593a3d2c4bdb023fdd834b6e8c874d063cc8 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Thu, 29 Feb 2024 04:11:10 +0100 Subject: feat: add `review` command Prototype of the `review` command, cf. `anissue review -h`. Also adds the `status` command. --- app/Git/CommitHash.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/Git/CommitHash.hs') diff --git a/app/Git/CommitHash.hs b/app/Git/CommitHash.hs index db7a478..0caecf4 100644 --- a/app/Git/CommitHash.hs +++ b/app/Git/CommitHash.hs @@ -2,6 +2,7 @@ module Git.CommitHash ( CommitHash (..), toShortText, toText, + toTextUnsafe, ) where @@ -23,6 +24,10 @@ toText :: CommitHash -> Maybe T.Text toText WorkingTree = Nothing toText (Commit hash) = Just hash +toTextUnsafe :: CommitHash -> T.Text +toTextUnsafe (Commit hash) = hash +toTextUnsafe _ = error "toTextUnsafe: WorkingDir" + instance P.Render CommitHash where render = P.render . P.Detailed -- cgit v1.2.3 From a2f401ca9839b6041b7d94f77de4530f168b12ad Mon Sep 17 00:00:00 2001 From: Fabian Kirchner Date: Wed, 6 Mar 2024 13:47:17 +0100 Subject: review(feature/review): approve lgtm, possible splitting some non-business-logic stuff into separate commits would be nice commit 9a49ec0dcd6f75736949350844f85d80fe48a662 --- app/Git/CommitHash.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'app/Git/CommitHash.hs') diff --git a/app/Git/CommitHash.hs b/app/Git/CommitHash.hs index 0caecf4..c53e2d8 100644 --- a/app/Git/CommitHash.hs +++ b/app/Git/CommitHash.hs @@ -28,6 +28,7 @@ toTextUnsafe :: CommitHash -> T.Text toTextUnsafe (Commit hash) = hash toTextUnsafe _ = error "toTextUnsafe: WorkingDir" +-- REVIEW Why is this unsafe? instance P.Render CommitHash where render = P.render . P.Detailed -- cgit v1.2.3 From 7f0066cafd2a91959ef618ef8342524ca30a328f Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Wed, 13 Mar 2024 06:16:50 +0100 Subject: review: request-changes feature/review --- app/Git/CommitHash.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/Git/CommitHash.hs') diff --git a/app/Git/CommitHash.hs b/app/Git/CommitHash.hs index c53e2d8..28aa738 100644 --- a/app/Git/CommitHash.hs +++ b/app/Git/CommitHash.hs @@ -27,8 +27,12 @@ toText (Commit hash) = Just hash toTextUnsafe :: CommitHash -> T.Text toTextUnsafe (Commit hash) = hash toTextUnsafe _ = error "toTextUnsafe: WorkingDir" +-- ^ REVIEW Why is this unsafe? +-- +-- REVIEW Because it is a partial function. +-- +-- RESOLVED --- REVIEW Why is this unsafe? instance P.Render CommitHash where render = P.render . P.Detailed -- cgit v1.2.3 From 09e26c37de7e7227d856ffe15c9554af36b50c58 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Thu, 14 Mar 2024 07:07:28 +0100 Subject: review: request-changes feature/review --- app/Git/CommitHash.hs | 5 ----- 1 file changed, 5 deletions(-) (limited to 'app/Git/CommitHash.hs') diff --git a/app/Git/CommitHash.hs b/app/Git/CommitHash.hs index 28aa738..0caecf4 100644 --- a/app/Git/CommitHash.hs +++ b/app/Git/CommitHash.hs @@ -27,11 +27,6 @@ toText (Commit hash) = Just hash toTextUnsafe :: CommitHash -> T.Text toTextUnsafe (Commit hash) = hash toTextUnsafe _ = error "toTextUnsafe: WorkingDir" --- ^ REVIEW Why is this unsafe? --- --- REVIEW Because it is a partial function. --- --- RESOLVED instance P.Render CommitHash where render = P.render . P.Detailed -- cgit v1.2.3