Skip to content

Commit

Permalink
attempt-backport: only run PRs targeted at master
Browse files Browse the repository at this point in the history
  • Loading branch information
Fishrock123 committed Nov 3, 2016
1 parent 0fad7cc commit 1b3c8c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/attempt-backport.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand All @@ -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)
Expand Down

0 comments on commit 1b3c8c3

Please sign in to comment.