From 5183a226f3fc75d623ecb9e487b4e9c4ca4554b9 Mon Sep 17 00:00:00 2001 From: BorisDog Date: Mon, 21 Jul 2025 15:41:16 -0700 Subject: [PATCH] Create pr.yml --- .github/workflows/pr.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..eea396d4 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,31 @@ +name: Pull Request validation + +on: + pull_request: + types: + - opened + - reopened + - edited + - labeled + - unlabeled + - synchronize + +jobs: + pull-request-validation: + name: Pull Request validation. + runs-on: ubuntu-latest + steps: + - name: Pull Request should have a label assigned. + if: ${{ always() && github.event.pull_request.labels[0] == null }} + run: | + exit 1 + + - name: Title should start with a Jira ticket. + if: ${{ always() && !(startsWith(github.event.pull_request.title, 'VS-')) }} + run: | + exit 1 + + - name: Title should not end with period or ellipses. + if: ${{ always() && (endsWith(github.event.pull_request.title, '.') || endsWith(github.event.pull_request.title, '…')) }} + run: | + exit 1