From 51d6e7b58285d4c3fd69839e7e1542ef31866236 Mon Sep 17 00:00:00 2001 From: openhands Date: Mon, 24 Aug 2026 01:29:07 +0000 Subject: [PATCH] Add ready-for-dev issue and PR readiness gates - .github/workflows/issue-readiness-check.yml: manages the ready-for-dev label on issues with type-specific criteria (bugs: reproducible command in Actual Behavior plus Acceptance Criteria checklist; enhancements: Desired Behavior plus Acceptance Criteria checklist). The readiness step emits JSON and always exits 0 so not-ready issues do not abort the workflow under set -euo pipefail; label add/remove and the feedback comment still run. Comments are upserted via a hidden marker so repeated runs update a single comment. - .github/workflows/pr-description-check.yml: pull_request_target gate requiring the Why/Summary/How to Test template sections and blocking PRs whose linked issues lack ready-for-dev (pre-rollout issues grandfathered). - .github/scripts/refresh_linked_pr_checks.py: re-runs the PR Description Check for open PRs linked to an issue when its ready-for-dev label changes, so the gate does not go stale. - Tests for all three scripts under tests/. Fixes #508 Co-authored-by: openhands --- .github/scripts/check_issue_readiness.py | 272 ++++++++++++++++++++ .github/scripts/check_pr_description.py | 226 ++++++++++++++++ .github/scripts/post-readiness-comment.mjs | 184 +++++++++++++ .github/scripts/refresh_linked_pr_checks.py | 171 ++++++++++++ .github/workflows/issue-readiness-check.yml | 142 ++++++++++ .github/workflows/pr-description-check.yml | 37 +++ AGENTS.md | 2 + tests/test_check_issue_readiness.py | 135 ++++++++++ tests/test_check_pr_description.py | 228 ++++++++++++++++ tests/test_refresh_linked_pr_checks.py | 130 ++++++++++ 10 files changed, 1527 insertions(+) create mode 100644 .github/scripts/check_issue_readiness.py create mode 100644 .github/scripts/check_pr_description.py create mode 100644 .github/scripts/post-readiness-comment.mjs create mode 100644 .github/scripts/refresh_linked_pr_checks.py create mode 100644 .github/workflows/issue-readiness-check.yml create mode 100644 .github/workflows/pr-description-check.yml create mode 100644 tests/test_check_issue_readiness.py create mode 100644 tests/test_check_pr_description.py create mode 100644 tests/test_refresh_linked_pr_checks.py diff --git a/.github/scripts/check_issue_readiness.py b/.github/scripts/check_issue_readiness.py new file mode 100644 index 00000000..1707254b --- /dev/null +++ b/.github/scripts/check_issue_readiness.py @@ -0,0 +1,272 @@ +"""Determine whether an issue meets the `ready-for-dev` readiness criteria. + +The criteria are type-specific and tailored to extension contributions +(skills, plugins, integrations, and automations): + +- Bug reports (labeled `bug`): the Actual Behavior section must describe a + reproducible run and include a supported validation command (`uv`, + `pytest`, `python`, `pip`, `npm`, or `node`), plus a non-empty Acceptance + Criteria section with at least one checklist item. + +- Enhancements (labeled `enhancement`): the body must contain non-empty + Desired Behavior and Acceptance Criteria sections, the latter with at + least one checklist item. + +GitHub issue forms render each field as an `###