Skip to content

Commit e059331

Browse files
authored
Add 'context' to mergeDeep name fields (#697)
* Add test case for changes to ruleset required_status_checks Signed-off-by: Kyle Harding <[email protected]> * Add 'context' to mergeDeep name fields This allows mergeDeep to correctly identify changes to required_status_checks in rulesets Signed-off-by: Kyle Harding <[email protected]> --------- Signed-off-by: Kyle Harding <[email protected]>
1 parent 193eac3 commit e059331

File tree

2 files changed

+306
-49
lines changed

2 files changed

+306
-49
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', 'login', 'type', 'key_prefix']
4+
const NAME_FIELDS = ['name', 'username', 'actor_id', 'login', 'type', 'key_prefix', 'context']
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

0 commit comments

Comments
 (0)