Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Restore handler test coverage for the token-rotation path

未关闭
#63 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
aws, github, typescript
领域
cloud, testing

调研方向

阅读 apps/token-rotator/src/main.spec.ts 以及 guard.spec.ts 和 stringHelpers.spec.ts,然后运行 token-rotator 测试以重现被跳过的用例。在不提交凭据的情况下,恢复 GitHub-auth、registration-token 和 SSM-put 路径的确定性覆盖;完成标准是 handler 测试能够可靠通过且不再被跳过。

由索引模型根据 Issue 内容生成。

描述

Context

PR #62 skipped lambdas › token-rotator › completes without error (apps/token-rotator/src/main.spec.ts) because it is a live-API test wired to a dead fixture: the committed .env.test authenticated as GitHub App 217830 in the third-party skedrocket org, which no longer exists — the GitHub API returns "Integration not found" unconditionally, so the test failed 100% of the time on every branch (verified on Renovate branches predating that PR).

That skip leaves the entire GitHub-auth → registration-token → SSM-put path with zero test coverage (the only other specs are guard.spec.ts and stringHelpers.spec.ts; libs/github has none). No working coverage was lost, but this must not become permanent.

Restoration options

  1. Hermetic (preferred): mock the GitHub API (e.g. nock) so the handler test runs without live credentials — deterministic, no secrets.
  2. Live: recreate a dedicated test App under the cloudposse org and inject its ID/key via repo secrets (never a committed file).

Hygiene follow-up

.env.test committed the dead App's private key at the repo root; PR #62 replaces it with placeholders, but the key remains in git history — inert (the App is deleted), but worth removing per policy if history-rewrites are ever done.

Refs: #62

主要语言
TypeScript
星标
3
派生
1
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cloudposse/lambda-github-action-token-rotator 的其他 Issue

查看 cloudposse/lambda-github-action-token-rotator 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。