diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index e74f662a3..000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,17 +0,0 @@ - -- ✅ 接受:与main直接相关的Bug修复:提交到dev分支 -- 新增功能类pr需要经过issue提前讨论,否则不会被合并 - -# 请填写以下内容 -(删除掉中括号内的空格,并替换为**小写的x**) -1. - [ ] `main` 分支 **禁止修改**,请确认本次提交的分支 **不是 `main` 分支** -2. - [ ] 我确认我阅读了贡献指南 -3. - [ ] 本次更新类型为:BUG修复 - - [ ] 本次更新类型为:功能新增 -4. - [ ] 本次更新是否经过测试 -5. 请填写破坏性更新的具体内容(如有): -6. 请简要说明本次更新的内容和目的: -# 其他信息 -- **关联 Issue**:Close # -- **截图/GIF**: -- **附加信息**: diff --git a/.github/workflows/precheck.yml b/.github/workflows/precheck.yml deleted file mode 100644 index 39f7096fa..000000000 --- a/.github/workflows/precheck.yml +++ /dev/null @@ -1,40 +0,0 @@ -# .github/workflows/precheck.yml -name: PR Precheck -on: [pull_request] - -jobs: - conflict-check: - runs-on: [self-hosted, Windows, X64] - outputs: - conflict: ${{ steps.check-conflicts.outputs.conflict }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Check Conflicts - id: check-conflicts - run: | - git fetch origin main - $conflicts = git diff --name-only --diff-filter=U origin/main...HEAD - if ($conflicts) { - echo "conflict=true" >> $env:GITHUB_OUTPUT - Write-Host "Conflicts detected in files: $conflicts" - } else { - echo "conflict=false" >> $env:GITHUB_OUTPUT - Write-Host "No conflicts detected" - } - shell: pwsh - labeler: - runs-on: [self-hosted, Windows, X64] - needs: conflict-check - if: needs.conflict-check.outputs.conflict == 'true' - steps: - - uses: actions/github-script@v7 - with: - script: | - github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - labels: ['🚫冲突需处理'] - }) diff --git a/.github/workflows/ruff-pr.yml b/.github/workflows/ruff-pr.yml deleted file mode 100644 index 5dd9a4563..000000000 --- a/.github/workflows/ruff-pr.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Ruff PR Check -on: [ pull_request ] -jobs: - ruff: - runs-on: [self-hosted, Windows, X64] - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Install Ruff and Run Checks - uses: astral-sh/ruff-action@v3 - with: - args: "--version" - version: "latest" - - name: Run Ruff Check (No Fix) - run: ruff check --output-format=github - shell: pwsh - - name: Run Ruff Format Check - run: ruff format --check --diff - shell: pwsh - diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml deleted file mode 100644 index dbab9944b..000000000 --- a/.github/workflows/ruff.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Ruff - -on: - push: - branches: - - master - workflow_dispatch: # 允许手动触发工作流 - - -permissions: - contents: write - -jobs: - ruff: - runs-on: [self-hosted, Windows, X64] - # 关键修改:添加条件判断 - # 确保只有在 event_name 是 'push' 且不是由 Pull Request 引起的 push 时才运行 - if: github.event_name == 'push' && !startsWith(github.ref, 'refs/pull/') - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ github.head_ref || github.ref_name }} - - name: Install Ruff and Run Checks - uses: astral-sh/ruff-action@v3 - with: - args: "--version" - version: "latest" - - name: Run Ruff Fix - run: ruff check --fix --unsafe-fixes; if ($LASTEXITCODE -ne 0) { Write-Host "Ruff check completed with warnings" } - shell: pwsh - - name: Run Ruff Format - run: ruff format; if ($LASTEXITCODE -ne 0) { Write-Host "Ruff format completed with warnings" } - shell: pwsh - - name: 提交更改 - if: success() - run: | - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - git add -A - $changes = git diff --quiet; $staged = git diff --staged --quiet - if (-not ($changes -and $staged)) { - git commit -m "🤖 自动格式化代码 [skip ci]" - git push - } - shell: pwsh