* chore(github): ask issue authors without the fix checkbox about a PR Issues filed through `gh issue create --body` or the API skip the issue form, so they never carry the "I am working on a fix" checkbox. When the "Contributing a fix" section is missing from the body, the triage workflow now comments asking the author whether they plan to open a pull request. The regression form gets the same checkbox, so its reports are not asked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(github): cover the issue fix-intent classifier The classifier moves from the triage workflow into .github/scripts/issue-fix-intent.sh, with a test that CI runs next to the other workflow script tests. The workflow checks out the default branch before the step so the script is available. A "Contributing a fix" heading without its checkbox now counts as missing. A hand-written body containing only the heading was classified as unchecked and got neither an assignment nor the question. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
698 B
Bash
Executable File
20 lines
698 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Reads an issue body on stdin and prints whether the author ticked the issue
|
|
# form's "I am working on a fix" checkbox: "checked", "unchecked", or
|
|
# "missing" when the body has no such checkbox, e.g. an issue filed with
|
|
# `gh issue create --body`. Only the checkbox under the form's own
|
|
# "Contributing a fix" heading counts, not the same text in another section.
|
|
|
|
set -euo pipefail
|
|
|
|
awk '
|
|
{ sub(/\r$/, "") }
|
|
/^### / { in_fix = ($0 ~ /^### Contributing a fix[[:space:]]*$/); next }
|
|
in_fix && /^- \[[ xX]\] I am working on a fix[[:space:]]*$/ {
|
|
seen = 1
|
|
if ($0 !~ /^- \[ \]/) checked = 1
|
|
}
|
|
END { print checked ? "checked" : seen ? "unchecked" : "missing" }
|
|
'
|