screwdriver-api 7.0.194 → 7.0.196

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.194",
3
+ "version": "7.0.196",
4
4
  "description": "API server for the Screwdriver.cd service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -5,6 +5,7 @@ const hoek = require('@hapi/hoek');
5
5
  const schema = require('screwdriver-data-schema');
6
6
  const joi = require('joi');
7
7
  const idSchema = schema.models.build.base.extract('id');
8
+ const merge = require('lodash.mergewith');
8
9
  const { getScmUri, getUserPermissions, getFullStageJobName } = require('../helper');
9
10
  const STAGE_TEARDOWN_PATTERN = /^stage@([\w-]+)(?::teardown)$/;
10
11
  const TERMINAL_STATUSES = ['FAILURE', 'ABORTED', 'UNSTABLE', 'COLLAPSED'];
@@ -247,7 +248,7 @@ module.exports = () => ({
247
248
  build.statusMessage = statusMessage || build.statusMessage;
248
249
  } else if (['SUCCESS', 'FAILURE', 'ABORTED'].includes(desiredStatus)) {
249
250
  build.meta = request.payload.meta || {};
250
- event.meta = { ...event.meta, ...build.meta };
251
+ merge(event.meta, build.meta);
251
252
  build.endTime = new Date().toISOString();
252
253
  } else if (desiredStatus === 'RUNNING') {
253
254
  build.startTime = new Date().toISOString();