fix(api): default same-repo issue dependencies to current repo #23

Merged
oleks merged 1 commits from fix/issue-22-dependencies-api-same-repo into main 2026-06-20 01:44:39 +03:00

1 Commits

Author SHA1 Message Date
Oleks 9644118fac fix(api): default same-repo issue dependencies to current repo
The dependencies/blocks POST and DELETE handlers read the dependency's
repo from the IssueMeta body. When owner/repo were omitted (a same-repo
dependency), the empty strings differed from the current repo's
owner/name, so the handler took the cross-repo branch and looked up an
empty ("", "") repository — returning 500 "repository does not exist
[id: 0]" whenever ALLOW_CROSS_REPOSITORY_DEPENDENCIES was on (the
default).

Treat an empty or matching owner/repo as the current repository so that
`{"index": N}` adds a same-repo dependency and returns 201. Cross-repo
lookups are unchanged.

Fixes #22

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 01:44:08 +03:00