Skip to content

Commit 93f32b4

Browse files
committed
add missing return, improve comment
1 parent 4fb1580 commit 93f32b4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

models/actions/runner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (r *ActionRunner) IsOnline() bool {
127127
// EditableInContext checks if the runner is editable by the "context" owner/repo
128128
// ownerID == 0 and repoID == 0 means "admin" context, any runner including global runners could be edited
129129
// ownerID == 0 and repoID != 0 means "repo" context, any runner belonging to the given repo could be edited
130-
// ownerID != 0 and repoID == 0 means "org" context, any runner belonging to the given user/org could be edited
130+
// ownerID != 0 and repoID == 0 means "owner(org/user)" context, any runner belonging to the given user/org could be edited
131131
// ownerID != 0 and repoID != 0 means "owner" OR "repo" context, legacy behavior, but we should forbid using it
132132
func (r *ActionRunner) EditableInContext(ownerID, repoID int64) bool {
133133
if ownerID != 0 && repoID != 0 {

routers/api/v1/shared/runners.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ func DeleteRunner(ctx *context.APIContext, ownerID, repoID, runnerID int64) {
112112
err = actions_model.DeleteRunner(ctx, runner.ID)
113113
if err != nil {
114114
ctx.APIErrorInternal(err)
115+
return
115116
}
116117
ctx.Status(http.StatusNoContent)
117118
}

0 commit comments

Comments
 (0)