warren830 commented on code in PR #4461:
URL:
https://github.com/apache/incubator-devlake/pull/4461#discussion_r1112926651
##########
backend/plugins/bamboo/models/job.go:
##########
@@ -37,17 +37,16 @@ type BambooJob struct {
common.NoPKModel
}
-func (BambooJob) Convert(apiRes *ApiBambooJob) *BambooJob {
- b := &BambooJob{
- JobKey: apiRes.SearchEntity.Key,
- Id: apiRes.Id,
- Name: apiRes.SearchEntity.JobName,
- PlanName: apiRes.SearchEntity.PlanName,
- ProjectName: apiRes.SearchEntity.ProjectName,
- Description: apiRes.SearchEntity.Description,
- BranchName: apiRes.SearchEntity.BranchName,
- Type: apiRes.SearchEntity.Type,
- }
+func (b *BambooJob) Convert(apiRes *ApiBambooJob) *BambooJob {
Review Comment:
I don't think any one would do that thing, well, if you change it to this,
BambooJob will have two methods, one's receiver is pointer, one's is value.
Hmm, maybe we'd better use func ConvertJob() is better
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]