From c5db307b9ec002044c163cf1280883cec094f6d3 Mon Sep 17 00:00:00 2001 From: tankilevitch Date: Sun, 10 Nov 2024 15:40:56 +0200 Subject: [PATCH] add verify-pr-title.yml --- .github/workflows/verify-pr-title.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/verify-pr-title.yml diff --git a/.github/workflows/verify-pr-title.yml b/.github/workflows/verify-pr-title.yml new file mode 100644 index 0000000000..66a3e9c365 --- /dev/null +++ b/.github/workflows/verify-pr-title.yml @@ -0,0 +1,27 @@ +name: "Verify PR Title Convention" + +on: + pull_request: + types: [opened, edited] + +jobs: + check-title: + runs-on: ubuntu-latest + steps: + - name: "Check PR title convention" + id: title-check + env: + PR_TITLE: ${{ github.event.pull_request.title }} + run: | + if [[ ! "$PR_TITLE" =~ ^\[(Integration|Core|Docs)(\]\[.*?\])?\]\ .+ ]]; then + echo "PR title does not match the required convention." + echo "Examples of acceptable titles:" + echo "[Integration][ADO] Fix missing team context for non default teams while ingesting boards" + echo "[Core][Logging] Fix Integration logs not being ingested" + echo "[Core] bump fastapi version" + echo "[Docs] Fix Ocean Denial of service in http-proxy-middleware in docs" + echo "[Integration][AWS] Added support to choose specific regions to query resources from" + exit 1 + else + echo "PR title matches the required convention." + fi