adr check: count contributors by access to the repo #656
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#661 adr check: enforce sign-off on decided records
sixfold-space/madtea
#662 plugin hook: refuse an agent commit that decides or edits a record without the person's token
sixfold-space/madtea
#673 epic: a decided record needs a second contributor's sign-off
sixfold-space/madtea
Reference
sixfold-space/madtea#656
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 checkcollects 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 runsadr checkis 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.