CloudCloud FlowsInstantPremium connectors

Release Branch Auto-Cutter

On Approvals response 'Cut release for sprint X', creates a new release/x.y branch ref from the latest main SHA via Create A Reference and posts the new branch link in a Teams release channel.

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

Overview

Puts a governance checkpoint in front of GitHub release-branch creation. A developer or release manager starts the flow with a sprint identifier (e.g. 2026.04 or 1.2), which kicks off an approval. Once approved, the flow reads the current head SHA of the base branch in the configured GitHub repo, creates a new release branch from that SHA, and posts a link in a Teams release channel. If rejected, Teams is notified.

**State:** Off (Stopped)

Use Case

Release-branch creation is typically a two-step process: a release manager decides *when* to cut the branch, and someone with write access actually creates it. As release cadence tightens and more teams touch the same repo, manual branch creation becomes both a coordination bottleneck and an audit-trail weakness.

This flow formalizes the process — sprint owner triggers, release manager approves (tracked in Approvals center), branch cut programmatically, Teams broadcast for searchable notification, Approvals history for audit trail. Ideal for predictable release cadences, audit needs, non-technical stakeholder branch initiation.

Flow Architecture

Trigger: **Power Apps (V2) manual trigger** with `Sprint Identifier` text input.

1. Init 7 vars from env (owner, repo, base branch, release prefix, approver email, Teams group + channel)
2. Init varSprint from trigger input
3. Init varReleaseBranchName = `concat(prefix, sprint)`
4. **Start_Release_Approval** (StartAndWaitForAnApproval Basic to approver email)
5. **Check_Approval_Outcome** (If: outcome == 'Approve')
   - Approve: Get_Base_Branch_Reference (SHA) → Create_Release_Branch_Reference (refs/heads/{name}, sha) → Post_Release_Branch_To_Teams (link + sprint + approver)
   - Reject: Post rejection notice to Teams

Environment Variables

VariableSchema NameTypeDefaultPurpose
GitHub Ownerflowlibs_GitHubOwnerString(none)GitHub user or org that owns the target repository
GitHub Repoflowlibs_GitHubRepoString(none)Target GitHub repository name
GitHub Base Branchflowlibs_GitHubBaseBranchStringmainBranch to read head SHA from when cutting
Release Branch Prefixflowlibs_ReleaseBranchPrefixStringrelease/Prefix applied to sprint identifier for new branch
Approver Emailflowlibs_ApproverEmailString(none)UPN/email of the release manager who approves
Teams Group IDflowlibs_TeamsGroupIdString(none)ID of the Teams team that owns the release channel
Teams Channel IDflowlibs_TeamsChannelIdString(none)ID of the Teams channel for branch-cut notifications

Connectors & Connections

ConnectorAPI NameConnection FormatUsage
Approvalsshared_approvalsconnection refStartAndWaitForAnApproval (Basic)
GitHubshared_githubconnection refGetReference + CreateReference
Microsoft Teamsshared_teamsconnection refPostMessageToConversation (×2 — approve + reject branches)

Customization Guide

1. Update env vars (owner, repo, base branch, prefix, approver, Teams target).
2. Bind 3 connection refs.
3. Turn on.

**Common Modifications:** change base branch (develop, trunk); different naming convention (rel/, releases/, hotfix/); group approver via ;-separated emails; chain multiple approvers (tech lead + release manager); emit more metadata in Teams; swap Teams for Slack/email.

Key Expressions

- concat(variables('varReleasePrefix'), variables('varSprint')) — release branch name
- outputs('Get_Base_Branch_Reference')?['body/object/sha'] — base SHA from GetReference
- concat('refs/heads/', variables('varReleaseBranchName')) — full ref for CreateReference
- equals(outputs('Start_Release_Approval')?['body/outcome'], 'Approve') — approval check