mirror of
https://github.com/harness/drone.git
synced 2025-05-01 13:11:27 +00:00
fix: [CODE-3120]: reload repo in repo summary API controller (#3356)
* reload repo in repo summary API controller
This commit is contained in:
parent
16e2ec6660
commit
6f37eaea3f
@ -35,6 +35,12 @@ func (c *Controller) Summary(
|
||||
return nil, fmt.Errorf("access check failed: %w", err)
|
||||
}
|
||||
|
||||
// fetch the repo because the one we have probably comes from the cache.
|
||||
repo, err = c.repoStore.Find(ctx, repo.ID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get the repo: %w", err)
|
||||
}
|
||||
|
||||
summary, err := c.git.Summary(ctx, git.SummaryParams{ReadParams: git.CreateReadParams(repo)})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get repo summary: %w", err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user