Nox-Lumen MfgNox-Lumen Mfg

Code hosting integrations

Activation: one natural-language turn

These integrations do not start in a static admin wizard, and users need not manually paste webhook URLs into each forge. The supported flow is:

Describe the goal inside a combo-agent session; the Agent loads the integration skill and handles the rest.

User saysSkill chosen
“Watch GitHub repo uu5208/ragbase for PR reviews”github-integration
“Connect GitLab project team/backend for auto-review”gitlab-integration
“Enable Gitee repo myorg/myapp PR reviews”gitee-integration
“Follow Gerrit project platform/core for new patchsets”gerrit-integration
“Review Gerrit change 12345 now”gerrit-integration

Each SKILL.md encodes a mandatory pipeline; after the trigger phrase matches the agent runs end-to-end—from collecting credentials to webhook validation. Operators only answer “paste your token.”

Rendering diagram…

Webhook endpoints are generated by the platform; users never hand-type GitHub/GitLab/Gerrit URLs. Agents call *_create_webhook REST helpers (Git hosts) or push webhooks.config (Gerrit meta branch) to register callbacks remotely.

End-to-end picture

Rendering diagram…

Platform matrix

ForgeSkillWebhook wiringReview feedbackRepo search
Gerritgerrit-integrationPush webhooks.config to refs/meta/config; cron fallback if blocked✅ change + inline
GitLab CE/EE/self-managedgitlab-integrationREST create hook✅ MR threads & discussions
GitHub / GHEgithub-integrationREST create hook✅ PR reviews + checks
Giteegitee-integrationREST create hook✅ PR comments

Credential checklist (ask_user)

ForgeSecretMinimum scope
GerritHTTP PasswordRead + Label: Code-Review; path A also Push refs/meta/config
GitLabglpat_… PAT / project tokensapi, read_repository
GitHubclassic/fine-grained PATrepo or fine scopes for PRs/contents/checks
GiteePATpull_requests, issues, hook

Never use personal administrator tokens—use project/service accounts or GitHub Apps for revocability.

Internal pipeline (non-negotiable order)

Step 1 — ask_user + connectivity check

After the secure prompt collects a token, immediate *_verify_token calls surface misconfigurations verbatim—no silent retries.

Step 2 — manage_scm_bot

manage_scm_bot(
  action="create",
  provider="github",
  instance_name="github-uu5208-ragbase",
  credentials_json='{"github_token":"ghp_xxx"}',
  config_json='{"repo":"uu5208/ragbase"}'
)

Responsibilities:

  1. Re-run verification (no DB row without a successful remote proof)
  2. Insert tenant_channel_bot
  3. Echo the full callback URL, e.g., https://combo.example.com/webhook/github-uu5208-ragbase

Skipping this tool and inventing secrets causes 404 storms—skills document the ban in red lettering.

Step 3 — Provision remote hook

REST path (Git hosts)

github_create_webhook(
  owner="uu5208",
  repo="ragbase",
  instance_name="github-uu5208-ragbase"
)

Agents never ask users to navigate UI settings.

Git path (Gerrit A)

Projects store hooks in refs/meta/config:

[remote "ragbase"]
  url = <callback from Step 2>
  event = patchset-created
  secret = <16-byte random from config_json>
  sslVerify = true

Only subscribe to patchset-created. Adding comment-added/change-merged creates feedback loops—the agent’s own review posts re-fire webhooks. With fnmatch-only filters, omission is the reliable fix (real incident burned six LLM rounds in 20 min).

Cron path (Gerrit B fallback)

Use when webhooks are impossible (missing plugin, policy blocks, air-gapped sandbox):

manage_cron_job(
  action="create",
  name="gerrit-poll-{project_slug}",
  schedule_type="every",
  schedule_value="10m",
  prompt="gerrit_list_changes(query='project:{project} status:open'); diff vs last_seen"
)

Choose exactly one of paths A/B upfront (decision table baked into skills). Do not silently hop from A→B without user acknowledgement.

Step 4 — manage_event_trigger binds prompts

manage_event_trigger(
  action="create",
  name="github-uu5208-ragbase-pr-review",
  source_type="webhook",
  source_bot_instance="github-uu5208-ragbase",
  event_filter='{"event_type":"pull_request"}',
  execution_mode="main",
  prompt="On PR events: fetch diff, review, post comments…"
)

prompt literally replays when deliveries arrive—session-driven automation in a nutshell.

Step 5 — curl -I validation (mandatory)

curl -sI "<callback URL from Step 2>"
ResultMeaning
200 / 405Route exists (405 expected for GET-only)
404DB row missing → escalate
TimeoutRAGFLOW_PUBLIC_URL / firewall issue

git push succeeding on Gerrit does not prove the SaaS ingress is reachable—you still need curl evidence.

Runtime loop post-configuration

Rendering diagram…

scm_tool_context injects PR/change identifiers so tools fire without brittle URL parsing.

Review feedback modes

PlatformCommentarySignals
GerritInline + summariesCode-Review / Verified labels
GitLabMR + discussionsapprove/request changes
GitHub/GHEInline + checksapprovals + check suites
GiteePR threadstextual feedback

Repo reads happen through REST snapshots—whole clones only if contractual.

Multiple bots / identities

Teams often register discrete bots per estate (GH org A, self-hosted GitLab B, corp Gerrit C). Routing inspects SCM URLs → tenant bot metadata.

Troubleshooting cheatsheet

SymptomFix
curl → 404Repair manage_scm_bot; don’t forge webhooks blindly
Gerrit 403 on review labelsElevate robot permissions
GitHub ephemeral 401PAT expiry / GH App clock drift
GitLab webhook silentEnable “Allow local network hooks”
Missing refs/meta/config locallyrun git fetch origin refs/meta/config:refs/remotes/origin/meta/config
not a registered emailAlign git author with gerrit_get_me
Infinite review recursionRestrict config to patchset-created only
Massive MR diffsUse max_diff_kb truncation + targeted reads

Further reading

On this page