-
Notifications
You must be signed in to change notification settings - Fork 45
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
[#4001/3996] Feature gitlab mr auto update #4053
Conversation
…ashboard Signed-off-by: Umesh Lumbhani <[email protected]>
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.
@umeshlumbhani247
Utils will have interfaces for Signature which will break the design. A better approach would be to import the signature package in utils and create a utility function that will be used in the gitlab_activity package. This will require re-work
Signed-off-by: Umesh Lumbhani <[email protected]>
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.
@umeshlumbhani247 kindly use existing pattern in https://github.com/communitybridge/easycla/blob/main/cla-backend-go/v2/repositories/gitlab_services.go
Leave the interfaces in the current packages (signatures and gitlab activities)
Create a file implementing these interfaces ie in the signatures package create signature_service that does the concrete implementation. When importing you can use the interface. This would be a shorter and cleaner way
Signed-off-by: Umesh Lumbhani <[email protected]>
Signed-off-by: Umesh Lumbhani <[email protected]>
@nickmango |
@@ -1,15 +1,21 @@ | |||
// Copyright The Linux Foundation and each contributor to CommunityBridge. | |||
// SPDX-License-Identifier: MIT | |||
|
|||
package signatures | |||
package models |
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.
Maintain the models.py . You had added the models folder
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.
@nickmango this models, i need to use in gitlab_activity, and i can't use signatures package in it due to cyclic dependency.
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.
The cyclic issue can be resolved with interfaces @umeshlumbhani247
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.
I have updated the code, Please review @nickmango
// Copyright The Linux Foundation and each contributor to CommunityBridge. | ||
// SPDX-License-Identifier: MIT | ||
|
||
package models |
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.
Maintain convention with models.py under signature package
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.
I have updated this , moved to gitlab_activity package.
|
||
var missingCompanyAffiliation = errors.New("must confirm affiliation with their company") | ||
|
||
func PrepareMrCommentContent(missingUsers []*GatedGitlabUser, signedUsers []*gitlab.User, signURL string) string { |
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.
You can maintain in the previous package. No need for utils package as it can get populated
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.
I am using this method on signatures->service.go, If i keep it on previous package , It will show cyclic dependency issue, as gitlab_activity is using signature package.
Signed-off-by: Umesh Lumbhani <[email protected]>
Signed-off-by: Umesh Lumbhani <[email protected]>
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.
lgtm
No description provided.