Skip to content

Commit

Permalink
testing...
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Jan 29, 2024
1 parent 655b5b3 commit 7646c3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions job_creator.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,16 +276,16 @@ private function getCmsMajor(): string
private function getCmsMajorFromBranch(): string
{
$branch = $this->getCleanedBranch();
$repo = explode('/', $this->githubRepository)[1];
// $repo = explode('/', $this->githubRepository)[1];
$branchMajor = '';
if (preg_match('#^[1-9]$#', $branch)) {
$branchMajor = $branch;
} elseif (preg_match('#^([1-9])\.[0-9]+$#', $branch, $matches)) {
$branchMajor = $matches[1];
}
foreach (array_keys(CMS_TO_REPO_MAJOR_VERSIONS) as $cmsMajor) {
if (isset(CMS_TO_REPO_MAJOR_VERSIONS[$cmsMajor][$repo])) {
if (CMS_TO_REPO_MAJOR_VERSIONS[$cmsMajor][$repo] === $branchMajor) {
if (isset(CMS_TO_REPO_MAJOR_VERSIONS[$cmsMajor][$this->repoName])) {
if (CMS_TO_REPO_MAJOR_VERSIONS[$cmsMajor][$this->repoName] === $branchMajor) {
return $cmsMajor;
}
}
Expand Down

0 comments on commit 7646c3f

Please sign in to comment.