From f7d76d172a7bccb282774605824e80ae849c2006 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 01:33:17 +0000 Subject: [PATCH 01/29] Initial plan for issue From 1e88d7354891f3545b6d30202cf4c63d20e551ac Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 01:36:24 +0000 Subject: [PATCH 02/29] Add GitHub Actions workflow to detect duplicate tools using ai-inference Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/detect-duplicate-tools.yml | 44 ++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/detect-duplicate-tools.yml diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml new file mode 100644 index 0000000..2b19558 --- /dev/null +++ b/.github/workflows/detect-duplicate-tools.yml @@ -0,0 +1,44 @@ +name: Detect Duplicate Tools +on: + 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 + + - name: Detect duplicate tools in README.md + uses: actions/ai-inference@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + model: gpt-4o-mini + files: README.md + prompt: | + Please analyze the README.md content and detect any duplicate tool entries. Look for: + + 1. Tools with the same GitHub repository URL (exact matches) + 2. Tools with very similar names (case-insensitive, ignoring punctuation) + 3. Tools that appear to be the same product but listed in different sections + + Focus on the bulleted lists under each section heading. Each tool entry typically follows the format: + * [Tool Name](URL) - description + + If duplicates are found, please provide: + - The duplicate entries with their section locations + - The specific URLs or tool names that match + - A recommendation on whether they should be consolidated or if they serve different purposes + + If no duplicates are found, simply respond with "No duplicate tools detected." \ No newline at end of file From 3df5c6128c9431863850cff375d2459af4d04764 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 01:36:51 +0000 Subject: [PATCH 03/29] Test duplicate detection workflow with README.md change Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5cc8b38..016efcf 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [Continuous AI](https://githubnext.com/projects/continuous-ai/) is any use of automated AI to support software collaboration on any platform. The term aligns with the established concept of Continuous Integration/Continuous Deployment (CI/CD). Just as CI/CD transformed software development by automating integration and deployment, Continuous AI covers the ways in which AI can be used to automate and enhance collaboration workflows. + + * [GitHub Actions](https://docs.github.com/en/actions) * [GitHub Models](https://docs.github.com/en/github-models/) From 0ec70de0559c38109856eee7c38a5bc505420925 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 01:38:38 +0000 Subject: [PATCH 04/29] Clean up workflow YAML formatting and fix linting issues Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/detect-duplicate-tools.yml | 28 ++++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index 2b19558..7bd6d2d 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - name: Detect duplicate tools in README.md uses: actions/ai-inference@v1 with: @@ -27,18 +27,24 @@ jobs: model: gpt-4o-mini files: README.md prompt: | - Please analyze the README.md content and detect any duplicate tool entries. Look for: - + Please analyze the README.md content and detect any duplicate + tool entries. Look for: + 1. Tools with the same GitHub repository URL (exact matches) - 2. Tools with very similar names (case-insensitive, ignoring punctuation) - 3. Tools that appear to be the same product but listed in different sections - - Focus on the bulleted lists under each section heading. Each tool entry typically follows the format: + 2. Tools with very similar names (case-insensitive, ignoring + punctuation) + 3. Tools that appear to be the same product but listed in + different sections + + Focus on the bulleted lists under each section heading. Each + tool entry typically follows the format: * [Tool Name](URL) - description - + If duplicates are found, please provide: - The duplicate entries with their section locations - The specific URLs or tool names that match - - A recommendation on whether they should be consolidated or if they serve different purposes - - If no duplicates are found, simply respond with "No duplicate tools detected." \ No newline at end of file + - A recommendation on whether they should be consolidated or if + they serve different purposes + + If no duplicates are found, simply respond with "No duplicate + tools detected." \ No newline at end of file From 6f725152f627fbdb637fc86eee3c364544a34b98 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 01:45:38 +0000 Subject: [PATCH 05/29] Fix workflow action reference and clean up README Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/detect-duplicate-tools.yml | 80 +++++++++++++++----- README.md | 4 +- 2 files changed, 63 insertions(+), 21 deletions(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index 7bd6d2d..b6edf82 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -20,31 +20,75 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Detect duplicate tools in README.md - uses: actions/ai-inference@v1 + - name: Read README.md content + id: read_readme + run: | + README_CONTENT=$(cat README.md) + echo "content<> $GITHUB_OUTPUT + echo "$README_CONTENT" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + - name: Detect duplicate tools + id: detect_duplicates + uses: actions/github-script@v7.0.1 + env: + README_CONTENT: ${{ steps.read_readme.outputs.content }} with: - github-token: ${{ secrets.GITHUB_TOKEN }} - model: gpt-4o-mini - files: README.md - prompt: | - Please analyze the README.md content and detect any duplicate - tool entries. Look for: + script: | + const readmeContent = process.env.README_CONTENT; + + const response = await fetch('https://models.inference.ai.azure.com/chat/completions', { + method: 'POST', + headers: { + 'Authorization': `Bearer ${{ secrets.GITHUB_TOKEN }}`, + 'Content-Type': 'application/json' + }, + body: JSON.stringify({ + model: 'gpt-4o-mini', + messages: [{ + role: 'user', + content: `Please analyze the following README.md content and detect any duplicate tool entries. Look for: 1. Tools with the same GitHub repository URL (exact matches) - 2. Tools with very similar names (case-insensitive, ignoring - punctuation) - 3. Tools that appear to be the same product but listed in - different sections + 2. Tools with very similar names (case-insensitive, ignoring punctuation) + 3. Tools that appear to be the same product but listed in different sections - Focus on the bulleted lists under each section heading. Each - tool entry typically follows the format: + Focus on the bulleted lists under each section heading. Each tool entry typically follows the format: * [Tool Name](URL) - description If duplicates are found, please provide: - The duplicate entries with their section locations - The specific URLs or tool names that match - - A recommendation on whether they should be consolidated or if - they serve different purposes + - A recommendation on whether they should be consolidated or if they serve different purposes + + If no duplicates are found, simply respond with "No duplicate tools detected." + + README.md content: + ${readmeContent}` + }], + max_tokens: 1000 + }) + }); + + const result = await response.json(); + const duplicateAnalysis = result.choices[0].message.content; + + console.log('Duplicate analysis:', duplicateAnalysis); + + // Post comment if this is a pull request + if (context.eventName === 'pull_request') { + const commentBody = [ + '### 🔍 **Duplicate Tool Detection Results**', + '', + duplicateAnalysis, + '', + '*This analysis was generated automatically by the duplicate detection workflow.*' + ].join('\n'); - If no duplicates are found, simply respond with "No duplicate - tools detected." \ No newline at end of file + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + body: commentBody + }); + } \ No newline at end of file diff --git a/README.md b/README.md index 016efcf..ca37fef 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ [Continuous AI](https://githubnext.com/projects/continuous-ai/) is any use of automated AI to support software collaboration on any platform. The term aligns with the established concept of Continuous Integration/Continuous Deployment (CI/CD). Just as CI/CD transformed software development by automating integration and deployment, Continuous AI covers the ways in which AI can be used to automate and enhance collaboration workflows. - - * [GitHub Actions](https://docs.github.com/en/actions) * [GitHub Models](https://docs.github.com/en/github-models/) @@ -71,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 From 0d1cea121ba81ccdb50b7fb0443f16b9d8014a61 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 01:51:47 +0000 Subject: [PATCH 06/29] Fix workflow parameter: change github-token to token for actions/ai-inference Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/detect-duplicate-tools.yml | 80 +++++--------------- 1 file changed, 18 insertions(+), 62 deletions(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index b6edf82..cbf7b3c 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -20,75 +20,31 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Read README.md content - id: read_readme - run: | - README_CONTENT=$(cat README.md) - echo "content<> $GITHUB_OUTPUT - echo "$README_CONTENT" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - - name: Detect duplicate tools - id: detect_duplicates - uses: actions/github-script@v7.0.1 - env: - README_CONTENT: ${{ steps.read_readme.outputs.content }} + - name: Detect duplicate tools in README.md + uses: actions/ai-inference@v1 with: - script: | - const readmeContent = process.env.README_CONTENT; - - const response = await fetch('https://models.inference.ai.azure.com/chat/completions', { - method: 'POST', - headers: { - 'Authorization': `Bearer ${{ secrets.GITHUB_TOKEN }}`, - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ - model: 'gpt-4o-mini', - messages: [{ - role: 'user', - content: `Please analyze the following README.md content and detect any duplicate tool entries. Look for: + token: ${{ secrets.GITHUB_TOKEN }} + model: gpt-4o-mini + files: README.md + prompt: | + Please analyze the README.md content and detect any duplicate + tool entries. Look for: 1. Tools with the same GitHub repository URL (exact matches) - 2. Tools with very similar names (case-insensitive, ignoring punctuation) - 3. Tools that appear to be the same product but listed in different sections + 2. Tools with very similar names (case-insensitive, ignoring + punctuation) + 3. Tools that appear to be the same product but listed in + different sections - Focus on the bulleted lists under each section heading. Each tool entry typically follows the format: + Focus on the bulleted lists under each section heading. Each + tool entry typically follows the format: * [Tool Name](URL) - description If duplicates are found, please provide: - The duplicate entries with their section locations - The specific URLs or tool names that match - - A recommendation on whether they should be consolidated or if they serve different purposes - - If no duplicates are found, simply respond with "No duplicate tools detected." - - README.md content: - ${readmeContent}` - }], - max_tokens: 1000 - }) - }); - - const result = await response.json(); - const duplicateAnalysis = result.choices[0].message.content; - - console.log('Duplicate analysis:', duplicateAnalysis); - - // Post comment if this is a pull request - if (context.eventName === 'pull_request') { - const commentBody = [ - '### 🔍 **Duplicate Tool Detection Results**', - '', - duplicateAnalysis, - '', - '*This analysis was generated automatically by the duplicate detection workflow.*' - ].join('\n'); + - A recommendation on whether they should be consolidated or if + they serve different purposes - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.pull_request.number, - body: commentBody - }); - } \ No newline at end of file + If no duplicates are found, simply respond with "No duplicate + tools detected." \ No newline at end of file From 2dc00d5178463772f56766827eeba083f16f2e8f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 04:01:57 +0000 Subject: [PATCH 07/29] Read and append README content as user message in AI inference workflow Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/detect-duplicate-tools.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index cbf7b3c..ee09d7f 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -20,12 +20,15 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Read README content + id: readme + run: echo "content<> $GITHUB_OUTPUT && cat README.md >> $GITHUB_OUTPUT && echo "EOF" >> $GITHUB_OUTPUT + - name: Detect duplicate tools in README.md uses: actions/ai-inference@v1 with: token: ${{ secrets.GITHUB_TOKEN }} model: gpt-4o-mini - files: README.md prompt: | Please analyze the README.md content and detect any duplicate tool entries. Look for: @@ -47,4 +50,8 @@ jobs: they serve different purposes If no duplicates are found, simply respond with "No duplicate - tools detected." \ No newline at end of file + tools detected." + + Here is the README.md content to analyze: + + ${{ steps.readme.outputs.content }} \ No newline at end of file From 3dc4f96b0cbb1d6f35aee36e03b859f54529fb70 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:08:13 +0000 Subject: [PATCH 08/29] Refactor duplicate detection workflow: update prompt structure and add workflow_dispatch trigger --- .github/workflows/detect-duplicate-tools.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index ee09d7f..610eb72 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -1,5 +1,6 @@ name: Detect Duplicate Tools on: + workflow_dispatch: push: paths: - 'README.md' @@ -29,7 +30,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} model: gpt-4o-mini - prompt: | + system-prompt: | Please analyze the README.md content and detect any duplicate tool entries. Look for: @@ -49,9 +50,17 @@ jobs: - A recommendation on whether they should be consolidated or if they serve different purposes - If no duplicates are found, simply respond with "No duplicate - tools detected." + Use GitHub-flavored Markdown for formatting your response. - Here is the README.md content to analyze: + If no duplicates are found, simply respond with "/OK/" - ${{ steps.readme.outputs.content }} \ No newline at end of file + Here is the README.md content to analyze: + prompt: | + ${{ steps.readme.outputs.content }} + max-tokens: 7000 + - name: If duplicates create issue + if: contains(steps.detect-duplicates.outputs.response, '/OK/') == false + run: | + echo "Creating issue for detected duplicates..." + gh issue create --title "Duplicate Tools Detected" \ + --body "${{ steps.detect-duplicates.outputs.response }}" \ From d4fba3d9e2560fef99305832cdc95377ed7343f8 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:09:09 +0000 Subject: [PATCH 09/29] Update AI inference model to openai/gpt-4.1 in duplicate detection workflow --- .github/workflows/detect-duplicate-tools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index 610eb72..769a17d 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -29,7 +29,7 @@ jobs: uses: actions/ai-inference@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - model: gpt-4o-mini + model: openai/gpt-4.1 system-prompt: | Please analyze the README.md content and detect any duplicate tool entries. Look for: From 570fb57dc6aeeeb57518eba3b7cf99c5398244bc Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:09:35 +0000 Subject: [PATCH 10/29] Reduce max-tokens limit in duplicate detection workflow from 7000 to 200 --- .github/workflows/detect-duplicate-tools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index 769a17d..e52f4c8 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -57,7 +57,7 @@ jobs: Here is the README.md content to analyze: prompt: | ${{ steps.readme.outputs.content }} - max-tokens: 7000 + max-tokens: 200 - name: If duplicates create issue if: contains(steps.detect-duplicates.outputs.response, '/OK/') == false run: | From 041a26ff1ea49624bd7b8207b64b900b616c9551 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:10:51 +0000 Subject: [PATCH 11/29] Fix environment variable indentation for GITHUB_TOKEN in issue creation step --- .github/workflows/detect-duplicate-tools.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index e52f4c8..dab4d5d 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -64,3 +64,5 @@ jobs: echo "Creating issue for detected duplicates..." gh issue create --title "Duplicate Tools Detected" \ --body "${{ steps.detect-duplicates.outputs.response }}" \ + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 15d3914ea3c0b5dce93c4f8596022e7b5d1811e2 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:14:29 +0000 Subject: [PATCH 12/29] Clarify response instructions for duplicate detection and adjust condition for issue creation --- .github/workflows/detect-duplicate-tools.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index dab4d5d..de87ff2 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -44,7 +44,7 @@ jobs: tool entry typically follows the format: * [Tool Name](URL) - description - If duplicates are found, please provide: + If duplicates are found, respond "Duplicate founds" and provide: - The duplicate entries with their section locations - The specific URLs or tool names that match - A recommendation on whether they should be consolidated or if @@ -57,9 +57,8 @@ jobs: Here is the README.md content to analyze: prompt: | ${{ steps.readme.outputs.content }} - max-tokens: 200 - name: If duplicates create issue - if: contains(steps.detect-duplicates.outputs.response, '/OK/') == false + if: contains(steps.detect-duplicates.outputs.response, 'Duplicate') && !contains(steps.detect-duplicates.outputs.response, '/OK/') run: | echo "Creating issue for detected duplicates..." gh issue create --title "Duplicate Tools Detected" \ From f7e8a19d4f97155ddbcd5b9ac756865f171091cc Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:15:44 +0000 Subject: [PATCH 13/29] Update AI inference model to openai/gpt-4o and increase max-tokens limit to 14000 --- .github/workflows/detect-duplicate-tools.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index de87ff2..1526a04 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -29,7 +29,8 @@ jobs: uses: actions/ai-inference@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - model: openai/gpt-4.1 + model: openai/gpt-4o + max-tokens: 14000 system-prompt: | Please analyze the README.md content and detect any duplicate tool entries. Look for: @@ -56,7 +57,9 @@ jobs: Here is the README.md content to analyze: prompt: | + ${{ steps.readme.outputs.content }} + - name: If duplicates create issue if: contains(steps.detect-duplicates.outputs.response, 'Duplicate') && !contains(steps.detect-duplicates.outputs.response, '/OK/') run: | From 4788d347427237969535d41241ee36f0218b6009 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:17:38 +0000 Subject: [PATCH 14/29] Refactor duplicate detection workflow by removing unnecessary steps and simplifying prompt handling --- .github/workflows/detect-duplicate-tools.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index 1526a04..fd9c354 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -20,17 +20,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - - name: Read README content - id: readme - run: echo "content<> $GITHUB_OUTPUT && cat README.md >> $GITHUB_OUTPUT && echo "EOF" >> $GITHUB_OUTPUT - - - name: Detect duplicate tools in README.md - uses: actions/ai-inference@v1 + - uses: actions/ai-inference@v1 with: token: ${{ secrets.GITHUB_TOKEN }} model: openai/gpt-4o max-tokens: 14000 + temperature: 0.2 system-prompt: | Please analyze the README.md content and detect any duplicate tool entries. Look for: @@ -56,10 +51,7 @@ jobs: If no duplicates are found, simply respond with "/OK/" Here is the README.md content to analyze: - prompt: | - - ${{ steps.readme.outputs.content }} - + prompt-file: README.md - name: If duplicates create issue if: contains(steps.detect-duplicates.outputs.response, 'Duplicate') && !contains(steps.detect-duplicates.outputs.response, '/OK/') run: | From a9d95a137ce89aafc68befc7d991c17a37ebcb1f Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:18:56 +0000 Subject: [PATCH 15/29] Fix prompt-file declaration in duplicate detection workflow --- .github/workflows/detect-duplicate-tools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index fd9c354..22b4f6e 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -26,6 +26,7 @@ jobs: model: openai/gpt-4o max-tokens: 14000 temperature: 0.2 + prompt-file: 'README.md' system-prompt: | Please analyze the README.md content and detect any duplicate tool entries. Look for: @@ -51,7 +52,6 @@ jobs: If no duplicates are found, simply respond with "/OK/" Here is the README.md content to analyze: - prompt-file: README.md - name: If duplicates create issue if: contains(steps.detect-duplicates.outputs.response, 'Duplicate') && !contains(steps.detect-duplicates.outputs.response, '/OK/') run: | From 7db780148bcad4a9704495b00f899b4270bff4e1 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:20:18 +0000 Subject: [PATCH 16/29] Update ai-inference action to use the latest version --- .github/workflows/detect-duplicate-tools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index 22b4f6e..1cc5060 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/ai-inference@v1 + - uses: actions/ai-inference@main with: token: ${{ secrets.GITHUB_TOKEN }} model: openai/gpt-4o From f64efa96d3b6559efeb003c8e04eb075c61bef96 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:23:34 +0000 Subject: [PATCH 17/29] Remove temperature parameter from AI inference step in duplicate detection workflow --- .github/workflows/detect-duplicate-tools.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index 1cc5060..e5eda44 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -25,7 +25,6 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} model: openai/gpt-4o max-tokens: 14000 - temperature: 0.2 prompt-file: 'README.md' system-prompt: | Please analyze the README.md content and detect any duplicate From dce16406f6858757376ea76343ffc260bf073d1e Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:24:51 +0000 Subject: [PATCH 18/29] Add echo statement to display AI model response in duplicate detection workflow --- .github/workflows/detect-duplicate-tools.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index e5eda44..e0e2070 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -51,6 +51,9 @@ jobs: If no duplicates are found, simply respond with "/OK/" Here is the README.md content to analyze: + - run: | + echo "Response from AI model:" + echo "${{ steps.detect-duplicates.outputs.response }}" - name: If duplicates create issue if: contains(steps.detect-duplicates.outputs.response, 'Duplicate') && !contains(steps.detect-duplicates.outputs.response, '/OK/') run: | From 8e0f993bd711cc4fb7d6e0973b7713317d52d13a Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:27:16 +0000 Subject: [PATCH 19/29] Add missing ID declaration for AI inference step in duplicate detection workflow --- .github/workflows/detect-duplicate-tools.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index e0e2070..a6ae5a5 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -21,6 +21,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/ai-inference@main + id: detect-duplicates with: token: ${{ secrets.GITHUB_TOKEN }} model: openai/gpt-4o From 776181539614c4544e7c8aa6a1cb46a17fd7f64c Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:28:33 +0000 Subject: [PATCH 20/29] Remove echo statements for AI model response in duplicate detection workflow --- .github/workflows/detect-duplicate-tools.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index a6ae5a5..e528871 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -52,9 +52,6 @@ jobs: If no duplicates are found, simply respond with "/OK/" Here is the README.md content to analyze: - - run: | - echo "Response from AI model:" - echo "${{ steps.detect-duplicates.outputs.response }}" - name: If duplicates create issue if: contains(steps.detect-duplicates.outputs.response, 'Duplicate') && !contains(steps.detect-duplicates.outputs.response, '/OK/') run: | From 24d0c45416f010eb4f81ee511e900c3986e03df8 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:29:54 +0000 Subject: [PATCH 21/29] Add label to issue creation for detected duplicates in workflow --- .github/workflows/detect-duplicate-tools.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index e528871..d875f62 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -58,5 +58,6 @@ jobs: echo "Creating issue for detected duplicates..." gh issue create --title "Duplicate Tools Detected" \ --body "${{ steps.detect-duplicates.outputs.response }}" \ + --label "genai,documentation" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 165733f77855182157b554946e4649a801856c60 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:31:46 +0000 Subject: [PATCH 22/29] Add formatting instruction for AI model response in duplicate detection workflow --- .github/workflows/detect-duplicate-tools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index d875f62..79a3f2d 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -46,9 +46,9 @@ jobs: - The specific URLs or tool names that match - A recommendation on whether they should be consolidated or if they serve different purposes + Format your information so that the GitHub Copilot Agent can easily understand and act upon it. Use GitHub-flavored Markdown for formatting your response. - If no duplicates are found, simply respond with "/OK/" Here is the README.md content to analyze: From 8c807fbb1f1621fc7ddb2448d8668c060f107c7d Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:34:54 +0000 Subject: [PATCH 23/29] Enhance AI model prompt by clarifying section treatment and response formatting for duplicate detection --- .github/workflows/detect-duplicate-tools.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index 79a3f2d..dc74f54 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -37,6 +37,8 @@ jobs: 3. Tools that appear to be the same product but listed in different sections + Treat the '## Programming Frameworks' as a separate section. + Focus on the bulleted lists under each section heading. Each tool entry typically follows the format: * [Tool Name](URL) - description @@ -46,6 +48,7 @@ jobs: - The specific URLs or tool names that match - A recommendation on whether they should be consolidated or if they serve different purposes + - A snippet of the README.md content where duplicates were found (use \`\`\` for code blocks) Format your information so that the GitHub Copilot Agent can easily understand and act upon it. Use GitHub-flavored Markdown for formatting your response. From 7c22f730335c3d33b8a7abc204206b15b824741c Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:36:26 +0000 Subject: [PATCH 24/29] Add instruction to AI model in issue creation for detected duplicates --- .github/workflows/detect-duplicate-tools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index dc74f54..09365eb 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -60,7 +60,7 @@ jobs: run: | echo "Creating issue for detected duplicates..." gh issue create --title "Duplicate Tools Detected" \ - --body "${{ steps.detect-duplicates.outputs.response }}" \ + --body "${{ steps.detect-duplicates.outputs.response }}\n@copilot get to work." \ --label "genai,documentation" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From efae4a758d912299635eb0e0fda9fe32463945ce Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:38:01 +0000 Subject: [PATCH 25/29] Remove unnecessary instruction from issue creation body in duplicate detection workflow --- .github/workflows/detect-duplicate-tools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index 09365eb..dc74f54 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -60,7 +60,7 @@ jobs: run: | echo "Creating issue for detected duplicates..." gh issue create --title "Duplicate Tools Detected" \ - --body "${{ steps.detect-duplicates.outputs.response }}\n@copilot get to work." \ + --body "${{ steps.detect-duplicates.outputs.response }}" \ --label "genai,documentation" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 0730bbd9adad1f2738878c557d54464628dab12f Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 19 Jun 2025 04:42:24 +0000 Subject: [PATCH 26/29] Refactor issue creation for detected duplicates to use response file instead of inline body --- .github/workflows/detect-duplicate-tools.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index dc74f54..ce05676 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -58,9 +58,8 @@ jobs: - name: If duplicates create issue if: contains(steps.detect-duplicates.outputs.response, 'Duplicate') && !contains(steps.detect-duplicates.outputs.response, '/OK/') run: | - echo "Creating issue for detected duplicates..." gh issue create --title "Duplicate Tools Detected" \ - --body "${{ steps.detect-duplicates.outputs.response }}" \ + --body-file ${{ steps.detect-duplicates.outputs.response-file }} \ --label "genai,documentation" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ec730e0c266af59ae16e1fd7688b42a53c1cb883 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 04:56:04 +0000 Subject: [PATCH 27/29] Improve AI prompting in duplicate detection workflow with structured output format Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/detect-duplicate-tools.yml | 77 ++++++++++++++------ 1 file changed, 54 insertions(+), 23 deletions(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index ce05676..c68bef9 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -28,38 +28,69 @@ jobs: max-tokens: 14000 prompt-file: 'README.md' system-prompt: | - Please analyze the README.md content and detect any duplicate - tool entries. Look for: + You are an expert code reviewer analyzing a README.md file for + duplicate tool entries. - 1. Tools with the same GitHub repository URL (exact matches) - 2. Tools with very similar names (case-insensitive, ignoring - punctuation) - 3. Tools that appear to be the same product but listed in - different sections + ## Task + Analyze the provided README.md content and detect duplicate tool + entries based on these criteria: - Treat the '## Programming Frameworks' as a separate section. + **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 - Focus on the bulleted lists under each section heading. Each - tool entry typically follows the format: - * [Tool Name](URL) - description + **Format to analyze:** + - Focus on bulleted lists under section headings + - Each entry follows: `* [Tool Name](URL) - description` + - Treat "Programming Frameworks" as a separate category - If duplicates are found, respond "Duplicate founds" and provide: - - The duplicate entries with their section locations - - The specific URLs or tool names that match - - A recommendation on whether they should be consolidated or if - they serve different purposes - - A snippet of the README.md content where duplicates were found (use \`\`\` for code blocks) - Format your information so that the GitHub Copilot Agent can easily understand and act upon it. + ## Output Format - Use GitHub-flavored Markdown for formatting your response. - If no duplicates are found, simply respond with "/OK/" + **If duplicates found, respond exactly:** + ``` + DUPLICATES_FOUND - Here is the README.md content to analyze: + ## 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 + ```markdown + [Relevant README snippets showing the duplicates] + ``` + ``` + + **If no duplicates found, respond exactly:** + ``` + NO_DUPLICATES_FOUND + ``` + + ## Example Duplicates to Look For + - Tools appearing in both "Continuous Code Review" and + "Programming Frameworks" + - Multiple entries with identical GitHub URLs + - Similar names like "GenAI Tool" vs "GenAI-Tool" vs "genai tool" + + Analyze this README.md content: - name: If duplicates create issue - if: contains(steps.detect-duplicates.outputs.response, 'Duplicate') && !contains(steps.detect-duplicates.outputs.response, '/OK/') + 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 }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 86759ced36104f71536e2aad9c56521d2061e515 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 12:22:26 +0000 Subject: [PATCH 28/29] Update duplicate detection prompt to ignore Programming Frameworks duplicates Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/detect-duplicate-tools.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index c68bef9..84173d0 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -42,10 +42,15 @@ jobs: 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` - - Treat "Programming Frameworks" as a separate category + - Only flag duplicates between main sections (excluding Programming Frameworks) ## Output Format @@ -79,10 +84,13 @@ jobs: ``` ## Example Duplicates to Look For - - Tools appearing in both "Continuous Code Review" and - "Programming Frameworks" - - Multiple entries with identical GitHub URLs - - Similar names like "GenAI Tool" vs "GenAI-Tool" vs "genai tool" + - 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 From 57ec35295a4b6720e7641b6aefeac1e06efe1829 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Jun 2025 13:07:33 +0000 Subject: [PATCH 29/29] Prevent AI from wrapping response in markdown code blocks Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/detect-duplicate-tools.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/detect-duplicate-tools.yml b/.github/workflows/detect-duplicate-tools.yml index 84173d0..87dac17 100644 --- a/.github/workflows/detect-duplicate-tools.yml +++ b/.github/workflows/detect-duplicate-tools.yml @@ -54,8 +54,10 @@ jobs: ## Output Format - **If duplicates found, respond exactly:** - ``` + **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 @@ -73,15 +75,11 @@ jobs: [Same format] ## Code Snippets - ```markdown [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)