From a26a460ff0be2f782772a12a93d75c944440f869 Mon Sep 17 00:00:00 2001 From: Shaur Kumar Date: Fri, 15 May 2026 10:12:33 -0600 Subject: [PATCH] chore: finish migration of find_release_branch to moveit_pro_ci --- .../actions/find_release_branch/action.yaml | 42 ------------------- .../workflows/batch-merge-release-branch.yaml | 2 +- 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 .github/actions/find_release_branch/action.yaml diff --git a/.github/actions/find_release_branch/action.yaml b/.github/actions/find_release_branch/action.yaml deleted file mode 100644 index d5dd87c6..00000000 --- a/.github/actions/find_release_branch/action.yaml +++ /dev/null @@ -1,42 +0,0 @@ -name: 'Find Release Branch' -description: 'Find the highest v. branch in the repository.' -outputs: - branch: - description: 'The release branch name (e.g. v9.5).' - value: ${{ steps.find_branch.outputs.branch }} - -runs: - using: 'composite' - steps: - - name: Find highest release branch - id: find_branch - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - with: - script: | - const owner = context.repo.owner; - const repo = context.repo.repo; - - const branchPattern = /^v(\d+)\.(\d+)$/; - const branches = await github.paginate(github.rest.repos.listBranches, { - owner, - repo, - per_page: 100, - }); - - const versionBranches = branches - .map(b => b.name) - .filter(name => branchPattern.test(name)) - .sort((a, b) => { - const [, aMajor, aMinor] = a.match(branchPattern).map(Number); - const [, bMajor, bMinor] = b.match(branchPattern).map(Number); - return bMajor - aMajor || bMinor - aMinor; - }); - - if (versionBranches.length === 0) { - core.setFailed('No branch matching v. found.'); - return; - } - - const branch = versionBranches[0]; - core.info(`Found release branch: ${branch}`); - core.setOutput('branch', branch); diff --git a/.github/workflows/batch-merge-release-branch.yaml b/.github/workflows/batch-merge-release-branch.yaml index 4683b3de..83cef5ce 100644 --- a/.github/workflows/batch-merge-release-branch.yaml +++ b/.github/workflows/batch-merge-release-branch.yaml @@ -23,7 +23,7 @@ jobs: - name: Get current release branch id: get_current_release_branch - uses: ./.github/actions/find_release_branch + uses: PickNikRobotics/moveit_pro_ci/.github/actions/find_release_branch@d8676de7c5e49d274277cf536b6d41fbacf71642 # v0.2.0 - name: Merge release branch into main id: merge