Simplify code found by simplicity audit of d6be98f
This commit is contained in:
@@ -39,7 +39,7 @@ func (m *Manager) SaveSchedule(ctx context.Context, projectID, scheduleID string
|
||||
if err != nil {
|
||||
return api.Schedule{}, err
|
||||
}
|
||||
if user.GitName == "" || user.GitEmail == "" {
|
||||
if !user.HasGitIdentity() {
|
||||
return api.Schedule{}, ErrNoGitIdentity
|
||||
}
|
||||
project, err := m.store.GetProject(ctx, projectID)
|
||||
@@ -105,7 +105,7 @@ func (m *Manager) startScheduled(ctx context.Context, sc api.Schedule) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if user.GitName == "" || user.GitEmail == "" {
|
||||
if !user.HasGitIdentity() {
|
||||
return ErrNoGitIdentity
|
||||
}
|
||||
_, err = m.StartWorkflow(ctx, project, user, sc.Title, project.DefaultBranch, "byre", sc.Workflow, sc.Prompt, nil, "")
|
||||
|
||||
Reference in New Issue
Block a user