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(): make secrets parameter optional #299

Merged
merged 3 commits into from
Apr 7, 2022
Merged

feat(): make secrets parameter optional #299

merged 3 commits into from
Apr 7, 2022

Conversation

kevinschoonover
Copy link
Contributor

@kevinschoonover kevinschoonover commented Mar 5, 2022

closes #289

tested this PR locally using act

@kevinschoonover kevinschoonover marked this pull request as ready for review March 5, 2022 22:18
@hashicorp-cla
Copy link

hashicorp-cla commented Mar 12, 2022

CLA assistant check
All committers have signed the CLA.

@TomNorth
Copy link
Contributor

TomNorth commented Apr 5, 2022

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 continue-on-error in the workflow, but I'm putting together to be broadly consumed by engineers across the org, so that's not viable going forward.

(Thanks for this)

@kevinschoonover
Copy link
Contributor Author

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?

Copy link
Contributor

@tomhjp tomhjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@kevinschoonover
Copy link
Contributor Author

Sorry about that! Should be done now.

Copy link
Contributor

@tomhjp tomhjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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');
});

Copy link
Contributor

@tomhjp tomhjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Make secrets parameter optional so we can use this action just to get the token.
6 participants