screwdriver-api 8.0.106 → 8.0.107

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": "8.0.106",
3
+ "version": "8.0.107",
4
4
  "description": "API server for the Screwdriver.cd service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -73,10 +73,9 @@ async function triggerNextJobs(config, server) {
73
73
  const currentPipeline = config.pipeline;
74
74
  const currentJob = config.job;
75
75
  const currentBuild = config.build;
76
+ const currentEvent = config.event;
76
77
  const { jobFactory, buildFactory, eventFactory, pipelineFactory, stageFactory, stageBuildFactory } = server.app;
77
78
 
78
- /** @type {EventModel} */
79
- const currentEvent = await eventFactory.get({ id: currentBuild.eventId });
80
79
  const current = {
81
80
  pipeline: currentPipeline,
82
81
  build: currentBuild,
@@ -357,10 +356,10 @@ async function triggerNextJobs(config, server) {
357
356
  const stageBuild = await getStageBuild({
358
357
  stageFactory,
359
358
  stageBuildFactory,
360
- workflowGraph: currentEvent.workflowGraph,
359
+ workflowGraph: externalEvent.workflowGraph,
361
360
  jobName: nextJob.name,
362
361
  pipelineId: currentPipeline.id,
363
- eventId: currentEvent.id
362
+ eventId: externalEvent.id
364
363
  });
365
364
 
366
365
  if (stageBuild) {
@@ -370,7 +369,7 @@ async function triggerNextJobs(config, server) {
370
369
  if (nextBuild && nextBuild.status === Status.SUCCESS) {
371
370
  downstreamOfNextJobsToBeProcessed.push({
372
371
  build: nextBuild,
373
- event: currentEvent,
372
+ event: externalEvent,
374
373
  job: nextJob,
375
374
  pipeline: await nextJob.pipeline,
376
375
  scmContext: config.scmContext,