CNB datasource - import repositories, files, issues, and pull requests
Import repositories, source files, issues, pull requests, and comments from
CNB into Dify knowledge pipelines.
Source repository:
https://github.com/haiminovo/cnb_datasource
Open CNB Personal Settings, then create an access token with these scopes:
Private repositories also require the matching private-resource scope and
repository access.
For a repository-scoped token, set in the datasource
credentials. Validation then skips and , and checks only:
That mode requires and , but does not require
or .
Configure:
For an enterprise deployment, replace the URL fields with the deployment
endpoints.
After the page list is generated, select the repository metadata, README, code,
issue, and pull request documents that should be imported.
Copy the repository path from the CNB browser URL. For example:
The corresponding repository path is:
Accepted formats:
Multiple repositories can be separated by commas or new lines:
Do not enter only the repository name, such as . The full
namespace path is required. Leave this field empty to scan all repositories
accessible to the configured CNB token.
only limits automatic repository discovery. Explicit
repository paths are all processed and are not truncated by that value.
If you leave repository paths empty and also set a ref, the plugin applies that
ref to every accessible repository. Repositories where the ref does not exist or
cannot be read are shown with and their README/code files
are skipped. This prevents one inaccessible repository from failing the whole
datasource.
The import form exposes three optional fields:
Set only one of them:
If all three fields are empty, the repository default branch is used. Setting
more than one field returns a validation error.
The plugin resolves branch and tag values to a commit SHA before reading files.
This keeps branch and tag names distinct when both use the same name. For branch
names containing slashes, enter the complete name directly, such as
.
The plugin includes a CNB OAuth 2.0 authorization flow. CNB currently requires
an operator to approve and register OAuth applications. Access-token
authentication is the recommended setup for normal use.
The plugin connects directly to:
For enterprise deployments, the configured API and web endpoints are used
instead.
The plugin accesses only CNB data allowed by the configured token or OAuth
authorization. The data is sent directly to CNB and the Dify installation that
runs the plugin. See PRIVACY.md for details.
Last checked 10/10/2026 10:53 AM · version 0.0.13