feat(): make secrets parameter optional#299
Conversation
|
Will this get merged soon? If not I need to create my own action in the next couple of days, but I'd rather avoid it! For my own testing I can just use (Thanks for this) |
|
I need a hashicorp maintainer to approve before it can be merged. @tvoran do you have any cycles to take a look / is there any interest in this change? |
tomhjp
left a comment
There was a problem hiding this comment.
Thanks for opening this. LGTM, although I'm not keen on maintaining yarn.lock alongside package-lock.json unless we get some infrastructure around keeping them in sync (e.g. some kind of CI to ensure yarn import gives a consistent result?). Could you delete it for now please?
|
Sorry about that! Should be done now. |
tomhjp
left a comment
There was a problem hiding this comment.
Thanks! Sorry I forgot to mention in the previous comment, please could we also add a test? To help me verify, I wrote a little unit test, and you can just use this in action.test.js if you like:
it('export only Vault token, no secrets', async () => {
mockExportToken("true")
await exportSecrets();
expect(core.exportVariable).toBeCalledTimes(1);
expect(core.exportVariable).toBeCalledWith('VAULT_TOKEN', 'EXAMPLE');
});
closes #289
tested this PR locally using act