📖 1 minute read
When managing releases via git tags, use git tag --contains <commit-sha> to check if specific code has been deployed yet. Combine with GitHub CLI to trace PR status: gh pr view <pr-number> --json mergeCommit gets the merge SHA, then check git tag --contains <sha> to see which releases include that change. Compare timestamps with git log <tag> -1 --format='%ci' to understand deployment timing. Useful for tracking when fixes reach production.
# Check if PR #123 is in any release
$ gh pr view 123 --json mergeCommit
{
"mergeCommit": {
"oid": "abc123..."
}
}
# Check which tags contain this commit
$ git tag --contains abc123
v2024.03.10.1
v2024.03.11.1
# Compare timestamps
$ git log v2024.03.10.1 -1 --format="%H %ci"
abc123 2024-03-10 15:04:11 +0800
Leave a Reply