CircleCI-Public / orb-tools-orb

Various tools for authoring and publishing CircleCI orbs
https://circleci.com/orbs/registry/orb/circleci/orb-tools
MIT License
51 stars 74 forks source link

`trigger-integration-tests-workflow` command triggers workflow using wrong user account #118

Closed antonlisovenko closed 2 years ago

antonlisovenko commented 2 years ago

Hi.

It looks like the trigger-integration-tests-workflow command always uses the same user for the new workflow - the one corresponding to the CIRCLE_TOKEN which as it looks like is the token of the person who created the project initially. So if any other user (not the one who created a project initially) creates a PR and runs a workflow they see different users for the main workflow and the second "integration test" workflow that looks counter-intuitive.

In the end this creates vision that two different users ran the workflows sequentially which is not true

Is it possible to use the CircleCI token of the user who runs the first workflow to trigger the second one?

KyleTryon commented 2 years ago

Hello @antonlisovenko.

CircleCI can not automatically select which environment variables to use based on the user which triggered the job. Two users can however work on separate branches at the same time which should resolve the second half of the issue.