Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(yaml): add yaml as valid file format #1

Open
wants to merge 2 commits into
base: main-enterprise
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ ${this.results.reduce((x, y) => {

// Overlay repo config
// RepoConfigs should be preloaded but checking anyway
const overrideRepoConfig = this.repoConfigs[`${repo.repo}.yml`]?.repository
const overrideRepoConfig = this.repoConfigs[`${repo.repo}.yml`]?.repository || this.repoConfigs[`${repo.repo}.yaml`]?.repository
if (overrideRepoConfig) {
repoConfig = this.mergeDeep.mergeDeep({}, repoConfig, overrideRepoConfig)
}
Expand Down Expand Up @@ -384,7 +384,7 @@ ${this.results.reduce((x, y) => {
const repoName = repo.repo
const subOrgOverrideConfig = this.getSubOrgConfig(repoName)
this.log.debug(`suborg config for ${repoName} is ${JSON.stringify(subOrgOverrideConfig)}`)
const repoOverrideConfig = this.repoConfigs[`${repoName}.yml`] || {}
const repoOverrideConfig = this.repoConfigs[`${repoName}.yml`] || this.repoConfigs[`${repoName}.yaml`] || {}
const overrideConfig = this.mergeDeep.mergeDeep({}, this.returnRepoSpecificConfigs(this.config), subOrgOverrideConfig, repoOverrideConfig)

this.log.debug(`consolidated config is ${JSON.stringify(overrideConfig)}`)
Expand Down Expand Up @@ -642,7 +642,7 @@ ${this.results.reduce((x, y) => {
// If repo is passed get only its config
// else load all the config
if (repo) {
if (override.name === `${repo.repo}.yml`) {
if (override.name === `${repo.repo}.yml` || override.name === `${repo.repo}.yaml`) {
const data = await this.loadYaml(override.path)
this.log.debug(`data = ${JSON.stringify(data)}`)
repoConfigs[override.name] = data
Expand Down