Remove Github 'Deployments' banner in pull requests
Recently I moved one site from Verel to Firebase, but a “This branch has no deployments” banner keep showing. A simple Google search find this: https://github.com/orgs/community/discussions/46375 Github doc: https://docs.github.com/en/rest/deployments/deployments?apiVersion=2022-11-28 Seems we can only use API. but I first tried delete: gh api /repos/$User/$Repo/deployments --jq=".[].id" ` | ForEach-Object { gh api --method DELETE -H "Accept: application/vnd.github+json" ` -H "X-GitHub-Api-Version: 2022-11-28" ` "/repos/$User/$Repo/deployments/$_" } but get error: { "message": "Validation Failed", "errors": [ "We cannot delete an active deployment unless it is the only deployment in a given environment." ], "documentation_url": "https://docs.github.com/rest/deployments/deployments#delete-a-deployment", "status": "422" } gh: Validation Failed (HTTP 422) Then I tried to create a deployment and set it as active: ...