adr check: find the author of a status change as the forge PR author #655
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
#673 epic: a decided record needs a second contributor's sign-off
sixfold-space/madtea
Reference
sixfold-space/madtea#655
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
For each decided record, find the commit that set its status, then the PR that merged that commit, through the forge's commit-to-PR endpoint (
GetCommitPR,internal/gitea/client_branchedit.go:35). The PR author is the author of the status change. When no PR exists, the author is unknown, and the check accepts a sign-off token from any contributor.The lookup must pass the full commit hash. This repo uses SHA-256 object IDs, and the endpoint returns 404 for a short hash.
Acceptance
Tests against the live forge API and a test repo: a status set in a PR gives that PR's author; a short hash is expanded; a commit with no PR gives no author.