Skip to content

Bug: function is failing because the JQ query is searching for incorrect fields #19

@byron-infomagnus

Description

@byron-infomagnus

This error is from running the workflow here: https://github.com/byron-github-school/.github/blob/main/.github/workflows/pull-project-tasks.yml

Run # Rate limiting helper functions
fetch the project ID
Fetching project ID for project 'ep-test01.1' in organization 'byron-github-school'
Error: Invalid JSON response from GitHub API:
Checking GraphQL API rate limit...
GraphQL API points remaining: 5000
Attempt 1 of 5: gh api graphql -f query=query($org: String!) {
organization(login: $org) {
projectsV2(first: 100) {
nodes {
id
title
}
}
}
} -f org=byron-github-school
{"data":{"organization":{"projectsV2":{"nodes":[{"id":"PVT_kwDOB83RPM4A84Om","title":"Audit Framework MACS 001"},{"id":"PVT_kwDOB83RPM4A84OY","title":"Audit Framework MACS template 001"},{"id":"PVT_kwDOB83RPM4A4XxV","title":"ep-test01"}]}}}}Command succeeded on attempt 1.
Error: Process completed with exit code 1.

The return values for all the functions in this step need to be modified to ensure each JQ query is searching the correct return values and also searching for the correct field.

Review the provided error message and compare against the GraphQL API responses that are expected per the GitHub API documentation here: https://docs.github.com/en/graphql/reference/queries

This issue is fixed when these functions can properly search the return value and find the appropriate field. If the field cannot be discuvered and response is not an error, then function is not searching the correct field.
Use this valid issue to test: im-infomagnus/ms-code-with-engineering-playbook#77

Metadata

Metadata

Assignees

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