codeowners: allow owner signoff through Comment reviews - #3
staging-devin-ai-integration[bot] wants to merge 3 commits into
Conversation
Owners currently have to approve a pull request to satisfy ownership, even when they only want to sign off on their own areas. Accept a standalone codeowners-approved directive in Comment reviews and apply the existing user/team ownership rules. Keep signoffs out of ordinary approval counts and automatic approval, and invalidate stale signoffs without mutating GitHub reviews. Co-Authored-By: Ethan Wu <ethan@cognition.ai>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
Original prompt from Ethan Wu
|
Keep list content indentation across paragraph boundaries so nested\ndirectives cannot satisfy ownership. Allow separated directives only\nafter they leave the list, and extend the shared compatibility cases. Co-Authored-By: Ethan Wu <ethan@cognition.ai>
A fenced block can interrupt a list or quote paragraph. Track its delimiter before skipping the paragraph so blank lines in examples cannot expose directives. Clear paragraph state when entering the fence to allow signoffs after its closing delimiter. Co-Authored-By: Ethan Wu <ethan@cognition.ai>
Related PR(s)
Companion https://github.com/usacognition/devin-webapp/pull/91587 updates the pinned
binary and dispatches review events for directive submissions and body edits.
Summary / Background
COMMENTED+ standalonecodeowners-approvedsatisfies every required ownergroup the signer belongs to.
APPROVEDprocessing, review thresholds, andallow_self_approvalretain their existing semantics.The newest valid signoff per reviewer survives unrelated comments and is
superseded by a later request-changes or dismissed review. Editing away a
directive withdraws that review's signoff. Smart dismissal checks owned-file
changes without attempting to dismiss Comment reviews. If ownership depends on
a signoff, enforcement cannot turn it into an ordinary GitHub approval.
The Go parser and receiver use the same JSON compatibility cases for standalone
lines, Markdown containers, fenced/indented code, HTML, case, and whitespace.
List indentation survives blank lines so nested paragraphs do not become
directives; the fixtures cover both continued lists and deindented signoffs.
Fences interrupting list/quote paragraphs are recognized before skipping their
content, so blank lines inside examples cannot expose directives.
Validated with Go 1.23.12:
go build ./...,go test ./...,go vet ./..., and./scripts/covbadge.sh(100% statement coverage in the new directive parser).Receiver checks also validate the shared fixtures and confirm that the existing
primary bot approval gate excludes signoffs. No live GitHub reviews were posted.
Release notes
Owners can sign off on their areas with a
codeowners-approvedComment reviewwithout giving the pull request an approving review.
Link to Devin session: https://staging.itsdev.in/sessions/cb452606a1134c548e161db7a0047e95
Open in Devin Desktop: https://staging.itsdev.in/desktop/session/cb452606a1134c548e161db7a0047e95?variant=devin-insiders
Requested by: @etw-cognition
Devin Review