Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f7d76d1
Initial plan for issue
Copilot Jun 19, 2025
1e88d73
Add GitHub Actions workflow to detect duplicate tools using ai-inference
Copilot Jun 19, 2025
3df5c61
Test duplicate detection workflow with README.md change
Copilot Jun 19, 2025
0ec70de
Clean up workflow YAML formatting and fix linting issues
Copilot Jun 19, 2025
6f72515
Fix workflow action reference and clean up README
Copilot Jun 19, 2025
0d1cea1
Fix workflow parameter: change github-token to token for actions/ai-i…
Copilot Jun 19, 2025
2dc00d5
Read and append README content as user message in AI inference workflow
Copilot Jun 19, 2025
3dc4f96
Refactor duplicate detection workflow: update prompt structure and ad…
pelikhan Jun 19, 2025
d4fba3d
Update AI inference model to openai/gpt-4.1 in duplicate detection wo…
pelikhan Jun 19, 2025
570fb57
Reduce max-tokens limit in duplicate detection workflow from 7000 to 200
pelikhan Jun 19, 2025
041a26f
Fix environment variable indentation for GITHUB_TOKEN in issue creati…
pelikhan Jun 19, 2025
15d3914
Clarify response instructions for duplicate detection and adjust cond…
pelikhan Jun 19, 2025
f7e8a19
Update AI inference model to openai/gpt-4o and increase max-tokens li…
pelikhan Jun 19, 2025
4788d34
Refactor duplicate detection workflow by removing unnecessary steps a…
pelikhan Jun 19, 2025
a9d95a1
Fix prompt-file declaration in duplicate detection workflow
pelikhan Jun 19, 2025
7db7801
Update ai-inference action to use the latest version
pelikhan Jun 19, 2025
f64efa9
Remove temperature parameter from AI inference step in duplicate dete…
pelikhan Jun 19, 2025
dce1640
Add echo statement to display AI model response in duplicate detectio…
pelikhan Jun 19, 2025
8e0f993
Add missing ID declaration for AI inference step in duplicate detecti…
pelikhan Jun 19, 2025
7761815
Remove echo statements for AI model response in duplicate detection w…
pelikhan Jun 19, 2025
24d0c45
Add label to issue creation for detected duplicates in workflow
pelikhan Jun 19, 2025
165733f
Add formatting instruction for AI model response in duplicate detecti…
pelikhan Jun 19, 2025
8c807fb
Enhance AI model prompt by clarifying section treatment and response …
pelikhan Jun 19, 2025
7c22f73
Add instruction to AI model in issue creation for detected duplicates
pelikhan Jun 19, 2025
efae4a7
Remove unnecessary instruction from issue creation body in duplicate …
pelikhan Jun 19, 2025
0730bbd
Refactor issue creation for detected duplicates to use response file …
pelikhan Jun 19, 2025
ec730e0
Improve AI prompting in duplicate detection workflow with structured …
Copilot Jun 19, 2025
86759ce
Update duplicate detection prompt to ignore Programming Frameworks du…
Copilot Jun 19, 2025
57ec352
Prevent AI from wrapping response in markdown code blocks
Copilot Jun 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions .github/workflows/detect-duplicate-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Detect Duplicate Tools
on:
workflow_dispatch:
push:
paths:
- 'README.md'
pull_request:
paths:
- 'README.md'
permissions:
contents: read
issues: write
pull-requests: write
models: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
detect-duplicates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/ai-inference@main
id: detect-duplicates
with:
token: ${{ secrets.GITHUB_TOKEN }}
model: openai/gpt-4o
max-tokens: 14000
prompt-file: 'README.md'
system-prompt: |
You are an expert code reviewer analyzing a README.md file for
duplicate tool entries.

## Task
Analyze the provided README.md content and detect duplicate tool
entries based on these criteria:

**Duplicate Criteria:**
1. **Exact URL matches** - Same GitHub repository URL
2. **Similar tool names** - Case-insensitive, ignoring
punctuation/spacing
3. **Same product in different sections** - Identical tools listed
multiple times

**IMPORTANT: Ignore duplicates in Programming Frameworks sections**
- Do NOT flag as duplicates if one instance is under "Programming Frameworks" section
- Tools can legitimately appear in both main sections AND programming framework subsections
- Programming Frameworks subsections include: YAML, Shell Scripting, JavaScript/TypeScript, Markdown, etc.

**Format to analyze:**
- Focus on bulleted lists under section headings
- Each entry follows: `* [Tool Name](URL) - description`
- Only flag duplicates between main sections (excluding Programming Frameworks)

## Output Format

**IMPORTANT: Respond in plain text format only. Do NOT wrap your response in markdown code blocks.**

**If duplicates found, respond exactly in this format:**

DUPLICATES_FOUND

## Duplicate Analysis

### Duplicate 1: [Tool Name]
**Sections:** Section A, Section B
**URLs:**
- [Link 1](url1)
- [Link 2](url2)
**Issue:** [Exact match/Similar name/Same product]
**Recommendation:** [Consolidate/Clarify differences/Keep separate
with different descriptions]

### Duplicate 2: [Tool Name]
[Same format]

## Code Snippets
[Relevant README snippets showing the duplicates]

**If no duplicates found, respond exactly:**

NO_DUPLICATES_FOUND

## Example Duplicates to Look For
- Tools appearing in multiple main sections (excluding Programming Frameworks)
- Multiple entries with identical GitHub URLs (excluding Programming Frameworks)
- Similar names like "GenAI Tool" vs "GenAI-Tool" vs "genai tool" (excluding Programming Frameworks)

**Examples of what NOT to flag:**
- A tool in "Continuous Code Review" and also in "Programming Frameworks → Markdown"
- A tool in "Continuous Triage" and also in "Programming Frameworks → JavaScript/TypeScript"

Analyze this README.md content:
- name: If duplicates create issue
if: >-
contains(steps.detect-duplicates.outputs.response, 'DUPLICATES_FOUND')
run: |
gh issue create --title "Duplicate Tools Detected" \
--body-file ${{ steps.detect-duplicates.outputs.response-file }} \
--label "genai,documentation"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Some of them have builtin support for GitHub Actions and/or GitHub Models.

### JavaScript/TypeScript

* [GenAIScript](https://https://microsoft.github.io/genaiscript/), a scripting language for GitHub Actions that simplifies the use of AI models and tools in workflows
* [GenAIScript](https://microsoft.github.io/genaiscript/), a scripting language for GitHub Actions that simplifies the use of AI models and tools in workflows

### Markdown

Expand Down