From 9c405ee7479dc6f06a46f42b9ee2ab39a2955366 Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Tue, 5 Mar 2024 03:47:32 +0100 Subject: [PATCH 1/2] Add a workflow that verifies PR title --- .github/workflows/check-pr-title.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/check-pr-title.yml diff --git a/.github/workflows/check-pr-title.yml b/.github/workflows/check-pr-title.yml new file mode 100644 index 0000000000..40c3c3a4dc --- /dev/null +++ b/.github/workflows/check-pr-title.yml @@ -0,0 +1,22 @@ +# NOTE: This is a common file that is overwritten by realm/ci-actions sync service +# and should only be modified in that repository. + +name: "Check PR Title" +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled, converted_to_draft, edited] + +jobs: + check-pr-title: + name: Check PR Title + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: false + - name: Enforce PR title + uses: realm/ci-actions/title-checker@main + with: + regex: R[A-Z]{2,5}-[0-9]{1,6} + error-hint: Invalid PR title. Make sure it's prefixed with the JIRA ticket the PR addresses or add the no-jira-ticket label. + ignore-labels: 'no-jira-ticket' \ No newline at end of file From 01d5ae1af248320ea70bfe8df4407e626211c4f4 Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Thu, 7 Mar 2024 12:55:22 +0100 Subject: [PATCH 2/2] Update check-pr-title.yml --- .github/workflows/check-pr-title.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-pr-title.yml b/.github/workflows/check-pr-title.yml index 40c3c3a4dc..32640b9646 100644 --- a/.github/workflows/check-pr-title.yml +++ b/.github/workflows/check-pr-title.yml @@ -17,6 +17,6 @@ jobs: - name: Enforce PR title uses: realm/ci-actions/title-checker@main with: - regex: R[A-Z]{2,5}-[0-9]{1,6} + regex: R[A-Z]{2,6}-[0-9]{1,6} error-hint: Invalid PR title. Make sure it's prefixed with the JIRA ticket the PR addresses or add the no-jira-ticket label. - ignore-labels: 'no-jira-ticket' \ No newline at end of file + ignore-labels: 'no-jira-ticket'