Skip to content

Commit c7fb6ce

Browse files
committed
Create a fresh copy of the base repository config
Signed-off-by: Kyle Harding <kyle@balena.io>
1 parent 4e0cb44 commit c7fb6ce

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lib/settings.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,10 @@ ${this.results.reduce((x, y) => {
298298

299299
async updateRepos(repo) {
300300
this.subOrgConfigs = this.subOrgConfigs || await this.getSubOrgConfigs()
301-
let repoConfig = this.config.repository
301+
// Create a fresh copy of the base repository config
302+
let repoConfig = this.config.repository ? Object.assign({}, this.config.repository) : {}
302303
if (repoConfig) {
303-
repoConfig = Object.assign(repoConfig, { name: repo.repo, org: repo.owner })
304+
repoConfig = Object.assign({}, repoConfig, { name: repo.repo, org: repo.owner })
304305
}
305306

306307
const subOrgConfig = this.getSubOrgConfig(repo.repo)
@@ -791,7 +792,7 @@ ${this.results.reduce((x, y) => {
791792
}
792793
)) {
793794
delete subOrgConfigs[key]
794-
}
795+
}
795796
}
796797
}
797798
return subOrgConfigs
@@ -862,7 +863,7 @@ ${this.results.reduce((x, y) => {
862863
if (this.nop) {
863864
//Remove nulls and undefined from the results
864865
const results = res.flat(3).filter(r => r)
865-
866+
866867
this.results = this.results.concat(results)
867868
}
868869
}

0 commit comments

Comments
 (0)