CloudNotification & ReportingInstant

Release Change Digest to Teams

Manual trigger accepts two commit SHAs, runs Compare Two Commits, and posts a formatted Teams adaptive card summarizing file diffs, commit counts, and authors — perfect release-notes pre-reading.

Members OnlySign in or create a free account to download this solution.

Overview

Manual-trigger cloud flow that accepts a base and head ref (branch names or commit SHAs), calls the GitHub Compare Two Commits API, and posts a formatted HTML digest to a Microsoft Teams channel. The digest shows status, commit counts, ahead/behind counts, files-changed count, unique author names, and a direct link to the comparison on GitHub — ideal as release-notes pre-reading or a deploy sanity check.

**State:** Stopped (user activates when ready)

Use Case

Before cutting a release, an engineering lead wants a one-click summary of everything that changed between two refs — typically main vs. release branch, or last deployed SHA vs. HEAD. Rather than clicking through GitHub compare, run this flow with two refs and receive a ready-to-share digest in the team's Teams channel.

Concise enough to scan in seconds, contains the direct GitHub link for drill-down.

Flow Architecture

Trigger: **Manually trigger a flow** with `Base Commit SHA or Branch` + `Head Commit SHA or Branch` inputs.

1. Init 5 vars (owner, repo, Teams group/channel, digest title)
2. **Compare Commits In GitHub** (CompareRepositoryCommits)
3. Select Author Names (Select projects each commit to author name)
4. Compose Unique Author List (triple-replace string unwrap)
5. Compose Digest Message HTML (stats + GitHub compare link)
6. **Post Digest To Teams Channel** (PostMessageToConversation)

Environment Variables

VariableSchema NameTypeDefaultPurpose
GitHub Ownerflowlibs_GitHubOwnerStringmicrosoftGitHub organization or user that owns the repo
GitHub Repositoryflowlibs_GitHubRepositoryStringpower-platformRepository name
Teams Group IDflowlibs_TeamsGroupIdString(none)Teams group/team ID
Teams Channel IDflowlibs_TeamsChannelIdString(none)Teams channel ID

Connectors & Connections

ConnectorAPI NameConnection FormatUsage
GitHubshared_githubraw GUIDCompareRepositoryCommits
Microsoft Teamsshared_teamsshared-teams-d6c7aabb-...PostMessageToConversation (Flow bot)

Customization Guide

1. Set 4 env vars (owner, repo, Teams group/channel).
2. Bind connection refs.
3. Edit Init varDigestTitle for custom heading.
4. Turn on.

**Common Modifications:** include file list via second Select over body['files']; adaptive card instead of HTML; schedule it (Recurrence) instead of manual.

Key Expressions

- @coalesce(body('Compare_Commits_In_GitHub')?['commits'], json('[]')) — author projection
- Triple-replace unwrap for unique author list
- @{length(coalesce(body('Compare_Commits_In_GitHub')?['files'], json('[]')))} — files-changed count
- <a href='@{body('Compare_Commits_In_GitHub')?['html_url']}'> — GitHub comparison link

Release Change Digest to Teams — FlowLibs | FlowLibs