Skip to content

📖 docs: clarify partial credit logic for Branch-Protection tiers#5010

Merged
spencerschrock merged 3 commits intoossf:mainfrom
aban-alazzeh:clarify-bp-scoring-docs
Apr 23, 2026
Merged

📖 docs: clarify partial credit logic for Branch-Protection tiers#5010
spencerschrock merged 3 commits intoossf:mainfrom
aban-alazzeh:clarify-bp-scoring-docs

Conversation

@aban-alazzeh
Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Docs update 📖

What is the current behavior?

The documentation for the Branch-Protection check states that "Each tier must be fully satisfied to achieve points at the next tier." This implies an all or nothing scoring model for each tier, leading users to believe they will receive zero points for a tier if even one requirement is missed

What is the new behavior (if this is a feature change)?**

This PR updates the documentation to accurately reflect the implementation logic in checks/evaluation/branch_protection.go. The updated wording clarifies that while tier progression is strict (you cannot earn points for Tier N+1 until Tier N is complete), users do receive partial credit for each requirement met within their current active tier via the normalizeScore function.

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

Fixes #5009

Special notes for your reviewer

I’ve updated docs/checks/internal/checks.yaml and ran the generation script to refresh docs/checks.md. This change makes the "partial credit" logic in normalizeScore more transparent, so users can clearly see how it works.

Does this PR introduce a user-facing change?

NONE

Signed-off-by: AbdelRahman AlAzzeh <ar.alazzeh003@outlook.com>
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 8, 2026
@aban-alazzeh aban-alazzeh changed the title docs: clarify partial credit for branch protection tiers 📖 docs: clarify partial credit logic for Branch-Protection tiers Apr 8, 2026
Copy link
Copy Markdown
Member

@spencerschrock spencerschrock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.78%. Comparing base (353ed60) to head (7da7314).
⚠️ Report is 354 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5010      +/-   ##
==========================================
+ Coverage   66.80%   69.78%   +2.98%     
==========================================
  Files         230      252      +22     
  Lines       16602    15736     -866     
==========================================
- Hits        11091    10982     -109     
+ Misses       4808     3873     -935     
- Partials      703      881     +178     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@spencerschrock spencerschrock merged commit 09a80e3 into ossf:main Apr 23, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

docs: clarify partial scoring logic in Branch-Protection tiered requirements

2 participants