From 1bbf0a96d6f4fb57d6806527c922ae1b5d38f6b6 Mon Sep 17 00:00:00 2001 From: Bhavya Jain Date: Tue, 19 Mar 2024 19:23:50 +0530 Subject: [PATCH 1/4] Add pnpm --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5045be..76ee8f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,3 @@ -# This workflow runs ESLint, Prettier, unit tests, and e2e tests using pnpm. name: CI on: @@ -17,6 +16,9 @@ jobs: uses: actions/setup-node@v3 with: node-version: 20 + - name: Install pnpm (if not already installed) + run: | + which pnpm || curl -fsSL https://get.pnpm.io/install.sh | sh - - name: Install dependencies run: pnpm install - name: Run Prettier (Pre-commit or in workflow) @@ -30,6 +32,9 @@ jobs: uses: actions/setup-node@v3 with: node-version: 20 + - name: Install pnpm (if not already installed) + run: | + which pnpm || curl -fsSL https://get.pnpm.io/install.sh | sh - - name: Install dependencies run: pnpm install - name: Run ESLint From c56e3398428e88f7924476b1143a4e53f53ab40c Mon Sep 17 00:00:00 2001 From: Bhavya Jain Date: Tue, 19 Mar 2024 19:29:24 +0530 Subject: [PATCH 2/4] refactored installation for pnpm --- .github/workflows/ci.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76ee8f5..6419981 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,9 +16,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: 20 - - name: Install pnpm (if not already installed) - run: | - which pnpm || curl -fsSL https://get.pnpm.io/install.sh | sh - + - name: Install pnpm + run: npm install -g pnpm - name: Install dependencies run: pnpm install - name: Run Prettier (Pre-commit or in workflow) @@ -32,9 +31,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: 20 - - name: Install pnpm (if not already installed) - run: | - which pnpm || curl -fsSL https://get.pnpm.io/install.sh | sh - + - name: Install pnpm + run: npm install -g pnpm - name: Install dependencies run: pnpm install - name: Run ESLint From 696fe7645e946ccfca90e453864990c3209c8a66 Mon Sep 17 00:00:00 2001 From: Bhavya Jain Date: Tue, 19 Mar 2024 19:51:07 +0530 Subject: [PATCH 3/4] push diff validate pr yml --- .github/workflows/validate-pr-title.yml | 29 ++++++++++++++++--------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/validate-pr-title.yml b/.github/workflows/validate-pr-title.yml index 8e89e9b..82f2551 100644 --- a/.github/workflows/validate-pr-title.yml +++ b/.github/workflows/validate-pr-title.yml @@ -1,14 +1,23 @@ -# This workflow validates pull request titles against Commitlint rules. -name: Validate PR Title +name: "Lint PR" on: - pull_request: + pull_request: + types: + - opened + - edited + - synchronize + pull_request_target: + types: + - opened + - edited + - synchronize jobs: - validate-title: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: dreampulse/action-lint-pull-request-title@v3 # Action for title validation - with: - config: '.commitlintrc.js' + lint-pr: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - name: Lint PR + uses: amannn/action-semantic-pull-request@v4.6.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 27add2ae49d8628872992dd5c4a2f6f5935505a5 Mon Sep 17 00:00:00 2001 From: Bhavya Jain Date: Tue, 19 Mar 2024 19:54:43 +0530 Subject: [PATCH 4/4] deleted commitlintrc file --- backend/.commitlintrc.js | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 backend/.commitlintrc.js diff --git a/backend/.commitlintrc.js b/backend/.commitlintrc.js deleted file mode 100644 index 3c496d1..0000000 --- a/backend/.commitlintrc.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - extends: ['@commitlint/config-conventional'], - rules: { - 'type-enum': [ - 2, - 'always', - ['feat', 'fix', 'refactor', 'docs', 'style', 'test', 'build', 'chore'], - ], - 'subject-full-stop': [0, 'never'], - }, -};