{"_id":"590a04f6ed80861900cbc787","parentDoc":null,"project":"55b2d5baa74a380d00e290c4","__v":0,"category":{"_id":"590a04f3ed80861900cbc73f","version":"590a04f2ed80861900cbc737","project":"55b2d5baa74a380d00e290c4","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-10-02T17:55:17.903Z","from_sync":false,"order":7,"slug":"builds-and-tests","title":"Builds"},"version":{"_id":"590a04f2ed80861900cbc737","project":"55b2d5baa74a380d00e290c4","__v":4,"createdAt":"2017-05-03T16:27:30.085Z","releaseDate":"2017-05-03T16:27:30.085Z","categories":["590a04f3ed80861900cbc738","590a04f3ed80861900cbc739","590a04f3ed80861900cbc73a","590a04f3ed80861900cbc73b","590a04f3ed80861900cbc73c","590a04f3ed80861900cbc73d","590a04f3ed80861900cbc73e","590a04f3ed80861900cbc73f","590a04f3ed80861900cbc740","590a04f3ed80861900cbc741","590a04f3ed80861900cbc742","590a04f3ed80861900cbc743","590a04f3ed80861900cbc744","590a04f3ed80861900cbc745","590a04f3ed80861900cbc746","590a04f3ed80861900cbc747","590a04f3ed80861900cbc748","590a04f3ed80861900cbc749","590a04f3ed80861900cbc74a","590a04f3ed80861900cbc74b","590a04f3ed80861900cbc74c","590a04f3ed80861900cbc74d","59124949de13f61900336a7a","5914b04e7c2c552d008b7104","5914b47242c6a22300b9dc20"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"7.0.0","version":"7"},"user":"55b2d5626862a10d00887af9","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-16T20:41:22.567Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"Buddybuild triggers a new build whenever a pull request is opened and when commits are added to an existing pull request. The commit's status is updated in GitHub, Bitbucket or GitLab so that you can tell if the pull request is safe to merge.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Merge commit behaviour\"\n}\n[/block]\nRather than simply building each pull request commit, instead buddybuild builds the merge of that pull request commit and the tip of its base branch. In other words, we build the pull request *merge commit* so that you always know if your changes are safe to merge.\n\nSimilarly when you click on **Build Now** on an open pull request in buddybuild we build the merge commit of the latest pull request commit against the tip of its base branch.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Enabling pull requests\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Pull request features are available for GitHub, Bitbucket or GitLab apps **if you have signed up with those services in buddybuild**.\",\n  \"title\": \"Looking for Pull Request in buddybuild?\"\n}\n[/block]\nVisit your build settings and ensure that the **Build pull requests** setting is enabled.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/813aff8-Builds_-_Settings_-_Build_pushes_and_Pull_Requests.png\",\n        \"Builds - Settings - Build pushes and Pull Requests.png\",\n        1500,\n        390,\n        \"#dae0e2\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nIf **Build pull requests** is enabled then buddybuild will build the pull request *merge commit* when you open a pull request and whenever you push code to a pull request, instead of building the pull request commit.\n\nOtherwise, if **Build pushes** is enabled then buddybuild will build your commit when you push code.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Optimizing your setup\"\n}\n[/block]\nFor larger teams we recommend that you enable pull requests by default for all branches and build pushes for base branches only. This will allow your team to have the latest pull request commit status and the latest commit status on your base branches (like *develop* and *master*), while reducing the noise of unstable feature branches.\n\nThis can be done by ensuring that **Build pushes** is disabled by default but enabled for each of your base branches (*develop*, *master* and *release* for example) in the **Branch-specific configurations**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/19cdabd-Builds_-_Settings_-_Build_pushes_override.png\",\n        \"Builds - Settings - Build pushes override.png\",\n        1500,\n        542,\n        \"#1395e0\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Cross-repository pull requests\"\n}\n[/block]\nBy default, cross-repository pull requests are disabled in buddybuild. To enable this feature, first click the **configure** link beneath the **Build pull requests** option. Then enable the **Build cross-repository pull requests** setting in the dialog that appears.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/2fc74bb-Builds_-_Settings_-_Pull_Requests_toggle.png\",\n        \"Builds - Settings - Pull Requests toggle.png\",\n        1500,\n        183,\n        \"#d1d2d3\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nBuddybuild offers two options that let you control which repositories you would like to build pull requests from:\n* If the **Build all forked repositories** setting is enabled, buddybuild will create a new build for all incoming pull requests, regardless of which organization or repository it came from.\n* For fine-grained control over which repositories buddybuild builds pull requests for, you can disable the **Build all forked repositories** setting and then enable pull requests from forks that you trust.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/33ec976-Builds_-_Settings_-_Pull_Requests_forked_repos.png\",\n        \"Builds - Settings - Pull Requests forked repos.png\",\n        1500,\n        542,\n        \"#edf0f3\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"pull-requests","type":"basic","title":"Pull Requests"}
Buddybuild triggers a new build whenever a pull request is opened and when commits are added to an existing pull request. The commit's status is updated in GitHub, Bitbucket or GitLab so that you can tell if the pull request is safe to merge. [block:api-header] { "type": "basic", "title": "Merge commit behaviour" } [/block] Rather than simply building each pull request commit, instead buddybuild builds the merge of that pull request commit and the tip of its base branch. In other words, we build the pull request *merge commit* so that you always know if your changes are safe to merge. Similarly when you click on **Build Now** on an open pull request in buddybuild we build the merge commit of the latest pull request commit against the tip of its base branch. [block:api-header] { "type": "basic", "title": "Enabling pull requests" } [/block] [block:callout] { "type": "warning", "body": "Pull request features are available for GitHub, Bitbucket or GitLab apps **if you have signed up with those services in buddybuild**.", "title": "Looking for Pull Request in buddybuild?" } [/block] Visit your build settings and ensure that the **Build pull requests** setting is enabled. [block:image] { "images": [ { "image": [ "https://files.readme.io/813aff8-Builds_-_Settings_-_Build_pushes_and_Pull_Requests.png", "Builds - Settings - Build pushes and Pull Requests.png", 1500, 390, "#dae0e2" ], "sizing": "full" } ] } [/block] If **Build pull requests** is enabled then buddybuild will build the pull request *merge commit* when you open a pull request and whenever you push code to a pull request, instead of building the pull request commit. Otherwise, if **Build pushes** is enabled then buddybuild will build your commit when you push code. [block:api-header] { "type": "basic", "title": "Optimizing your setup" } [/block] For larger teams we recommend that you enable pull requests by default for all branches and build pushes for base branches only. This will allow your team to have the latest pull request commit status and the latest commit status on your base branches (like *develop* and *master*), while reducing the noise of unstable feature branches. This can be done by ensuring that **Build pushes** is disabled by default but enabled for each of your base branches (*develop*, *master* and *release* for example) in the **Branch-specific configurations**. [block:image] { "images": [ { "image": [ "https://files.readme.io/19cdabd-Builds_-_Settings_-_Build_pushes_override.png", "Builds - Settings - Build pushes override.png", 1500, 542, "#1395e0" ], "sizing": "full" } ] } [/block] [block:api-header] { "type": "basic", "title": "Cross-repository pull requests" } [/block] By default, cross-repository pull requests are disabled in buddybuild. To enable this feature, first click the **configure** link beneath the **Build pull requests** option. Then enable the **Build cross-repository pull requests** setting in the dialog that appears. [block:image] { "images": [ { "image": [ "https://files.readme.io/2fc74bb-Builds_-_Settings_-_Pull_Requests_toggle.png", "Builds - Settings - Pull Requests toggle.png", 1500, 183, "#d1d2d3" ], "sizing": "full" } ] } [/block] Buddybuild offers two options that let you control which repositories you would like to build pull requests from: * If the **Build all forked repositories** setting is enabled, buddybuild will create a new build for all incoming pull requests, regardless of which organization or repository it came from. * For fine-grained control over which repositories buddybuild builds pull requests for, you can disable the **Build all forked repositories** setting and then enable pull requests from forks that you trust. [block:image] { "images": [ { "image": [ "https://files.readme.io/33ec976-Builds_-_Settings_-_Pull_Requests_forked_repos.png", "Builds - Settings - Pull Requests forked repos.png", 1500, 542, "#edf0f3" ], "sizing": "full" } ] } [/block]