Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf46f435

Browse files
get the response from http request
1 parent8d17eee commitf46f435

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎pkg/github/actions.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,10 +736,13 @@ func getJobLogData(ctx context.Context, client *github.Client, owner, repo strin
736736

737737
ifreturnContent {
738738
// Download and return the actual log content
739-
// TODO we can use a generic http error or an interface instead of github.Response
740-
content,_,err:=downloadLogContent(url.String())
739+
content,resp,err:=downloadLogContent(url.String())
741740
iferr!=nil {
742-
returnnil,nil,fmt.Errorf("failed to download log content for job %d: %w",jobID,err)
741+
// To keep the return value consistent wrap the response as a GitHub Response
742+
ghRes:=&github.Response{
743+
Response:resp,
744+
}
745+
returnnil,ghRes,fmt.Errorf("failed to download log content for job %d: %w",jobID,err)
743746
}
744747
result["logs_content"]=content
745748
result["message"]="Job logs content retrieved successfully"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp