adr check: count contributors by access to the repo #656

Open
opened 2026-09-29 16:37:25 +00:00 by hexajon · 0 comments
Owner

What to build

A contributor is an account that is a collaborator, or a member of a team, with more than read access to the repo. adr check collects the authors of the PRs that changed the records and the authors of the comments on the decision issues, and keeps only contributors. madtea already reads an account's effective permission (GET collaborators/<user>/permission, internal/gitea/client_collaborators.go:32). Check what the forge returns when the account that runs adr check is not a repo admin. A refused read makes the check fail with a message, and never counts wrongly.

Acceptance

Tests against the live forge API and a test repo: a comment from an account with read access only is ignored; a write collaborator counts; a team member with write access counts; a refused permission read fails the check with a message.

## What to build A contributor is an account that is a collaborator, or a member of a team, with more than read access to the repo. `adr check` collects the authors of the PRs that changed the records and the authors of the comments on the decision issues, and keeps only contributors. madtea already reads an account's effective permission (`GET collaborators/<user>/permission`, `internal/gitea/client_collaborators.go:32`). Check what the forge returns when the account that runs `adr check` is not a repo admin. A refused read makes the check fail with a message, and never counts wrongly. ## Acceptance Tests against the live forge API and a test repo: a comment from an account with read access only is ignored; a write collaborator counts; a team member with write access counts; a refused permission read fails the check with a message.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
sixfold-space/madtea#656
No description provided.