-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add author' groups into Monocle Idents #1089
Conversation
e213766
to
f2dcbbd
Compare
src/Monocle/Backend/Test.hs
Outdated
eve = Author "eve" "e" | ||
fakeAuthor = Author "John" "John" | ||
fakeAuthorAlt = Author "John Doe/12" "review.opendev.org/John Doe/12" | ||
alice = Author "alice" "a" mempty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to avoid these changes, we could define a pattern synonym like this:
pattern Author :: Text -> AuthorWithGroup
pattern Author name = AuthorWithGroup name mempty
… and then rename the data constructor to AuthorWithGroup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't mind I prefer the simplest approach via a function called mkAuthorWithNoGroup
.
The change is ready to land IMO. |
@@ -201,6 +204,9 @@ type WorkspaceName = IndexName | |||
|
|||
type WorkspaceStatus = Map WorkspaceName Status | |||
|
|||
-- | IdentInfo is the Monocle UID and the list of Groups | |||
type IdentUG = (Text, [Text]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: might be cleaner to use a data record instead of type alias to prevent using the tuple form (like in getIdentByAliasFromIdents
below)
No description provided.