From 0cc0bc43d1360bb83023fe58efa0f75ae3d1e2af Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 6 Nov 2024 16:08:03 +0100 Subject: [PATCH] [FEAT] add workflow --- .github/workflows/assign-pr-author.yml | 5 ++-- .github/workflows/check-title.yml | 33 ++++++++++++++++++++++++++ .github/workflows/maven.yml | 6 ++--- 3 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/check-title.yml diff --git a/.github/workflows/assign-pr-author.yml b/.github/workflows/assign-pr-author.yml index 907e54d..aa811a0 100644 --- a/.github/workflows/assign-pr-author.yml +++ b/.github/workflows/assign-pr-author.yml @@ -1,9 +1,10 @@ --- name: "Assign PR Author as Assignee" -"on": +on: pull_request: - types: [opened, ready_for_review, reopened] + types: + - opened jobs: assign-pr-author-as-assignee: diff --git a/.github/workflows/check-title.yml b/.github/workflows/check-title.yml new file mode 100644 index 0000000..8117ec3 --- /dev/null +++ b/.github/workflows/check-title.yml @@ -0,0 +1,33 @@ +--- +name: "Check PR title" + +on: + pull_request: + types: + - opened + - edited + - synchronize + - ready_for_review + - reopened + +jobs: + check-title: + runs-on: ubuntu-latest + steps: + - name: "Check title" + uses: Slashgear/action-check-pr-title@v4.3.0 + with: + regexp: "\\[(API,)?(API|DEV-OPS|DOC|FEAT|FIX|FIX\\-CI|STYLE)\\] (\\([A-Za-z0-9.\\-]+\\) )? [A-Za-z0-9 ,.'\\-!]+$" + helpMessage: | + Title of the PR MUST respect format: "[{TYPE}] clear description without typos in english" with {TYPE}: + * [API] Change API that permit to access on the application (un-compatibility only). This one can specifically added with [API,{TYPE}] + * [DEV-OPS] Update automatic build system, method to deliver application/packages, ... + * [DOC] Update or add some documentation. + * [FEAT] Develop a new feature + * [FIX] When fixing issue + * [FIX-CI] When the CI fail to build and we apply a correction to set it work again. + * [STYLE] Update of the style tools/checker, or add/remove rules. + Examples: + [FEAT] My beautiful feature + [API,FIX] Change API to fix typo + [FIX] (module) Correct part of ... diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9b7f5ec..0cc7531 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -10,15 +10,13 @@ name: Java CI with Maven on: push: - branches: [ "develop" ] + branches: + - develop pull_request: - branches: [ "develop" ] jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 - name: Set up JDK 17