Hello all, I am in the process of setting up infracost in a Bitbucket pipeline. I've used your example on https://bitbucket.org/infracost/infracost-bitbucket-pipeline/src/master/ but I've noticed that for comments on pull requests the documentation mentions using an app password under my account. Is it also possible to use a repository access token or something like that? Or should I just have infracost generate output and then do the comments on a pullrequest via an API call?
Context: I would like for teammates to be able to use the pipeline when they do pull requests, without comments showing up under my own account 🙂.
If I need to explain anything further, let me know.
02/15/2023, 2:02 PM
@rhythmic-ambulance-95028 it’s not something I’ve tried, but reading the docs about it I think it should work as long as the repository access token has write access to the pull request.
Have just tested it out and it works fine if you just pass something like this to the
02/15/2023, 2:17 PM
Will give that a try, thx!
So I just need to define BITBUCKET_REPO_TOKEN using the secret generated for the repository access token in the Bitbucket repository itself?
02/15/2023, 2:21 PM
Yes. And the secret needs to have the Pull Request Write permission enabled.
02/15/2023, 2:25 PM
This works for me as well, thanks for the quick reply!