From ac71a9dad86f05cffb63dfc0665fed9c5f08170b Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Thu, 3 Nov 2016 15:30:27 -0400 Subject: [PATCH] attempt-backport: only run PRs targeted at master Refs: https://github.com/nodejs/github-bot/issues/77 PR-URL: https://github.com/nodejs/github-bot/pull/90 --- scripts/attempt-backport.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/attempt-backport.js b/scripts/attempt-backport.js index 32fe2f8c..b937c966 100644 --- a/scripts/attempt-backport.js +++ b/scripts/attempt-backport.js @@ -19,6 +19,8 @@ module.exports = function (app) { function handlePrUpdate (event, owner, repo) { if (!~enabledRepos.indexOf(repo)) return + if (event.pull_request.base.ref !== 'master') return + const prId = event.number const options = { owner, repo, prId, logger: event.logger } @@ -31,7 +33,7 @@ module.exports = function (app) { } // to trigger polling manually - app.get('/pr/:owner/:repo/:id', (req, res) => { + app.get('/attempt-backport/pr/:owner/:repo/:id', (req, res) => { const owner = req.params.owner const repo = req.params.repo const prId = parseInt(req.params.id, 10)