You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of now, mediator only parses events for repositories and artifacts. We need to extend the webhook receiver (currently handleWebhookEvent) to route requests for pull requests into a new handler. This receiver would be very similar to others that parse events for released artifacts or repository changes.
Pull request metadata parsing
Upon receiving the pull request, the handler will parse the pull request payload data into a protobuf-generated structure. The structure can be reused and extended for other policy rules that parse PRs, but for now we only need the following information.
message FilePatch {
string name = 1; // file changed, e.g. package-lock.json
string patchUrl = 2; // points to the the raw patchfile
}
message PullRequest {
string URL = 1;
int32 ID = 2;
repeated FilePatch patches = 3;
}
The pull request payload contains the number of changed files, but not the patches themselves, but we can use the ListFiles GH API call to retrieve the files in a pull request.
The text was updated successfully, but these errors were encountered:
Webhook event receiver for pull requests
As of now, mediator only parses events for repositories and artifacts. We need to extend the webhook receiver (currently handleWebhookEvent) to route requests for pull requests into a new handler. This receiver would be very similar to others that parse events for released artifacts or repository changes.
Pull request metadata parsing
Upon receiving the pull request, the handler will parse the pull request payload data into a protobuf-generated structure. The structure can be reused and extended for other policy rules that parse PRs, but for now we only need the following information.
The pull request payload contains the number of changed files, but not the patches themselves, but we can use the ListFiles GH API call to retrieve the files in a pull request.
The text was updated successfully, but these errors were encountered: