Skip to content

Add assignee/assignees filter fields to GitHub triggers #1183

@geoffjay

Description

@geoffjay

Summary

Add optional assignee and assignees filter fields to the existing GitHub trigger source types (github_issues and github_pull_requests). This brings GitHub triggers to parity with the new GitLab triggers and the existing Linear assignee filter.

Context

The issue description for #1178 explicitly notes:
"Note that assignee was added to the issues trigger and assignees to the merge requests, this is an optional field that I want to add, and I've actually been meaning to add to GitHub as well."

Currently, GitHub triggers fetch all matching issues/PRs by labels and state but have no assignee filtering. The gh CLI supports --assignee for filtering.

Acceptance Criteria

  • Add assignee: Option<String> to TriggerConfig::GithubIssues in crates/orchestrator/src/scheduler/types.rs
  • Add assignees: Option<Vec<String>> to TriggerConfig::GithubPullRequests in crates/orchestrator/src/scheduler/types.rs
  • Both fields use #[serde(default)] for backward compatibility
  • Update GithubIssueSource::new() to accept optional assignee parameter
  • Update GithubIssueSource::fetch_tasks() in crates/orchestrator/src/scheduler/github.rs:
    • When assignee is set, add --assignee {value} to gh issue list args
  • Update GithubPullRequestSource::new() to accept optional assignees parameter
  • Update GithubPullRequestSource::fetch_tasks():
    • When assignees is set, add --assignee {value} for each assignee (gh CLI supports repeated --assignee)
  • Update create_source() in crates/orchestrator/src/scheduler/runner.rs to pass new fields through
  • Update SourceTemplate::GithubIssues and SourceTemplate::GithubPullRequests in crates/cli/src/commands/apply.rs with the new fields and conversion
  • Update source_github_issues and source_github_pull_requests in schemas/workflow.yml with new optional properties
  • Update existing tests in github.rs to verify assignee field handling
  • Add test for assignee filtering in gh CLI args construction

YAML Example

# GitHub Issues with assignee filter
source:
  type: github_issues
  owner: myorg
  repo: myrepo
  labels: [agent]
  assignee: alice
  state: open

# GitHub PRs with assignees filter
source:
  type: github_pull_requests
  owner: myorg
  repo: myrepo
  assignees: [bob, carol]
  state: open

Key Files

  • crates/orchestrator/src/scheduler/types.rs - add fields to enum variants
  • crates/orchestrator/src/scheduler/github.rs - implement filtering
  • crates/orchestrator/src/scheduler/runner.rs - pass fields to constructors
  • crates/cli/src/commands/apply.rs - SourceTemplate updates
  • schemas/workflow.yml - schema updates

Stack Base

Stack on: feature/autonomous-pipeline
Parallel: no ordering constraint (independent of GitLab work, touches only GitHub code)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions