-
Notifications
You must be signed in to change notification settings - Fork 818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Optimization for samples #1568
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 36 out of 51 changed files in this pull request and generated no comments.
Files not reviewed (15)
- samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/FetchGroupChatMessages.csproj: Language not supported
- samples/bot-all-cards/csharp/BotAllCards/Bots/DialogBot.cs: Evaluated as low risk
- samples/bot-all-cards/csharp/BotAllCards/Bots/TeamsBot.cs: Evaluated as low risk
- samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/Bots/AdaptiveCardActionsBot.cs: Evaluated as low risk
- samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/Bots/ActivityBot.cs: Evaluated as low risk
- samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/helper/GetChatHelper.cs: Evaluated as low risk
- samples/bot-configuration-app-auth/csharp/Bot configuration/AdapterWithErrorHandler.cs: Evaluated as low risk
- samples/bot-adaptive-card-actions/nodejs/bots/adaptivecardActionsBot.js: Evaluated as low risk
- samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/Controllers/BotController.cs: Evaluated as low risk
- samples/bot-adaptive-card-actions/nodejs/index.js: Evaluated as low risk
- samples/bot-all-cards/csharp/BotAllCards/Dialogs/MainDialog.cs: Evaluated as low risk
- samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/SimpleGraphClient.cs: Evaluated as low risk
- samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/Dialogs/MainDialog.cs: Evaluated as low risk
- samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/Bots/AuthBot.cs: Evaluated as low risk
- samples/bot-configuration-app-auth/csharp/Bot configuration/Bots/TeamsBot.cs: Evaluated as low risk
Comments suppressed due to low confidence (3)
samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/Dialogs/LogoutDialog.cs:75
- The documentation comment for the
InterruptAsync
method should include the return typeTask<DialogTurnResult>
.
private async Task<DialogTurnResult> InterruptAsync(DialogContext innerDc, CancellationToken cancellationToken)
samples/bot-all-cards/csharp/BotAllCards/Cards/AllCards.cs:108
- The method name 'Office365ConnectorCard' should be renamed to 'GetOffice365ConnectorCard' to match the naming convention used for other methods.
public static Attachment Office365ConnectorCard()
samples/bot-all-cards/csharp/BotAllCards/Cards/AllCards.cs:123
- The parameter name 'ConnectionName' should be renamed to 'connectionName' to follow the camelCase convention for parameters.
public static OAuthCard GetOAuthCard(string ConnectionName)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks correct, Approving!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 36 out of 51 changed files in this pull request and generated no comments.
Files not reviewed (15)
- samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/FetchGroupChatMessages.csproj: Language not supported
- samples/bot-all-cards/csharp/BotAllCards/Bots/DialogBot.cs: Evaluated as low risk
- samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/Bots/AdaptiveCardActionsBot.cs: Evaluated as low risk
- samples/bot-all-cards/csharp/BotAllCards/Bots/TeamsBot.cs: Evaluated as low risk
- samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/helper/GetChatHelper.cs: Evaluated as low risk
- samples/bot-configuration-app-auth/csharp/Bot configuration/AdapterWithErrorHandler.cs: Evaluated as low risk
- samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/Bots/ActivityBot.cs: Evaluated as low risk
- samples/bot-adaptive-card-actions/csharp/AdaptiveCardActions/Controllers/BotController.cs: Evaluated as low risk
- samples/bot-adaptive-card-actions/nodejs/index.js: Evaluated as low risk
- samples/bot-adaptive-card-actions/nodejs/bots/adaptivecardActionsBot.js: Evaluated as low risk
- samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/SimpleGraphClient.cs: Evaluated as low risk
- samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/Bots/AuthBot.cs: Evaluated as low risk
- samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/Dialogs/MainDialog.cs: Evaluated as low risk
- samples/bot-all-cards/csharp/BotAllCards/Dialogs/MainDialog.cs: Evaluated as low risk
- samples/bot-all-cards/csharp/BotAllCards/Cards/AllCards.cs: Evaluated as low risk
Comments suppressed due to low confidence (2)
samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/Dialogs/LogoutDialog.cs:83
- The method should pass the cancellation token: return await innerDc.CancelAllDialogsAsync(cancellationToken);
return await innerDc.CancelAllDialogsAsync();
samples/bot-archive-groupchat-messages/csharp/FetchGroupChatMessages/Dialogs/LogoutDialog.cs:77
- The method should return a completed task: return await Task.FromResult(null);
return null;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good Approved !!!
@microsoft-github-policy-service agree company="Microsoft" |
Optimizing the sample code based on following parameters
Sample List: