Turn a reviewer's concern into one question for the author, on the section of the pull request's spec docs that it is about, in the reviewer's pending review. Local mode only.
const url = 'https://example.com/api/v1/pr-asks';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"url":"example","concern":"example","section":["example"],"force":true,"attribution":"speccy"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/pr-asks \ --header 'Content-Type: application/json' \ --data '{ "url": "example", "concern": "example", "section": [ "example" ], "force": true, "attribution": "speccy" }'Request Bodyrequired
Section titled “Request Bodyrequired”object
The URL of the pull request.
The reviewer’s concern, in their own words.
The heading path of the section, when the concern fits more than one.
Post the question although the doc already answers the concern.
None posts the question with no hidden marker. Absent means pr.attribution of the .speccy.yaml that the pull request review uses.
Responses
Section titled “ Responses ”What Speccy did with the concern.
object
Posted: the question is in the pending review. answered: the doc answers the concern, and Speccy posted nothing. unclear: the concern fits two sections equally, and Speccy posted nothing.
The spec doc of the section, relative to the repo root.
With place line, the line of the comment.
With posted, where the question is. line: on its line. body: in the body of the review, because the line is not in the diff. file: on the whole file, because the line is not in the diff and GitHub does not let anyone edit a review body that started empty.
With answered, the text of the doc that answers the concern.
With unclear, the sections that fit.
object
Example
{ "status": "posted", "place": "line"}default
Section titled “default”An error.
RFC 9457 problem details with a stable code.
object
A stable machine-readable error code.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}