From c5db307b9ec002044c163cf1280883cec094f6d3 Mon Sep 17 00:00:00 2001 From: tankilevitch Date: Sun, 10 Nov 2024 15:40:56 +0200 Subject: [PATCH 1/4] 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 From ab9f5a8f84e55223919438729155e9d30666d942 Mon Sep 17 00:00:00 2001 From: tankilevitch Date: Sun, 10 Nov 2024 15:48:41 +0200 Subject: [PATCH 2/4] fix --- .github/workflows/verify-pr-title.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/verify-pr-title.yml b/.github/workflows/verify-pr-title.yml index 66a3e9c365..fbca6129ec 100644 --- a/.github/workflows/verify-pr-title.yml +++ b/.github/workflows/verify-pr-title.yml @@ -13,14 +13,14 @@ jobs: env: PR_TITLE: ${{ github.event.pull_request.title }} run: | - if [[ ! "$PR_TITLE" =~ ^\[(Integration|Core|Docs)(\]\[.*?\])?\]\ .+ ]]; then + 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" + echo "[Integration] Resolve missing team context in board ingestion for non-default teams" + echo "[Core] Ensure ingestion of integration logs" + echo "[Core] Upgrade FastAPI version to improve performance and compatibility" + echo "[Docs] Correct documentation on Ocean's denial-of-service vulnerability in http-proxy-middleware" + echo "[Integration] Enable region-specific resource querying support" exit 1 else echo "PR title matches the required convention." From f911339b4cd2aac4bf2e69a811378a6fbba775d3 Mon Sep 17 00:00:00 2001 From: tankilevitch Date: Sun, 10 Nov 2024 15:49:18 +0200 Subject: [PATCH 3/4] add CI --- .github/workflows/verify-pr-title.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify-pr-title.yml b/.github/workflows/verify-pr-title.yml index fbca6129ec..90d795b8db 100644 --- a/.github/workflows/verify-pr-title.yml +++ b/.github/workflows/verify-pr-title.yml @@ -13,7 +13,7 @@ jobs: env: PR_TITLE: ${{ github.event.pull_request.title }} run: | - if [[ ! "$PR_TITLE" =~ ^\[(Integration|Core|Docs)\]\ .+ ]]; then + if [[ ! "$PR_TITLE" =~ ^\[(Integration|Core|Docs|CI)\]\ .+ ]]; then echo "PR title does not match the required convention." echo "Examples of acceptable titles:" echo "[Integration] Resolve missing team context in board ingestion for non-default teams" From 329a1f14328626e638ee6d0bc58c02ddb729abf4 Mon Sep 17 00:00:00 2001 From: tankilevitch Date: Sun, 10 Nov 2024 15:49:34 +0200 Subject: [PATCH 4/4] Add infra option --- .github/workflows/verify-pr-title.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify-pr-title.yml b/.github/workflows/verify-pr-title.yml index 90d795b8db..3ea0263328 100644 --- a/.github/workflows/verify-pr-title.yml +++ b/.github/workflows/verify-pr-title.yml @@ -13,7 +13,7 @@ jobs: env: PR_TITLE: ${{ github.event.pull_request.title }} run: | - if [[ ! "$PR_TITLE" =~ ^\[(Integration|Core|Docs|CI)\]\ .+ ]]; then + if [[ ! "$PR_TITLE" =~ ^\[(Integration|Core|Docs|CI|Infra)\]\ .+ ]]; then echo "PR title does not match the required convention." echo "Examples of acceptable titles:" echo "[Integration] Resolve missing team context in board ingestion for non-default teams"