Skip to content

Commit

Permalink
fix: STRF-11934 Separate Github PR Title check
Browse files Browse the repository at this point in the history
  • Loading branch information
jairo-bc committed Apr 15, 2024
1 parent e40ba16 commit fe88781
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 14 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/pull_request_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,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
29 changes: 29 additions & 0 deletions .github/workflows/pull_request_title_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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:
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 fe88781

Please sign in to comment.