Support clone private repository in runner

This commit is contained in:
Lunny Xiao
2022-11-14 14:11:47 +08:00
committed by Jason Song
parent d8b401ab06
commit f55253e81d
2 changed files with 26 additions and 10 deletions

View File

@ -114,6 +114,9 @@ func (b *Basic) Verify(req *http.Request, w http.ResponseWriter, store DataStore
if err == nil && task != nil && task.Status.IsRunning() {
log.Trace("Basic Authorization: Valid AccessToken for task[%d]", task.ID)
store.GetData()["IsBotToken"] = true
store.GetData()["BotTaskID"] = task.ID
return bots_model.NewBotUser()
} else {
log.Error("GetRunnerByToken: %v", err)