Skip to content

Commit 7e3ae58

Browse files
authored
doc-healer: stop retrying rejected docs-only fix direction from closed unmerged [docs] PRs (#33900)
1 parent 2e22346 commit 7e3ae58

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/daily-doc-healer.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,20 @@ repo:${{ github.repository }} is:issue is:closed label:documentation closed:>=YY
8989
For each issue found:
9090
- Record the issue number, title, body, and closing date.
9191
- Check whether a DDUw-created PR (label `documentation automation`, title prefix `[docs]`) was merged that references or addresses the issue in the same time window. If such a PR exists, DDUw likely already handled it — skip this issue.
92-
- If no DDUw `[docs]` PR references the issue, also search for any merged PR that closes or fixes the issue by number (e.g. `closes #NNN`, `fixes #NNN`, `resolves #NNN` in the PR body). If such a PR is found, verify the documentation change it made is complete and skip the issue.
92+
- After the merged-PR check, use the GitHub MCP search tool to find DDUw `[docs]` PR candidates (label `documentation`, label `automation`, author `github-actions[bot]`) that were closed in the last 30 days and reference the same issue or drift keyword/file path. Query pattern:
93+
94+
`repo:<OWNER/REPO> is:pr is:closed author:github-actions[bot] label:documentation label:automation <DRIFT_KEYWORD>`
95+
96+
Replace `<OWNER/REPO>` with the repository from the Context section (`${{ github.repository }}` at runtime), and replace `<DRIFT_KEYWORD>` with a stable term tied to the drift (for example: `#NNN`, `"reference/engines.md"`, or a unique feature term from the issue body).
97+
- For each candidate PR returned by search, use `pull_request_read` (`method: get`) and keep only PRs where `merged` is false.
98+
- Before treating it as rejection, inspect closure context with `issue_read` (`method: get` and `method: get_comments`): treat as rejected only when `closed_by` appears in GitHub MCP `list_repository_collaborators` results and comments/reviews indicate intentional direction (or explicit lack of acceptance), not an obvious transient/accidental closure.
99+
100+
- A closed-unmerged DDUw `[docs]` PR is a strong rejection signal for that fix direction. Do **not** re-attempt the same docs fix.
101+
- Instead, create a `[doc-healer]` improvement issue that:
102+
1. Names the rejected PR and the unresolved drift.
103+
2. Proposes the inverse fix direction (for example, code change instead of docs-only change).
104+
3. Tags `@<closed_by.login>` (login extracted from the `closed_by` user object in rejected PR issue data) for an explicit next-step decision. If `closed_by` is unavailable, do not suppress retries automatically; escalate uncertainty in the improvement issue body.
105+
- If there is no merged DDUw `[docs]` PR and no closed-unmerged rejection signal, also search for any merged PR that closes or fixes the issue by number (e.g. `closes #NNN`, `fixes #NNN`, `resolves #NNN` in the PR body). If such a PR is found, verify the documentation change it made is complete and skip the issue.
93106

94107
If no unaddressed documentation issues are found, call `noop` and stop.
95108

@@ -227,4 +240,4 @@ Call `noop` with a summary:
227240
- **Follow DDUw style**: Match the tone and format used by existing DDUw pull requests.
228241
- **Link everything**: Reference issues and PRs in all output.
229242
- **One PR per run**: Bundle all documentation fixes into a single pull request.
230-
- **Exit cleanly**: Always call exactly one safe-output tool before finishing (`create_pull_request`, `create_issue`, or `noop`).
243+
- **Exit cleanly**: Always call exactly one safe-output tool before finishing (`create_pull_request`, `create_issue`, or `noop`).

0 commit comments

Comments
 (0)