Added a checkbox to build only the default branch specified in the project.
This commit is contained in:
parent
bc1ee39467
commit
bbbd9b3cf2
7 changed files with 102 additions and 12 deletions
|
|
@ -636,6 +636,14 @@ class WebhookController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
// Check if this branch is to be built.
|
||||
if ($project->getDefaultBranchOnly() && ($branch !== $project->getBranch())) {
|
||||
return [
|
||||
'status' => 'ignored',
|
||||
'message' => 'The branch is not a branch by default. Build is allowed only for the branch by default.'
|
||||
];
|
||||
}
|
||||
|
||||
$environments = $project->getEnvironmentsObjects();
|
||||
if ($environments['count']) {
|
||||
$created_builds = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue