Expand description
ai6-source-github: the github provider. As a Source it lists the open issues (and
pull requests) of one repository that carry the configured labels; as a Tracker it reads,
comments on, labels, closes and creates issues of that repository. Requests are blocking;
the host calls them off its async runtime.
§ai6-source-github
The github Source provider for AI6: open GitHub
issues that carry a label become Missions, and the outcome comes back as a comment. See
the API header.
§Features
- Polls one repository’s open issues and pull requests by label and assignee, resuming from a cursor so only changed items 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 sub-issues, and lists the replies that may answer a question.
- 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-github§Quick start
In operations.toml:
[operation.G.sources.github]
repo = "jose-pr/ai6"
labels = ["ai6:ready"]
token_env = "GITHUB_TOKEN"Then start a Station that holds the Headquarters lease with the library on its plugin path:
GITHUB_TOKEN=... cargo run -p ai6 --features cli -- serve --plugin-path target/debug§Development
cargo test -p ai6-source-github
cargo clippy -p ai6-source-github --all-targets -- -D warningsTests run against a loopback HTTP server that answers with responses recorded from GitHub
and scrubbed; they never call GitHub. tests/live.rs is the exception: it runs the provider
against a real repository, is ignored by default, and says at its top what it needs.
§License
MPL-2.0. See LICENSE.
Structs§
- Github
- GitHub 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.