Skip to content

Implement BranchProtectionAssessor using GitHub API #405

@jwm4

Description

@jwm4

Background

BranchProtectionAssessor (src/agentready/assessors/testing.py) is registered in create_all_assessors() but its assess() method unconditionally returns not_applicable. It has never contributed to any assessment score.

The assessor's own docstring describes the intended implementation:

This is a stub implementation that will return not_applicable until GitHub API integration is implemented.

What it should check

Per the existing criteria in the assessor:

  • Required status checks on the default branch
  • Required review approvals before merging
  • Force push prevention
  • Branch update requirements (branch must be up to date before merging)

Implementation notes

  • The project already has GitHub integration infrastructure in src/agentready/github/
  • The assessor is Tier 4 (Advanced) with default_weight=0.005 — low weight, low risk
  • Should gracefully degrade to skipped when no GitHub token is available or the repo is not on GitHub (e.g., local-only repos, GitLab)
  • branch_protection is also absent from default-weights.yaml (tracked in Fix default-weights.yaml: dead key, missing entries, and scoring drift #403) — that should be resolved alongside or before this

Acceptance criteria


Opened by Claude Code under the supervision of Bill Murdock.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions