Skip to content

feat(ci): add MR knowledge extraction pipeline with reaction/reject interaction#39

Merged
jeff-r2026 merged 3 commits into
Tencent:mainfrom
m0Nst3r873:main
Jun 24, 2026
Merged

feat(ci): add MR knowledge extraction pipeline with reaction/reject interaction#39
jeff-r2026 merged 3 commits into
Tencent:mainfrom
m0Nst3r873:main

Conversation

@m0Nst3r873

Copy link
Copy Markdown
Contributor

Summary

Add teamai ci extract-mr command for CI pipeline integration with reviewer interaction.

Features

  • AI extraction: Extract learnings + codebase suggestions from MR/PR diff
  • Individual comments: Each suggestion posted as separate comment with unique marker (--individual-comments)
  • Reaction/Reject: Reviewer rejects unwanted items via emoji
    • GitHub: 👎 reaction = reject
    • TGit: ☝️ emoji (id:8) = reject
    • Default: all written (no reaction = approve)
  • Post-merge write: Filters out rejected items, writes approved knowledge to team repo
  • Auto git user: Configures committer from token API to pass TGit committer-check
  • Dual platform: GitHub (REST API) + TGit/工蜂 (REST API with global MR id)
  • CI templates: GitHub Actions + Coding CI (QCI) ready-to-use YAML
  • README updated: CI Integration section added

New Files

File Description
src/ci/extract-mr.ts Main orchestration + git user auto-config
src/ci/mr-comment.ts Comment formatting + individual publish
src/ci/read-rejections.ts Read GitHub reactions / TGit emoji
examples/ci/github-actions-mr-extract.yml GitHub Actions template
examples/ci/coding-ci-mr-extract.yaml Coding CI template
src/__tests__/ci-extract-mr.test.ts 7 scenario tests
src/__tests__/mr-comment.test.ts URL parsing + formatting tests
src/__tests__/read-rejections.test.ts 11 rejection logic tests

Modified Files

File Changes
src/index.ts Register ci extract-mr subcommand
src/import-mr.ts Strip AI preamble before frontmatter
src/providers/tgit/mr-fetch.ts Fix ?iid= query + TAI_PAT_TOKEN support
README.md Add CI Integration section

Verified

  • GitHub: PR auto-trigger → individual comments → 👎 reject → filtered write ✅
  • TGit + ZhiYan QCI: MR auto-trigger → individual notes → ☝️ reject → filtered write ✅
  • Auto git user passes TGit committer-check ✅
  • 104 test files / 1439 tests pass ✅

Test plan

  • npx tsc --noEmit
  • npx vitest run — 104 files, 1439 tests
  • Demo: GitHub m0Nst3r873/teamai-ci-demo + TGit jaelgeng/teamai-ci-demo

m0Nst3r873 and others added 3 commits June 23, 2026 20:20
…nteraction

Add `teamai ci extract-mr` command for CI pipeline integration:

- Extract learnings and codebase suggestions from MR/PR via AI
- Post each suggestion as individual comment with unique marker
- Reviewer rejects unwanted items via reaction (GitHub 👎 / TGit ☝️)
- Post-merge: filter out rejected items, write approved knowledge to team repo
- Auto-configure git committer from token API (passes TGit committer-check)
- Fix TGit API: use ?iid= query and global MR id for Notes API
- Fix AI output: strip preamble before YAML frontmatter
- CI templates for GitHub Actions and Coding CI (QCI)
- Update README with CI Integration section

--story=0
Add `teamai ci extract-mr` command to the command table and add the
CI Integration section (quick start, templates, reject interaction)
to match the English README updated in PR Tencent#39.
@jeff-r2026 jeff-r2026 merged commit 0c7f45e into Tencent:main Jun 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants