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

Fix actions inputSecretsToActionSecrets returning duplicates of the last provided secret #843

Closed
wants to merge 2 commits into from

Conversation

Tenrys
Copy link
Contributor

@Tenrys Tenrys commented Sep 13, 2023

🔧 Changes

Currently, adding multiple secrets only takes into account the last secret provided to the CLI, even though they are all in the map provided by the command.

Looking deeper after printing around a bit, it seemed that the inputSecretsToActionSecrets function was the culprit, so I made a very simple change to account for how pointers and loop variables work together.

📚 References

I've never used Go so I asked GitHub Copilot for some help, and it did fix the issue after testing it.

image

🔬 Testing

This is the command I used to test changes:

go run ./cmd/auth0 actions update <action-id> -n pre-user-registration -c "hello" -s "USER_REDIRECT_URL=http://localhost:9000/callback" -s "AGENT_REDIRECT_URL=http://localhost:9000/callback" -s "CUSTOMER_REDIRECT_URL=http://localhost:9000/callback" --json

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@Tenrys Tenrys requested a review from a team as a code owner September 13, 2023 11:28
@Tenrys Tenrys mentioned this pull request Sep 13, 2023
6 tasks
@Tenrys Tenrys changed the title Fix actions inputSecretsToActionSecrets returning duplicates of the last provided secret Fix (#841) actions inputSecretsToActionSecrets returning duplicates of the last provided secret Sep 13, 2023
@Tenrys Tenrys changed the title Fix (#841) actions inputSecretsToActionSecrets returning duplicates of the last provided secret Fix #841 actions inputSecretsToActionSecrets returning duplicates of the last provided secret Sep 13, 2023
@Tenrys Tenrys changed the title Fix #841 actions inputSecretsToActionSecrets returning duplicates of the last provided secret Fix actions inputSecretsToActionSecrets returning duplicates of the last provided secret Sep 13, 2023
@Tenrys Tenrys force-pushed the fix-input-secrets-to-action-secrets branch from b21bc39 to a38feb2 Compare September 13, 2023 11:30
@willvedd
Copy link
Contributor

Appreciate you taking the time to create this PR. We love when the community makes contributions! However, I had been working on a duplicate PR in parallel (#844 ). I will be closing this one out. If you can review #844 that would be great. Thanks for your help!

@willvedd willvedd closed this Sep 13, 2023
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.

2 participants