Skip to content

Commit

Permalink
Separate command and condition
Browse files Browse the repository at this point in the history
  • Loading branch information
massongit committed Apr 18, 2024
1 parent 8a69338 commit af88a27
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion service/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ func (g *PullRequest) diffUsingGitCommand(ctx context.Context) ([]byte, error) {
}

for _, sha := range []string{mergeBaseSha, headSha} {
if _, err := exec.Command("git", "fetch", "--depth=1", remoteRepo, sha).CombinedOutput(); err != nil {
_, err := exec.Command("git", "fetch", "--depth=1", remoteRepo, sha).CombinedOutput()
if err != nil {
return nil, fmt.Errorf("failed to run git fetch: %w", err)

Check warning on line 349 in service/github/github.go

View check run for this annotation

Codecov / codecov/patch

service/github/github.go#L346-L349

Added lines #L346 - L349 were not covered by tests
}
}
Expand Down

0 comments on commit af88a27

Please sign in to comment.