Add external_ref field to CreateArgs and UpdateArgs RPC protocol structs to enable linking issues to external systems (GitHub, Jira, Shortcut, etc.) when using daemon mode. Changes: - Add ExternalRef field to rpc.CreateArgs and rpc.UpdateArgs - Update bd create/update commands to pass external_ref via RPC - Update daemon handlers to process external_ref field - Add integration tests for create and update operations The --external-ref flag now works correctly in both daemon and direct modes. Fixes https://github.com/steveyegge/beads/issues/303 Generated with [Claude Code](https://claude.com/claude-code) via [Happy](https://happy.engineering) Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -66,6 +66,9 @@ func updatesFromArgs(a UpdateArgs) map[string]interface{} {
|
||||
if a.Assignee != nil {
|
||||
u["assignee"] = *a.Assignee
|
||||
}
|
||||
if a.ExternalRef != nil {
|
||||
u["external_ref"] = *a.ExternalRef
|
||||
}
|
||||
return u
|
||||
}
|
||||
|
||||
@@ -108,7 +111,7 @@ func (s *Server) handleCreate(req *Request) Response {
|
||||
issueID = childID
|
||||
}
|
||||
|
||||
var design, acceptance, assignee *string
|
||||
var design, acceptance, assignee, externalRef *string
|
||||
if createArgs.Design != "" {
|
||||
design = &createArgs.Design
|
||||
}
|
||||
@@ -118,6 +121,9 @@ func (s *Server) handleCreate(req *Request) Response {
|
||||
if createArgs.Assignee != "" {
|
||||
assignee = &createArgs.Assignee
|
||||
}
|
||||
if createArgs.ExternalRef != "" {
|
||||
externalRef = &createArgs.ExternalRef
|
||||
}
|
||||
|
||||
issue := &types.Issue{
|
||||
ID: issueID,
|
||||
@@ -128,6 +134,7 @@ func (s *Server) handleCreate(req *Request) Response {
|
||||
Design: strValue(design),
|
||||
AcceptanceCriteria: strValue(acceptance),
|
||||
Assignee: strValue(assignee),
|
||||
ExternalRef: externalRef,
|
||||
Status: types.StatusOpen,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user