feat: Show actor on pinned/status change events (gt-1ydd9)
- Add Actor field to MutationEvent struct - Use new assignee from update args instead of old issue state - Include actor (who performed the action) in mutation events - Display actor in bd activity output, falling back to assignee When pinning/updating status, the activity feed now shows who performed the action (e.g., "@gastown/crew/jack") instead of showing nothing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,7 @@ type ActivityEvent struct {
|
||||
NewStatus string `json:"new_status,omitempty"`
|
||||
ParentID string `json:"parent_id,omitempty"`
|
||||
StepCount int `json:"step_count,omitempty"`
|
||||
Actor string `json:"actor,omitempty"`
|
||||
}
|
||||
|
||||
var activityCmd = &cobra.Command{
|
||||
@@ -299,6 +300,7 @@ func formatEvent(e rpc.MutationEvent) ActivityEvent {
|
||||
NewStatus: e.NewStatus,
|
||||
ParentID: e.ParentID,
|
||||
StepCount: e.StepCount,
|
||||
Actor: e.Actor,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +342,7 @@ func getEventDisplay(e rpc.MutationEvent) (symbol, message string) {
|
||||
}
|
||||
}
|
||||
|
||||
// buildEventContext creates a context string from title and assignee
|
||||
// buildEventContext creates a context string from title and actor/assignee
|
||||
func buildEventContext(e rpc.MutationEvent) string {
|
||||
var parts []string
|
||||
|
||||
@@ -350,8 +352,11 @@ func buildEventContext(e rpc.MutationEvent) string {
|
||||
parts = append(parts, title)
|
||||
}
|
||||
|
||||
// Add assignee if present
|
||||
if e.Assignee != "" {
|
||||
// For status changes, prefer showing actor (who performed the action)
|
||||
// For other events, show assignee
|
||||
if e.Actor != "" {
|
||||
parts = append(parts, "@"+e.Actor)
|
||||
} else if e.Assignee != "" {
|
||||
parts = append(parts, "@"+e.Assignee)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user