diff --git a/lib/plugins/environments.js b/lib/plugins/environments.js index 52a29612..5062503f 100644 --- a/lib/plugins/environments.js +++ b/lib/plugins/environments.js @@ -10,11 +10,7 @@ module.exports = class Environments extends Diffable { // Force all names to lowercase to avoid comparison issues. this.entries.forEach((environment) => { environment.name = environment.name.toLowerCase() - if (environment.variables) { - environment.variables.forEach((variable) => { - variable.name = variable.name.toLowerCase() - }) - } + // Do not force variables to lowercase as they are case-sensitive on create (POST). }) } } @@ -297,11 +293,11 @@ module.exports = class Environments extends Diffable { for (const variable of attrs.variables) { const existingVariable = existingVariables.find( - (_var) => _var.name === variable.name + (_var) => _var.name === variable.name.toLowerCase() ) if (existingVariable) { existingVariables = existingVariables.filter( - (_var) => _var.name === variable.name + (_var) => _var.name !== variable.name.toLowerCase() ) if (existingVariable.value !== variable.value) { await this.github.request(