From 8cb001bc8c7f837ea9008cec5e7eef04e317f944 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 12 Nov 2025 21:23:45 +0000 Subject: [PATCH 1/3] Initial plan From 6dcd518cfafbb59dd92898f8c7b14e2735c33a35 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 12 Nov 2025 21:30:02 +0000 Subject: [PATCH 2/3] Enhanced workflow to close non-descriptive issues in multiple languages Co-authored-by: krroomm4-coder <231756406+krroomm4-coder@users.noreply.github.com> --- .../workflows/close-single-word-issues.yml | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/close-single-word-issues.yml b/.github/workflows/close-single-word-issues.yml index f2ef0da..eca9aab 100644 --- a/.github/workflows/close-single-word-issues.yml +++ b/.github/workflows/close-single-word-issues.yml @@ -1,4 +1,4 @@ -name: Close Single-Word Issues +name: Close Non-Descriptive Issues on: issues: @@ -13,20 +13,41 @@ jobs: runs-on: ubuntu-latest steps: - - name: Close Single-Word Issue + - name: Close Non-Descriptive Issue uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const issueTitle = context.payload.issue.title.trim(); + + // Check if it's a single word (no whitespace) const isSingleWord = /^\S+$/.test(issueTitle); - if (isSingleWord) { + // Check if title is too short (less than 10 characters) + const isTooShort = issueTitle.length < 10; + + // Count words (split by whitespace and filter out empty strings) + const words = issueTitle.split(/\s+/).filter(word => word.length > 0); + const hasFewerThanThreeWords = words.length < 3; + + // Check if title contains only very common/vague words + const vaguePhrases = [ + /^(open|close|start|stop|launch|run|help|issue|problem|bug|error|fix)\s*(the|an|a)?\s*(app|application|program|cli|tool|issue)?$/i, + /^(فتح|إغلاق|مساعدة|مشكلة|خطأ)\s*([اأإ]?[تل]?تطبيق|[اأإ]?[تل]?برنامج)?$/, // Arabic + /^(开|关|打开|关闭|启动|帮助|问题|错误)\s*(应用|程序)?$/, // Chinese + /^(開く|閉じる|起動|ヘルプ|問題|エラー)\s*(アプリ|プログラム)?$/, // Japanese + ]; + + const isVaguePhrase = vaguePhrases.some(pattern => pattern.test(issueTitle)); + + const shouldClose = isSingleWord || (isTooShort && hasFewerThanThreeWords) || isVaguePhrase; + + if (shouldClose) { const issueNumber = context.payload.issue.number; const repo = context.repo.repo; // Close the issue and add the invalid label - github.rest.issues.update({ + await github.rest.issues.update({ owner: context.repo.owner, repo: repo, issue_number: issueNumber, @@ -39,6 +60,6 @@ jobs: owner: context.repo.owner, repo: repo, issue_number: issueNumber, - body: `This issue may have been opened accidentally. I'm going to close it now, but feel free to open a new issue with a more descriptive title.` + body: `This issue may have been opened accidentally or has a non-descriptive title. I'm going to close it now, but feel free to open a new issue with a more descriptive title that explains the problem or feature request in detail.` }); } From 1fd36a99fd44a87a96a86335087615b1d095daba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 12 Nov 2025 21:31:04 +0000 Subject: [PATCH 3/3] Add documentation to non-descriptive issues workflow Co-authored-by: krroomm4-coder <231756406+krroomm4-coder@users.noreply.github.com> --- .github/workflows/close-single-word-issues.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/close-single-word-issues.yml b/.github/workflows/close-single-word-issues.yml index eca9aab..28ec679 100644 --- a/.github/workflows/close-single-word-issues.yml +++ b/.github/workflows/close-single-word-issues.yml @@ -1,5 +1,15 @@ name: Close Non-Descriptive Issues +# This workflow automatically closes issues with non-descriptive titles to maintain +# issue quality. It detects and closes: +# 1. Single-word titles (e.g., "bug", "help") +# 2. Very short titles (< 10 characters) with fewer than 3 words +# 3. Vague phrases in multiple languages (English, Arabic, Chinese, Japanese) +# Examples: "open app", "فتح اتطبيق", "打开应用", etc. +# +# Issues are labeled as 'invalid' and closed with a helpful message encouraging +# users to open a new issue with a more descriptive title. + on: issues: types: