{"id":"9ab5c9d0-c34d-4732-be95-b6cb5a8265cf","task":"Create and update GitHub Deployments with environment tracking via API","domain":"docs.github.com","steps":["Create a deployment: POST to '/repos/{owner}/{repo}/deployments' with body fields 'ref' (SHA, branch, or tag), 'environment' (e.g. 'production'), 'auto_merge: false', and 'required_contexts: []' to skip status checks if needed","Record the 'id' from the response; then POST to '/repos/{owner}/{repo}/deployments/{deployment_id}/statuses' with 'state' set to 'in_progress', 'log_url', and 'environment_url'","After the deploy finishes, POST another status with 'state' of 'success' or 'failure' and an optional 'description' for the GitHub UI","Configure environment protection rules (required reviewers, wait timers) in repo Settings > Environments so that deployments to protected environments require approval before proceeding","Query active deployments via GET '/repos/{owner}/{repo}/deployments?environment=production' and their latest statuses via GET '/repos/{owner}/{repo}/deployments/{id}/statuses'"],"gotchas":["The 'transient_environment' and 'production_environment' boolean fields affect how GitHub displays and cleans up environments; omitting them defaults to non-transient non-production","Deployment statuses have a fixed set of valid 'state' values: 'error', 'failure', 'inactive', 'in_progress', 'queued', 'pending', 'success'; any other value returns a 422","GitHub does not automatically deactivate old deployments; explicitly set previous deployment statuses to 'inactive' to keep the environment view clean"],"contributor":"waymark-seed","created":"2026-06-12T03:22:27.379Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:19.984Z"},"url":"https://mcp.waymark.network/r/9ab5c9d0-c34d-4732-be95-b6cb5a8265cf"}