@@ -4,7 +4,7 @@ const child_process = require('child_process')
4
4
const debug = require ( 'debug' ) ( 'attempt-backport' )
5
5
const request = require ( 'request' )
6
6
const node_repo = require ( '../lib/node-repo' )
7
- const updatePrWithLabels = node_repo . updatePrWithLabels
7
+ const fetchExistingThenUpdatePr = node_repo . fetchExistingThenUpdatePr
8
8
const removeLabelFromPR = node_repo . removeLabelFromPR
9
9
const getBotPrLabels = node_repo . getBotPrLabels
10
10
@@ -132,7 +132,7 @@ function attemptBackport (options, version, isLTS, cb) {
132
132
options . logger . debug ( `backport to ${ version } failed` )
133
133
134
134
if ( ! isLTS ) {
135
- updatePrWithLabels ( options , [ `dont-land-on-v${ version } .x` ] )
135
+ fetchExistingThenUpdatePr ( options , [ `dont-land-on-v${ version } .x` ] )
136
136
} else {
137
137
getBotPrLabels ( options , ( err , ourLabels ) => {
138
138
if ( err ) {
@@ -223,7 +223,7 @@ function attemptBackport (options, version, isLTS, cb) {
223
223
const cp = wrapCP ( 'git' , [ 'am' ] , { stdio : 'pipe' } , function done ( ) {
224
224
// Success!
225
225
if ( isLTS ) {
226
- updatePrWithLabels ( options , [ `lts-watch-v${ version } .x` ] )
226
+ fetchExistingThenUpdatePr ( options , [ `lts-watch-v${ version } .x` ] )
227
227
} else {
228
228
// TODO(Fishrock123): Re-enable this, but do a check first
229
229
// to make sure the label was set by the bot only.
0 commit comments