fix: Make sure to refresh access token when reading commit information (#3447)

When receiving notification by webhook the forge tries to read
information on the latest commit when constructing the pipeline. This
requires a call to the Bitbucket API which again requires the access
token to be up-to-date.

Signed-off-by: Thor Anker Kvisgård Lange <tal@netic.dk>
This commit is contained in:
Thor Anker Kvisgård Lange 2024-02-27 17:15:11 +01:00 committed by GitHub
parent 901daf988c
commit ce51d65829
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -525,6 +525,8 @@ func (c *client) getUserAndRepo(ctx context.Context, r *model.Repo) (*model.User
}
log.Trace().Any("user", user).Msg("got user")
forge.Refresh(ctx, c, _store, user)
return user, repo, nil
}