You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge remote-tracking branch 'origin/main' into acticons
* origin/main:
Allow fast-forward-only merge when signed commits are required (go-gitea#37335)
Introduce `ActionRunAttempt` to represent each execution of a run (go-gitea#37119)
Move review request functions to a standalone file (go-gitea#37358)
Fix repo init README EOL (go-gitea#37388)
Fix org team assignee/reviewer lookups for team member permissions (go-gitea#37365)
Remove external service dependencies in migration tests (go-gitea#36866)
Extend issue context popup beyond markdown content (go-gitea#36908)
# Conflicts:
# routers/api/v1/repo/action.go
# web_src/js/components/RepoActionView.vue
Where("repo_id=? AND run_id=? AND (status=? OR status=?)", repoID, runID, ArtifactStatusUploadConfirmed, ArtifactStatusExpired).
201
+
Where("repo_id=? AND run_id=? AND run_attempt_id=? AND (status=? OR status=?)", repoID, runID, runAttemptID, ArtifactStatusUploadConfirmed, ArtifactStatusExpired).
194
202
GroupBy("artifact_name").
195
203
Select("artifact_name, sum(file_size) as file_size, max(status) as status, max(expired_unix) as expired_unix").
_, err:=db.GetEngine(ctx).Where("run_id=? AND artifact_name=? AND status = ?", runID, name, ArtifactStatusUploadConfirmed).Cols("status").Update(&ActionArtifact{Status: ArtifactStatusPendingDeletion})
228
+
// SetArtifactNeedDeleteByID sets an artifact to need-delete by ID, cron job will delete it.
_, err:=db.GetEngine(ctx).Where("id=? AND status = ?", artifactID, ArtifactStatusUploadConfirmed).Cols("status").Update(&ActionArtifact{Status: ArtifactStatusPendingDeletion})
231
+
returnerr
232
+
}
233
+
234
+
// SetArtifactNeedDeleteByRunAttempt sets an artifact to need-delete in a run attempt, cron job will delete it.
235
+
// runAttemptID may be 0 for legacy artifacts created before ActionRunAttempt existed.
_, err:=db.GetEngine(ctx).Where("run_id=? AND run_attempt_id=? AND artifact_name=? AND status = ?", runID, runAttemptID, name, ArtifactStatusUploadConfirmed).Cols("status").Update(&ActionArtifact{Status: ArtifactStatusPendingDeletion})
223
238
returnerr
224
239
}
225
240
241
+
// GetArtifactsByRunAttemptAndName returns all artifacts with the given name in the specified run attempt.
242
+
// This supports both attempt-scoped data and legacy artifacts with run_attempt_id=0.
0 commit comments