fix(api): 补齐单次请求模板变量与请求头支持 #281
Loading…
Reference in New Issue
No description provided.
Delete Branch "Mengz/gitlink-cli:mengz/api-single-call-templates"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
这个 PR 修复了 gitlink-cli api 单次调用里 /:owner/:repo 不会替换的问题,并把单次请求的模板能力补齐到和 batch 模式一致。现在可以在 path、query、JSON body 和 header 中使用 {{owner}}、{{repo}} 以及通过 --var 传入的自定义变量;owner/repo 会优先使用 --var,否则自动复用全局 --owner、--repo 或当前仓库上下文。同时把之前声明了但没有真正生效的 --header 接通,支持传多个自定义请求头并参与模板渲染。
这条改动直接解决了 open issue #20 里提到的单次 Raw API 调用占位符失效问题,也让脚本和 Agent 在不写 batch plan 的情况下就能完成一次性的模板化请求。
验证:
Pull request closed