Credit the user who forked a task as a co-author on its merge

This commit is contained in:
Ian Gulliver
2026-10-15 17:03:08 -07:00
parent f9be3c3c9d
commit 525f11923d
4 changed files with 11 additions and 4 deletions
+1 -1
View File
@@ -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 {