Credit the user who forked a task as a co-author on its merge
This commit is contained in:
@@ -795,7 +795,7 @@ func (s *Store) Participants(ctx context.Context, taskID string) ([]api.Particip
|
||||
rows, err := s.db.QueryContext(ctx, `
|
||||
SELECT u.login, u.display_name, u.git_name, u.git_email
|
||||
FROM events e JOIN users u ON u.login = e.actor
|
||||
WHERE e.task_id = ? AND e.kind = 'user.message'
|
||||
WHERE e.task_id = ? AND (e.kind = 'user.message' OR (e.kind = 'task.created' AND json_extract(e.payload, '$.forked_from') IS NOT NULL))
|
||||
GROUP BY u.login ORDER BY min(e.seq)
|
||||
`, taskID)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user