From 96921404c23f602dd0136c91353907289278618b Mon Sep 17 00:00:00 2001 From: Kyle Harding Date: Fri, 20 Dec 2024 15:17:47 -0500 Subject: [PATCH] Fix existing existing environment variable filter This boolean was reversed when filtering existing variables, so it consistently sent a POST request to existing vars. Signed-off-by: Kyle Harding --- lib/plugins/environments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/environments.js b/lib/plugins/environments.js index 4d064746..172e53c2 100644 --- a/lib/plugins/environments.js +++ b/lib/plugins/environments.js @@ -167,7 +167,7 @@ module.exports = class Environments extends Diffable { for (const variable of attrs.variables) { const existingVariable = existingVariables.find((_var) => _var.name === variable.name) if (existingVariable) { - existingVariables = existingVariables.filter(_var => _var.name !== variable.name) + existingVariables = existingVariables.filter(_var => _var.name === variable.name) if (existingVariable.value !== variable.value) { await this.github.request('PATCH /repos/:org/:repo/environments/:environment_name/variables/:variable_name', { org: this.repo.owner,