Skip to content

Commit 00e9205

Browse files
committed
On top level ruleset updates, it would trigger a sync all that will trigger top level branch protection rules across all repos. Make a clone of the branch settings before modifying it since it's a shared object.
1 parent 99127f7 commit 00e9205

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/plugins/branches.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = class Branches extends ErrorStash {
1313
super(errors)
1414
this.github = github
1515
this.repo = repo
16-
this.branches = settings
16+
this.branches = structuredClone(settings)
1717
this.log = log
1818
this.nop = nop
1919
}

lib/plugins/overrides.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = class Overrides extends ErrorStash {
2828
static removeOverrides (overrides, source, existing) {
2929
overrides.forEach(override => {
3030
let sourceRefs = Overrides.getObjectRef(source, override)
31-
let data = JSON.stringify(sourceRefs, null, 2)
31+
let data = JSON.stringify(sourceRefs)
3232
if (data.includes('{{EXTERNALLY_DEFINED}}')) {
3333
let existingRefs = Overrides.getObjectRef(existing, override)
3434
sourceRefs.forEach(sourceRef => {

0 commit comments

Comments
 (0)