Skip to content
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

Sample Migration Bot People Picker Adaptive Card To Python #1541

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Mohammed-MSFT
Copy link
Contributor

No description provided.

Copy link

@Copilot 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.

Copilot reviewed 18 out of 33 changed files in this pull request and generated 3 comments.

Files not reviewed (15)
  • samples/bot-people-picker-adaptive-card/python/.env: Language not supported
  • samples/bot-people-picker-adaptive-card/python/.gitignore: Language not supported
  • samples/bot-people-picker-adaptive-card/python/.vscode/extensions.json: Language not supported
  • samples/bot-people-picker-adaptive-card/python/.vscode/launch.json: Language not supported
  • samples/bot-people-picker-adaptive-card/python/.vscode/settings.json: Language not supported
  • samples/bot-people-picker-adaptive-card/python/.vscode/tasks.json: Language not supported
  • samples/bot-people-picker-adaptive-card/python/appManifest/manifest.json: Language not supported
  • samples/bot-people-picker-adaptive-card/python/assets/sample.json: Language not supported
  • samples/bot-people-picker-adaptive-card/python/env/.env.local: Language not supported
  • samples/bot-people-picker-adaptive-card/python/infra/azure.bicep: Language not supported
  • samples/bot-people-picker-adaptive-card/python/infra/azure.parameters.json: Language not supported
  • samples/bot-people-picker-adaptive-card/python/requirements.txt: Language not supported
  • samples/bot-people-picker-adaptive-card/python/bots/init.py: Evaluated as low risk
  • samples/bot-people-picker-adaptive-card/python/adaptive_cards/cards.py: Evaluated as low risk
  • samples/bot-people-picker-adaptive-card/python/config.py: Evaluated as low risk

> the Teams service needs to call into the bot.

1) Setup for Bot
- In Azure portal, create Microsoft Entra ID app registraion and it will generate MicrosoftAppId and MicrosoftAppPassword for you.
Copy link
Preview

Copilot AI Jan 29, 2025

Choose a reason for hiding this comment

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

The word 'registraion' should be corrected to 'registration'.

Suggested change
- In Azure portal, create Microsoft Entra ID app registraion and it will generate MicrosoftAppId and MicrosoftAppPassword for you.
- In Azure portal, create Microsoft Entra ID app registration and it will generate MicrosoftAppId and MicrosoftAppPassword for you.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed


async def on_teams_members_added(
self,
teams_members_added: [TeamsChannelAccount],
Copy link
Preview

Copilot AI Jan 29, 2025

Choose a reason for hiding this comment

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

The type hint for teams_members_added should use List from the typing module. Change it to teams_members_added: List[TeamsChannelAccount].

Suggested change
teams_members_added: [TeamsChannelAccount],
teams_members_added: List[TeamsChannelAccount],

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

- Extracts the text of the mention and removes it from the activity's text.
- Strips extra spaces after removing the mention.
"""
if activity.entities and activity.entities[0].type == "mention":
Copy link
Preview

Copilot AI Jan 29, 2025

Choose a reason for hiding this comment

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

The remove_mention_text method only handles the first mention entity. It should be updated to handle multiple mentions.

Suggested change
if activity.entities and activity.entities[0].type == "mention":
if activity.entities:

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

@Jegadeesh-MSFT Jegadeesh-MSFT left a comment

Choose a reason for hiding this comment

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

looks good

Copy link
Collaborator

@Pawank-MSFT Pawank-MSFT left a comment

Choose a reason for hiding this comment

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

looks correct, approving!

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.

3 participants