diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..7ed124f0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,58 @@ +name: Bug Report +description: Report a problem with the core CLI +title: "[Bug]: " +labels: ["bug", "triage"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting! Please fill out the details below. + + - type: dropdown + id: os + attributes: + label: Operating System + options: + - macOS + - Windows + - Linux (Ubuntu/Debian) + - Linux (Other) + validations: + required: true + + - type: input + id: command + attributes: + label: Command + description: Which command failed? + placeholder: "e.g., core dev work, core php test" + validations: + required: true + + - type: input + id: version + attributes: + label: Version + description: Output of `core version` + placeholder: "e.g., core v0.1.0" + + - type: textarea + id: description + attributes: + label: What happened? + description: Describe the issue + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected behaviour + description: What should have happened? + + - type: textarea + id: logs + attributes: + label: Error output + description: Paste any error messages + render: shell diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..bc677307 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: Host UK Documentation + url: https://github.com/host-uk/core-devops + about: Setup guides and workspace documentation + - name: Discussions + url: https://github.com/orgs/host-uk/discussions + about: Ask questions and share ideas \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..ad0f9d52 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,45 @@ +name: Feature Request +description: Suggest a new feature or enhancement +title: "[Feature]: " +labels: ["enhancement"] +body: + - type: markdown + attributes: + value: | + Thanks for the suggestion! Please describe your idea below. + + - type: dropdown + id: area + attributes: + label: Area + options: + - dev commands (work, commit, push, pull) + - php commands (test, lint, stan) + - GitHub integration (issues, reviews, ci) + - New command + - Documentation + - Other + validations: + required: true + + - type: textarea + id: problem + attributes: + label: Problem or use case + description: What problem does this solve? + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed solution + description: How would you like it to work? + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + description: Any other approaches you've thought about? \ No newline at end of file diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml new file mode 100644 index 00000000..3aec84eb --- /dev/null +++ b/.github/workflows/auto-label.yml @@ -0,0 +1,85 @@ +name: Auto Label Issues + +on: + issues: + types: [opened, edited] + +permissions: + issues: write + +jobs: + label: + runs-on: ubuntu-latest + steps: + - name: Auto-label based on content + uses: actions/github-script@v7 + with: + script: | + const issue = context.payload.issue; + const title = issue.title.toLowerCase(); + const body = (issue.body || '').toLowerCase(); + const content = title + ' ' + body; + + const labelsToAdd = []; + + // Type labels based on title prefix + if (title.includes('[bug]')) { + labelsToAdd.push('bug'); + } else if (title.includes('[feature]') || title.includes('feat(') || title.includes('feat:')) { + labelsToAdd.push('enhancement'); + } else if (title.includes('[docs]') || title.includes('docs(') || title.includes('docs:')) { + labelsToAdd.push('documentation'); + } + + // Project labels based on content + if (content.includes('core dev') || content.includes('core work') || content.includes('core commit') || content.includes('core push')) { + labelsToAdd.push('project:core-cli'); + } + if (content.includes('core php') || content.includes('composer') || content.includes('pest') || content.includes('phpstan')) { + labelsToAdd.push('project:core-php'); + } + + // Language labels + if (content.includes('.go') || content.includes('golang') || content.includes('go mod')) { + labelsToAdd.push('go'); + } + if (content.includes('.php') || content.includes('laravel') || content.includes('composer')) { + // Skip - already handled by project:core-php + } + + // Priority detection + if (content.includes('critical') || content.includes('urgent') || content.includes('breaking')) { + labelsToAdd.push('priority:high'); + } + + // Agent labels + if (content.includes('agent') || content.includes('ai ') || content.includes('claude') || content.includes('agentic')) { + labelsToAdd.push('agentic'); + } + + // Complexity hints + if (content.includes('simple') || content.includes('quick fix') || content.includes('typo')) { + labelsToAdd.push('good first issue'); + } + + // Apply labels if any detected + if (labelsToAdd.length > 0) { + // Filter to only existing labels + const existingLabels = await github.rest.issues.listLabelsForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + per_page: 100 + }); + const validLabels = existingLabels.data.map(l => l.name); + const filteredLabels = labelsToAdd.filter(l => validLabels.includes(l)); + + if (filteredLabels.length > 0) { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + labels: filteredLabels + }); + console.log(`Added labels: ${filteredLabels.join(', ')}`); + } + }