Skip to content

Commit

Permalink
fix: STRF-11934 Separate Github PR Title check (#1199)
Browse files Browse the repository at this point in the history
  • Loading branch information
jairo-bc authored Apr 16, 2024
1 parent e40ba16 commit 345f698
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 17 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/pull_request_review.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Tests

on:
Expand All @@ -20,25 +17,17 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Verify Github PR Title TEST
run: echo '${{ env.TITLE }}'

- name: Verify Github PR Title
run: echo '${{ env.TITLE }}' | npx commitlint

- name: Verify Git Commit Name
run: git log -1 --pretty=format:"%s" | npx commitlint

- name: Lint the code
run: npm run lint

Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/pull_request_title_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Pull Request Title Check

on:
pull_request:
branches: [master, main]

jobs:
check-pr-title:
env:
TITLE: ${{ github.event.pull_request.title }}

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: 'npm'
- name: Install Dependencies
run: npm ci

- name: Verify Github PR Title
run: echo $TITLE | npx commitlint

- name: Verify Git Commit Name
run: git log -1 --pretty=format:"%s" | npx commitlint
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- run: npm i
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v2
Expand Down

0 comments on commit 345f698

Please sign in to comment.