billowy-vase-97860
03/20/2024, 12:15 PMlittle-author-61621
- bash: |
if [ -z "$(System.PullRequest.TargetBranchName)" ]; then
# If System.PullRequest.TargetBranchName is not set, default to 'main'
TARGET_BRANCH="main"
else
# If it is set, use the specified target branch name
TARGET_BRANCH="$(System.PullRequest.TargetBranchName)"
fi
# Clone the base branch (either the target branch of the PR or the default branch) into a temp directory.
git clone $(Build.Repository.Uri) --branch=$TARGET_BRANCH --single-branch /tmp/base
displayName: Checkout base branch
white-airport-8778
TARGET_BRANCH=main
to
TARGET_BRANCH="$(Build.SourceBranchName)"
in that if statement so it uses the feature branch name, this page has the predefined env vars in azure pipelines in case that doesn’t workbillowy-vase-97860
03/20/2024, 12:26 PMwhite-airport-8778
white-airport-8778
infracost_cloud_update
task, that runs on default branch pushes and updates Infracost Cloud with the full branch scan so you can see all issues regardless of what’s being changed in PRs.
That’s not to say you must follow our integrations, of course you can change them to do what’s best for your environment 🙂