You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "klesh (via GitHub)" <gi...@apache.org> on 2023/09/06 06:05:32 UTC
[GitHub] [incubator-devlake] klesh commented on a diff in pull request #5995: refactor: manage reusable ApiClient in RemoteApiHelper
klesh commented on code in PR #5995:
URL: https://github.com/apache/incubator-devlake/pull/5995#discussion_r1316777101
##########
backend/plugins/gitlab/models/connection.go:
##########
@@ -117,6 +117,10 @@ type GitlabConnection struct {
GitlabConn `mapstructure:",squash"`
}
+func (c GitlabConnection) GetHash() string {
Review Comment:
We can add `GetHash` to the `plugin.ApiConnection`, it should be fine because every plugin connection has `BaseConnection` nested.
##########
backend/plugins/gitlab/models/connection.go:
##########
@@ -117,6 +117,10 @@ type GitlabConnection struct {
GitlabConn `mapstructure:",squash"`
}
+func (c GitlabConnection) GetHash() string {
Review Comment:
I think it would make more sense to move this function into the `BaseConnection` struct because both `ID` and `UpdatedAt` are defined in it so we don't need to modify every plugin to implement this method
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org