Allow approval comments to include reasons - #234
CAOShurong wants to merge 3 commits into
Conversation
Keep exact-comment behavior as the default and add an opt-in first-line decision mode for explanatory follow-up text. Assisted-by: OpenAI Codex
|
Hi @CAOShurong Can you please test these changes and produce tests with both possible values for your new variable? |
…asons Signed-off-by: CAOShurong <170531907+CAOShurong@users.noreply.github.com>
Signed-off-by: CAOShurong <170531907+CAOShurong@users.noreply.github.com>
|
Added the requested explicit coverage in The full suite passed 20 repetitions on the byte-verified committed source. The exact-head fork CI also passed the upstream Linux Docker build, tests and v2.10.1 lint (zero issues). No production code was added in this test revision; the merge preserves the current upstream polling fixes. Prepared with OpenAI Codex (AI-generated code/tests/text). The PR description now corrects the earlier unsupported personal-review wording and records the local pinned-lint compatibility failure and untested race/ARM/deployment paths. Fork CI success is not maintainer approval or deployment evidence. |
Summary
allow-comment-reasonsinput.Closes #21.
Requested test coverage
This update addresses the request to test both values explicitly. The same 11 parser scenarios each run with
falseandtrue(22 cases), covering reasons, CRLF, exact keywords, later/empty first lines, same-line prose, unauthorized users, and distinct versus duplicate approvers.Four
httptestpolling cases cover approval and denial in both modes. They verify whether the reason-bearing comment completes immediately or waits for an exact keyword, as well as the terminal comment, issue closure and exit code. This revision adds tests only; a normal merge retains the two current upstream polling fixes.Current-revision verification
On Go 1.26.7 / Windows amd64, including a clean archive byte-matched to commit
0d4edbd3a233d304a3e91230c88e70bc64e872ae:go test -json -count=20 -p=2 ./...: all 76 leaf cases pass in each repetition.go vet -p=2 ./...andgo build -p=2 -buildvcs=false -trimpath ... .: pass.golangci-lint v2.10.1 run -v: zero issues.The fork CI run also passed on exact head
0d4edbd3a233d304a3e91230c88e70bc64e872ae: the unchanged upstream workflow's Linux Docker build, full Go tests (including the explicit false/true cases), and Docker-basedgolangci-lint v2.10.1with zero issues. The completed run, job steps and logs were checked. This is fork execution, not upstream maintainer approval.Limitations: Windows is not a supported Action runner; the local program/API checks are synthetic, not deployed workflow proof. Race, ARM and a real approval/deployment workflow are not tested. The pinned pre-commit lint v1.52.2 panics with
unsupported version: 2on both this revision and the untouched pre-test baseline; the complete configured hook set is not claimed green. Its initial environment-install timeout is also retained. The old August run is not evidence for this revision. No container image or release is published by this update.Provenance correction
Prepared with OpenAI Codex: AI-generated code, tests and PR text. The previous sentence suggesting personal review was not substantiated by the available records and has been removed. No personal or independent human review, production adoption, or maintainer acceptance is asserted.