You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
check_issue_refs fails a pull request that says it closes an issue the pull request itself closes #1139
Current gap: the check compares every issue number cited in ROADMAP.md, CHANGELOG.md, CONTRIBUTORS.md and METRICS.md with GitHub: a CHANGELOG line that says closes #N fails while #N is open, and a checked ROADMAP item that cites an open issue fails. That is correct on main, and wrong on the pull request that fixes #N: the PR's body says Closes #N, the CHANGELOG line is part of the same change, and the issue closes only when the PR merges, so the PR's own lint run fails. The only way to make it pass is to close the issue before merging or to leave the CHANGELOG and ROADMAP lines out of the PR and land them in a second one. This showed up on every batch of fixes committed with their docs in the last two weeks.
Repro: on a branch, add closes #<an open issue> to the CHANGELOG and run python3 scripts/check_issue_refs.py.
Suggested approach: when running in a pull request (GITHUB_EVENT_NAME == pull_request), read the PR body from the event payload, collect the issue numbers it closes (closes, fixes, resolves, case-insensitive), and treat them as closed for the comparison. Locally keep the strict behaviour, with an optional --assume-closed N flag for a developer who wants the same effect. Say in the output which issues were assumed closed.
Done when: a PR whose body closes #N can cite #N as closed in the CHANGELOG and ROADMAP and pass lint, a citation of a different open issue still fails, and the tests cover the payload parsing.
Activity