Expand description
ai6-source-gitlab: the gitlab provider. As a Source it lists the open issues of one
project that carry the configured labels; as a Tracker it reads, comments on, labels,
closes, links and creates issues of that project. Requests are blocking; the host calls
them off its async runtime.
§ai6-source-gitlab
The gitlab Source provider for AI6: open GitLab
issues that carry a label become Missions, and the outcome comes back as a comment. It
talks to gitlab.com or a self-managed instance. See the
API header.
§Features
- Polls one project’s open issues by label and assignee, resuming from a cursor so only changed issues are fetched.
- Reads its token from the environment variable the Operation names; the token is never configured or logged.
- Reports a rate limit as an error and tries again on the next poll; pagination never leaves the configured API origin.
- As a Tracker, reads, comments on, labels, assigns, closes and creates issues, attaches a child as a task under its parent, links related issues, and lists the replies that may answer a question, from the issue’s author or a project member.
- Builds as both a Rust library and the Guatiao provider library a Station loads.
§Installation
Part of the AI6 workspace; built with it:
cargo build -p ai6 --features cli -p ai6-source-gitlab§Quick start
In operations.toml:
[operation.G.sources.gitlab]
project = "group/project"
labels = ["ai6:ready"]
token_env = "GITLAB_TOKEN"A self-managed instance adds api_url = "https://gitlab.example.com/api/v4". Then start a
Station that holds the Headquarters lease with the library on its plugin path:
GITLAB_TOKEN=... cargo run -p ai6 --features cli -- serve --plugin-path target/debug§Development
cargo test -p ai6-source-gitlab
cargo clippy -p ai6-source-gitlab --all-targets -- -D warningsTests run against a loopback HTTP server that answers with responses recorded from gitlab.com
and scrubbed; they never call GitLab. tests/live.rs is the exception: it runs the provider
against a real project, is ignored by default, and says at its top what it needs.
§License
MPL-2.0. See LICENSE.
Structs§
- Gitlab
- GitLab issues as an AI6 Source and Tracker.
- Settings
- One instance’s settings, from
[operation.<id>.sources.<name>].
Constants§
- PROVIDER_
ID - The provider ID an Operation names under
sources.
Statics§
- guatiao_
declares - What this library declares, read by a scanner as data.
Functions§
- guatiao_
library_ ⚠entry - The symbol a
guatiaohost loads this library by.