Skip to content

Conversation

@singhk97
Copy link
Collaborator

@singhk97 singhk97 commented Dec 8, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 8, 2025 19:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a parameterless AddClient() convenience method to the AppBuilder class, following the established pattern of providing default implementations for builder methods (similar to the existing AddLogger() method).

Key Changes:

  • Adds a new AddClient() overload that creates a default HttpClient instance without requiring parameters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +47 to +51
public AppBuilder AddClient()
{
_options.Client = new Common.Http.HttpClient();
return this;
}
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

The newly added parameterless AddClient() method lacks test coverage. Since the repository has comprehensive testing for the Microsoft.Teams.Apps namespace (see Tests/Microsoft.Teams.Apps.Tests/AppTests.cs), this new method should include unit tests to verify:

  1. That it correctly creates a default HttpClient instance
  2. That it properly sets _options.Client
  3. That it returns the AppBuilder instance for method chaining

Consider adding tests similar to the existing tests in AppTests.cs.

Copilot uses AI. Check for mistakes.
@singhk97
Copy link
Collaborator Author

singhk97 commented Dec 8, 2025

Resolved the code ql issue. Turns out the previous "default" setup configuration had to be deleted for this to work.

@singhk97 singhk97 closed this Dec 8, 2025
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.

1 participant