renovatebot / renovate-approve-bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Let a human review Renovate's config migration PRs, instead of auto-approving

HonkingGoose opened this issue · comments

The renovate-approve-bot automatically approves Renovate's configuration migration PRs. I think we should let our users review the changes themselves instead of auto-approving.

Right now the configuration migration PRs makes some whitespace and ordering changes, so the PR probably needs to be fixed up by the user anyways.

To summarize: disable renovate-approve-bot approval for Renovate config PRs.

I thought we should only approve ones marked as Automerge enabled anyway

I think this is the relevant bit of code:

app.on("pull_request.opened", async context => {
context.log("Received PR open event");
if (isRenovate(context) && isAutomerging(context)) {
context.log("Approving new PR");
return approvePr(context);
}
});

So why does it think it's automerging?

I found this quote from you in another discussion:

Essentially it looks for "Automerge: enabled" in the PR body content and approves only if it sees that (otherwise it would just add noise)

renovatebot/renovate#15123 (reply in thread)


EDIT: I'm not sure from reading the index.js code that this description is accurate. I don't see the string "Automerge: enabled" in the code.

SECOND EDIT: Looks like we're checking if we see a manual merge message, and if we do, we exit:

function isAutomerging(context) {
try {
return !context.payload.pull_request.body.includes(MANUAL_MERGE_MESSAGE);
} catch (err) {
context.log(context.payload);
context.log(err);
return false;
}
}

Yeah, we look for the absence of "merge this manually"

Implemented