From 339a0deec84e15265f90439048549e11e0b1e91a Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 5 Oct 2023 16:20:03 -0400 Subject: [PATCH] github: simplify target branch extraction from PR title Signed-off-by: Simon Deziel --- .github/workflows/commits.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/commits.yml b/.github/workflows/commits.yml index 9f7d4a8d2..be64da6fe 100644 --- a/.github/workflows/commits.yml +++ b/.github/workflows/commits.yml @@ -6,7 +6,7 @@ permissions: contents: read jobs: - dco-check: + commits: permissions: pull-requests: read # for tim-actions/get-pr-commits to get list of commits from the PR name: Signed-off-by (DCO) and branch target @@ -29,7 +29,7 @@ jobs: TITLE: ${{ github.event.pull_request.title }} run: | set -eux - TARGET_FROM_PR_TITLE="$(echo "${TITLE}" | sed -n 's/.*(\(\(latest\|[0-9]\.[0-9]\)-\(edge\|candidate\)\))$/\1/p')" + TARGET_FROM_PR_TITLE="$(echo "${TITLE}" | sed -n 's/.*(\([0-9]\.[0-9]-\(edge\|candidate\)\))$/\1/p')" if [ -z "${TARGET_FROM_PR_TITLE}" ]; then TARGET_FROM_PR_TITLE="latest-edge" else