Azure-Samples / Azure-Samples/m365-inbox-serverless-agent-python

Add a "configure go-live env vars" skill to walk users through azd env set for M365 + Teams

Đang mở
#22 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Bicep
Star
11
Fork
7
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Problem

Going live today requires the user to manually run ~5 `azd env set` commands and hunt down:

- `MAILBOX_OWNER_EMAIL` – their own UPN
- `TEAMS_TEAM_ID` – from the channel link's `groupId=`
- `TEAMS_CHANNEL_ID` – the `19:...@thread.tacv2` segment of the channel link
- `TEAMS_MENTION_USER_ID` – their AAD object id (`az ad signed-in-user show`)
- `TEAMS_MENTION_NAME` – their display name

We have `infra/scripts/discover-teams-ids.{sh,ps1}` and a doc block in `README.md` §5, but the user still has to:

1. Know the script exists.
2. Paste a Teams channel URL from their browser.
3. Glue the outputs together.
4. Re-run `azd provision` / `azd up`.

This is the #1 friction point right after `azd up`.

## Proposal

Add a Copilot skill (under `.github/skills/` or wherever this repo registers skills — see `skills/`) named something like **`configure-go-live`** that:

1. Detects current `azd env get-values` and reports which of the 5 vars are unset / placeholder.
2. Prompts the user for a Teams channel URL and extracts `TEAMS_TEAM_ID` + `TEAMS_CHANNEL_ID` via regex.
3. Runs `az ad signed-in-user show` to auto-fill `TEAMS_MENTION_USER_ID` + `TEAMS_MENTION_NAME` (and offers `MAILBOX_OWNER_EMAIL` from `userPrincipalName`).
4. Shows the diff (old → new) and asks for confirmation before issuing the `azd env set` calls.
5. Offers to run `azd provision` (or `azd up`) afterward, and reminds the user to run `./infra/scripts/authorize-connectors.sh` the first time.

## Acceptance

- A user with a fresh clone + `azd up` already run can go from DRY RUN → LIVE in a single skill invocation.
- Skill is idempotent (re-running it just re-confirms / updates whatever's stale).
- Works on both bash and PowerShell hosts.

## Related

- `README.md` §5 (Go live)
- `docs/configuration.md` (Go live with real M365)
- `infra/scripts/discover-teams-ids.{sh,ps1}`
- `skills/teams-channels.md`

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách kiểm tra việc đăng ký skill hiện có trong skills/, sau đó đọc README.md §5, docs/configuration.md, skills/teams-channels.md và infra/scripts/discover-teams-ids.{sh,ps1}. Chạy azd env get-values và xem lại các script discovery hiện có trước khi xác định luồng của skill. Được xem là hoàn tất khi một lần gọi hỗ trợ cấu hình dry-run-to-live, xác nhận và các cập nhật idempotent, hoạt động trong bash và PowerShell, đồng thời cung cấp các lệnh follow-up đã được ghi trong tài liệu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
azure, bash, powershell
Lĩnh vực
cli, cloud, tooling
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
64/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.