feat: add metadata JSON readiness output#1113
Open
panva wants to merge 2 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1113 +/- ##
==========================================
+ Coverage 62.01% 62.43% +0.42%
==========================================
Files 46 48 +2
Lines 7505 7882 +377
==========================================
+ Hits 4654 4921 +267
- Misses 2851 2961 +110 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Expose stable PR readiness reason codes from PRChecker and add git node metadata --json for machine-readable metadata readiness results. The JSON output includes readiness classification, reserved exit-code categories, generated metadata, unique reason codes, and detailed reasons. Signed-off-by: Filip Skokan <panva.ip@gmail.com>
7949e79 to
d416c6a
Compare
Contributor
Can we change that to only capture wait time? E.g. missing TSC approval should be a hard error, no amount of time is going to help with that, and not erroring would be confusing IMO. Missing approval would mean that someone has added the CQ label on a 0-approval PR, again that seems like an error |
Member
Author
|
@aduh95 makes sense, i'll update the utils and then the node PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds structured readiness output to
git node metadata --jsonso automation can consume PR landability checks without matching human-readable CLI output.The JSON output includes:
readyreadinessexitCodemetadatareasonCodesreasonsIt also adds stable reason codes from
PRCheckerfor the existing readiness checks.Exit Codes
git node metadata --jsonuses category-level exit codes:0: PR is ready20: PR is not ready for deferrable metadata reasons40: PR is not ready for a hard or mixed reason1: unexpected tool/runtime failure20-29are reserved for future deferrable metadata states, and40-49are reserved for future hard metadata failure states.The current deferrable set is scoped to the lightweight commit-queue selector use case from nodejs/node#64343:
missing-approvalmissing-tsc-approvalwait-time