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
|
|
@ -551,7 +551,7 @@ impl Run {
|
|||
}
|
||||
|
||||
/// `repo` as its owner and name, or what is wrong with it.
|
||||
fn split_repo(repo: &str) -> Result<(&str, &str), String> {
|
||||
pub(crate) fn split_repo(repo: &str) -> Result<(&str, &str), String> {
|
||||
repo.split_once('/')
|
||||
.filter(|(o, n)| segment(o) && segment(n))
|
||||
.ok_or_else(|| format!("repo {repo:?} is not owner/name"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue