Skip to content

Conversation

@wkoutre
Copy link
Contributor

@wkoutre wkoutre commented Jan 20, 2026

Supports querying Linear issues from multiple teams in parallel:

  • Add linear_teams input (comma-separated list) with backwards
    compatibility for linear_team (single team)
  • Query each team, aggregate results, and sort by priority
  • Limit total issues to max_issues across all teams
  • Include linear_team in matrix output for worker reference
  • Update worker workflow to accept and display team name

Also adds linear_team field to ProcessedIssue type in
@uniswap/ai-toolkit-linear-task-utils for tracking issue origin.

Resolves: DEV-201


✨ Claude-Generated Content

Summary

Add support for querying Linear issues from multiple teams in the claude-auto-tasks workflow. Issues from all specified teams are aggregated, sorted by priority, and limited to max_issues total.

Changes

Workflow Updates

File Changes
_claude-task-prepare.yml Added linear_teams input for comma-separated team list with backwards compatibility for linear_team
_claude-task-worker.yml Added linear_team input to display team name in job summary

Multi-Team Query Logic

Feature Description
Team input Accepts linear_teams (comma-separated) or linear_team (single, backwards compatible)
Label creation Ensures the specified label exists in all teams before querying
Parallel aggregation Queries each team, combines results into unified list
Priority sorting Sorts combined results by priority (Urgent → High → Normal → Low → No Priority)
Issue limiting Limits total issues to max_issues across all teams
Matrix output Includes linear_team field for worker reference

Package Updates (linear-task-utils)

File Changes
types.ts Added linear_team field to ProcessedIssue interface
query-issues.ts Populates linear_team from query parameter
query-issues.spec.ts Updated test expectations to include linear_team
CLAUDE.md Documented multi-team support and updated output examples

Usage

# Single team (backwards compatible)
prepare:
  uses: ./.github/workflows/_claude-task-prepare.yml
  with:
    linear_team: "Developer AI"
# Multiple teams
prepare:
  uses: ./.github/workflows/_claude-task-prepare.yml
  with:
    linear_teams: "Developer AI,Apps Infra,Backend Engineering"

Notes

  • linear_teams takes precedence over linear_team if both are provided
  • Workflow fails with clear error if neither input is provided
  • Job summary table now includes team column for multi-team visibility
  • No breaking changes - existing single-team workflows continue to work
    Resolves: DEV-201

Supports querying Linear issues from multiple teams in parallel:
- Add `linear_teams` input (comma-separated list) with backwards
  compatibility for `linear_team` (single team)
- Query each team, aggregate results, and sort by priority
- Limit total issues to `max_issues` across all teams
- Include `linear_team` in matrix output for worker reference
- Update worker workflow to accept and display team name

Also adds `linear_team` field to ProcessedIssue type in
@uniswap/ai-toolkit-linear-task-utils for tracking issue origin.

Resolves: DEV-201
@linear
Copy link

linear bot commented Jan 20, 2026

@vercel
Copy link

vercel bot commented Jan 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
ai-toolkit-slack-oauth-backend Ready Ready Preview, Comment Jan 20, 2026 8:11pm

Request Review

Copy link
Contributor Author

wkoutre commented Jan 20, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@semgrep-code-uniswap
Copy link

Semgrep found 1 run-shell-injection finding:

Using variable interpolation ${{...}} with github context data in a run: step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. github context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with env: to store the data and use the environment variable in the run: script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".

@wkoutre wkoutre marked this pull request as ready for review January 20, 2026 20:17
@wkoutre wkoutre requested a review from a team as a code owner January 20, 2026 20:17
@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2026

🤖 Claude Code Review

Review complete

PR Review: Multi-Team Support for Claude Auto-Tasks Workflow

Summary

This PR adds multi-team support to the Claude auto-tasks workflow, enabling queries for Linear issues from multiple teams simultaneously. The implementation is well-structured with proper backwards compatibility, priority-based sorting across teams, and appropriate documentation updates.

Files Reviewed

File Assessment
.github/workflows/_claude-task-prepare.yml ✅ Good
.github/workflows/_claude-task-worker.yml ✅ Good
packages/linear-task-utils/CLAUDE.md ✅ Good
packages/linear-task-utils/src/query-issues.spec.ts ✅ Good
packages/linear-task-utils/src/query-issues.ts ✅ Good
packages/linear-task-utils/src/types.ts ✅ Good

Analysis

What This PR Does

  1. TypeScript Package Changes (linear-task-utils):

    • Adds linear_team: string field to ProcessedIssue interface to track which team each issue belongs to
    • Updates queryIssues() to populate the new field from the team parameter
    • Updates tests to verify the new field is included in output
  2. Workflow Changes (_claude-task-prepare.yml):

    • Adds new linear_teams input for comma-separated team names
    • Maintains linear_team input for backwards compatibility
    • Iterates over teams to ensure labels exist in each
    • Queries issues from each team and aggregates results
    • Sorts combined results by priority (matching the TS implementation's sort order)
    • Limits total issues to max_issues across all teams
    • Updates summary table to include team column
  3. Worker Workflow Changes (_claude-task-worker.yml):

    • Adds linear_team input for multi-team support
    • Displays team in job summary when provided
  4. Documentation (CLAUDE.md):

    • Updates output format example to show linear_team field
    • Documents multi-team support behavior

Strengths

  1. Backwards Compatibility: Single-team usage via linear_team input continues to work unchanged
  2. Priority Handling: The jq-based priority sorting in the workflow correctly mirrors the TypeScript implementation's PRIORITY_SORT_ORDER (1, 2, 3, 4, 0)
  3. Clean Separation: The CLI queries one team at a time, and the workflow handles aggregation - this keeps the CLI simple and reusable
  4. Proper Error Handling: Validates that either linear_teams or linear_team is provided
  5. Test Coverage: Unit tests updated to verify linear_team field is included

Architecture Decision

The approach of keeping the CLI single-team focused while handling multi-team aggregation in the workflow is reasonable. It maintains simplicity in the TypeScript code while allowing workflow-level orchestration of the multi-team behavior.

Verdict

No bugs, security issues, or data corruption risks identified. The implementation is clean, well-documented, and maintains backwards compatibility. The test updates properly verify the new behavior.


💡 Want a fresh review? Add a comment containing @request-claude-review to trigger a new review at any time.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review verdict: APPROVE

👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.

This formal review submission is for the verdict only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant