refactor: use ungh for github api (#34108)

This commit is contained in:
Stephen Zhou
2026-03-26 14:37:17 +08:00
committed by GitHub
parent 554ba6b8f3
commit c32eebf57d
26 changed files with 236 additions and 428 deletions

View File

@@ -283,16 +283,6 @@ Reserve snapshots for static, deterministic fragments (icons, badges, layout chr
**Note**: Dify is a desktop application. **No need for** responsive/mobile testing.
### 12. Mock API
Use Nock to mock API calls. Example:
```ts
const mockGithubStar = (status: number, body: Record<string, unknown>, delayMs = 0) => {
return nock(GITHUB_HOST).get(GITHUB_PATH).delay(delayMs).reply(status, body)
}
```
## Code Style
### Example Structure