<commit_before>name: Code format check

on: 
  push:
    branches: 
      - master
      - interprocesscommunication
jobs:
  dotnet-format:
    runs-on: windows-latest
    steps:
      - name: Install dotnet-format
        run: dotnet tool install -g dotnet-format

      - name: Checkout repo
        uses: actions/checkout@v2
        with:
          ref: ${{ github.head_ref }}

      - name: Run dotnet format
        id: format
        uses: jfversluis/dotnet-format@v1.0.5
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          action: "fix"
          only-changed-files: true # only works for PRs
          # workspace: "Xamarin.Forms.sln" 默认根路径只有一个 sln 文件，可以忽略这一行

      - name: Commit files
        if: steps.format.outputs.has-changes == 'true' # 如果有格式化，才继续
        # 下面将使用机器人的账号，你可以替换为你自己的账号
        run: |
          git config --local user.name "github-actions-dotnet-formatter[bot]"
          git config --local user.email "<EMAIL>"
          git commit -a -m 'Automated dotnet-format update'

      - name: Create Pull Request
        if: steps.format.outputs.has-changes == 'true' # 如果有格式化，才继续
        uses: peter-evans/create-pull-request@v3
        with:
          title: '[Bot] Automated PR to fix formatting errors'
          body: |
            Automated PR to fix formatting errors
          committer: GitHub <<EMAIL>>
          author: github-actions[bot] <<EMAIL>>
          # 以下是给定代码审查者，需要设置仓库有权限的开发者
          assignees: lindexi,walterlv
          reviewers: lindexi,walterlv
          # 对应的上传分支
          branch: t/bot/fix-codeformatting<commit_msg>测试无文件更改创建代码审查<commit_after>name: Code format check

on: 
  push:
    branches: 
      - master
      - interprocesscommunication
jobs:
  dotnet-format:
    runs-on: windows-latest
    steps:
      - name: Install dotnet-format
        run: dotnet tool install -g dotnet-format

      - name: Checkout repo
        uses: actions/checkout@v2
        with:
          ref: ${{ github.head_ref }}

      - name: Run dotnet format
        id: format
        uses: jfversluis/dotnet-format@v1.0.5
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          action: "fix"
          only-changed-files: true # only works for PRs
          # workspace: "Xamarin.Forms.sln" 默认根路径只有一个 sln 文件，可以忽略这一行

      - name: Commit files
        if: steps.format.outputs.has-changes == 'true' # 如果有格式化，才继续
        # 下面将使用机器人的账号，你可以替换为你自己的账号
        run: |
          git config --local user.name "github-actions-dotnet-formatter[bot]"
          git config --local user.email "<EMAIL>"
          git commit -a -m 'Automated dotnet-format update'

      - name: Create Pull Request
        # if: steps.format.outputs.has-changes == 'true' # 如果有格式化，才继续
        uses: peter-evans/create-pull-request@v3
        with:
          title: '[Bot] Automated PR to fix formatting errors'
          body: |
            Automated PR to fix formatting errors
          committer: GitHub <<EMAIL>>
          author: github-actions[bot] <<EMAIL>[<EMAIL>>
          # 以下是给定代码审查者，需要设置仓库有权限的开发者
          assignees: lindexi,walterlv
          reviewers: lindexi,walterlv
          # 对应的上传分支
          branch: t/bot/fix-codeformatting
{'fraction_non_alphanumeric': 0.09943714821763602, 'fraction_numerical': 0.0031269543464665416, 'mean_word_length': 1.9675324675324675, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '910665', 'n_tokens_mistral': 1124, 'n_tokens_neox': 1134, 'n_words': 241}