Skip to content
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

Merged
merged 6 commits into from
Dec 12, 2023
Merged

Conversation

morucci
Copy link
Collaborator

@morucci morucci commented Nov 24, 2023

No description provided.

@morucci morucci linked an issue Nov 27, 2023 that may be closed by this pull request
@morucci morucci changed the title WIP - Add the author's group field into the Monocle schema WIP - Add author' groups into Monocle Idents Nov 28, 2023
eve = Author "eve" "e"
fakeAuthor = Author "John" "John"
fakeAuthorAlt = Author "John Doe/12" "review.opendev.org/John Doe/12"
alice = Author "alice" "a" mempty
Copy link
Contributor

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

Copy link
Collaborator Author

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.

@morucci morucci changed the title WIP - Add author' groups into Monocle Idents Add author' groups into Monocle Idents Dec 12, 2023
@morucci
Copy link
Collaborator Author

morucci commented Dec 12, 2023

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])
Copy link
Contributor

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)

@TristanCacqueray TristanCacqueray added the merge me Trigger the merge process label Dec 12, 2023
@mergify mergify bot merged commit 7c60ac9 into change-metrics:master Dec 12, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support a groups attribute in any Ident attribute
2 participants