feat(themes): add matcha theme (@alyxpele) #24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Fix formatting | |
| env: | |
| PNPM_VERSION: "9.6.0" | |
| NODE_VERSION: "24.11.0" | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| on: | |
| pull_request_target: | |
| types: [labeled] | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| if: github.event.label.name == 'format' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name}} | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: ${{ env.PNPM_VERSION }} | |
| - name: Install formatter | |
| run: pnpm install -D -w prettier | |
| - name: Get changed files | |
| id: get-changed-files | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const changedFiles = await github.paginate( | |
| github.rest.pulls.listFiles, | |
| { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.payload.pull_request.number, | |
| } | |
| ); | |
| return changedFiles.filter(file=> file.status !== "removed").map(file => file.filename).join(' '); | |
| - name: Fix formatting | |
| run: | | |
| CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }}) | |
| if [ -n "$CHANGED_FILES" ]; then | |
| pnpm prettier --write $CHANGED_FILES | |
| fi | |
| - name: Commit changes | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "fix formatting" | |
| - name: Remove label | |
| uses: actions-ecosystem/action-remove-labels@v1 | |
| with: | |
| labels: format |