From ecd593eb0c6f8d62a4c13eab99bb773db410e5cc Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Wed, 4 Nov 2026 22:19:31 +0800 Subject: [PATCH] ci: stop requiring a linked issue on PRs The PR check now only asks for the How it was verified section. Linking an issue with Closes # stays recommended when a PR resolves one. --- .github/pull_request_template.md | 2 +- .github/workflows/pr-check.yml | 9 --------- AGENTS.md | 4 ++-- CONTRIBUTING.md | 6 ++---- 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 836b8710..6ad43075 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,4 @@ -Closes # + ## What and why diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index d1a74b7e..2d3eede8 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -24,18 +24,9 @@ jobs: const pr = context.payload.pull_request; const LABEL = 'needs-info'; const MARKER = ''; - // Docs, CI and pure refactors may skip the linked issue. - const NO_ISSUE_TYPES = /^(docs|ci|build|chore|refactor|style|test)(\(.+\))?!?:/; - const body = (pr.body || '').replace(//g, ''); const problems = []; - const linksIssue = - /\b(close[sd]?|fix(e[sd])?|resolve[sd]?)\s*:?\s+(#\d+|https:\/\/github\.com\/[\w.-]+\/[\w.-]+\/issues\/\d+)/i.test(body); - if (!linksIssue && !NO_ISSUE_TYPES.test(pr.title)) { - problems.push('Link the issue this PR resolves, e.g. `Closes #123`.'); - } - const verified = body.match(/^##+\s*How it was verified\s*$([\s\S]*?)(?=^##+\s|(?![\s\S]))/im); if (!verified || !verified[1].trim()) { problems.push('Fill in **How it was verified**: the commands you ran and their results. UI changes need before/after screenshots.'); diff --git a/AGENTS.md b/AGENTS.md index f781fe0e..425fbc6e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -49,8 +49,8 @@ Visual style: dark, low-contrast greys, one cool accent ## Issues & PRs -Follow `CONTRIBUTING.md` and `.github/pull_request_template.md`: one issue per PR with -`Closes #`, reproduce first, keep the diff focused, short plain description, and a +Follow `CONTRIBUTING.md` and `.github/pull_request_template.md`: one problem per PR +(`Closes #` when it resolves an issue), reproduce first, keep the diff focused, short plain description, and a **How it was verified** section with commands run, results and (for UI) before/after screenshots. Unclear product decisions → `needs-decision` and stop. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5dfa9ffd..6e02bd6b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,8 +16,7 @@ Project layout, coding rules, commands and checks are in [AGENTS.md](AGENTS.md). ## Pull requests -- One issue per PR, linked with `Closes #123`. Feature PRs need a `planned` issue. - Docs, CI and pure refactors may skip the issue. +- One problem per PR. If it resolves an issue, link it with `Closes #123`. - Reproduce the problem first, or write a test that fails before the fix. - Fix the cause, and check whether the same cause breaks anything nearby. - Keep the diff focused. Unrelated refactors go in their own PR. @@ -36,5 +35,4 @@ and the plugin API. Community plugins live in their authors' repositories and are listed through [l0ng-ai/openidea-plugins](https://github.com/l0ng-ai/openidea-plugins); see [`plugins/README.md`](plugins/README.md) § 8.1. -A check on each PR adds `needs-info` when the issue link or the verification -section is missing, and removes it once they're filled in. +A check on each PR adds `needs-info` when the verification section is missing, and removes it once it's filled in.