feat: add git user.name to actor fallback chain (#994)
- Insert git config user.name in fallback chain before final $USER default - Consolidate duplicate actor resolution logic into single function - Add BEADS_ACTOR as env var alias for MCP compatibility - Add tests for actor resolution priority - Update CONFIG.md with Actor Identity Resolution section The new fallback order is: --actor flag > BD_ACTOR > BEADS_ACTOR > git user.name > $USER > "unknown" Co-authored-by: Ohffs <ohffsnotnow@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -64,17 +64,8 @@ func signalOrchestratorActivity() {
|
||||
// Build command line from os.Args
|
||||
cmdLine := strings.Join(os.Args, " ")
|
||||
|
||||
// Determine actor (use package-level var if set, else fall back to env)
|
||||
actorName := actor
|
||||
if actorName == "" {
|
||||
if bdActor := os.Getenv("BD_ACTOR"); bdActor != "" {
|
||||
actorName = bdActor
|
||||
} else if user := os.Getenv("USER"); user != "" {
|
||||
actorName = user
|
||||
} else {
|
||||
actorName = "unknown"
|
||||
}
|
||||
}
|
||||
// Determine actor (uses git config user.name as default)
|
||||
actorName := getActorWithGit()
|
||||
|
||||
// Build activity signal
|
||||
activity := struct {
|
||||
|
||||
Reference in New Issue
Block a user