From 620cde8320159ddc03fb2ed4ce9983140dcac31f Mon Sep 17 00:00:00 2001 From: Lionel Untereiner Date: Mon, 18 Mar 2024 16:09:35 +0100 Subject: [PATCH 1/3] add check conventional semantics --- .github/workflows/ci_tests.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 150718bf957..ccf1dddb573 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -5,6 +5,7 @@ on: branches: - develop pull_request: + types: [opened, synchronize, reopened, edited] workflow_dispatch: # Cancels in-progress workflows for a PR when updated @@ -15,9 +16,26 @@ concurrency: # Please define `build.args.GEOS_TPL_TAG` in `.devcontainer/devcontainer.json` jobs: + # Checks if PR title follows conventional semantics + semantic_pull_request: + permissions: + pull-requests: write # for amannn/action-semantic-pull-request to analyze PRs and + statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR + contents: read + runs-on: ubuntu-latest + steps: + - name: Check if the PR name has conventional semantics + uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # v5.4.0 + id: lint_pr_title + with: + wip: true + # Configure that a scope doesn't need to be provided. + requireScope: false + # Jobs will be cancelled if PR is a draft. # PR status must be "Open" to run CI. is_not_draft_pull_request: + needs: [semantic_pull_request] # Everywhere in this workflow, we use the most recent ubuntu distribution available in Github Actions # to ensure maximum support of google cloud's sdk. runs-on: ubuntu-22.04 From c79511c867c98fff456281e25d50e4d46d81838a Mon Sep 17 00:00:00 2001 From: Lionel Untereiner Date: Mon, 18 Mar 2024 16:11:46 +0100 Subject: [PATCH 2/3] add auth --- .github/workflows/ci_tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index ccf1dddb573..f26b3492fe8 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -27,6 +27,8 @@ jobs: - name: Check if the PR name has conventional semantics uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # v5.4.0 id: lint_pr_title + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: wip: true # Configure that a scope doesn't need to be provided. From bd217df837cad063a45ff1327bab2b464e9ccf2b Mon Sep 17 00:00:00 2001 From: Lionel Untereiner Date: Mon, 18 Mar 2024 17:17:12 +0100 Subject: [PATCH 3/3] only for PR --- .github/workflows/ci_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index f26b3492fe8..427fa1bdfb6 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -23,6 +23,7 @@ jobs: statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR contents: read runs-on: ubuntu-latest + if: github.event_name == 'pull_request' steps: - name: Check if the PR name has conventional semantics uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # v5.4.0