Cross-Repo Duplicate Finder
For each new issue, runs a GitHub search across the whole org for similar open issues and posts a comment listing possible cross-repo duplicates so fixes land once instead of in multiple repos.
Overview
Watches for newly opened GitHub issues on any repo you own and scans the entire organization for open issues with similar titles. When candidates are found, posts a single consolidated comment on the source issue listing the cross-repo duplicates so triage happens in one place.
**State:** Stopped (demo)
Use Case
Engineering orgs that split work across many repos often file the same bug or feature request in multiple places. Nobody notices until a release manager links by hand, by which point two teams have duplicated investigation. Platform teams, repo owners, and any org where one logical product spans several repos benefit.
Fires every 15 minutes the GitHub connector polls for issues newly assigned to the authenticated user.
Flow Architecture
Trigger: **When a new issue is opened** (GitHub IssueOpened, polls every 15 min).
1. Init 8 vars (org, token, max results, comment header, owner from `repository_url`, repo, number, title)
2. **Search For Possible Duplicates** (GitHub SearchIssues with `org:{org} is:issue is:open in:title {title}`)
3. **Filter Out Source Issue** (Filter array)
4. **Check If Duplicates Found** (Condition `length > 0`)
- True: Select Duplicate Markdown Lines (object form) → Compose Comment Body → Post Duplicate Comment (HTTP)Environment Variables
| Variable | Schema Name | Type | Default | Purpose |
|---|---|---|---|---|
| FlowLibs - GitHub Organization | flowlibs_GitHubOrganization | String | aronmb23 | Org slug to scope the duplicate search |
| FlowLibs - GitHub API Token (Secret) | flowlibs_GitHubApiToken | Secret | (none) | GitHub PAT for HTTP comment call (repo scope) |
| FlowLibs - GitHub Duplicate Max Results | flowlibs_GitHubDuplicateMaxResults | Number | 5 | Cap on duplicate links in the comment |
| FlowLibs - GitHub Duplicate Comment Header | flowlibs_GitHubDuplicateCommentHeader | String | 🔍 Possible cross-repo duplicates detected: | First line of the duplicate comment |
Connectors & Connections
| Connector | API Name | Connection Format | Usage |
|---|---|---|---|
| GitHub | shared_github | OAuth (aronmb23) | IssueOpened trigger + SearchIssues |
| HTTP (built-in) | - | Bearer token from env var | POST /repos/{owner}/{repo}/issues/{number}/comments |
Customization Guide
1. Set 4 env vars (org, token, max results, comment header).
2. Authorize GitHub connection.
3. Turn on.
**Common Modifications:** broaden via in:title,body; scope to single repo via repo:{owner}/{name}; change comment format; throttle volume; disable comment but keep search; tune polling cadence.
Key Expressions
- @{split(triggerBody()?['repository_url'], '/')[4]} — parse owner from trigger
- @{last(split(triggerBody()?['repository_url'], '/'))} — parse repo
- @{concat('org:', variables('varGitHubOrganization'), ' is:issue is:open in:title ', variables('varIssueTitle'))} — org-scoped search
- @coalesce(body('Search_For_Possible_Duplicates')?['items'], body('Search_For_Possible_Duplicates')?['body'], array()) — defensive body access