Skip to content

修复一些代码样式的问题 #1

修复一些代码样式的问题

修复一些代码样式的问题 #1

Workflow file for this run

name: Auto-Format
# This action works with pull requests and pushes on the main branch
on:
pull_request:
types: [closed]
branches: [master, PR-Branch]
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
actions: write
contents: write
pull-requests: write
jobs:
prettier:
name: Prettier
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
# Make sure the actual branch is checked out when running on pull requests
ref: PR-Branch
# This is important to fetch the changes to the previous commit
fetch-depth: 0
persist-credentials: false
- name: Prettify code
uses: creyD/prettier_action@v4.3
with:
# This part is also where you can pass other options, for example:
prettier_options: --write **/*.{js,ts,mjs,vue,json,yml,md} --config ./prettier.config.mjs --ignore-path ./.prettierignore
commit_message: "style: prettified code from pull request."
only_changed: True
github_token: ${{ secrets.FORMAT_TOKEN }}