-
Notifications
You must be signed in to change notification settings - Fork 13
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
Use buildplanner ImpactReport endpoint to show change summary. #3419
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c79d6c0
Use buildplanner ImpactReport endpoint to show change summary.
mitchell-as 4820ac3
Merge branch 'version/0-46-0-RC1' into mitchell/dx-2955
mitchell-as 8d7542c
Only send buildexpressions to ImpactReport.
mitchell-as 0368182
Also pass impact report to cve runbit, even though it cannot yet be f…
mitchell-as b47e058
PR feedback.
mitchell-as 95f1adb
Simplify ImpactReport API.
mitchell-as 928e86b
Simplified ChangeSummary API.
mitchell-as ab3b898
Merge branch 'version/0-46-0-RC1' into mitchell/dx-2955
mitchell-as File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package request | ||
|
||
func ImpactReport(organization, project string, beforeExpr, afterExpr []byte) *impactReport { | ||
bp := &impactReport{map[string]interface{}{ | ||
"organization": organization, | ||
"project": project, | ||
"beforeExpr": string(beforeExpr), | ||
"afterExpr": string(afterExpr), | ||
}} | ||
|
||
return bp | ||
} | ||
|
||
type impactReport struct { | ||
vars map[string]interface{} | ||
} | ||
|
||
func (b *impactReport) Query() string { | ||
return ` | ||
query ($organization: String!, $project: String!, $beforeExpr: BuildExpr!, $afterExpr: BuildExpr!) { | ||
impactReport( | ||
before: {organization: $organization, project: $project, buildExprOrCommit: {buildExpr: $beforeExpr}} | ||
after: {organization: $organization, project: $project, buildExprOrCommit: {buildExpr: $afterExpr}} | ||
) { | ||
__typename | ||
... on ImpactReport { | ||
ingredients { | ||
namespace | ||
name | ||
before { | ||
ingredientID | ||
version | ||
isRequirement | ||
} | ||
after { | ||
ingredientID | ||
version | ||
isRequirement | ||
} | ||
} | ||
} | ||
... on ImpactReportError { | ||
message | ||
} | ||
} | ||
} | ||
` | ||
} | ||
|
||
func (b *impactReport) Vars() (map[string]interface{}, error) { | ||
return b.vars, nil | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
May as well pair this up with the identical conditional on line 64.
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 would, but they're not identical 😱