Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 2, 2026

Project 146 resolution fails with "Could not resolve to a ProjectV2" despite correct URL and code logic. Both direct projectV2(number) and fallback projectsV2 list queries fail, but insufficient logging prevents identifying whether this is a permission, access, or API issue.

Changes

Enhanced diagnostic logging in project resolution:

  • Log parsed URL components with types to verify extraction
  • Log string-to-integer conversion to confirm type handling
  • Log GraphQL query variables before execution
  • Distinguish between API errors vs. null results

Files modified:

  • actions/setup/js/update_project.cjs
  • actions/setup/js/create_project_status_update.cjs

Example

Before:

const projectInfo = parseProjectUrl(output.project);
const projectNumberInt = parseInt(projectNumberFromUrl, 10);
const project = await resolveProjectV2(projectInfo, projectNumberInt, github);

After:

const projectInfo = parseProjectUrl(output.project);
// Logs: "Parsed project URL: scope=orgs, owner=githubnext, number=146 (type: string)"

const projectNumberInt = parseInt(projectNumberFromUrl, 10);
// Logs: "Converting project number: "146" (string) -> 146 (number)"

const project = await resolveProjectV2(projectInfo, projectNumberInt, github);
// Logs: "resolveProjectV2 called with: scope=orgs, login=githubnext, number=146 (type: number)"
// Logs: "Executing direct projectV2 query with variables: login="githubnext", number=146"

Next workflow run will reveal exact failure point: token permissions, project visibility, or transient API errors.

Original prompt

Investigate issue in run when esolving project from URL (scope=orgs, login=githubnext, number=146)...
Warning: Direct projectV2(number) query failed; falling back to projectsV2 list search: Request failed due to following response errors:


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 2, 2026 17:44
…n-existent #146

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
…ssues

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate issue in resolving project from URL in GraphQL Add diagnostic logging for project resolution failures Feb 2, 2026
Copilot AI requested a review from mnkiefer February 2, 2026 17:50
@mnkiefer mnkiefer closed this Feb 2, 2026
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