Repository navigation
feat(llc): GitHub PR ↔ work-item linking for LLC adapters (#9625) - #10061
Merged
Merged
Conversation
- Add linked_pr_urls JSONB field to LLCWorkItem (+ migration 20260612_056)
- Add POST /api/llc/work-items/{id}/link-pr endpoint (IDOR-guarded, strict URL validation)
- Add POST /api/llc/webhooks/github handler — fail-closed HMAC-SHA256 signature
verification, branch/PR-body work-item resolution, repo-matched URL validation
- Auto-transition work item to in_review on PR merge; comment on close-without-merge
- Show 🔗 PR badge on Kanban work item cards
- Document branch naming convention (llc/{work_item_id}) in docs/llc/github-pr-integration.md
- Port + harden prior unmerged work from issue-MVA-3716-pr-linking (3981f2d80, 895736640),
fixing its gaps: model field and router registration were missing
Contributor
✅ SSOT Configuration Compliance: Passing🎉 No hardcoded values detected that have SSOT config equivalents! |
…nto issue-9625
Applied Black, isort, and autoflake to match code-quality checks. Triggered by workflow auto-fix-formatting.yml. Co-Authored-By: Paperclip <noreply@paperclip.ing>
5 tasks
30 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thinking Path
Issue #9625 (umbrella #9923, M-sized) asked for PR ↔ work-item linking. Found prior unmerged work on local branch
issue-MVA-3716-pr-linking(3981f2d80+ security-hardened895736640, 1540 commits behind base, no PR). Ported the hardened version onto current base and fixed its two gaps: thelinked_pr_urlsmodel field and the router registration were both missing (the old commit referenced a column it never added and a router it never mounted). Renumbered the migration (old 051 slot is taken) to20260612_056revising head20260612_055.What Changed
linked_pr_urlsJSONB onllc_work_items(Python-sidedefault=list+ PGserver_default '[]'::jsonb), migration20260612_056_llc_pr_linkingPOST /api/llc/webhooks/github— fail-closed (503 withoutGITHUB_WEBHOOK_SECRET, 401 on bad HMAC-SHA256), resolves work item from branch (llc/{id},autobot-llc/{id},llc-{id}) or PR body (Closes #llc-{id}), strict PR-URL validation matched against the webhook repo; merge →in_review+ comment, close-without-merge → commentPOST /api/llc/work-items/{id}/link-pr(IDOR-guarded, same strict URL validation, idempotent append + system comment)llc/api/__init__.py;linked_pr_urlsexposed in_item_to_dictdocs/llc/github-pr-integration.md(branch convention, webhook setup) + linked fromdocs/llc/_index.md; liveautobot-llcskill updated out-of-repollc/tests/test_github_webhooks.py(36 tests: extraction, URL validation, signature, endpoint security gates, link/transition flows)Verification
pytest llc/tests/test_github_webhooks.py llc/tests/test_work_items_idor.py llc/tests/test_work_item.py llc/tests/test_backlog_reorder.py→ 99 passedllc/testsdelta vs base: zero new failures outside the known bug(llc/tests): full-suite module pollution replaces sys.modules['llc.api'] — kills all llc.api.* route tests and masks regressions #9995 full-suite module-pollution class (my file passes standalone, same as all otherllc.api.*route tests)work_items.pyidentical on base)20260612_056);import llc.apismoke OKModel Used
Claude Fable 5
Closes #9625 (part of #9923)