mirror of
https://github.com/harness/drone.git
synced 2025-05-20 19:09:59 +08:00
[GIT] Return 404 for listcommit in case ref isn't found (#230)
This commit is contained in:
parent
230fed6a52
commit
ee0aae4e75
@ -117,7 +117,7 @@ func (g Adapter) ListCommits(ctx context.Context, repoPath string,
|
||||
stdout, _, runErr := gitea.NewCommand(giteaRepo.Ctx, args...).RunStdBytes(&gitea.RunOpts{Dir: giteaRepo.Path})
|
||||
if runErr != nil {
|
||||
// TODO: handle error in case they don't have a common merge base!
|
||||
return nil, fmt.Errorf("failed to trigger rev-list command: %w", runErr)
|
||||
return nil, processGiteaErrorf(runErr, "failed to trigger rev-list command")
|
||||
}
|
||||
|
||||
giteaCommits, err := giteaParsePrettyFormatLogToList(giteaRepo, bytes.TrimSpace(stdout))
|
||||
|
Loading…
Reference in New Issue
Block a user