From 4097fece99073da07c97bc64d1a7a0c1ae958467 Mon Sep 17 00:00:00 2001 From: Sanmarg Sandeep Paranjpe <50082154+sanmarg@users.noreply.github.com> Date: Wed, 29 May 2024 22:45:47 +0530 Subject: [PATCH 1/2] Create pr-title-checker-config.json Added Pr Title Checker Config Signed-off-by: Sanmarg Sandeep Paranjpe <50082154+sanmarg@users.noreply.github.com> --- .github/pr-title-checker-config.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/pr-title-checker-config.json diff --git a/.github/pr-title-checker-config.json b/.github/pr-title-checker-config.json new file mode 100644 index 000000000..c3437def3 --- /dev/null +++ b/.github/pr-title-checker-config.json @@ -0,0 +1,15 @@ +{ + "LABEL": { + "name": "title needs formatting", + "color": "EEEEEE" + }, + "CHECKS": { + "prefixes": ["[Bot] docs: "], + "regexp": "^(feat|fix|docs|test|ci|chore)!?(\\(.*\\))?!?:.*" + }, + "MESSAGES": { + "success": "PR title is valid", + "failure": "PR title is invalid", + "notice": "PR Title needs to pass regex '^(feat|fix|docs|test|ci|chore)!?(\\(.*\\))?!?:.*" + } + } From 06897c7f249c5e1070299dd582d88fc3a5900d62 Mon Sep 17 00:00:00 2001 From: Sanmarg Sandeep Paranjpe <50082154+sanmarg@users.noreply.github.com> Date: Wed, 29 May 2024 22:47:19 +0530 Subject: [PATCH 2/2] Create pr-title.yaml Added the main action yaml Signed-off-by: Sanmarg Sandeep Paranjpe <50082154+sanmarg@users.noreply.github.com> --- .github/workflows/pr-title.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/pr-title.yaml diff --git a/.github/workflows/pr-title.yaml b/.github/workflows/pr-title.yaml new file mode 100644 index 000000000..2cf1d798a --- /dev/null +++ b/.github/workflows/pr-title.yaml @@ -0,0 +1,24 @@ +name: "PR" + +on: + pull_request_target: + types: [opened, edited, reopened, synchronize] + +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + + +jobs: + validate: + permissions: + contents: read + pull-requests: read + name: Validate PR Title + runs-on: ubuntu-latest + steps: + - uses: thehanimo/pr-title-checker@1d8cd483a2b73118406a187f54dca8a9415f1375 # v1.4.2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + configuration_path: ".github/pr-title-checker-config.json"