btp-setup-automator icon indicating copy to clipboard operation
btp-setup-automator copied to clipboard

Make accountMetadata information as environment variables available for all commands

Open pirnz opened this issue 3 years ago • 5 comments
trafficstars

Hello, In order to give more power and flexibility to the commands section (specially the post and prune commands), I'd like to have available information about the subaccount, org etc.

This modification adds to the environment variables all info that is stored in the accountMetadata object (all items that have string values). This allows commands to get the current org with $org or subaccount id with $subaccountid, for example.

I know this implementation might be buggy, just wanted to propose the addition. I can work on a more refined version.

Kind regards, Pedro

pirnz avatar Jun 20 '22 15:06 pirnz

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: pirnz
:x: PedroIr
You have signed the CLA already but the status is still pending? Let us recheck it.

cla-assistant[bot] avatar Jun 20 '22 15:06 cla-assistant[bot]

Please give me a bit of time to look into this. There might be some challenges around exposing all env variables into a file.

rui1610 avatar Jun 22 '22 07:06 rui1610

I think we should do that, as it brings a lot of benefits for other scripts. @lechnerc77 : do you agree? If yes, I think we should tackle this and spend quality time on proper coding and testing before releasing it. @pirnz : would you be willing to spend some time on a good implementation?

rui1610 avatar Jul 11 '22 06:07 rui1610

Hi @PedroIr , I can't merge the pull request from you and @pirnz as long as you didn't accept the Contributor License Agreement. Can you do that?

Best, Rui

rui1610 avatar Aug 17 '22 07:08 rui1610

Hi! Sorry for the hiatus, I'm ready to put some time to work on this now. I'll review the implementation and add documentation around this. Pedro

pirnz avatar Sep 15 '22 13:09 pirnz