fix(gitosync): fill in missing tenant/project from bridge config on reconcile path

When a milestone file's provider identity block omits Tenant and Project
(both are optional since MatchDevelopMilestone fills them from expected),
the bridge's FetchWorkItem call fails with ErrInvalidInput because
planeWorkItemRef requires all three: tenant, project, id.

Fill in missing Tenant/Project from BridgeConfig before building the ref,
mirroring the missing-create path which always uses b.cfg.Tenant/Project.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
toki 2026-06-21 15:22:34 +09:00
parent 1a99b3d04b
commit 9338a8500c

View file

@ -166,6 +166,12 @@ func (b *Bridge) enqueueDoc(ctx context.Context, scan roadmapsync.ScanResult, do
}
identity := doc.Identity
if identity.Tenant == "" {
identity.Tenant = b.cfg.Tenant
}
if identity.Project == "" {
identity.Project = b.cfg.Project
}
ref := workitem.Ref{
Provider: identity.Provider,
Tenant: identity.Tenant,