Pull Request linking

My Chef Automate instance is integrated with my BitBucket repo. I’m not clear how the PR integration is supposed to work however. Should Chef Automate be interacting with BB to create a PR when I run delivery review, or should one pre-exist before delivery review and Chef Automate find it? The most I see is from the delivery init where it shows “There is a Bitbucket PR for this change” in the pipeline init commit. The thing is that there isn’t any BB PR that I can see and further there’s no link so that’s not useful even if there was.

I’d love some clarification on what I should expect. Optimally, I’d have developers do a simple delivery review to trigger the pipeline and create a PR in one step. It’d also be nice if there actions on either BB or Chef Automate bi-directionally replicate to the other.

1 Like

I figured this out. Automate does in fact link to the pull request, if it’s able to create it. The repo user you used to setup the SCM credentials in the Chef Automate console needs write access to any repo you intend to use delivery with.

If delivery review gives you output like this, that’s probably your problem:

Chef Delivery
Loading configuration from /Users/matt/src/myproject
Review for change mybranch targeted for pipeline master
Created new patchset        
Failed to push branch to Bitbucket: fatal: remote error: Repository not found        
The requested repository does not exist, or you do not have permission to        
access it.