You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create the GitLab module scaffolding in the orchestrator scheduler: configuration/auth resolution (following the LinearConfig pattern), the GitlabIssues and GitlabMergeRequests variants in TriggerConfig and SourceTemplate, factory wiring in create_source(), and template variable registration. This is the foundation for the GitLab trigger implementation.
Context
The orchestrator scheduler has a clean plugin architecture: TriggerConfig enum (serde-tagged) selects the variant, create_source() factory instantiates the TaskSource, and PollingStrategy drives the poll loop. Adding GitLab requires touching each layer to register the new types, but the actual API calls come in follow-up issues.
The Linear integration (linear.rs) is the closest pattern to follow: direct HTTP API with env var + config file auth resolution.
Acceptance Criteria
New file crates/orchestrator/src/scheduler/gitlab.rs with:
GitlabConfig struct with resolve() and is_configured() methods
Auth resolution: AGENTD_GITLAB_TOKEN env var, then [gitlab] token in config file
Base URL: AGENTD_GITLAB_URL env var (default https://gitlab.com)
Debug impl that redacts the token (like LinearConfig)
Stub GitlabIssueSource and GitlabMergeRequestSource structs (impl TaskSource with placeholder fetch_tasks)
Register pub mod gitlab; in crates/orchestrator/src/scheduler/mod.rs
Add to TriggerConfig enum in crates/orchestrator/src/scheduler/types.rs:
Summary
Create the GitLab module scaffolding in the orchestrator scheduler: configuration/auth resolution (following the
LinearConfigpattern), theGitlabIssuesandGitlabMergeRequestsvariants inTriggerConfigandSourceTemplate, factory wiring increate_source(), and template variable registration. This is the foundation for the GitLab trigger implementation.Context
The orchestrator scheduler has a clean plugin architecture:
TriggerConfigenum (serde-tagged) selects the variant,create_source()factory instantiates theTaskSource, andPollingStrategydrives the poll loop. Adding GitLab requires touching each layer to register the new types, but the actual API calls come in follow-up issues.The Linear integration (
linear.rs) is the closest pattern to follow: direct HTTP API with env var + config file auth resolution.Acceptance Criteria
crates/orchestrator/src/scheduler/gitlab.rswith:GitlabConfigstruct withresolve()andis_configured()methodsAGENTD_GITLAB_TOKENenv var, then[gitlab] tokenin config fileAGENTD_GITLAB_URLenv var (defaulthttps://gitlab.com)Debugimpl that redacts the token (likeLinearConfig)GitlabIssueSourceandGitlabMergeRequestSourcestructs (implTaskSourcewith placeholderfetch_tasks)pub mod gitlab;incrates/orchestrator/src/scheduler/mod.rsTriggerConfigenum incrates/orchestrator/src/scheduler/types.rs:trigger_type()cases returning"gitlab_issues"and"gitlab_merge_requests"is_implemented()cases returningtrueGitlabIssuesandGitlabMergeRequestscases tocreate_source()incrates/orchestrator/src/scheduler/runner.rsGitlabIssuesandGitlabMergeRequestsvariants toSourceTemplateincrates/cli/src/commands/apply.rswith conversion toTriggerConfigKNOWN_VARIABLESincrates/orchestrator/src/scheduler/template.rs:gitlab_project_id,gitlab_iid(internal issue/MR number),source_branch,target_branch,merge_statusConfiguration Design
Environment variables:
AGENTD_GITLAB_TOKEN- GitLab personal access token or project tokenAGENTD_GITLAB_URL- Base URL for self-hosted instancesKey Files
crates/orchestrator/src/scheduler/gitlab.rs(NEW)crates/orchestrator/src/scheduler/mod.rscrates/orchestrator/src/scheduler/types.rscrates/orchestrator/src/scheduler/runner.rscrates/orchestrator/src/scheduler/template.rscrates/cli/src/commands/apply.rsStack Base
Stack on:
feature/autonomous-pipelineParallel: no ordering constraint (foundation issue)