1
1
mirror of https://github.com/go-gitea/gitea synced 2025-09-28 03:28:13 +00:00

chore: remove Result from task and step

This commit is contained in:
Jason Song
2022-11-18 12:26:34 +08:00
parent dd417a3270
commit 0f5aab0c1a
6 changed files with 33 additions and 27 deletions

View File

@@ -165,11 +165,11 @@ func (s *Service) UpdateTask(
if err != nil {
return nil, status.Errorf(codes.Internal, "can't find the task: %v", err)
}
if task.Result == runnerv1.Result_RESULT_CANCELLED {
if task.Status.IsCancelled() {
return connect.NewResponse(&runnerv1.UpdateTaskResponse{
State: &runnerv1.TaskState{
Id: req.Msg.State.Id,
Result: task.Result,
Result: task.Status.AsResult(),
},
}), nil
}