工具
开发者工具
简体中文

RepoRefit / 开发者工具

RepoRefit GitHub Action

自动检查每个拉取请求。Action 在你自己的 GitHub runner 上只读取文件,不需要令牌或密钥。

一个文件完成设置

在仓库中创建 .github/workflows/reporefit.yml:

name: RepoRefit
on:
  push:
  pull_request:
  workflow_dispatch:
  schedule:
    - cron: '0 3 * * 1'
permissions:
  contents: read
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
      - uses: reporefit/action@v1
        with:
          fail-on: high

运行时机

输入

输入默认值含义
path.要检查的文件夹(相对于仓库根目录)。
toolall要运行的检查(与 CLI 相同的 ID)。
fail-onhigh存在不低于该严重程度的发现时让步骤失败:high、medium、low、none。
langen汇总和报告的语言:en、ko、ja、zh-Hans。
badge把 README 徽章 SVG 写到此路径。
ignore额外忽略规则,每行一个或用逗号分隔。

输出

可在后续步骤中使用,例如发表评论或决定下一步:

findings, high, medium, low, passed, evaluated, partial, fix-plan, report-md, report-json

报告与 AI 修复指令

作业摘要中会显示 Markdown 报告。Markdown 和 JSON 报告以及 AI 修复指令会写到 runner 的临时文件夹,需要保留时请作为构件上传:

      - uses: reporefit/action@v1
        id: rr
        with:
          fail-on: medium
          tool: secrets
          lang: ko
      - uses: actions/upload-artifact@v4
        if: always()
        with:
          name: reporefit
          path: |
            ${{ steps.rr.outputs.report-md }}
            ${{ steps.rr.outputs.report-json }}
            ${{ steps.rr.outputs.fix-plan }}

有发现时阻止合并

发现达到 fail-on 时步骤失败(退出码 1)。在 Settings → Branches 中把该作业设为必需的状态检查,即可在通过前阻止合并。

安全