From 571eae44d02c1a2fcc582ff9e1f8c597a39d87f3 Mon Sep 17 00:00:00 2001 From: Thirdy <65775625+thirdygayares@users.noreply.github.com> Date: Wed, 30 Oct 2024 00:16:03 +0800 Subject: [PATCH] Create pull_request.yml --- .github/workflows/pull_request.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/pull_request.yml diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..3cb7d02 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,19 @@ +name: Enforce Semantic Commits and Tests on PR to Dev + +on: + pull_request: + branches: + - dev + +jobs: + lint-commits: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Lint Commits + run: | + npm install -g @commitlint/config-conventional @commitlint/cli + git log --pretty=format:%s ${{ github.event.before }}..${{ github.sha }} | commitlint + ``` + +This workflow checks commit messages in the pull request to `dev` for proper formatting.