Skip to content

squad watch --board fails for org-owned ProjectV2 (always uses --owner @me) #1079

Closed

Description

@vejadu

Summary: The --board capability hardcodes --owner @me when calling gh project item-list and there is no flag or config option to override it. Users whose project board is org-owned (e.g. https://github.com/orgs/<org>/projects/22) cannot use --board at all.

Repro:

  1. Have access only to org-owned ProjectV2 boards (no personal @me projects). Verify with gh project list --owner @me returning "No projects found for @me".
  2. Run squad watch --board --board-project 22 (or any non-@me project number) in a squad repo.
  3. Observe in stderr / round summary:
    board: board error: Command failed: gh project item-list 22 --owner @me --format json --limit 300
    GraphQL: Could not resolve to a ProjectV2 with the number 22. (viewer.projectV2)
    

Root cause: packages/squad-cli/src/cli/commands/watch/capabilities/board.ts hardcodes '--owner', '@me' in two places (the BoardCapability.execute method and in updateBoardStatus). There is no CLI flag or .squad/config.json field to override it.

Proposed fix:

  1. Read owner from the capability config (context.config['owner']), defaulting to '@me'.
  2. Add a --board-owner <name> CLI flag in cli-entry.ts to set capabilities.board.owner.
  3. Update help text/flag logic to allow this new flag and default to @me.

Tests to add:

  • BoardCapability: supplied owner config is used in item-list command.
  • CLI: new flag parses and composes with other board flags.

Docs to update:

  • CLI/README: Document new flag and config pattern under board lifecycle features.

Workaround:
Users may patch the package locally until this lands (see handoff doc in .squad/patches/UPSTREAM-HANDOFF.md for context).

Environment:

  • OS: Windows 11 (also repros on Linux/macOS)
  • Node: 18+
  • CLI: Any gh with org ProjectV2 access
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions