Skip to content

Commit ac71a9d

Browse files
committed
attempt-backport: only run PRs targeted at master
Refs: #77 PR-URL: #90
1 parent 839a668 commit ac71a9d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/attempt-backport.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ module.exports = function (app) {
1919
function handlePrUpdate (event, owner, repo) {
2020
if (!~enabledRepos.indexOf(repo)) return
2121

22+
if (event.pull_request.base.ref !== 'master') return
23+
2224
const prId = event.number
2325
const options = { owner, repo, prId, logger: event.logger }
2426

@@ -31,7 +33,7 @@ module.exports = function (app) {
3133
}
3234

3335
// to trigger polling manually
34-
app.get('/pr/:owner/:repo/:id', (req, res) => {
36+
app.get('/attempt-backport/pr/:owner/:repo/:id', (req, res) => {
3537
const owner = req.params.owner
3638
const repo = req.params.repo
3739
const prId = parseInt(req.params.id, 10)

0 commit comments

Comments
 (0)