IW-670: Offline Forgejo issue --json error cases in BATS #737

Merged
mph merged 11 commits from IW-670 into main 2026-10-07 07:32:22 +00:00
Member

Summary

test/forgejo-issue.bats ran the Forgejo issue --json path only in live cases that skip without FORGEJO_API_TOKEN, so CI never ran it end to end. This PR adds two offline cases that run in CI.

Changes

  • test/forgejo-issue.bats: two offline cases for iw issue 1 --json on a Forgejo tracker:
    • no FORGEJO_API_TOKEN → exit 1, empty stdout, stderr names FORGEJO_API_TOKEN
    • no baseUrl (dummy token, no network call) → exit 1, empty stdout, stderr names baseUrl
  • The config helper write_live_forgejo_config is now write_forgejo_config, with a no-base-url option. The live cases use it too.
  • No production code changes. IssueHarnessTest already covers the logic at unit level.

Testing

  • The two new BATS cases pass; mutation checks recorded in project-management/issues/IW-670/implementation-log.md.
  • Phase PR #736 passed CI.
  • Review packet: project-management/issues/IW-670/review-packet.md

Release notes

See project-management/issues/IW-670/release-notes.md (Czech). Test-only change; no user-visible behaviour change.

🤖 Generated with Claude Code

Closes #670

## Summary `test/forgejo-issue.bats` ran the Forgejo `issue --json` path only in live cases that skip without `FORGEJO_API_TOKEN`, so CI never ran it end to end. This PR adds two offline cases that run in CI. ## Changes - `test/forgejo-issue.bats`: two offline cases for `iw issue 1 --json` on a Forgejo tracker: - no `FORGEJO_API_TOKEN` → exit 1, empty stdout, stderr names `FORGEJO_API_TOKEN` - no `baseUrl` (dummy token, no network call) → exit 1, empty stdout, stderr names `baseUrl` - The config helper `write_live_forgejo_config` is now `write_forgejo_config`, with a `no-base-url` option. The live cases use it too. - No production code changes. `IssueHarnessTest` already covers the logic at unit level. ## Testing - The two new BATS cases pass; mutation checks recorded in `project-management/issues/IW-670/implementation-log.md`. - Phase PR #736 passed CI. - Review packet: `project-management/issues/IW-670/review-packet.md` ## Release notes See `project-management/issues/IW-670/release-notes.md` (Czech). Test-only change; no user-visible behaviour change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Closes #670
test/forgejo-issue.bats has no offline case for issue --json

Artifacts:
- analysis.md
- issue.md

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8ZD5foFWAE2zV1xYojPMa
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8ZD5foFWAE2zV1xYojPMa
test/forgejo-issue.bats has no offline case for issue --json

Artifacts:
- tasks.md
- review-state.json (tasks_ready)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8ZD5foFWAE2zV1xYojPMa
Issue: IW-670
Phase: 1 - Offline Forgejo issue --json error cases

This commit marks the checkpoint for phase 1 context generation.
Use wf-implement IW-670 to return to this point.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Offline Forgejo issue --json error cases

Artifacts:
- phase-01-tasks.md

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs(IW-670): add review packet and release notes
All checks were successful
CI / changes (pull_request) Successful in 5s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 10s
CI / lint (pull_request) Successful in 13s
CI / compile (pull_request) Successful in 1m39s
CI / dashboard-build (pull_request) Successful in 1m28s
CI / test (pull_request) Successful in 18m17s
dcb45bf84e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mph merged commit 24868cd673 into main 2026-10-07 07:32:22 +00:00
Sign in to join this conversation.
No description provided.