screwdriver-api 4.1.255 → 4.1.256
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugins/builds/index.js +15 -1
package/package.json
CHANGED
package/plugins/builds/index.js
CHANGED
|
@@ -288,7 +288,21 @@ async function createInternalBuild(config) {
|
|
|
288
288
|
baseBranch
|
|
289
289
|
};
|
|
290
290
|
|
|
291
|
-
|
|
291
|
+
let jobState = job.state;
|
|
292
|
+
|
|
293
|
+
if (prRef) {
|
|
294
|
+
// Whether a job is enabled is determined by the state of the original job.
|
|
295
|
+
// If the original job does not exist, it will be enabled.
|
|
296
|
+
const originalJobName = job.parsePRJobName('job');
|
|
297
|
+
const originalJob = await jobFactory.get({
|
|
298
|
+
name: originalJobName,
|
|
299
|
+
pipelineId
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
jobState = originalJob ? originalJob.state : 'ENABLED';
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
if (jobState === 'ENABLED') {
|
|
292
306
|
return buildFactory.create(internalBuildConfig);
|
|
293
307
|
}
|
|
294
308
|
|