Skip to content

Commit

Permalink
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/mergeDeep.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const mergeBy = require('./mergeArrayBy')
const DeploymentConfig = require('./deploymentConfig')

const NAME_FIELDS = ['name', 'username', 'actor_id', 'type', 'login', 'key_prefix']
const NAME_FIELDS = ['name', 'username', 'actor_id', 'login', 'type', 'key_prefix']
const NAME_USERNAME_PROPERTY = item => NAME_FIELDS.find(prop => Object.prototype.hasOwnProperty.call(item, prop))
const GET_NAME_USERNAME_PROPERTY = item => { if (NAME_USERNAME_PROPERTY(item)) return item[NAME_USERNAME_PROPERTY(item)] }

6 changes: 3 additions & 3 deletions test/unit/lib/mergeDeep.test.js
Original file line number Diff line number Diff line change
@@ -981,17 +981,17 @@ entries:
dismissal_restrictions: {
apps: [],
teams: [],
users: [{ login: 'test' }, { login: 'test2' }]
users: [{ login: 'test', type: 'User' }, { login: 'test2', type: 'User' }]
}
}
}

const source = {
required_pull_request_reviews: {
dismissal_restrictions: {
apps: [],
teams: [],
users: [{ login: 'test' }, { login: 'test2' }]
users: ['test', 'test2']
}
}
}

0 comments on commit 657a1c0

Please sign in to comment.