Skip to content

Commit

Permalink
fix: the pull-request author is now the user assigned instead of the …
Browse files Browse the repository at this point in the history
…editor of the PR body
  • Loading branch information
gentlementlegen committed Jan 13, 2025
1 parent 8544719 commit 7023f84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/handlers/user-start-stop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export async function userPullRequest(context: Context<"pull_request.opened" | "
} as unknown as Context<"issue_comment.created">["payload"]["issue"];
context.payload = Object.assign({ issue: issueWithComment }, context.payload);
try {
return await start(context, issueWithComment, payload.sender, []);
return await start(context, issueWithComment, pull_request.user ?? payload.sender, []);
} catch (error) {
context.logger.info("The task could not be started, closing linked pull-request.", { pull_request });
await closePullRequest(context, { number: pull_request.number });
Expand Down
2 changes: 1 addition & 1 deletion src/utils/issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export async function addAssignees(context: Context, issueNo: number, assignees:
assignees,
});
} catch (e: unknown) {
throw new Error(context.logger.error("Adding the assignee failed", { assignee: assignees, issueNo, error: e as Error }).logMessage.raw);
throw context.logger.error("Adding the assignee failed", { assignee: assignees, issueNo, error: e as Error });
}

await confirmMultiAssignment(context, issueNo, assignees);
Expand Down

0 comments on commit 7023f84

Please sign in to comment.