feat: add the two-tier dashboard (task 0017)
Wire the bare `gitea-axi` home command to a two-tier repository dashboard (ADR 0012): the short tier shows up to 3 open issues and 3 open PRs with the client-side `review` decision, and `--full` shows the 20-row open-PR table plus open issue counts grouped by label, aggregated across every page of open issues up to the 1000-issue cap with a `+` suffix when capped. Empty states render the raw `prs: 0 open` / `issues: 0 open` strings; issue fetches pass `type=issues`; outside a Gitea repo the dashboard errors with REPO_NOT_FOUND. `paginate.ts` now reports whether pagination stopped at the cap, which drives the label-count `+` suffix.
This commit was merged in pull request #18.
This commit is contained in:
@@ -159,6 +159,21 @@ describe("repository context detection", () => {
|
||||
expect(stdout).toContain("code: REPO_NOT_FOUND");
|
||||
});
|
||||
|
||||
it("shows REPO_NOT_FOUND with -R/--login help for the bare dashboard outside a Gitea repo", async () => {
|
||||
const cwd = makeRepo(undefined);
|
||||
const bin = makeSandbox({ logins: [] });
|
||||
|
||||
const { stdout, exitCode } = await runCliTest([], {
|
||||
env: { PATH: bin },
|
||||
cwd,
|
||||
});
|
||||
|
||||
expect(exitCode).toBe(1);
|
||||
expect(stdout).toContain("code: REPO_NOT_FOUND");
|
||||
expect(stdout).toContain("-R");
|
||||
expect(stdout).toContain("--login");
|
||||
});
|
||||
|
||||
it("fails with TEA_NOT_INSTALLED when the tea binary is missing", async () => {
|
||||
const cwd = makeRepo("https://gitea.example.com/testowner/testrepo.git");
|
||||
const bin = makeSandbox({ tea: false });
|
||||
|
||||
Reference in New Issue
Block a user