Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Support WAITING status for [GitHubDeployments] #8521

Merged

Conversation

martincostello
Copy link
Contributor

Fix "invalid response data" badge label for GitHub deployments pending approval.

Scenario

If a deployment is pending manual approval:

image

Then the GraphQL API reports the status as PENDING:

Request

query {
  repository(owner: "martincostello", name: "api") {
    deployments(last: 1, environments: ["production"]) {
      nodes {
        latestStatus {
          state
        }
      }
    }
  }
}

Response

{
  "data": {
    "repository": {
      "deployments": {
        "nodes": [
          {
            "latestStatus": {
              "state": "WAITING"
            }
          }
        ]
      }
    }
  }
}

This then produces a badge that looks like this:

image

The status doesn't appear to be consistently documented, but definitely exists: octokit/webhooks.net#52

Fix "invalid response data" badge label for GitHub deployments pending approval.
@chris48s chris48s closed this Oct 14, 2022
@chris48s chris48s reopened this Oct 14, 2022
@shields-ci
Copy link

Warnings
⚠️ This PR modified service code for github but not its test code.
That's okay so long as it's refactoring existing code.
Messages
📖 ✨ Thanks for your contribution to Shields, @martincostello!

Generated by 🚫 dangerJS against c4806b6

@chris48s chris48s merged commit bd6a04b into badges:master Oct 15, 2022
@martincostello martincostello deleted the add-waiting-for-github-environments branch October 15, 2022 22:13
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.

None yet

3 participants