Skip to content

Add commentType to createComment and createThread methods#1370

Merged
dpaquette merged 1 commit into
mainfrom
users/danhellem/commentType-1
Jun 22, 2026
Merged

Add commentType to createComment and createThread methods#1370
dpaquette merged 1 commit into
mainfrom
users/danhellem/commentType-1

Conversation

@danhellem

Copy link
Copy Markdown
Collaborator

This pull request updates the way comments are created in pull request threads by explicitly setting the commentType field to 1 when creating comments and threads. This ensures that comments are consistently recognized as standard comments by the API. Related tests have also been updated to verify the new behavior.

API integration updates:

  • Added commentType: 1 to the payload when creating comments with gitApi.createComment in src/tools/repositories.ts, ensuring the comment type is explicitly set.
  • Added commentType: 1 to each comment in the payload when creating threads with gitApi.createThread in src/tools/repositories.ts.

Test updates:

  • Updated all relevant tests in test/src/tools/repositories.test.ts to expect commentType: 1 in the payloads for both createComment and createThread calls, ensuring tests accurately reflect the new API usage. [1] [2] [3] [4] [5] [6] [7]

GitHub issue number

#1368

Associated Risks

N/A

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?

updated automated tests, all are passing

@danhellem danhellem requested a review from a team as a code owner June 19, 2026 18:22
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@danhellem danhellem linked an issue Jun 19, 2026 that may be closed by this pull request
@dpaquette dpaquette merged commit 3cb803c into main Jun 22, 2026
8 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.

MCP ADO: PR comments missing commentType (still)

2 participants