Skip to content
Merged
20 changes: 20 additions & 0 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Auto-approve PR
on:
pull_request_target:
types: [ opened, synchronize ]
pull_request:
types: [ opened, synchronize ]

jobs:
auto-approve:
# Only run this action for the dorthrithil user
if: github.actor == 'dorthrithil'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Auto-approve
uses: hmarr/auto-approve-action@v3
with:
github-token: ${{ secrets.LC_BOT_PAT }}
review-message: "LocalCragBot here - I approved the PR!\n\nWondering why this is happening? Join the LocalCrag team and be the one approving PRs instead of me!"
2 changes: 1 addition & 1 deletion .github/workflows/backend-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
branches:
- main
- 'v[0-9]+.[0-9]+.[0-9]+'
- next
jobs:
backend-unit-tests:
environment: Testing
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-frontend-prod-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
branches:
- main
- 'v[0-9]+.[0-9]+.[0-9]+'
- next
jobs:
frontend-prod-build-check:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-migrate-from-empty-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
branches:
- main
- 'v[0-9]+.[0-9]+.[0-9]+'
- next
jobs:
check-migrate-from-empty-db:
environment: Testing
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-migrate-from-prod-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
branches:
- main
- 'v[0-9]+.[0-9]+.[0-9]+'
- next
jobs:
check-migrate-from-prod-db:
environment: Testing
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cypress-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
branches:
- main
- 'v[0-9]+.[0-9]+.[0-9]+'
- next
jobs:
cypress-run:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
branches:
- main
- 'v[0-9]+.[0-9]+.[0-9]+'
- next
jobs:
frontend-unit-tests:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
branches:
- main
- 'v[0-9]+.[0-9]+.[0-9]+'
- next
jobs:
lint-server:
runs-on: ubuntu-latest
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/pr-title-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Enforces that the PR title follows the Conventional Commits specification
# https://www.conventionalcommits.org/en/v1.0.0/
# The PR title is used as the commit message when squashing PRs (requires specific GitHub settings)

name: "Conventional Commits PR Title"

on:
pull_request:
branches:
- next
types:
- synchronize
- opened
- edited
- ready_for_review

jobs:
check_squash_commit:
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Extract PR title as squash commit message
run: echo "${{ github.event.pull_request.title }}" > squash_commit_message.txt

- name: Install commitlint
run: npm install @commitlint/{config-conventional,cli}

- name: Validate PR title as squash commit message
run: |
echo "${{ github.event.pull_request.title }}" | npx commitlint --verbose
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
};
Loading