screwdriver-api 7.0.149 → 7.0.151

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-api",
3
- "version": "7.0.149",
3
+ "version": "7.0.151",
4
4
  "description": "API server for the Screwdriver.cd service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -335,14 +335,14 @@ async function createInternalBuild(config) {
335
335
 
336
336
  if (ref) {
337
337
  // Whether a job is enabled is determined by the state of the original job.
338
- // If the original job does not exist, it will be enabled.
338
+ // If the original job does not exist or archived, it will be enabled.
339
339
  const originalJobName = job.parsePRJobName('job');
340
340
  const originalJob = await jobFactory.get({
341
341
  name: originalJobName,
342
342
  pipelineId
343
343
  });
344
344
 
345
- jobState = originalJob ? originalJob.state : Status.ENABLED;
345
+ jobState = originalJob && !originalJob.archived ? originalJob.state : Status.ENABLED;
346
346
  }
347
347
 
348
348
  if (Status.isEnabled(jobState)) {