# Build PRs on Bitbucket

**URL:** <https://discuss.circleci.com/t/build-prs-on-bitbucket/27955>\
**Category:** Integrations and Accounts\
**Tags:** bitbucket\
**Created:** [January 25, 2019, 9:25pm UTC](https://discuss.circleci.com/t/build-prs-on-bitbucket/27955 "2019-01-25T21:25:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikemhenry](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/mikemhenry/32/21265_2.png) [@mikemhenry](https://discuss.circleci.com/u/mikemhenry)\
**Post date:** [January 25, 2019, 9:25pm UTC](https://discuss.circleci.com/t/build-prs-on-bitbucket/27955/1 "2019-01-25T21:25:01Z")

</div>

Right now pull requests don’t build unless a user has setup a circleci account. Does circleci not support building pull requests from forks on bitbucket? There is a 2 year old post about it but no updates.

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [January 25, 2019, 9:40pm UTC](https://discuss.circleci.com/t/build-prs-on-bitbucket/27955/2 "2019-01-25T21:40:55Z")

</div>

It does work, but you need to turn it on. I seem to recall that there was a security consideration with this - search the forum for more info. I imagine it is to do with visibility of deploy keys etc, so consider who can make forks in your projects.

The switch is in the Advanced Settings, defaulting to Off:

> #### Build forked pull requests
> 
> Run builds for pull requests from forks. CircleCI will automatically update the commit status shown on GitHub’s pull request page.

See also the switch regarding passing secrets to forks.

---

<div class="post-metadata">

**Author:** ![mikemhenry](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/mikemhenry/32/21265_2.png) [@mikemhenry](https://discuss.circleci.com/u/mikemhenry)\
**Post date:** [January 25, 2019, 10:04pm UTC](https://discuss.circleci.com/t/build-prs-on-bitbucket/27955/3 "2019-01-25T22:04:47Z")

</div>

So it doesn’t seem to be working (I noticed that it says GitHub but not bitbucket?), but let me supply some more details:

- I’ve got that option turned on
- I’ve also set “Pass secrets to builds from forked pull requests”
- The .circleci config file is the same in both the main repo and the fork
- The main repo has a circleci project setup
- The forked repo user has not setup a circleci account

I’ve got another person in the mix who made an account and their PR fired off a CI build, but it happened under their circleci account.

The behavior I expected was:

- PR from a fork is created
- CI build is spun up under the main repo account

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [April 25, 2019, 10:04pm UTC](https://discuss.circleci.com/t/build-prs-on-bitbucket/27955/4 "2019-04-25T22:04:48Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
