Skip to content

#114 - Implement Clerk Middleware for Seller Registration Flow #100

#114 - Implement Clerk Middleware for Seller Registration Flow

#114 - Implement Clerk Middleware for Seller Registration Flow #100

Workflow file for this run

name: 🧹 PR Lint Check
on:
pull_request:
types: [opened, synchronize, reopened]
pull_request_target:
types: [opened, synchronize, reopened]
permissions:
contents: write
pull-requests: write
jobs:
lint:
name: Run Lint Checks
runs-on: ubuntu-latest
env:
NODE_ENV: development
CLERK_SECRET_KEY: dummy_secret_key
NEXT_PUBLIC_SERVER_API_URL: http://localhost:3000/api
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: dummy_publishable_key
RESEND_API_KEY: dummy_resend_key
DATABASE_URL: postgresql://user:password@localhost:5432/giglance
PORT: 5000
steps:
- name: Checkout PR Code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 22
- name: Install Frontend Dependencies
run: |
cd frontend
yarn install --frozen-lockfile
- name: Run Frontend Lint
id: lint-frontend
run: |
cd frontend
yarn lint
- name: Install Backend Dependencies
run: |
cd backend
yarn install --frozen-lockfile
- name: Run Backend Lint
id: lint-backend
run: |
cd backend
yarn lint
notify:
name: Notify Lint Result
needs: lint
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_target'
permissions:
pull-requests: write
contents: write
steps:
- name: Checkout base branch (safe)
uses: actions/checkout@v3
- name: Post result
run: |
if [[ "${{ needs.lint.result }}" == "success" ]]; then
gh pr comment ${{ github.event.pull_request.number }} \
--body "✅ Great job @${{ github.actor }}! Linting passed for both frontend and backend."
else
gh pr comment ${{ github.event.pull_request.number }} --body $'🚫 Hey @${{ github.actor }}, your PR failed lint checks.\n\nPlease run `yarn lint` in both `frontend` and `backend` folders locally and fix the issues before opening a PR.\n\nRefer to the [contribution guidelines](https://github.com/upes-open/OSoC-25-Giglance/blob/main/.github/CONTRIBUTING.md) for linting rules.'
gh pr edit "${{ github.event.pull_request.number }}" --add-label "Lint failed"
gh pr close "${{ github.event.pull_request.number }}"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}