+
Skip to content

Conversation

tdruez
Copy link
Contributor

@tdruez tdruez commented Aug 13, 2025

Issue: #345

This PR primarily adds new documentation pages covering generic integration with DejaCode using the REST API and Webhooks.
It also includes a few code changes to extend these capabilities, ensuring they offer the same feature support as the existing integration modules (Jira, GitHub, etc.).

Documentation addition:

Changes:

  • Add the sync method on BaseIntegration
  • Add the ability to add Request comment in REST API
  • Remove the obligation to provide an assignee in REST API context

Framework:

The workflow.integrations.base.BaseIntegration class serves as the core framework
for the five fully supported platforms: Jira, GitHub, GitLab, SourceHut,
and Forgejo.

It centralizes the code and logic shared across these integrations to maximize
reusability and consistency. This includes handling HTTP requests, maintaining a
session, managing logging, and generating the request title and
content.

To add support for a new platform, create a subclass of BaseIntegration and
implement the following methods:

  • get_headers – Returns the authentication headers required by the target platform.
  • sync – Creates or updates an external issue to reflect the given request.
  • post_common – Posts a comment to an external issue.

tdruez added 9 commits August 13, 2025 12:36
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
@tdruez tdruez merged commit 9dde073 into main Aug 14, 2025
4 checks passed
@tdruez tdruez deleted the 345-cravex-integration-generic branch August 14, 2025 18:17
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

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载