Skip to content

Conversation

PlaySkyHD
Copy link
Contributor

@PlaySkyHD PlaySkyHD commented Jul 14, 2025

Hey,

i added the create_pull_request_thread functionality to initiate a new comment thread on a pull request.

GitHub issue number

#231

Associated Risks

/

PR Checklist

  • I have read the contribution guidelines
  • I have read the code of conduct guidelines
  • Title of the pull request is clear and informative.
  • 👌 Code hygiene
  • 🔭 Telemetry added, updated, or N/A
  • 📄 Documentation added, updated, or N/A
  • 🛡️ Automated tests added, or N/A

🧪 How did you test it?

Model: Claude Sonnet 4
Prompt:

## Code Review Expert: Detailed Analysis and Best Practices

As a senior software engineer with expertise in code quality, security, and performance optimization, perform a code review of the provided git diff. 

Focus on delivering actionable feedback in the following areas:

Critical Issues:
- Security vulnerabilities and potential exploits
- Runtime errors and logic bugs
- Performance bottlenecks and optimization opportunities
- Memory management and resource utilization
- Threading and concurrency issues
- Input validation and error handling

Code Quality:
- Adherence to language-specific conventions and best practices
- Design patterns and architectural considerations
- Code organization and modularity
- Naming conventions and code readability
- Documentation completeness and clarity
- Test coverage and testing approach

Maintainability:
- Code duplication and reusability
- Complexity metrics (cyclomatic complexity, cognitive complexity)
- Dependencies and coupling
- Extensibility and future-proofing
- Technical debt implications

Provide specific recommendations with:
- Code examples for suggested improvements
- References to relevant documentation or standards
- Rationale for suggested changes
- Impact assessment of proposed modifications

Format your review using clear sections and bullet points. Include inline code references where applicable.

Note: This review should comply with the project's established coding standards and architectural guidelines.

### Context:
- **DevOps-Project**: z
- **Repository**: y
- **PR number**: x

### Instructions:
1. **Use Azure DevOps integration**:
   - Connect to Azure DevOps via MCP Tools
   - Load PR details, commits and existing comments
   - Analyze the changed files and code diffs

2 **Code standards check against**:
   - Copilot Instructions

3. **Sarcastic review style**:
   - Be precise but biting in criticism
   - Repeat similar issues for multiple files
   - Create separate comment threads for each issue
   - If possible, always link the file in the comment as well as the line and offset

4. **Azure DevOps Actions**:
   - Use `mcp_ado_repo_create_pull_request_thread` for new comments
   - Create specific comment threads with file/line references (for the line and offset: rightFileStartLine, rightFileStartOffset, rightFileEndLine, rightFileEndOffset)
   - Link specific lines of code and offsets
   - Set review priority based on issue severity

5. **Extra information**:
   - Ignore deleted comments
   - Ignore deleted files
   - Always perform a review, even if you think the PR has already been reviewed. Please proceed in such a way that you ignore the old review and start again.
   - PullRequest-Status Enum(NotSet = 0, Active = 1, Abandoned = 2, Completed = 3, All = 4)
   - Only look at the diffs from the PullRequest

6. **Qualtity**:
   1. **Specify filePath** - Full path to the file
   2. **Specify rightFileStartLine** - Start line of the problem
   3. **Specify rightFileEndLine** - End line of the problem
   4. **Specify rightFileStartOffset** - Start offset
   5. **Specify rightFileEndOffset** - End offset

### Expected result:
- Each comment with specific file/line reference
- Sarcastic but constructive tone
- Specific recommendations for improvement
- create new short review comments with specific line references
- Reviewing the diffs between the source branch and target branch
grafik

@PlaySkyHD PlaySkyHD requested a review from a team as a code owner July 14, 2025 13:22
@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@79ad732). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #260   +/-   ##
=======================================
  Coverage        ?   97.72%           
=======================================
  Files           ?       10           
  Lines           ?      484           
  Branches        ?       61           
=======================================
  Hits            ?      473           
  Misses          ?        4           
  Partials        ?        7           
Flag Coverage Δ
unittests 97.72% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@danhellem danhellem requested a review from nikolapeja6 July 14, 2025 15:46
@danhellem danhellem added the Needs Review 👓 needs review by the product team label Jul 14, 2025
@PlaySkyHD
Copy link
Contributor Author

All comments addressed, I've resolved the threads. Let me know if anything still needs attention.

nikolapeja6
nikolapeja6 previously approved these changes Jul 18, 2025
@danhellem
Copy link
Contributor

Please run a npm run format on this branch and then we can merge

@danhellem danhellem added Waiting for Author 🔨 waiting for author to address feedback or create a pull request and removed Needs Review 👓 needs review by the product team labels Jul 21, 2025
@PlaySkyHD
Copy link
Contributor Author

Done, I've formatted the code

Copy link
Member

@nikolapeja6 nikolapeja6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nikolapeja6 nikolapeja6 merged commit c750a38 into microsoft:main Jul 22, 2025
4 checks passed
@PlaySkyHD PlaySkyHD deleted the create_pull_request_thread branch July 23, 2025 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Waiting for Author 🔨 waiting for author to address feedback or create a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants