@@ -14,6 +14,7 @@ This repository implements an automated coding workflow using **GitHub Copilot C
1414
1515### ✨ Key Features
1616
17+ #### 🤖 Copilot Coder
1718- 🏷️ ** Label-driven workflow** - Trigger code generation by adding the ` copilot ` label
1819- 🤖 ** AI-powered coding** - GitHub Copilot CLI generates code based on issue descriptions
1920- 🌿 ** Automatic branching** - Creates feature branches (` copilot/{issue-number} ` )
@@ -23,6 +24,14 @@ This repository implements an automated coding workflow using **GitHub Copilot C
2324- 📦 ** Artifact logging** - Captures and stores execution logs
2425- 🔄 ** MCP integration** - Uses Context7 for documentation and best practices
2526
27+ #### 🔍 Copilot PR Reviewer (NEW!)
28+ - 💬 ** Automatic PR reviews** - Reviews code on every PR open/update
29+ - 🔒 ** Security analysis** - Detects security vulnerabilities
30+ - ⚡ ** Performance checks** - Identifies performance issues
31+ - 🧹 ** Code quality** - Flags code quality concerns
32+ - 📝 ** Detailed feedback** - Posts actionable comments with examples
33+ - 📊 ** Artifact logs** - Complete analysis available for reference
34+
2635## 🚀 Quick Start
2736
2837### 1️⃣ Setup (One Time)
@@ -91,23 +100,72 @@ The workflow will automatically:
91100### 5️⃣ Review and Merge
92101
931021 . Review the Pull Request
94- 2 . Test the implementation
95- 3 . Approve and merge when ready
103+ 2 . ** Copilot Reviewer automatically analyzes the code** ✨
104+ 3 . Test the implementation
105+ 4 . Approve and merge when ready
106+
107+ ## 🤖 Copilot PR Reviewer (Automatic)
108+
109+ The ** Copilot PR Reviewer** automatically analyzes every pull request:
110+
111+ - 🔄 ** Triggers on every PR** - Open or update
112+ - 🔍 ** Analyzes all changed files** - Security, performance, code quality
113+ - 💬 ** Posts review comments** - With actionable recommendations
114+ - 📊 ** Generates analysis report** - Available as artifact
115+
116+ ### Review Process
117+
118+ ```
119+ PR Opened/Updated
120+ ↓
121+ Reviewer Workflow Triggers (Automatic)
122+ ↓
123+ 1️⃣ Download Changed Files
124+ 2️⃣ Run Copilot Analysis
125+ 3️⃣ Post Review Comments
126+ ↓
127+ � Feedback Ready for Developer
128+ ```
129+
130+ ### Example Review Output
131+
132+ Copilot identifies and comments on issues like:
133+
134+ - 🔒 ** Security** : SQL injection, exposed secrets, unsafe deserialization
135+ - ⚡ ** Performance** : Inefficient loops, unnecessary allocations, N+1 queries
136+ - 🧹 ** Code Quality** : Naming, documentation, complexity, error handling
137+ - 📝 ** Best Practices** : Type safety, error handling, edge cases
138+
139+ ** No action required!** The reviewer workflow runs automatically on every PR. Just merge your code after addressing the findings.
140+
141+ For detailed information, see [ Copilot PR Reviewer Documentation] ( docs/COPILOT-REVIEWER.md ) .
96142
97- ## 🎯 How It Works
143+ ## � 🎯 How It Works
98144
99- ### Workflow Trigger
145+ ### Coder Workflow Trigger
100146
101147``` yaml
102148on :
103149 issues :
104150 types : [opened, labeled]
105151` ` `
106152
107- The workflow triggers when:
153+ The coder workflow triggers when:
108154- An issue is opened with the ` copilot` label
109155- The `copilot` label is added to an existing issue
110156
157+ # ## Reviewer Workflow Trigger
158+
159+ ` ` ` yaml
160+ on:
161+ pull_request:
162+ types: [opened, synchronize]
163+ ` ` `
164+
165+ The reviewer workflow triggers when :
166+ - A pull request is opened
167+ - A pull request is updated (new commits)
168+
111169# ## Architecture
112170
113171```
@@ -147,21 +205,28 @@ Update Labels (completed, ready-for-review)
147205```
148206.github/
149207├── workflows/
150- │ └── copilot-coder.yml # Main GitHub Actions workflow
151- └── copilot-instructions.md # Instructions for Copilot CLI
208+ │ ├── copilot-coder.yml # Code generation workflow
209+ │ └── copilot-reviewer.yml # PR review workflow (NEW!)
210+ └── copilot-instructions.md # Instructions for Copilot CLI
152211
153212scripts/
154- ├── prepare-commit.sh # Prepare commit with co-author
155- ├── push-branch.sh # Push branch to remote
156- ├── post-workflow-comment.sh # Post completion comment
157- └── post-workflow-comment.sh # Post completion comment
213+ ├── prepare-commit.sh # Prepare commit with co-author
214+ ├── push-branch.sh # Push branch to remote
215+ ├── post-workflow-comment.sh # Post completion comment
216+ ├── get-pr-diff.sh # Get PR file changes (reviewer)
217+ ├── download-pr-files.sh # Download changed files (reviewer)
218+ ├── analyze-with-copilot.sh # Run AI analysis (reviewer)
219+ └── post-pr-comment.sh # Post review comments (reviewer)
158220
159221docs/
160- ├── GHES-SETUP.md # Detailed setup guide
161- ├── MIGRATION-GUIDE.md # Migration from ADO guide
162- └── TROUBLESHOOTING.md # Common issues and solutions
163-
164- mcp-config.json # MCP servers configuration
222+ ├── GHES-SETUP.md # Detailed setup guide
223+ ├── GHES-COMPATIBILITY.md # GHES compatibility info
224+ ├── COPILOT-REVIEWER.md # PR Reviewer documentation (NEW!)
225+ ├── REVIEWER-MIGRATION.md # ADO to GHES adaptation guide (NEW!)
226+ ├── MIGRATION-GUIDE.md # Migration from ADO guide
227+ └── TROUBLESHOOTING.md # Common issues and solutions
228+
229+ mcp-config.json # MCP servers configuration
165230```
166231
167232## 🛠️ Technologies Used
@@ -340,8 +405,12 @@ permissions:
340405
341406Detailed guides are available in the `docs/` directory :
342407
408+ Detailed guides are available in the `docs/` directory :
409+
343410- **[GHES Setup Guide](docs/GHES-SETUP.md)** - Complete setup instructions
411+ - **[Copilot PR Reviewer Guide](docs/COPILOT-REVIEWER.md)** - Automated PR review
344412- **[Migration Guide](docs/MIGRATION-GUIDE.md)** - Migrate from Azure DevOps
413+ - **[Reviewer Migration Guide](docs/REVIEWER-MIGRATION.md)** - ADO Reviewer adaptation details
345414- **[Troubleshooting](docs/TROUBLESHOOTING.md)** - Common issues and solutions
346415
347416# # 🔄 Migration from Azure DevOps
@@ -353,6 +422,18 @@ If you're migrating from the Azure DevOps implementation, see the **[Migration G
353422- Parallel operation strategies
354423- Cleanup procedures
355424
425+ # ## ADO Reviewer Agent Porting
426+
427+ The **Copilot PR Reviewer** is an adaptation of the [ADO_ReviewerAgent](https://github.com/0GiS0/ADO_ReviewerAgent) project by [0GiS0](https://github.com/0GiS0), adapted for GitHub Enterprise Server.
428+
429+ Key adaptations :
430+ - ✅ Azure Pipelines → GitHub Actions
431+ - ✅ Azure DevOps API → GitHub API
432+ - ✅ ADO authentication → GitHub token auth
433+ - ✅ Thread comments → Review comments
434+
435+ See [REVIEWER-MIGRATION.md](docs/REVIEWER-MIGRATION.md) for detailed technical comparison.
436+
356437Legacy ADO documentation : [README-ADO.md](README-ADO.md)
357438
358439# # 🆘 Troubleshooting
0 commit comments