Skip to content

feat: add best practices badge URL generator#301

Open
vinayada1 wants to merge 1 commit intoossf:mainfrom
vinayada1:feat/best-practices-badge-url
Open

feat: add best practices badge URL generator#301
vinayada1 wants to merge 1 commit intoossf:mainfrom
vinayada1:feat/best-practices-badge-url

Conversation

@vinayada1
Copy link
Copy Markdown
Contributor

Summary

Add a Best Practices Badge URL generator that turns Privateer scan results into reviewable bestpractices.dev proposal links.

This change adds a small CLI for producing badge proposal URLs from scanner output, including support for badge section selection, optional justification text, and compatibility batching for environments that need shorter URLs. It also documents the user workflow in the repository so scan results can be applied through the Best Practices Badge UI with manual review.

The implementation normalizes Privateer results into Best Practices Badge statuses, preserves useful evidence text in justifications, and handles repository lookup from serialized scan payloads. Regression tests cover invalid inputs, batching behavior, default option handling, NotApplicable mapping, evidence URL preservation, and Unicode-safe justification truncation.

Limitations

This flow still depends on the current bestpractices.dev automation proposal query format and is validated locally rather than with a live end-to-end badge submission test.

Validation

  • go test ./...

@vinayada1 vinayada1 requested a review from a team as a code owner May 1, 2026 21:14
@vinayada1 vinayada1 force-pushed the feat/best-practices-badge-url branch 4 times, most recently from e540eea to f928e37 Compare May 4, 2026 18:53
Signed-off-by: Vinaya Damle <vinayada1@users.noreply.github.com>
@vinayada1 vinayada1 force-pushed the feat/best-practices-badge-url branch from f928e37 to b090ab4 Compare May 4, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants