Skip to content

feat: add wrike connector#57

Merged
andrei-hasna merged 2 commits into
mainfrom
open-connectors-cursor/open-connectors/9898397d-4345-4ca3-b404-fd161496dcc9-a718e181
Jul 7, 2026
Merged

feat: add wrike connector#57
andrei-hasna merged 2 commits into
mainfrom
open-connectors-cursor/open-connectors/9898397d-4345-4ca3-b404-fd161496dcc9-a718e181

Conversation

@andrei-hasna

@andrei-hasna andrei-hasna commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add @hasna/connect-wrike package under connectors/wrike/ with REST API v4 client (bearer auth, configurable host), CLI, types/utils, and placeholder .env.example
  • Register wrike in Business Tools category and add search synonym
  • Add focused client/API tests (bearer header, host URL construction, error handling)

Test plan

  • bun install at worktree root
  • bun run typecheck
  • bun test connectors/wrike (11 pass)
  • bun test src/lib/registry.test.ts src/lib/synonyms.test.ts (35 pass)
  • rg 'beepmedia|hasnaxyz' connectors/wrike — no matches
  • Full bun test suite (pre-existing CLI subprocess failures in worktree; unrelated to wrike)

Note

Low Risk
Greenfield connector with no changes to shared runtime; risk is limited to new optional integration code and catalog metadata.

Overview
Adds a new @hasna/connect-wrike package under connectors/wrike/ with a programmatic Wrike client and connect-wrike CLI for Wrike REST API v4.

Auth uses a permanent API token with lowercase bearer in Authorization, plus a configurable host (www.wrike.com or EU app-eu.wrike.com). Credentials load from env (WRIKE_API_TOKEN, WRIKE_HOST) or profile files under ~/.hasna/connectors/connect-wrike/. The HTTP layer JSON-stringifies array query params (e.g. fields) and maps API errors to WrikeApiError.

Surface area covers tasks, folders, spaces, workflows, custom fields, comments, timelogs, contacts, workflows listing, and related CRUD/list operations exposed through Commander subcommands. Bun tests mock fetch for bearer header, host URLs, errors, and a few API helpers.

The monorepo catalog gains Wrike in Business Tools (business-tools.ts), and wrike is added to the project search synonym list.

Reviewed by Cursor Bugbot for commit dfa23f1. Bugbot is set up for automated code reviews on this repo. Configure here.

Implement @hasna/connect-wrike with REST API v4 client, CLI, registry entry, and focused tests.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit dfa23f1. Configure here.


function getFormat(cmd: Command): OutputFormat {
const parent = cmd.parent;
return (parent?.opts().format || 'pretty') as OutputFormat;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Root format flag ignored

Low Severity

The version command resolves output format via getFormat(program), which only reads program.parent?.opts().format. The root command has no parent, so --format json is ignored and output stays in pretty mode.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit dfa23f1. Configure here.

if (!profileExists(opts.profile)) {
error(`Profile "${opts.profile}" does not exist. Create it with "${CONNECTOR_NAME} profile create ${opts.profile}"`);
process.exit(1);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicit default profile rejected

Medium Severity

The CLI requires profileExists when --profile is set, but getCurrentProfile already treats default as active before default.json exists. connect-wrike -p default fails on a fresh install while the same commands without -p default still run.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit dfa23f1. Configure here.

@andrei-hasna
andrei-hasna merged commit 11ce243 into main Jul 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant