Github workflow: Update Cirrus-cron GraphQL query

Sometime on Jan. 14th the GraphQL schema for Cirrus-CI changed, leading
to the following error:

`Validation error of type FieldUndefined: Field 'githubRepository' in
type 'Root' is undefined @ 'githubRepository'`

After some exploration, it was determined the field had been replaced
with a new root-level field `ownerRepository`.  Manual experimentation
revealed the scalar value `LINUX` was appropriate to use for the new
`platform` parameter.  The query reply appears to remain compatible.

Update the script which performs this query to use the new field name
and parameter.  ***NOTE*** This script is shared across multiple
containers-org repos. All of which are/were affected by the schema
change.

Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
Chris Evich
2022-01-24 15:12:38 -05:00
parent b75d6baf07
commit 0d42d9f8d1

View File

@ -22,7 +22,7 @@ mkdir -p artifacts
cat > ./artifacts/query_raw.json << "EOF" cat > ./artifacts/query_raw.json << "EOF"
{"query":" {"query":"
query CronNameStatus($owner: String!, $repo: String!) { query CronNameStatus($owner: String!, $repo: String!) {
githubRepository(owner: $owner, name: $repo) { ownerRepository(platform: \"LINUX\", owner: $owner, name: $repo) {
cronSettings { cronSettings {
name name
lastInvocationBuild { lastInvocationBuild {