Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions torchci/lib/bot/autoCcBot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ function myBot(app: Probot): void {
if (payloadType === "issue") {
await context.octokit.issues.update(context.issue({ body: newBody }));
} else if (payloadType === "pull_request") {
// @ts-ignore
await context.octokit.pulls.update(context.issue({ body: newBody }));
await context.octokit.pulls.update(context.pullRequest({ body: newBody }));
}
} else {
context.log("no action: no change from existing cc list on issue");
Expand Down
3 changes: 1 addition & 2 deletions torchci/test/autoCcBot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@ Some header text
payload["pull_request"]["body"] = "Arf arf";

const scope = nock("https://api.github.com")
.patch("/repos/seemethere/test-repo/pulls/", (body: any) => {
.patch("/repos/seemethere/test-repo/pulls/20", (body: any) => {
expect(body).toMatchObject({
issue_number: 20,
body: "Arf arf\n\ncc @ezyang",
});
return true;
Expand Down