Fetch Tide PR Status
CLI equivalent of the Prow PR Status page. Focuses on labels and required jobs — the most common merge blockers. Tide also checks other things (author, milestone) which may appear in the tide verdict but are not broken out here.
Only outputs open, non-draft PRs.
Prerequisites
ghCLI authenticatedpython3withpyyaml(pip install pyyaml)
Usage
# All open PRs by an author
python3 "${SKILL_DIR}/fetch_tide_pr_status.py" openshift/cluster-monitoring-operator machine424
# Specific PRs
python3 "${SKILL_DIR}/fetch_tide_pr_status.py" openshift/cluster-monitoring-operator 3057,3044
Output
JSON array, one object per PR:
[
{
"number": 3044,
"title": "OCPBUGS-105305: [release-4.21] wrap ...",
"author": "machine424",
"url": "https://github.com/openshift/cluster-monitoring-operator/pull/3044",
"branch": "release-4.21",
"state": "open",
"mergeable": true,
"tide": "Not mergeable. Needs jira/valid-bug label.",
"blockers": [
"missing required label: jira/valid-bug",
"has forbidden label: jira/invalid-bug",
"job not passing: ci/prow/e2e-aws-ovn (running)"
],
"labels": {
"met": false,
"required": {
"have": ["lgtm", "approved"],
"missing": ["jira/valid-bug"]
},
"forbidden": {
"have": ["jira/invalid-bug"],
"clear": ["needs-rebase", "do-not-merge/hold"]
}
},
"required_jobs": [
{"name": "ci/prow/unit", "state": "success"},
{"name": "ci/prow/e2e-aws-ovn", "state": "running", "description": "Job triggered."}
]
}
]
tide — Tide's own verdict. blockers — what's preventing merge. required_jobs — non-optional jobs from openshift/release config; if the config could not be fetched, contains a single {"error": "..."} entry instead of jobs (not reflected in blockers).
Data Sources
https://prow.ci.openshift.org/tide.js— required/forbidden labels (public)gh api repos/{o}/{r}/pulls/{n}— PR metadatagh api repos/{o}/{r}/commits/{sha}/status— job statuses + Tide contextraw.githubusercontent.com/openshift/release/master/ci-operator/jobs/...— presubmit config (required vs optional)