# Building forked projects

**URL:** <https://discuss.bitrise.io/t/building-forked-projects/3415>\
**Category:** Question & Answer\
**Created:** [December 1, 2017, 3:17pm UTC](https://discuss.bitrise.io/t/building-forked-projects/3415 "2017-12-01T15:17:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![markf](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@markf](https://discuss.bitrise.io/u/markf)\
**Post date:** [December 1, 2017, 3:17pm UTC](https://discuss.bitrise.io/t/building-forked-projects/3415/1 "2017-12-01T15:17:56Z")

</div>

I have many repos that are all forks of one project. Is it possible to only create a single app on Bitrise for the main repo, then have Bitrise build the fork if a push is made to the fork?

So my flow would be like this:

I have Project 1 in Bitbucket. I setup Project 1 in Bitrise to build my app when I push to Project 1. I fork the Project 1 repo and now I have Project 2. I need Bitrise to build Project 2 if I push to Project 2 without setting up a new app in Bitrise.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [December 2, 2017, 9:42am UTC](https://discuss.bitrise.io/t/building-forked-projects/3415/2 "2017-12-02T09:42:18Z")

</div>

Hi @markf,

Unfortunately it’s not possible to build forks when you push into the fork, because non of the git hosting services support that on an API / webhook level.

What’s possible, and is definitely supported today, is **when someone starts a Pull Request from the fork into the main repository** (which - the main repo - you registered on [bitrise.io](http://bitrise.io) ) then [bitrise.io](http://bitrise.io) can build the PR, even if the source is from a fork.

This way you don’t have to setup a new app for the fork, but builds will only happen when you open a PR and when you update it (push new commits to the PR’s branch).

I hope this helps, if you’d have any questions just let us know! 🙂

---

<div class="post-metadata">

**Author:** ![markf](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@markf](https://discuss.bitrise.io/u/markf)\
**Post date:** [December 4, 2017, 12:55pm UTC](https://discuss.bitrise.io/t/building-forked-projects/3415/3 "2017-12-04T12:55:13Z")

</div>

Thanks @viktorbenei! That is something to keep in mind. Bitbucket does have a webhook for when a fork is created. Is it possible to use that hook to create a new app in bitrise?

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [December 5, 2017, 9:29am UTC](https://discuss.bitrise.io/t/building-forked-projects/3415/4 "2017-12-05T09:29:26Z")

</div>

Hi @markf,

Indeed that’s an option, although the repository have to be registered to a user; simply from the webhook we can’t determine to which [bitrise.io](http://bitrise.io) user to register it. In addition, if the fork is private, proper access also have to be granted, and that’s not possible via a webhook.
