From e254a454e3021ff1d947a7c3f533f21fd2218e48 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 9 Apr 2024 16:52:43 +1200 Subject: [PATCH] FIX Handle linkfield 3.0 branch --- funcs.php | 2 +- tests/BranchesTest.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/funcs.php b/funcs.php index 5cc1d9d..3f1acf3 100644 --- a/funcs.php +++ b/funcs.php @@ -164,7 +164,7 @@ function branches( if (isset(DO_NOT_MERGE_UP_FROM_MAJOR[$githubRepository])) { $doNotMergeUpFromMajor = DO_NOT_MERGE_UP_FROM_MAJOR[$githubRepository]; $branches = array_filter($branches, function($branch) use ($doNotMergeUpFromMajor) { - return version_compare($branch, $doNotMergeUpFromMajor, '>'); + return version_compare($branch, "$doNotMergeUpFromMajor.999999.999999", '>'); }); } diff --git a/tests/BranchesTest.php b/tests/BranchesTest.php index 2559ab0..7c49a3e 100644 --- a/tests/BranchesTest.php +++ b/tests/BranchesTest.php @@ -452,6 +452,9 @@ public function provideBranches() {"name": "1"}, {"name": "2"}, {"name": "3"}, + {"name": "3.0"}, + {"name": "3.1"}, + {"name": "3.999"}, {"name": "4"}, {"name": "4.0"}, {"name": "5"}