Skip to content

Commit

Permalink
attempt-backport: only run PRs targeted at master
Browse files Browse the repository at this point in the history
Refs: #77
PR-URL: #90
  • Loading branch information
Fishrock123 committed Nov 16, 2016
1 parent 839a668 commit ac71a9d
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 ac71a9d

Please sign in to comment.