-
Notifications
You must be signed in to change notification settings - Fork 43
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
Unified PR machinery for actions like pull request comment #5223
base: main
Are you sure you want to change the base?
Conversation
This allows for providers to comment on pull requests Signed-off-by: Juan Antonio Osorio <[email protected]>
This shared space will allow actions to gather structures or results that will allow it to aggregate and flush. In more solid terms, we'd be able to aggregate PR comments, iterate them, and issue just one big comment. Signed-off-by: Juan Antonio Osorio <[email protected]>
Signed-off-by: Juan Antonio Osorio <[email protected]>
Signed-off-by: Juan Antonio Osorio <[email protected]>
Signed-off-by: Juan Antonio Osorio <[email protected]>
Signed-off-by: Juan Antonio Osorio <[email protected]>
type minderTemplateData struct { | ||
MagicComment string | ||
Body string | ||
} |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
strconv.ParseInt
Incorrect conversion of a signed 64-bit integer from
strconv.ParseInt
|
||
ic, err := c.CreateIssueComment(ctx, owner, repoName, | ||
// TODO: overflow | ||
int(prNumber), body) |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
strconv.ParseInt
Incorrect conversion of a signed 64-bit integer from
strconv.ParseInt
|
||
func (c *GitHub) createReview( | ||
ctx context.Context, comment provifv1.PullRequestCommentInfo, mci magicCommentInfo, | ||
owner, repoName string, prNumber int64, commitSha string, |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
strconv.ParseInt
Incorrect conversion of a signed 64-bit integer from
strconv.ParseInt
// TODO: overflow | ||
r, err := c.CreateReview(ctx, owner, repoName, int(prNumber), review) | ||
if err != nil { | ||
return mci, fmt.Errorf("could not create review: %w", err) |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
strconv.ParseInt
Incorrect conversion of a signed 64-bit integer from
strconv.ParseInt
Signed-off-by: Juan Antonio Osorio <[email protected]>
Summary
This adds all the needed machinery and implementation to create a unified actions result. This is specially useful for aggregating results from different alerts such as pull_request_comment.
I tried doing it in separate PRs... see #5188 & #5182 but this proved challenging. So now it's all here.
Change Type
Mark the type of change your PR introduces:
Testing
Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.
Review Checklist: