Check the token's owner and repository when registering a runner (#30406) (#30411)

Backport #30406 by @Zettat123

Fix #30378

Co-authored-by: Zettat123 <zettat123@gmail.com>
This commit is contained in:
Giteabot
2024-04-11 16:57:34 +08:00
committed by GitHub
parent 69cc79173d
commit 81b5938b2c
4 changed files with 19 additions and 0 deletions

View File

@@ -163,6 +163,7 @@ func DeleteRepositoryDirectly(ctx context.Context, doer *user_model.User, repoID
&actions_model.ActionScheduleSpec{RepoID: repoID},
&actions_model.ActionSchedule{RepoID: repoID},
&actions_model.ActionArtifact{RepoID: repoID},
&actions_model.ActionRunnerToken{RepoID: repoID},
); err != nil {
return fmt.Errorf("deleteBeans: %w", err)
}