Skip to content

feat(integrations): Add Trello setup wizard and create_card tool (#4216) - #4228

Closed
Shinu-Cherian wants to merge 3 commits into
Tracer-Cloud:mainfrom
Shinu-Cherian:feature/trello-integration
Closed

feat(integrations): Add Trello setup wizard and create_card tool (#4216)#4228
Shinu-Cherian wants to merge 3 commits into
Tracer-Cloud:mainfrom
Shinu-Cherian:feature/trello-integration

Conversation

@Shinu-Cherian

Copy link
Copy Markdown

Fixes #4216

Describe the changes you have made in this PR -

This PR completes the Trello integration by migrating it to the standard IntegrationSetupSpec flow and adding an agent-facing tool.
Specifically:

  1. Created TRELLO_SETUP using IntegrationSetupSpec in integrations/trello/setup.py to prompt for API Key and Token securely.
  2. Registered the Trello verifier (verify_trello) using the standard @register_verifier decorator.
  3. Hooked Trello into the CLI onboarding wizard (surfaces/cli/wizard/).
  4. Added the create_trello_card agent tool (subclassing BaseTool) so the LLM can create Trello cards during an investigation.
  5. Updated integrations/_catalog_impl.py and integrations/registry.py to properly load and register Trello.
  6. Updated documentation and .env.example.

Demo/Screenshot for feature changes and bug fixes -

(Note: I have tested this locally, and the wizard successfully prompts for the correct fields and verifies them via the API).


Code Understanding and AI Usage

Did you use AI assistance (ChatGPT, Claude, Copilot, etc.) to write any part of this code?

  • No, I wrote all the code myself
  • Yes, I used AI assistance (continue below)

If you used AI assistance:

  • I have reviewed every single line of the AI-generated code
  • I can explain the purpose and logic of each function/component I added
  • I have tested edge cases and understand how the code handles them
  • I have modified the AI output to follow this project's coding standards and conventions

Explain your implementation approach:

  • What problem does your code solve? It transforms Trello from an incomplete stub into a fully supported integration that users can configure via the CLI and agents can use to create incident cards.
  • What alternative approaches did you consider? I considered writing a bespoke while True loop for the CLI setup (like older integrations), but chose to use the new IntegrationSetupSpec declarative approach because it aligns with the project's recent migration goals (Issue Migrate the remaining 44 integration setup handlers onto the shared setup flow #4168).
  • Why did you choose this specific implementation? Using IntegrationSetupSpec reduces boilerplate and leverages the shared verification framework. I also ensured that the verifier correctly catches HTTP errors from Trello and maps them to standard OpenSRE validation failures.
  • What are the key functions/components and what do they do?
    • TRELLO_SETUP (setup.py): Defines the required fields (api_key, token) and optional ones (board_id, list_id) for the CLI.
    • verify_trello (verifier.py): Reaches out to GET /members/me to ensure credentials are valid.
    • CreateTrelloCardTool (create_card.py): The ReAct tool schema and execution logic for the agent to use create_trello_card from the HTTP client.

Checklist before requesting a review

  • I have added proper PR title and linked to the issue
  • I have performed a self-review of my code
  • I can explain the purpose of every function, class, and logic block I added
  • I understand why my changes work and have tested them thoroughly
  • I have considered potential edge cases and how my code handles them
  • If it is a core feature, I have added thorough tests
  • My code follows the project's style guidelines and conventions

@github-actions

Copy link
Copy Markdown
Contributor

Greptile code review

This repo uses Greptile for automated review. Before merge, aim for Confidence Score: 5/5 with zero unresolved review threads — see CONTRIBUTING.md.

Run a review — add a PR comment with:

@greptile review

Give it ~5-10 minutes (sometimes longer) for results, then fix feedback and re-trigger until you reach Confidence Score: 5/5.

Optional: automate with the greploop skill.

@Shinu-Cherian

Copy link
Copy Markdown
Author

@greptile review

@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Trello is migrated to the shared integration setup and verification flow, added to CLI onboarding and environment loading, and exposed through a newly discoverable card-creation tool.

Confidence Score: 5/5

The PR appears safe to merge because no additional blocking failure eligible for this follow-up review remains.

No blocking failure remains within the scope of the previous review threads.

Important Files Changed

Filename Overview
integrations/trello/setup.py Defines the Trello setup fields and connects setup-time credential verification.
integrations/trello/tools/create_card.py Adds the agent-facing Trello card creation tool with configuration availability checks.
integrations/trello/verifier.py Migrates Trello connectivity checks to the shared verifier registry.
integrations/_catalog_impl.py Loads environment-backed Trello configuration into the integration catalog.
tools/registry_discovery.py Adds the Trello tools package to integration tool discovery.

Reviews (4): Last reviewed commit: "fix(trello): require list_id in setup/to..." | Re-trigger Greptile

Comment thread integrations/_catalog_impl.py Outdated
Comment thread integrations/trello/tools/__init__.py
Comment thread integrations/trello/verifier.py
@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds standard Trello onboarding, verification, environment loading, and an agent-facing card-creation tool.

  • Registers Trello in the integration catalog and CLI wizard.
  • Adds API-key/token verification and optional board/list configuration.
  • Adds documentation and sample environment variables.

Confidence Score: 1/5

This PR is not safe to merge because the integration catalog cannot import and the Trello setup, verification, and card-creation paths contain additional current failures.

The malformed catalog edit blocks integration initialization, stale Trello exports cause import failures, generic verifier errors bypass normal failure handling, and configurations accepted by setup can expose a card tool that cannot create cards.

integrations/_catalog_impl.py, integrations/trello/verifier.py, integrations/trello/tools/create_card.py, integrations/trello/setup.py, .env.example

Important Files Changed

Filename Overview
integrations/_catalog_impl.py Adds Trello env loading but corrupts the surrounding Discord mapping, making the catalog module unimportable.
integrations/trello/verifier.py Registers the standard verifier but removes still-exported APIs and introduces an unhandled result status.
integrations/trello/tools/create_card.py Adds card creation, but advertises the tool without the destination list required by the client.
integrations/trello/setup.py Adds declarative setup while making the operationally required list ID optional.
surfaces/cli/wizard/configurators/productivity.py Connects the Trello setup specification to the onboarding wizard.
.env.example Documents Trello variables but unintentionally comments out the Vercel API token entry.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  User[CLI user] --> Wizard[Trello setup wizard]
  Wizard --> Verify[Trello verifier]
  Verify --> Store[Integration config]
  Store --> Catalog[Effective integration catalog]
  Catalog --> Agent[Agent tool registry]
  Agent --> Tool[create_trello_card]
  Tool --> API[Trello API]
Loading

Reviews (2): Last reviewed commit: "feat(integrations): Add Trello setup wiz..." | Re-trigger Greptile

Comment thread integrations/_catalog_impl.py
Comment thread integrations/trello/verifier.py
method="verify_trello",
)
return TrelloValidationResult(ok=False, detail=f"Trello validation failed: {err}")
return result("trello", source, "error", f"Trello validation failed: {err}")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Verifier errors bypass failure handling

When Trello verification encounters a connection, timeout, response, or other generic exception, this returns the unsupported error status. The shared verifier handles failures as failed or missing and does not count error as a failing exit condition, so a real Trello connectivity failure can produce a successful verification exit code.

Knowledge Base Used: Integrations Framework

Comment on lines +46 to +48
def is_available(self, sources: dict) -> bool:
trello_config = sources.get("trello", {})
return bool(trello_config.get("api_key") and trello_config.get("token"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Available tool lacks required destination

When Trello is configured with only the required API key and token, this advertises the card tool as available even though list_id is injected and unavailable to the model. The client then rejects every invocation because no destination list exists, causing card creation to return an unavailable error.

Knowledge Base Used: Integrations Framework

Comment thread .env.example Outdated
Comment on lines +525 to +530
# TRELLO_API_KEY=
# TRELLO_TOKEN=
# TRELLO_BOARD_ID=
# TRELLO_LIST_ID=

# VERCEL_API_TOKEN=

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Vercel token entry was commented

Adding the Trello variables also changes VERCEL_API_TOKEN= into a comment while leaving the related team ID active. This makes the sample Vercel configuration incomplete and makes the required token easier for users to overlook.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@Shinu-Cherian

Copy link
Copy Markdown
Author

@greptile review

@Shinu-Cherian

Copy link
Copy Markdown
Author

@greptile review

@muddlebee

Copy link
Copy Markdown
Collaborator

@Shinu-Cherian thank you for PR, but pls check contribution guidelines :)

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.

[FEATURE] Complete Trello integration wiring (currently a stub)

2 participants