mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-27 03:21:25 +01:00
feat: explain refusals to delete or rerun an unfinished run
Gitea refuses to delete or rerun a run that has not finished with "this workflow run is not done". Report "run 37 has not finished; cancel it first: tea run cancel 37", and cover the next steps added to refusals in tests. Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
4 files changed
+32
No files matched your search
@@ -186,6 +186,10 @@ func conflictHint(ctx context.Context, apiErr *transport.APIError, conflict *ser
|
||||
if conflict.Key != "" {
|
||||
return "enable it with: tea workflow enable " + conflict.Key
|
||||
}
|
||||
case services.ReasonNotDone:
|
||||
if conflict.Kind == "run" && conflict.Key != "" {
|
||||
return "cancel it first: tea run cancel " + conflict.Key
|
||||
}
|
||||
case services.ReasonOwnsRepos:
|
||||
return "transfer or delete them first"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user