This message was deleted.
# help
b
This message was deleted.
b
Hello! Yes, you have to make a custom API request to update the PR status: https://www.infracost.io/docs/guides/source_control_benefits/#4-pull-request-status
๐Ÿ‘€ 1
a
Just read through it, makes sense. Thanks @busy-agent-35515!
๐Ÿš€ 2
๐Ÿ™Œ 1
w
@ancient-jewelry-73631 when you get it working with Bitbucket Pipelines, can you possibly share your code snippet here so I can add it to the docs so the rest of the community benefits (of course weโ€™d credit you).
a
Sure thing
@white-airport-8778 I have a suggestion for documentation - should I share it in #C01G63Q4HS7?
w
I do most of the docs so you can just DM me ๐Ÿ˜„
๐Ÿ˜„ 1
a
@white-airport-8778 here you go! The PR closing portion was done with @busy-agent-35515โ€™s help
๐Ÿ™Œ 1
This is a slightly better version that checks whether the monthly cost will change before updating the base cost file on the master branch
and the simplest version which does not commit back to the repo but simply closes the PR in Infracost Cloud:
w
Oh wow - thank you @ancient-jewelry-73631 - Iโ€™ll review today and update our docs
๐ŸŽ‰ 1
a
of course!
w
@ancient-jewelry-73631 on pushes to the main/master branch, you can also run this so that branchโ€™s costs (and tagging policy failures) are shown in the new Repos > myrepo > Default branch tab
Copy code
infracost upload --path=/tmp/infracost.json
a
@white-airport-8778 would this be for the base file?
w
yep, since on branch pushes there is no diff, just the
infracost breakdown
from the branch itself
a
@white-airport-8778 I see, I am using
comment
, which I believe takes care of that in one of the previous steps
w
@ancient-jewelry-73631 on main branch pushes, there is no
diff
or
comment
so you need to run
infracost breakdown
followed by
infracost upload
so the main branch costs show in the Repos > myrepo > Branches tab
The above is documented here
a
makes sense, thanks!
๐Ÿ™Œ 1