Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 16, 2025

The update_project safe output failed when adding new options to GitHub Projects V2 single-select fields. GraphQL requires the color field to be non-null for all options in the updateProjectV2Field mutation, but the code only included name and description when building the options array.

// Before: Missing color field
const allOptions = [
  ...field.options.map(o => ({ name: o.name, description: "" })),
  { name: String(fieldValue), description: "" },
];

// After: Preserves existing colors, defaults to GRAY
const allOptions = [
  ...field.options.map(o => ({ name: o.name, description: "", color: o.color || "GRAY" })),
  { name: String(fieldValue), description: "", color: "GRAY" },
];

Changes:

  • Updated GraphQL query to fetch color field from existing options
  • Modified options array construction to include color from existing options with GRAY fallback
  • Added test case verifying color preservation when creating new options

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login -json GO111MODULE g_.a GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xTest User env 4248081/b001/_pkg_.a GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linu/var/run/docker/runtime-runc/moby (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login -json GO111MODULE che/go-build/0f/0f22223af12b9207afdcf9a651cdc71003f044bebccf1dc9fbf70cd42e8249ca-d/gh-aw GOINSECURE GOMOD GOMODCACHE che/go-build/0f/0f22223af12b9207afdcf9a651cdc71003f044bebccf1dc9fbf70cd42e8249ca-d/gh-aw env -json GO111MODULE e/git GOINSECURE GOMOD GOMODCACHE e/git (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login /run/containerd/io.containerd.runtime.v2.task/moby/d5c9902fc5b4f79c459b8d7560aff47070cd8d3eacc1e4636c9dbfaa7c21fd76/init.pid d5c9902fc5b4f79c459b8d7560aff47070cd8d3eacc1e4636c9dbfaa7c21fd76 ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linu--log env 47070cd8d3eacc1e4636c9dbfaa7c21fd76 GO111MODULE /opt/hostedtoolcache/go/1.25.0/xdelete GOINSECURE GOMOD GOMODCACHE go (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Analyze campaign run: https://github.com/githubnext/gh-aw/actions/runs/20261154113/job/58173544031

[4/5] Processing content (issue/PR) if specified...
✓ Item already on board
Warning: Failed to create option "Closed - Not Planned": Request failed due to following response errors:
 - Variable $options of type [ProjectV2SingleSelectFieldOptionInput!]! was provided invalid value for 0.color (Expected value to not be null), 1.color (Expected value to not be null), 2.color (Expected value to not be null), 3.color (Expected value to not be null)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 16, 2025 08:39
…-select options

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Analyze campaign run for processing errors Fix update_project mutation missing color field for single-select options Dec 16, 2025
Copilot AI requested a review from mnkiefer December 16, 2025 08:49
@mnkiefer mnkiefer marked this pull request as ready for review December 16, 2025 09:14
@mnkiefer mnkiefer merged commit c15c2ec into main Dec 16, 2025
36 checks passed
@mnkiefer mnkiefer deleted the copilot/analyze-campaign-run-errors branch December 16, 2025 09:20
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.

2 participants