Skip to content

Commit a05e3b9

Browse files
mscdexFishrock123
authored andcommitted
attempt-backport: declare node versions once
PR-URL: nodejs#93
1 parent 6c3167e commit a05e3b9

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

‎scripts/attempt-backport.js‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ const updatePrWithLabels = node_repo.updatePrWithLabels
88
// const removeLabelFromPR = node_repo.removeLabelFromPR
99

1010
const enabledRepos = ['node']
11+
const nodeVersions = [
12+
{ version: 4, lts: true },
13+
{ version: 6, lts: true },
14+
{ version: 7 }
15+
]
1116
const queue = []
1217
let inProgress = false
1318

@@ -27,9 +32,9 @@ module.exports = function (app) {
2732
const options = { owner, repo, prId, logger: event.logger }
2833

2934
debug(`/${owner}/${repo}/pull/${prId} sync`)
30-
queueAttemptBackport(options, 7, false)
31-
queueAttemptBackport(options, 6, true)
32-
queueAttemptBackport(options, 4, true)
35+
for (const node of nodeVersions) {
36+
queueAttemptBackport(options, node.version, !!node.lts)
37+
}
3338

3439
if (!inProgress) processNextBackport()
3540
}
@@ -42,9 +47,9 @@ module.exports = function (app) {
4247
const options = { owner, repo, prId, logger: req.log }
4348

4449
if (~enabledRepos.indexOf(repo)) {
45-
queueAttemptBackport(options, 7, false)
46-
queueAttemptBackport(options, 6, true)
47-
queueAttemptBackport(options, 4, true)
50+
for (const node of nodeVersions) {
51+
queueAttemptBackport(options, node.version, !!node.lts)
52+
}
4853
}
4954

5055
if (!inProgress) processNextBackport()

0 commit comments

Comments
 (0)