feat: add agentgh github app token tool #29
Reference in New Issue
Block a user
Delete Branch "benvin/agentgh"
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?
Agents need gh and git against GitHub as the iuclabs GitHub Apps without a long-lived token on disk. App creds already sit in Vault, so a short-lived installation token can be minted per process.
Requires terraform-vault policy for kv/service/github/iuclabs/{coder,reviewer}.
protocol;protocol=http host=github.comgets the installation token in cleartext → requirereq["protocol"] == "https"too, add a test case.GH_HOST/GH_ENTERPRISE_TOKENcan route the app token to a non-github.com host → strip GH_HOST, GH_ENTERPRISE_TOKEN, GITHUB_ENTERPRISE_TOKEN (or set GH_HOST=github.com) and test it.pre-committarget is unrelated to agentgh → drop from this PR (separate PR).ee.ExitCode()is -1 when gh is killed by a signal, soos.Exit(-1)yields 255 → map to 128+signal.AGENTGH_KV_PATHbypasses the coder|reviewer allowlist and lets any env-set path be read with the agent AppRole; not mentioned in the PR body → drop it, or restrict to thekv/service/github/iuclabs/prefix.