Skip to content

Commit

Permalink
Add 'context' to mergeDeep name fields (#697)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
klutchell authored Nov 22, 2024
1 parent 193eac3 commit e059331
Show file tree
Hide file tree
Showing 2 changed files with 306 additions and 49 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', 'login', 'type', 'key_prefix']
const NAME_FIELDS = ['name', 'username', 'actor_id', 'login', 'type', 'key_prefix', 'context']
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)] }

Expand Down
Loading

0 comments on commit e059331

Please sign in to comment.