При запросе последнего коммита или списка коммитов (с помощью history
) вы можете получить доступ к status
объекту , который имеет свойство state
:
{
repository(owner: "bertrandmartel", name: "metec-braille-driver") {
refs(first: 100, refPrefix: "refs/heads/") {
nodes {
target {
... on Commit {
status {
state
contexts {
description
createdAt
state
}
}
history(first: 100) {
nodes {
message
status {
state
contexts {
description
createdAt
state
}
}
}
}
}
}
}
}
}
}
, который имеет следующий результат:
....
"status": {
"state": "FAILURE",
"contexts": [
{
"description": "AppVeyor build failed",
"createdAt": "2020-03-09T02:31:19Z",
"state": "FAILURE"
},
{
"description": "The Travis CI build passed",
"createdAt": "2020-03-09T02:31:42Z",
"state": "SUCCESS"
}
]
},
....
Также из v3 do c:
Состояние статуса. Может быть ошибкой, ошибкой, ожиданием или успехом