From 1344b2cb1a76953b5fedacc2a90e54acfa7e18b4 Mon Sep 17 00:00:00 2001 From: mor39a <89531894+mor39a@users.noreply.github.com> Date: Thu, 18 Jun 2026 17:03:11 -0500 Subject: [PATCH 1/5] Add issues templates config --- .github/ISSUE_TEMPLATE/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..16a8f522 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,6 @@ +blank_issues_enabled: true + +contact_links: + - name: "Has your issue already been reported?" + url: "https://github.com/issues?q=repo%3Aruncat-dev%2FRunCat365" + about: "Please check the list of existing issues before opening a new one to avoid duplicates." \ No newline at end of file From 46489e5a22c50c2293224889cc96c0ee984b821a Mon Sep 17 00:00:00 2001 From: mor39a <89531894+mor39a@users.noreply.github.com> Date: Thu, 18 Jun 2026 20:06:14 -0500 Subject: [PATCH 2/5] Add check duplicates action --- .github/workflows/check-duplicates.yml | 76 ++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/check-duplicates.yml diff --git a/.github/workflows/check-duplicates.yml b/.github/workflows/check-duplicates.yml new file mode 100644 index 00000000..b6fee272 --- /dev/null +++ b/.github/workflows/check-duplicates.yml @@ -0,0 +1,76 @@ +name: Check Duplicate Issues and PRs + +on: + issues: + types: [opened] + +permissions: + issues: write + pull-requests: read + +jobs: + check-duplicates: + runs-on: ubuntu-latest + steps: + - name: Search and notify duplicates + uses: actions/github-script@v7 + with: + script: | + const issue = context.payload.issue; + const owner = context.repo.owner; + const repo = context.repo.repo; + const title = issue.title; + + // Clean special characters but keep the natural phrasing + const cleanTitle = title + .replace(/[^\w\s]/gi, ' ') + .replace(/\s+/g, ' ') + .trim(); + + const words = cleanTitle.split(/\s+/); + + if (cleanTitle.length < 10 || words.length < 3) { + console.log("Title is too short or lacks context to search for duplicates. Skipping."); + return; + } + + const query = `repo:${owner}/${repo} in:title ${cleanTitle} -number:${issue.number}`; + console.log(`Searching with hybrid query: "${query}"`); + + try { + const response = await github.rest.search.issuesAndPullRequests({ + q: query, + search_type: 'hybrid', + per_page: 5 + }); + + const items = response.data.items; + + if (items && items.length > 0) { + let commentBody = `### 🔍 Potential Duplicate Issues or PRs Found\n\n`; + commentBody += `Hello @${issue.user.login},\n\n`; + commentBody += `We found some existing issues or Pull Requests that might cover a similar topic. Please review them to see if they already address your concern:\n\n`; + + for (const item of items) { + const type = item.pull_request ? 'Pull Request' : 'Issue'; + const state = item.state === 'open' ? '🟢 Open' : '🔴 Closed'; + commentBody += `- [${type} #${item.number}](${item.html_url}) - *${item.title}* (${state})\n`; + } + + commentBody += `\n---\n`; + commentBody += `*This is an automated check. Maintainers will review this issue and decide whether to close it as a duplicate or keep it open.*`; + + await github.rest.issues.createComment({ + owner: owner, + repo: repo, + issue_number: issue.number, + body: commentBody + }); + + console.log(`Found ${items.length} potential duplicates and commented.`); + } else { + console.log("No potential duplicates found."); + } + } catch (error) { + console.error("Error searching for duplicates:", error); + } \ No newline at end of file From 22966d7efba0b9d833a5d054cae308a846ff5fce Mon Sep 17 00:00:00 2001 From: mor39a <89531894+mor39a@users.noreply.github.com> Date: Fri, 19 Jun 2026 08:18:21 -0500 Subject: [PATCH 3/5] Extract script --- .github/scripts/check-duplicates.cjs | 60 ++++++ .github/workflows/check-duplicates.yml | 63 +----- UpgradeLog.htm | 274 +++++++++++++++++++++++++ 3 files changed, 339 insertions(+), 58 deletions(-) create mode 100644 .github/scripts/check-duplicates.cjs create mode 100644 UpgradeLog.htm diff --git a/.github/scripts/check-duplicates.cjs b/.github/scripts/check-duplicates.cjs new file mode 100644 index 00000000..abd99879 --- /dev/null +++ b/.github/scripts/check-duplicates.cjs @@ -0,0 +1,60 @@ +module.exports = async ({ github, context }) => { + const issue = context.payload.issue; + const owner = context.repo.owner; + const repo = context.repo.repo; + const title = issue.title; + + // Clean special characters but keep the natural phrasing + const cleanTitle = title + .replace(/[^\w\s]/gi, ' ') + .replace(/\s+/g, ' ') + .trim(); + + const words = cleanTitle.split(/\s+/); + + if (cleanTitle.length < 10 || words.length < 3) { + console.log("Title is too short or lacks context to search for duplicates. Skipping."); + return; + } + + const query = `repo:${owner}/${repo} in:title ${cleanTitle} -number:${issue.number}`; + console.log(`Searching with hybrid query: "${query}"`); + + try { + const response = await github.rest.search.issuesAndPullRequests({ + q: query, + search_type: 'hybrid', + per_page: 5 + }); + + const items = response.data.items; + + if (items && items.length > 0) { + let commentBody = `### 🔍 Potential Duplicate Issues or PRs Found\n\n`; + commentBody += `Hello @${issue.user.login},\n\n`; + commentBody += `We found some existing issues or Pull Requests that might cover a similar topic. Please review them to see if they already address your concern:\n\n`; + + for (const item of items) { + const type = item.pull_request ? 'Pull Request' : 'Issue'; + const state = item.state === 'open' ? '🟢 Open' : '🔴 Closed'; + commentBody += `- [${type} #${item.number}](${item.html_url}) - *${item.title}* (${state})\n`; + } + + commentBody += `\n---\n`; + commentBody += `*This is an automated check. Maintainers will review this issue and decide whether to close it as a duplicate or keep it open.*`; + + await github.rest.issues.createComment({ + owner: owner, + repo: repo, + issue_number: issue.number, + body: commentBody + }); + + console.log(`Found ${items.length} potential duplicates and commented.`); + } else { + console.log("No potential duplicates found."); + } + } catch (error) { + console.error("Error searching for duplicates:", error); + } +}; diff --git a/.github/workflows/check-duplicates.yml b/.github/workflows/check-duplicates.yml index b6fee272..00b2a2c1 100644 --- a/.github/workflows/check-duplicates.yml +++ b/.github/workflows/check-duplicates.yml @@ -12,65 +12,12 @@ jobs: check-duplicates: runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Search and notify duplicates uses: actions/github-script@v7 with: script: | - const issue = context.payload.issue; - const owner = context.repo.owner; - const repo = context.repo.repo; - const title = issue.title; - - // Clean special characters but keep the natural phrasing - const cleanTitle = title - .replace(/[^\w\s]/gi, ' ') - .replace(/\s+/g, ' ') - .trim(); - - const words = cleanTitle.split(/\s+/); - - if (cleanTitle.length < 10 || words.length < 3) { - console.log("Title is too short or lacks context to search for duplicates. Skipping."); - return; - } - - const query = `repo:${owner}/${repo} in:title ${cleanTitle} -number:${issue.number}`; - console.log(`Searching with hybrid query: "${query}"`); - - try { - const response = await github.rest.search.issuesAndPullRequests({ - q: query, - search_type: 'hybrid', - per_page: 5 - }); - - const items = response.data.items; - - if (items && items.length > 0) { - let commentBody = `### 🔍 Potential Duplicate Issues or PRs Found\n\n`; - commentBody += `Hello @${issue.user.login},\n\n`; - commentBody += `We found some existing issues or Pull Requests that might cover a similar topic. Please review them to see if they already address your concern:\n\n`; - - for (const item of items) { - const type = item.pull_request ? 'Pull Request' : 'Issue'; - const state = item.state === 'open' ? '🟢 Open' : '🔴 Closed'; - commentBody += `- [${type} #${item.number}](${item.html_url}) - *${item.title}* (${state})\n`; - } - - commentBody += `\n---\n`; - commentBody += `*This is an automated check. Maintainers will review this issue and decide whether to close it as a duplicate or keep it open.*`; - - await github.rest.issues.createComment({ - owner: owner, - repo: repo, - issue_number: issue.number, - body: commentBody - }); - - console.log(`Found ${items.length} potential duplicates and commented.`); - } else { - console.log("No potential duplicates found."); - } - } catch (error) { - console.error("Error searching for duplicates:", error); - } \ No newline at end of file + const script = require('./.github/scripts/check-duplicates.cjs'); + await script({ github, context }); diff --git a/UpgradeLog.htm b/UpgradeLog.htm new file mode 100644 index 00000000..48e254c6 --- /dev/null +++ b/UpgradeLog.htm @@ -0,0 +1,274 @@ + + + + Informe de migración +

+ Informe de migración -

Información general

ProyectoRuta de accesoErroresAdvertenciasMensajes
WapForStoreWapForStore\WapForStore.wapproj100
RunCat365RunCat365\RunCat365.csproj000
SoluciónRunCat365.sln001

Solución y proyectos

WapForStore

Mensaje
WapForStore\WapForStore.wapproj: + No se encontró la aplicación en la que se basa este tipo de proyecto. Siga este vínculo para obtener más información: c7167f0d-bc9f-4e6e-afe1-012c56b48db5

RunCat365

Mensaje
RunCat365 no registró mensajes. +

Solución

Mensaje
+ Mostrar 1 mensajes adicionales +
RunCat365.sln: + El archivo de soluciones no requiere migración.
+ Ocultar 1 mensajes adicionales +
\ No newline at end of file From 828defe52f81517781a3beded1e5333011fd08a1 Mon Sep 17 00:00:00 2001 From: mor39a <89531894+mor39a@users.noreply.github.com> Date: Fri, 19 Jun 2026 08:59:21 -0500 Subject: [PATCH 4/5] Add label 'potential-duplicate' --- .github/scripts/check-duplicates.cjs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/scripts/check-duplicates.cjs b/.github/scripts/check-duplicates.cjs index abd99879..ff18ab59 100644 --- a/.github/scripts/check-duplicates.cjs +++ b/.github/scripts/check-duplicates.cjs @@ -50,6 +50,13 @@ module.exports = async ({ github, context }) => { body: commentBody }); + await github.rest.issues.addLabels({ + owner: owner, + repo: repo, + issue_number: issue.number, + labels: ['potential-duplicate'] + }); + console.log(`Found ${items.length} potential duplicates and commented.`); } else { console.log("No potential duplicates found."); From 6f0970358571f15c2e1dacaa0c7cc17b8e48138e Mon Sep 17 00:00:00 2001 From: mor39a <89531894+mor39a@users.noreply.github.com> Date: Fri, 19 Jun 2026 09:03:47 -0500 Subject: [PATCH 5/5] Delete unnecessary file --- UpgradeLog.htm | 274 ------------------------------------------------- 1 file changed, 274 deletions(-) delete mode 100644 UpgradeLog.htm diff --git a/UpgradeLog.htm b/UpgradeLog.htm deleted file mode 100644 index 48e254c6..00000000 --- a/UpgradeLog.htm +++ /dev/null @@ -1,274 +0,0 @@ - - - - Informe de migración -

- Informe de migración -

Información general

ProyectoRuta de accesoErroresAdvertenciasMensajes
WapForStoreWapForStore\WapForStore.wapproj100
RunCat365RunCat365\RunCat365.csproj000
SoluciónRunCat365.sln001

Solución y proyectos

WapForStore

Mensaje
WapForStore\WapForStore.wapproj: - No se encontró la aplicación en la que se basa este tipo de proyecto. Siga este vínculo para obtener más información: c7167f0d-bc9f-4e6e-afe1-012c56b48db5

RunCat365

Mensaje
RunCat365 no registró mensajes. -

Solución

Mensaje
- Mostrar 1 mensajes adicionales -
RunCat365.sln: - El archivo de soluciones no requiere migración.
- Ocultar 1 mensajes adicionales -
\ No newline at end of file