Skip to content

Commit

Permalink
Fix bug in get secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
giade committed Nov 23, 2023
1 parent cf5e677 commit c4b4fb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jumpgroup/secret-fetcher",
"version": "1.6.3",
"version": "1.6.4",
"author": "JumpGroup srl",
"main": "src/index.js",
"license": "MIT",
Expand Down
9 changes: 3 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,17 @@ const getRemoteKeys = async (groupKey, groupSecret) => {
item.tags.forEach(tag => {
const [tagGroup, tagValue] = tag.split(":");
if (tagGroup) {
var newTag = tagGroup;
if (tagValue) {
newTag = tagGroup === groupKey ? tagValue : tag;
}
const newTag = tagValue || tagGroup;
if (!tagToObjectMap[newTag]) {
tagToObjectMap[newTag] = {};
}
const itemProperties = yaml.loadAll(item.note)[0];
tagToObjectMap[newTag] = itemProperties;

tagToObjectMap[newTag] = { ...tagToObjectMap[newTag], ...itemProperties };
}
});
});


return tagToObjectMap;
}

Expand Down

0 comments on commit c4b4fb9

Please sign in to comment.