CloudCloud FlowsAutomated

Duplicate Issue Detector

On new issue creation, uses Find Issues By State And Keyword to surface similar open issues, posts a comment listing possible duplicates, and notifies the triager in Teams.

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

Overview

On every newly-opened GitHub issue, searches the same repository for other open issues whose title closely matches and posts a clickable shortlist to a Teams triage channel. Non-destructive — only surfaces possible duplicates so the backlog groomer can act before engineering picks up the work. Trigger fires every ~3 minutes via the GitHub IssueOpened webhook poll, with splitOn fanning each new issue out into its own run.

**Flow ID:** 0d586d85-1c3a-f111-88b3-6045bd0052fe • **State:** Stopped

Use Case

Backlogs accumulate duplicate issues fast — different reporters describe the same bug with different words, and triagers waste time spotting overlap by hand. This flow catches the obvious cases automatically by leaning on GitHub's own search ranking.

**Key Benefits:** surfaces possible duplicates within ~3 minutes; single ranked shortlist (no noise); never modifies issues; fully env-var-driven; silent on negative cases.

Flow Architecture

Trigger: **When an issue is opened** (GitHub IssueOpened, polls every 3 min, splitOn for fanout).

1. Init 4 vars (owner, repo, Teams group, triage channel)
2. Build_Search_Query (Compose) — phrase-quoted: `"<title>" is:issue is:open repo:<owner>/<repo>`
3. Search_For_Potential_Duplicates (GitHub SearchIssues, sort=best match, per_page=10)
4. Filter_Out_Current_Issue (Query) — drops triggering issue
5. Check_If_Duplicates_Found (If)
   - True: Build_Duplicate_List_Html (Select projects to `<li><a href>`) → Post_Duplicate_Alert_To_Triage_Channel (Teams)

Environment Variables

VariableSchema NameTypeDefaultPurpose
GitHub Ownerflowlibs_GitHubOwnerStringoctocatGitHub user/org that owns the watched repo
GitHub Repositoryflowlibs_GitHubRepositoryStringhello-worldRepository name within that owner
Teams Group IDflowlibs_TeamsGroupIdString(none)Teams team GUID for the triage channel
Teams Triage Channel IDflowlibs_TeamsTriageChannelIdString(none)Channel ID for duplicate alerts

Connectors & Connections

ConnectorAPI NameConnection FormatUsage
GitHubshared_githubnew_sharedgithub_1719cIssueOpened trigger + SearchIssues
Microsoft Teamsshared_teamsflowlibs_sharedteams_8ba46PostMessageToConversation — duplicate alerts

Customization Guide

1. Import; set GitHub owner/repo + Teams group/channel env vars; update connection refs; turn on.

**Common Modifications:** auto-comment with candidates via GitHub CreateComment; tighten matching with min match score; multi-repo via JSON env var of [{owner,repo}]; Slack instead of Teams; closed-issue dedup by dropping is:open; trigger frequency tuning.

Key Expressions

- @parameters('flowlibs_GitHubOwner') — owner env var
- @concat('"', triggerBody()?['title'], '" is:issue is:open repo:', variables('varGitHubOwner'), '/', variables('varGitHubRepository')) — phrase-quoted search
- @not(equals(item()?['number'], triggerBody()?['number'])) — filter out source issue
- @coalesce(body('Search_For_Potential_Duplicates')?['body'], body('Search_For_Potential_Duplicates')) — resilient candidate source