diff --git a/lib/platform/github/index.js b/lib/platform/github/index.js index 288d57f09685e01f371f79dab76ef2cbf121c86f..068dc6fa0a248a200ec726a5492643f106b4c755 100644 --- a/lib/platform/github/index.js +++ b/lib/platform/github/index.js @@ -551,8 +551,18 @@ async function getPr(prNo) { logger.debug('Could not determine commit author'); } logger.debug(`Commit author is: ${author}`); + const message = commit.commit ? commit.commit.message : ''; + const parents = commit.parents || []; + let ignoreWebFlow = false; + if ( + author === 'web-flow' && + message.startsWith("Merge branch '") && + parents.length === 2 + ) { + ignoreWebFlow = true; + } // Ignore GitHub "web-flow" - if (author !== 'web-flow' && arr.indexOf(author) === -1) { + if (!ignoreWebFlow && arr.indexOf(author) === -1) { arr.push(author); } return arr; diff --git a/test/platform/github/index.spec.js b/test/platform/github/index.spec.js index c52bee229be4b964962db77bf8e7e9a4aa5374a1..38e0c19c6c4aad364b59ceb52f9b726c7b9c9c75 100644 --- a/test/platform/github/index.spec.js +++ b/test/platform/github/index.spec.js @@ -1066,8 +1066,8 @@ describe('platform/github', () => { get.mockImplementationOnce(() => ({ body: [ { - author: { - login: 'foo', + committer: { + login: 'web-flow', }, }, { @@ -1105,6 +1105,10 @@ describe('platform/github', () => { committer: { login: 'web-flow', }, + commit: { + message: "Merge branch 'master' into renovate/foo", + }, + parents: [1, 2], }, ], }));