Verify classic protection when permitted and unify status presentation - #497
Merged
Conversation
The dedicated branch-protection endpoint always names each required check's app binding, but needs the App's optional repository- administration read permission. When an installation grants it, classic protection verifies exactly like a ruleset; a 403 falls back to the identity-less branch summary, a 404 is evidence of no classic protection, and rate limits still reschedule the sweep durably.
Both sections drop the bordered pill chips, which looked interactive and carried no color: status is now an inline icon and tinted word, with a new dashed unknown glyph distinct from informational blue. Green means verified, rust means act, grey means Postil cannot know. Repositories sort problems first, zero counts disappear, the summary counts reuse the row encoding, verified rows quiet down to one line with their evidence inside the expander, and the fix for an unenforced gate is a visible link instead of two interactions deep. Config artifact chips encode state only and only when the state is not nominal; the source stays in the description sentence.
A network failure on the optional protection endpoint no longer fails the whole observation; it records an error while summary and ruleset evidence still decide. Rate limits and aborts keep throwing.
Both unverified-state sentences name repository Administration (read-only), the permission as GitHub presents it, instead of two inconsistent paraphrases.
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.
Two failures of the installation-health section drove this change: an "unverified" status that offered no way to become verified, and status presentation the owner could not read at a glance, with bordered pills that looked clickable but were not, a warning triangle on expected states, and a config-files chip whose one-word vocabulary switched between source and state row by row.
Postil now reads the dedicated branch-protection endpoint, which always names each required check's app binding but needs the App's optional repository-administration read permission. An installation that grants it gets classic protection verified exactly like a ruleset; one that does not keeps today's behavior, since a 403 falls back to the identity-less branch summary. A 404 counts as evidence of no classic protection, and rate limits still reschedule the sweep.
Both status sections now share one visual grammar: an inline icon and tinted word instead of pill chips, with a new dashed
unknownglyph so "cannot know" stops borrowing the informational icon. Green means verified, rust means act, grey means unknowable. Repositories sort problems first, zero counts and redundant explainer prose are gone, verified rows collapse to one line with their evidence inside the expander, an unenforced repository shows its "Open repository rules" link directly, and unverified rows name their two exits: a ruleset, or granting the optional read access. Config artifact chips encode state only, and only when the state is not nominal.