Skip to content

Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.

ci(github): harden issue templates and automate incomplete triage

Samir Hossains869e13134e20
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index a503136..f287ee7 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -1,94 +1,85 @@
name: Bug report
-description: Report an issue or unexpected behavior in MovieBox-Tui.
+description: Something is broken or not working as expected.
title: "bug: "
labels: ["bug"]
body:
- - type: markdown
- attributes:
- value: |
- Please verify the issue occurs on the latest release before submitting.
- For general setup questions, use [GitHub Discussions](https://github.com/mesamirh/MovieBox-Tui/discussions).
-
- type: checkboxes
- id: checklist
+ id: preflight
attributes:
- label: Pre-submission Checklist
+ label: Pre-submission checklist
options:
- - label: I am running the latest release of MovieBox-Tui.
+ - label: I checked docs/known-issues.md and docs/players.md
required: true
- - label: I searched existing issues and confirmed this is not already reported.
+ - label: I am using the latest version of MovieBox-Tui
required: true
+ - label: If on Android/Termux, I installed termux-tools and an Android media player (VLC, Just Player, MPV app)
+ required: false
- type: textarea
id: description
attributes:
- label: Description
- description: Describe what happened and what you expected instead.
- placeholder: Provide a clear description of the problem.
+ label: What happened?
+ description: >
+ Describe the bug clearly. What did you expect to happen instead?
+ One-line answers like "it shows error" will be closed automatically.
+ placeholder: |
+ Example: When I search for "Inception" and press Enter to watch,
+ the app shows "Player exited with code 1" and closes immediately.
+ I expected the video to start playing in mpv.
validations:
required: true
- type: textarea
id: reproduction
attributes:
- label: Steps to Reproduce
- description: List the exact steps to reproduce the issue.
+ label: Steps to reproduce
placeholder: |
- 1. Launch `moviebox-tui`
+ 1. Run `moviebox-tui`
2. Search for ...
3. Select ...
- 4. See error ...
+ 4. Press Enter / watch
validations:
required: true
- type: textarea
- id: error_output
+ id: log_output
attributes:
- label: Error Output or Screenshot
- description: Paste any error status text displayed on screen, terminal output, or attach a screenshot.
- placeholder: Paste error messages or drag and drop screenshots here.
+ label: Log / Terminal Output
+ description: >
+ Provide the exact sanitized log file path content.
+ Android/Linux: `~/.local/share/moviebox-tui/logs/moviebox-tui_rCURRENT.log`
+ Windows: `%LOCALAPPDATA%\moviebox-tui\logs\moviebox-tui_rCURRENT.log`
+ macOS: `~/Library/Application Support/moviebox-tui/logs/moviebox-tui_rCURRENT.log`
+ Run with `MOVIEBOX_LOG=debug moviebox-tui` to get detailed output.
+ render: shell
validations:
- required: false
+ required: true
- - type: dropdown
- id: os
+ - type: input
+ id: version
attributes:
- label: Operating System
- options:
- - Android (Termux)
- - Linux
- - macOS
- - Windows
+ label: Version
+ description: Run `moviebox-tui --version` to find it.
+ placeholder: "0.1.20"
validations:
required: true
- type: dropdown
- id: player
+ id: os
attributes:
- label: Media Player
- description: The media player configured in Settings (/settings) or launched.
+ label: Operating system
options:
- - Android Player (Intent Chooser)
- - mpv
- - IINA
- - VLC
- - None / Other
- validations:
- required: true
-
- - type: input
- id: version
- attributes:
- label: Version
- description: Found via `moviebox-tui --version`.
- placeholder: "0.1.20"
+ - macOS
+ - Linux
+ - Windows
+ - Android (Termux)
validations:
required: true
- type: input
id: terminal
attributes:
- label: Terminal Emulator
- placeholder: "Ghostty, Kitty, Alacritty, iTerm2, WezTerm, Termux, Windows Terminal, ..."
+ label: Terminal
+ placeholder: "Ghostty, iTerm2, Kitty, WezTerm, Alacritty, Termux, cmd, ..."
validations:
- required: false
+ required: true
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 6e8a08f..9a5fcf9 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,14 +1,8 @@
blank_issues_enabled: false
contact_links:
- - name: Documentation & Known Issues
- url: https://mesamirh.github.io/MovieBox-Tui/known-issues.html
- about: Review documented workarounds, requirements, and known issues.
- - name: Android / Termux Setup Guide
- url: https://mesamirh.github.io/MovieBox-Tui/cross-platform.html#os-notes
- about: Read requirements for running on Android via Termux.
- - name: Media Players & Troubleshooting
- url: https://mesamirh.github.io/MovieBox-Tui/players.html
- about: External media player setup, requirements, and supported features.
- - name: GitHub Discussions
+ - name: Questions & Troubleshooting
url: https://github.com/mesamirh/MovieBox-Tui/discussions
- about: Ask questions, request setup assistance, or discuss configurations.
+ about: Ask setup questions or get help with player errors before filing a bug.
+ - name: Player & Termux Setup Help
+ url: https://github.com/mesamirh/MovieBox-Tui/blob/main/docs/cross-platform.md
+ about: Read how to configure termux-tools and external Android players.
diff --git a/.github/workflows/duplicate-detector.yml b/.github/workflows/duplicate-detector.yml
index 485fe29..2e4f11b 100644
--- a/.github/workflows/duplicate-detector.yml
+++ b/.github/workflows/duplicate-detector.yml
@@ -20,6 +20,5 @@ jobs:
comment: |
Potential duplicate detected: #{number}.
- Please review that issue to check if your problem or suggestion has already been addressed.
- labels: duplicate
+ Check that issue to see if this has already been reported or resolved.
close-issue: false
diff --git a/.github/workflows/incomplete-issue.yml b/.github/workflows/incomplete-issue.yml
index b18776b..b7cdedc 100644
--- a/.github/workflows/incomplete-issue.yml
+++ b/.github/workflows/incomplete-issue.yml
@@ -1,172 +1,48 @@
-name: Issue Intake & Quality Guard
-
+name: Incomplete Issue Guard
on:
issues:
- types: [opened, edited]
- issue_comment:
- types: [created]
+ types: [opened]
permissions:
issues: write
- contents: read
jobs:
triage:
runs-on: ubuntu-latest
- if: "!github.event.issue.pull_request"
steps:
- - name: Validate and triage issue
+ - name: Check for low-effort reports
uses: actions/github-script@v7
with:
script: |
const issue = context.payload.issue;
- const eventName = context.eventName;
-
- function parseSemver(v) {
- const cleaned = (v || '').replace(/^[vV]/, '').trim();
- const parts = cleaned.split('.').map(n => parseInt(n, 10));
- if (parts.length >= 3 && parts.every(n => !isNaN(n))) {
- return parts.slice(0, 3);
- }
- return null;
- }
-
- function isOlder(current, latest) {
- for (let i = 0; i < 3; i++) {
- if (current[i] < latest[i]) return true;
- if (current[i] > latest[i]) return false;
- }
- return false;
- }
-
- if (eventName === 'issue_comment') {
- const comment = context.payload.comment;
- const isAuthor = comment.user && issue.user && comment.user.login === issue.user.login;
- const hasNeedsInfo = (issue.labels || []).some(l => l.name === 'needs-info' || l.name === 'stale');
-
- if (isAuthor && hasNeedsInfo) {
- const labelsToRemove = ['needs-info', 'stale'];
- for (const label of labelsToRemove) {
- try {
- await github.rest.issues.removeLabel({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: issue.number,
- name: label
- });
- } catch (_) {}
- }
- }
- return;
- }
-
- const body = (issue.body || '').trim();
- if (!body) return;
-
- const isBugReport = (issue.labels || []).some(l => l.name === 'bug') ||
- (issue.title || '').toLowerCase().startsWith('bug:');
-
- if (!isBugReport) return;
-
- function extractSection(headerName) {
- const regex = new RegExp(`###\\s*${headerName}[\\r\\n]+([\\s\\S]*?)(?=###|$)`, 'i');
- const match = body.match(regex);
- return match ? match[1].trim() : '';
- }
-
- const description = extractSection('Description');
- const steps = extractSection('Steps to Reproduce');
- const userVersionRaw = extractSection('Version');
- const osRaw = extractSection('Operating System');
- const playerRaw = extractSection('Media Player');
-
- const labelsToAdd = new Set();
- const feedbackPoints = [];
-
- if (osRaw.includes('Android')) labelsToAdd.add('os: android');
- else if (osRaw.includes('Linux')) labelsToAdd.add('os: linux');
- else if (osRaw.includes('macOS')) labelsToAdd.add('os: macos');
- else if (osRaw.includes('Windows')) labelsToAdd.add('os: windows');
-
- const titleAfterPrefix = (issue.title || '')
- .replace(/^(bug|feat|fix|refactor|chore|docs|perf)(\([^)]+\))?:\s*/i, '')
- .trim();
- const genericTitlePattern = /^(none|na|n\/a|error|bug|issue|help|not working|broken|its show error|please fix)$/i;
- const isTitleGeneric = titleAfterPrefix.length < 5 || genericTitlePattern.test(titleAfterPrefix);
-
- const isTooShort = (text) => {
- const stripped = text.replace(/[`*_\s\r\n-]/g, '');
- return stripped.length < 15;
- };
- const placeholderPattern = /^(none|na|n\/a|nil|error|not working|broken|please fix|please resolved?|v?\d+(\.\d+)*)$/i;
-
- const descriptionIncomplete = isTooShort(description) || placeholderPattern.test(description);
- const stepsIncomplete = isTooShort(steps) || placeholderPattern.test(steps);
-
- if (isTitleGeneric || descriptionIncomplete || stepsIncomplete) {
- labelsToAdd.add('needs-info');
- feedbackPoints.push('**Incomplete Details**: Please provide a descriptive issue title, concrete description of what failed, and exact numbered steps to reproduce.');
- }
-
- let latestVersionStr = null;
- try {
- const release = await github.rest.repos.getLatestRelease({
- owner: context.repo.owner,
- repo: context.repo.repo
- });
- latestVersionStr = release.data.tag_name || release.data.name;
- } catch (_) {}
-
- if (latestVersionStr) {
- const latestParsed = parseSemver(latestVersionStr);
- const userParsed = parseSemver(userVersionRaw);
+ const body = issue.body || '';
- if (latestParsed && userParsed && isOlder(userParsed, latestParsed)) {
- labelsToAdd.add('outdated-version');
- const latestClean = latestParsed.join('.');
- const userClean = userParsed.join('.');
+ const descMatch = body.match(/### What happened\?([\s\S]*?)###/);
+ const reproMatch = body.match(/### Steps to reproduce([\s\S]*?)###/);
+ const logMatch = body.match(/### Log \/ Terminal Output([\s\S]*?)###/);
- let upgradeCmd = 'curl -fsSL https://raw.githubusercontent.com/mesamirh/MovieBox-Tui/main/install.sh | bash';
- if (osRaw.includes('macOS')) {
- upgradeCmd = 'brew upgrade moviebox-tui (or re-run install.sh)';
- } else if (osRaw.includes('Windows')) {
- upgradeCmd = 'irm https://raw.githubusercontent.com/mesamirh/MovieBox-Tui/main/install.ps1 | iex';
- }
+ const desc = descMatch ? descMatch[1].trim() : '';
+ const repro = reproMatch ? reproMatch[1].trim() : '';
+ const log = logMatch ? logMatch[1].trim() : '';
- feedbackPoints.push(`**Outdated Version**: This report specifies version \`${userClean}\`, but the latest release is \`${latestClean}\`.\nPlease update to the latest release and verify if the issue persists:\n\`\`\`sh\n${upgradeCmd}\n\`\`\``);
- }
- }
+ const tooShort = (s) => s.replace(/\s/g, '').length < 30;
+ const isPlaceholder = (s) => /please\s*resol|no\s*steps|followed\s*everything/i.test(s);
- if (osRaw.includes('Android') && (playerRaw.includes('None') || playerRaw.includes('Other'))) {
- feedbackPoints.push('**Android / Termux Playback**: Video playback on Android requires external video player dispatch. Ensure `termux-tools` and `termux-am` are installed:\n```sh\npkg update && pkg install -y termux-tools termux-am\n```');
- }
+ const incomplete =
+ tooShort(desc) || isPlaceholder(desc) ||
+ tooShort(repro) || isPlaceholder(repro) ||
+ tooShort(log);
- if (labelsToAdd.size > 0) {
- const currentLabels = (issue.labels || []).map(l => l.name);
- const newLabels = Array.from(labelsToAdd).filter(l => !currentLabels.includes(l));
- if (newLabels.length > 0) {
- await github.rest.issues.addLabels({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: issue.number,
- labels: newLabels
- });
- }
- }
+ if (!incomplete) return;
- if (feedbackPoints.length > 0 && context.payload.action === 'opened') {
- const commentBody = [
- 'Thank you for opening an issue.',
- '',
- ...feedbackPoints,
- '',
- 'Issues flagged with `needs-info` are closed automatically after 7 days of inactivity.'
- ].join('\n\n');
+ await github.rest.issues.addLabels({
+ ...context.repo,
+ issue_number: issue.number,
+ labels: ['needs-info'],
+ });
- await github.rest.issues.createComment({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: issue.number,
- body: commentBody
- });
- }
+ await github.rest.issues.createComment({
+ ...context.repo,
+ issue_number: issue.number,
+ body: `This issue is missing reproduction steps or terminal log output required to investigate.\n\nTo proceed, provide:\n1. Exact steps to reproduce the problem.\n2. The sanitized log file from:\n - **Android/Linux:** \`~/.local/share/moviebox-tui/logs/moviebox-tui_rCURRENT.log\`\n - **Windows:** \`%LOCALAPPDATA%\\moviebox-tui\\logs\\moviebox-tui_rCURRENT.log\`\n - **macOS:** \`~/Library/Application Support/moviebox-tui/logs/moviebox-tui_rCURRENT.log\`\n\nIssues without actionable details close automatically after 7 days. See the [debugging guide](https://github.com/mesamirh/MovieBox-Tui/blob/main/docs/debugging.md) for log capture instructions.`,
+ });
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index ff4b6f0..5860373 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -1,8 +1,7 @@
-name: Stale Issue Lifecycle
-
+name: Close Stale Issues
on:
schedule:
- - cron: "0 0 * * *"
+ - cron: '0 6 * * *'
workflow_dispatch:
permissions:
@@ -12,20 +11,15 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- - name: Close stale needs-info issues
- uses: actions/stale@v9
+ - uses: actions/stale@v9
with:
- only-labels: "needs-info"
- days-before-issue-stale: 7
- days-before-issue-close: 2
- stale-issue-label: "stale"
+ stale-issue-label: needs-info
+ close-issue-label: needs-info
+ days-before-stale: 7
+ days-before-close: 0
stale-issue-message: >
- This issue has been marked as stale because it has been awaiting required
- information for 7 days without a response. It will be closed in 2 days if
- no update is provided.
- close-issue-message: >
- This issue was closed due to inactivity and missing reproduction details.
- If the problem persists, please submit a new issue with complete reproduction steps.
- exempt-issue-labels: "pinned,security"
- days-before-pr-stale: -1
- days-before-pr-close: -1
+ This issue has had the `needs-info` label for 7 days without response
+ and is now closed. Reopen with actionable reproduction details once available.
+ close-issue-message: ''
+ only-labels: needs-info
+ operations-per-run: 50