swarm-ui, swarm-controller: the review try-out's repo and PR fields offer the repos and PRs to pick
Two read-only routes feed them: GET /api/pulls/repos lists the repos with an open pull request, and GET /api/pulls?repo=owner/name lists a repo's open pull requests, highest number first. The page offers the lists through the browser's own suggestion list and keeps both fields free text, since a run also works on a merged or closed PR.
This commit is contained in:
parent
60ea7fdc04
commit
9a4059e130
10 changed files with 399 additions and 7 deletions
|
|
@ -314,6 +314,17 @@ ones. The route answers:
|
|||
- **503** when this host has no forge token yet, or the forge failed or
|
||||
didn't answer within two minutes
|
||||
|
||||
The page's repo and PR fields offer values to pick from, and stay free text,
|
||||
since a run also works on a merged or closed PR. Two routes feed them:
|
||||
|
||||
- `GET /api/pulls/repos` lists the repos with at least one open PR, as
|
||||
`owner/name`.
|
||||
- `GET /api/pulls?repo=owner/name` lists the repo's open PRs, highest number
|
||||
first, each with `number`, `title` and `head_sha`. It answers **400** for a
|
||||
`repo` that's missing or not `owner/name`, **404** for a repo the forge
|
||||
doesn't know, and **503** when this host has no forge token yet, or the
|
||||
forge failed or didn't answer within two minutes.
|
||||
|
||||
Every error is problem+json with the reason in `detail`.
|
||||
|
||||
When it's ready, **open a PR** has the service account push a branch that
|
||||
|
|
|
|||
Loading…
Reference in a new issue