Simplify code found by simplicity audit of d6be98f
This commit is contained in:
@@ -25,7 +25,7 @@ func (m *Manager) SetAuditWorkflow(ctx context.Context, projectID, name, actor s
|
||||
if err != nil {
|
||||
return api.Project{}, err
|
||||
}
|
||||
if creator.GitName == "" || creator.GitEmail == "" {
|
||||
if !creator.HasGitIdentity() {
|
||||
return api.Project{}, fmt.Errorf("%w: audits run as the project's creator %s, who has no git identity", ErrInvalid, creator.Login)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user