mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-20 15:36:30 +00:00
Use repo user to repair (#2645)
Solve https://github.com/woodpecker-ci/woodpecker/pull/2642#pullrequestreview-1694731501
This commit is contained in:
parent
5045f1e431
commit
387637bb4e
1 changed files with 6 additions and 1 deletions
|
@ -551,7 +551,12 @@ func RepairAllRepos(c *gin.Context) {
|
|||
func repairRepo(c *gin.Context, repo *model.Repo, withPerms bool) {
|
||||
forge := server.Config.Services.Forge
|
||||
_store := store.FromContext(c)
|
||||
user := session.User(c)
|
||||
|
||||
user, err := _store.GetUser(repo.UserID)
|
||||
if err != nil {
|
||||
handleDbError(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// creates the jwt token used to verify the repository
|
||||
t := token.New(token.HookToken, repo.FullName)
|
||||
|
|
Loading…
Reference in a new issue