mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
chore(runtime): fetch build data
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
631f801aa6
commit
d3d56ed0ef
9 changed files with 77 additions and 78 deletions
|
@ -153,3 +153,22 @@ func (p *HTTPClient) UpdateStep(ctx context.Context, arg *runnerv1.UpdateStepReq
|
|||
|
||||
return err
|
||||
}
|
||||
|
||||
// Detail fetches build details
|
||||
func (p *HTTPClient) Detail(ctx context.Context, arg *runnerv1.DetailRequest) (*runnerv1.DetailResponse, error) {
|
||||
client := runnerv1connect.NewRunnerServiceClient(
|
||||
p.Client,
|
||||
p.Endpoint,
|
||||
p.opts...,
|
||||
)
|
||||
req := connect.NewRequest(arg)
|
||||
req.Header().Set("X-Runner-Token", p.Secret)
|
||||
|
||||
resp, err := client.Detail(ctx, req)
|
||||
|
||||
return &runnerv1.DetailResponse{
|
||||
Repo: resp.Msg.Repo,
|
||||
Build: resp.Msg.Build,
|
||||
Stage: resp.Msg.Stage,
|
||||
}, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue