Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Confirm self-merge via 👍 reaction to bot comment #422

Open
LinqLover opened this issue Aug 28, 2021 · 1 comment
Open

Confirm self-merge via 👍 reaction to bot comment #422

LinqLover opened this issue Aug 28, 2021 · 1 comment

Comments

@LinqLover
Copy link

Regarding the well-known bot message we all love:

image

I think it would be even nicer if PR creators only needed to give a 👍 reaction to the bot instead of writing a comment. Would this be possible or is the bot only triggered via new comments?

(Note to myself, the relevant lines of code appear to be here:

dt-mergebot/src/pr-info.ts

Lines 418 to 425 in 98d89b4

function getMergeRequest(comments: PR_repository_pullRequest_comments_nodes[], users: string[], sinceDate: Date) {
const request = latestComment(comments.filter(comment =>
users.some(u => comment.author && sameUser(u, comment.author.login))
&& comment.body.trim().toLowerCase().startsWith("ready to merge")));
if (!request) return request;
const date = new Date(request.createdAt);
return date > sinceDate ? { date, user: request.author!.login } : undefined;
}
)

@elibarzilay
Copy link
Contributor

I'm not sure that this is a good idea... The reactions are less explicit, and mistaking them seems easier. Another point is that there are other reactions, some could mean an approval, and some a rejection. For example, if 👍 means "ready to merge", then I'd expect a 👎 to remove the self-merge...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants