Skip to content

style: modify text design and minor refactoring (#361) #37

style: modify text design and minor refactoring (#361)

style: modify text design and minor refactoring (#361) #37

Workflow file for this run

name: Lint
on:
pull_request:
push:
branches:
- main
jobs:
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up pnpm
uses: pnpm/[email protected]
with:
version: latest
- name: Install dependencies
run: pnpm install
- name: Check for formatting issues
id: prettier-check
run: |
pnpm exec prettier --check "**/*.{js,jsx,ts,tsx,json,css,md}" || echo "formatting-required"
- name: Comment on the PR if formatting is required
if: steps.prettier-check.outputs.formatting-required
uses: actions/github-script@v7
with:
script: |
const issue_number = context.payload.pull_request.number;
github.rest.issues.createComment({
issue_number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Some files aren't properly formatted. Would you like me to lint them for you?"
})
- name: Run Prettier
run: pnpm exec prettier --check "**/*.{js,jsx,ts,tsx,json,css,md}"