hive-forge: defer repo resolution to the accessor, not construction
This commit is contained in:
parent
cc2503d9c7
commit
fe7bf81d4a
14 changed files with 57 additions and 35 deletions
|
|
@ -64,7 +64,7 @@ pub struct Args {
|
|||
/// missing its ref), or if the dispatch POST fails (network, or a non-2xx
|
||||
/// such as `404` for an unknown workflow file or branch).
|
||||
pub fn run(client: &Client, args: Args) -> Result<()> {
|
||||
let repo = client.repo();
|
||||
let repo = client.repo()?;
|
||||
let (workflow, branch) = match (args.pr, args.run, args.branch.as_deref()) {
|
||||
(Some(pr), _, _) => (args.workflow.clone(), branch_for_pr(client, pr)?),
|
||||
(_, Some(run), _) => resolve_run(client, repo, run, &args.workflow)?,
|
||||
|
|
|
|||
Loading…
Reference in a new issue