From faa3f71bc09219fe3b593deac09e72dcba0b353d Mon Sep 17 00:00:00 2001 From: MULHAM Date: Sun, 21 Jun 2026 23:06:32 +0700 Subject: [PATCH] chore: add PR and issue templates Add a markdown pull request template plus GitHub issue forms (bug report, feature request, new scanner request) and a config that disables blank issues and links to npm and the README. Standardizes contributions, especially new package-manager scanner submissions. --- .github/ISSUE_TEMPLATE/bug_report.yml | 76 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 +++ .github/ISSUE_TEMPLATE/feature_request.yml | 22 +++++++ .github/ISSUE_TEMPLATE/new_scanner.yml | 51 +++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 42 ++++++++++++ 5 files changed, 199 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/ISSUE_TEMPLATE/new_scanner.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..2d30f9a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,76 @@ +name: Bug report +description: Report something broken in pkgmap +title: "fix: " +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting! Please fill the fields below so we can reproduce fast. + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Clear description of the bug. + validations: + required: true + - type: textarea + id: repro + attributes: + label: Steps to reproduce + description: Exact commands / flags used. + placeholder: | + 1. Run `pkgmap --manager brew` + 2. ... + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + - type: dropdown + id: manager + attributes: + label: Affected package manager + options: + - npm + - pnpm + - yarn + - brew + - volta + - pip + - cargo + - gem + - all / multiple + - not manager-specific + - other + validations: + required: true + - type: input + id: os + attributes: + label: OS and version + placeholder: macOS 15.5 / Ubuntu 24.04 / Windows 11 + validations: + required: true + - type: input + id: node + attributes: + label: Node.js version + description: pkgmap requires Node >= 20. + placeholder: v22.3.0 + validations: + required: true + - type: input + id: pkgmap-version + attributes: + label: pkgmap version + placeholder: 1.12.0 + validations: + required: true + - type: textarea + id: logs + attributes: + label: Logs / output + description: Paste terminal output. Automatically formatted as code. + render: shell diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..e283991 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: npm package + url: https://www.npmjs.com/package/@mulham28/pkgmap + about: Install instructions and published versions. + - name: Usage docs + url: https://github.com/mulhamna/pkgmap#readme + about: Read the README before opening an issue. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..a4af4aa --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,22 @@ +name: Feature request +description: Suggest an enhancement for pkgmap +title: "feat: " +labels: ["enhancement"] +body: + - type: textarea + id: problem + attributes: + label: Problem / motivation + description: What are you trying to do that pkgmap can't today? + validations: + required: true + - type: textarea + id: solution + attributes: + label: Proposed solution + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Alternatives considered diff --git a/.github/ISSUE_TEMPLATE/new_scanner.yml b/.github/ISSUE_TEMPLATE/new_scanner.yml new file mode 100644 index 0000000..5b9d518 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/new_scanner.yml @@ -0,0 +1,51 @@ +name: New scanner request +description: Request support for a new package manager +title: "feat: add scanner" +labels: ["enhancement", "scanner"] +body: + - type: markdown + attributes: + value: | + Each scanner lives in `src/scanners/.js` and exports a default async + function returning `{ manager, packages: [{ name, version }] }`. + - type: input + id: name + attributes: + label: Package manager name + placeholder: deno / conda / apt + validations: + required: true + - type: input + id: list-command + attributes: + label: Command to list installed packages + placeholder: deno list --json + validations: + required: true + - type: input + id: check-binary + attributes: + label: Binary to check availability + description: Used with `which` / `where` before running. + placeholder: deno + - type: dropdown + id: json + attributes: + label: Does the list command support JSON output? + options: + - "yes" + - "no — text only" + - unknown + validations: + required: true + - type: input + id: platforms + attributes: + label: Supported platforms + placeholder: macOS, Linux, Windows + - type: checkboxes + id: pr + attributes: + label: Contribution + options: + - label: I'm willing to submit a PR for this scanner diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..0db35e7 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,42 @@ + + +## Summary + + + +- + +## Changes + + + +- + +## Type of change + + + +- [ ] `feat` — new feature +- [ ] `fix` — bug fix +- [ ] `refactor` — no behavior change +- [ ] `chore` — tooling / maintenance +- [ ] `docs` — documentation only +- [ ] `test` — tests only +- [ ] `ci` / `build` — pipeline or build + +## Test plan + +- [ ] `npm run lint` +- [ ] `npm run format:check` +- [ ] `npm run release:check` +- [ ] Ran `pkgmap` locally and verified output + +## Checklist + +- [ ] Subject line ≤ 72 chars, imperative mood, no trailing period +- [ ] One logical change — no unrelated edits bundled in +- [ ] New/changed scanner follows the interface (`export default async function` → `{ manager, packages }`) +- [ ] No `CHANGELOG.md` hand-edits in release-please-managed sections