-
Notifications
You must be signed in to change notification settings - Fork 508
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
fix: split the collector into collector+extractor #6564
Conversation
EntryPoint: CollectAndExtractDeployments, | ||
var CollectDeploymentsMeta = plugin.SubTaskMeta{ | ||
Name: "CollectDeployments", | ||
EntryPoint: CollectDeployments, | ||
EnabledByDefault: true, | ||
Description: "collect and extract github deployments to raw and tool layer from GithubGraphql api", |
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.
Description
should be updated too.
return nil, err | ||
} | ||
accounts := apiAccount.Users | ||
results := make([]interface{}, 0, 1) |
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.
var result []interface
is more idiomatic.
// ResponseParser's return will be stored to tool layer. So it's called CollectorAndExtractor. | ||
func CollectAndExtractDeployments(taskCtx plugin.SubTaskContext) errors.Error { | ||
func CollectDeployments(taskCtx plugin.SubTaskContext) errors.Error { |
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.
Comment in line 87 should be updated too.
githubDeployment, err := convertGithubDeployment(deployment, data.Options.ConnectionId, data.Options.GithubId) | ||
if err != nil { | ||
return nil, err | ||
isFinish := false |
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.
Can ResponseParser
return nil, nil
directly?
//Labels: ``, // not on use | ||
//RunnerID: ``, // not on use | ||
//RunnerName: ``, // not on use | ||
//RunnerGroupID: ``, // not on use |
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 think not on use
should be not in use
.
Name: "CollectPr", | ||
EntryPoint: CollectPr, | ||
var CollectPrsMeta = plugin.SubTaskMeta{ | ||
Name: "CollectPrs", |
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.
Will this name be conflict with tasks in github/tasks?
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.
no
* fix: split the collector into collector+extractor * fix: impl * fix: github graphql incremental collector * fix: lint * fix: some detail
🤖 cherry pick finished successfully 🎉! |
Summary
fix: split the collector into collector+extractor
Does this close any open issues?
Closes #6495
Screenshots
Include any relevant screenshots here.
Other Information
Any other information that is important to this PR.