GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ci: prevent duplicate PR check from flagging current PR as duplicate … · schjonhaug/opencode@c6a241e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • duplicate-prs.yml
  • .opencode
    • agent
      • duplicate-pr.md
    • tool
      • github-pr-search.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/duplicate-prs.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/duplicate-prs.yml
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ jobs:
4444
{
4545
echo "Check for duplicate PRs related to this new PR:"
4646
echo ""
47+
echo "CURRENT_PR_NUMBER: $PR_NUMBER"
48+
echo ""
4749
echo "Title: $(gh pr view "$PR_NUMBER" --json title --jq .title)"
4850
echo ""
4951
echo "Description:"
Collapse file

‎.opencode/agent/duplicate-pr.md‎

Copy file name to clipboardExpand all lines: .opencode/agent/duplicate-pr.md
+2Lines changed: 2 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ You are a duplicate PR detection agent. When a PR is opened, your job is to sear
1212

1313
Use the github-pr-search tool to search for PRs that might be addressing the same issue or feature.
1414

15+
IMPORTANT: The input will contain a line `CURRENT_PR_NUMBER: NNNN`. This is the current PR number, you should not mark that the current PR as a duplicate of itself.
16+
1517
Search using keywords from the PR title and description. Try multiple searches with different relevant terms.
1618

1719
If you find potential duplicates:
Collapse file

‎.opencode/tool/github-pr-search.ts‎

Copy file name to clipboardExpand all lines: .opencode/tool/github-pr-search.ts
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ export default tool({
4545
}
4646

4747
const prs = result.items as PR[]
48+
49+
if (prs.length === 0) {
50+
return `No other PRs found matching "${args.query}"`
51+
}
52+
4853
const formatted = prs.map((pr) => `${pr.title}\n${pr.html_url}`).join("\n\n")
4954

5055
return `Found ${result.total_count} PRs (showing ${prs.length}):\n\n${formatted}`

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.