Skip to content

Commit 657a1c0

Browse files
authored
fix: diff of branch protection bypass users (#594)
1 parent a037603 commit 657a1c0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/mergeDeep.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const mergeBy = require('./mergeArrayBy')
22
const DeploymentConfig = require('./deploymentConfig')
33

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

test/unit/lib/mergeDeep.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -981,17 +981,17 @@ entries:
981981
dismissal_restrictions: {
982982
apps: [],
983983
teams: [],
984-
users: [{ login: 'test' }, { login: 'test2' }]
984+
users: [{ login: 'test', type: 'User' }, { login: 'test2', type: 'User' }]
985985
}
986986
}
987987
}
988-
988+
989989
const source = {
990990
required_pull_request_reviews: {
991991
dismissal_restrictions: {
992992
apps: [],
993993
teams: [],
994-
users: [{ login: 'test' }, { login: 'test2' }]
994+
users: ['test', 'test2']
995995
}
996996
}
997997
}

0 commit comments

Comments
 (0)