feat(forge): add validate option for forge ref validation on write (#138)

Problem: Typos in forge refs like `gh:user/repo#42` silently persist —
there's no feedback when a ref points to a nonexistent issue.

Solution: Add `forge.validate` config option. When enabled, `diff.apply()`
returns new/changed `ForgeRef[]` and `forge.validate_refs()` fetches
metadata for each, logging specific warnings for not-found, auth, or
CLI-missing errors.
This commit is contained in:
Barrett Ruth 2026-03-11 12:23:20 -04:00
parent 494e26d7a1
commit a4f782a5fb
6 changed files with 163 additions and 19 deletions

View file

@ -41,6 +41,7 @@
---@class pending.ForgeConfig
---@field close? boolean
---@field validate? boolean
---@field warn_missing_cli? boolean
---@field [string] pending.ForgeInstanceConfig
@ -155,6 +156,7 @@ local defaults = {
sync = {},
forge = {
close = false,
validate = false,
warn_missing_cli = true,
github = {
icon = '',