From 4c3dd9704fc365fc4e32e1c5eebe7c378a55f57c Mon Sep 17 00:00:00 2001 From: Roger Date: Mon, 6 Apr 2026 00:33:25 +0800 Subject: [PATCH] chore: add Go version lint check, modernize issue templates (#557) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add go.mod version check in lint workflow (fails if go directive != 1.20) - Add golang.org/x/sys to dependabot ignore list (newer versions require Go 1.21+) - Fix golang.org/x/text ignore comment - Migrate issue templates from markdown to YAML forms: - Update PR template (dev → main, add go.mod checklist item) - Update .gitignore for YAML issue templates --- .github/ISSUE_TEMPLATE/browser_request.yml | 51 ++++++++++++ .github/ISSUE_TEMPLATE/bug_report.md | 40 --------- .github/ISSUE_TEMPLATE/bug_report.yml | 96 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 ++ .github/ISSUE_TEMPLATE/feature_request.md | 23 ------ .github/ISSUE_TEMPLATE/feature_request.yml | 35 ++++++++ .github/PULL_REQUEST_TEMPLATE.md | 14 ++-- .github/dependabot.yml | 3 +- .github/workflows/lint.yml | 10 +++ .gitignore | 3 +- 10 files changed, 207 insertions(+), 73 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/browser_request.yml delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml diff --git a/.github/ISSUE_TEMPLATE/browser_request.yml b/.github/ISSUE_TEMPLATE/browser_request.yml new file mode 100644 index 0000000..6785a6b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/browser_request.yml @@ -0,0 +1,51 @@ +name: Browser Support Request +description: Request support for a new browser +labels: ["enhancement", "browser"] +body: + - type: input + id: browser-name + attributes: + label: Browser Name + placeholder: "e.g. Waterfox, Floorp, Whale" + validations: + required: true + + - type: dropdown + id: engine + attributes: + label: Browser Engine + options: + - Chromium-based + - Firefox-based + - Other / Unknown + validations: + required: true + + - type: dropdown + id: platform + attributes: + label: Platform + multiple: true + options: + - Windows + - macOS + - Linux + validations: + required: true + + - type: input + id: data-dir + attributes: + label: User Data Directory + description: The browser's profile/data directory path. You can usually find this at `chrome://version` or `about:support`. + placeholder: "e.g. ~/Library/Application Support/BrowserName/" + validations: + required: false + + - type: textarea + id: additional + attributes: + label: Additional Context + description: Any other information about this browser (download link, encryption differences, etc.) + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index b78e4b8..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: bug -assignees: '' - ---- - -## Describe the bug -A clear and concise description of what the bug is. - -## Log Output -Please attach or paste the relevant log output. Use `./hack-browser-data -vv` and paste result here. - -## Expected vs Actual Behavior -Describe what you expected to happen and what actually happened. - -## Desktop (please complete the following information): -Select the operating system(s) you are using: -- [ ] Windows -- [ ] macOS -- [ ] Linux - -- OS Version: [e.g. windows 10, macos 10.15.7, ubuntu 20.04] -- OS Architecture: [e.g. 32-bit, 64-bit] -- Browser Name: [e.g. chrome, firefox] -- Browser Version: [e.g. 86.0.4240.111, 82.0.3] - -## Additional Details -- [ ] I ran `hack-browser-data` with administrator/root privileges. - -## Checklist -- [ ] I have checked the [existing issues](https://github.com/moonD4rk/HackBrowserData/issues) for similar problems. - -## Screenshots/Videos -If applicable, add screenshots or videos to help explain your problem. - -## Additional context -Add any other context about the problem here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..c85dca1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,96 @@ +name: Bug Report +description: Report a bug to help us improve +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to report a bug! Please fill out the information below. + + - type: dropdown + id: os + attributes: + label: Operating System + options: + - Windows + - macOS + - Linux + validations: + required: true + + - type: input + id: os-version + attributes: + label: OS Version + placeholder: "e.g. Windows 10 22H2, macOS 14.5, Ubuntu 24.04" + validations: + required: true + + - type: dropdown + id: browser + attributes: + label: Browser + options: + - Chrome + - Chrome Beta + - Chromium + - Edge + - Brave + - Opera + - OperaGX + - Vivaldi + - Yandex + - CocCoc + - Arc + - QQ + - 360 ChromeX + - 360 Chrome + - DC Browser + - Sogou Explorer + - Firefox + - Other + validations: + required: false + + - type: input + id: browser-version + attributes: + label: Browser Version + placeholder: "e.g. Chrome 135.0.7049.96, Firefox 144.0" + validations: + required: false + + - type: textarea + id: description + attributes: + label: Bug Description + description: A clear and concise description of what the bug is. + validations: + required: true + + - type: textarea + id: log-output + attributes: + label: Log Output + description: Run `hack-browser-data -v` and paste the output here. + render: shell + validations: + required: false + + - type: textarea + id: expected + attributes: + label: Expected vs Actual Behavior + description: What you expected to happen and what actually happened. + validations: + required: false + + - type: checkboxes + id: checklist + attributes: + label: Checklist + options: + - label: I have checked the [existing issues](https://github.com/moonD4rk/HackBrowserData/issues) for similar reports. + required: true + - label: I ran `hack-browser-data` with administrator/root privileges. + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..8ea80ab --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Documentation + url: https://github.com/moonD4rk/HackBrowserData/tree/main/rfcs + about: Read the RFCs for architecture and encryption details. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index f56e15c..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Feature Request -about: Suggest an idea for this project -title: '' -labels: enhancement -assignees: '' - ---- - -## Feature Description -A clear and concise description of what the feature is. - -## Why is this feature needed? -A clear and concise description of why this feature is needed. - -## Checklist -- [ ] I have checked the [existing issues](https://github.com/moonD4rk/HackBrowserData/issues) for similar problems. - -## Screenshots/Videos -If applicable, add screenshots or videos to help explain your proposal. - -## Additional Context -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..3a32ddd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,35 @@ +name: Feature Request +description: Suggest an idea for this project +labels: ["enhancement"] +body: + - type: textarea + id: description + attributes: + label: Feature Description + description: A clear and concise description of the feature. + validations: + required: true + + - type: textarea + id: motivation + attributes: + label: Why is this feature needed? + description: Describe the problem this feature would solve or the use case it enables. + validations: + required: true + + - type: textarea + id: proposed-solution + attributes: + label: Proposed Solution + description: If you have an idea for how this could be implemented, describe it here. + validations: + required: false + + - type: checkboxes + id: checklist + attributes: + label: Checklist + options: + - label: I have checked the [existing issues](https://github.com/moonD4rk/HackBrowserData/issues) for similar requests. + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 48134b9..1935e35 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,13 +1,13 @@ -## Proposed changes +## Summary - + +Fixes # ## Checklist - - -- [ ] Pull request is created against the [dev](https://github.com/moonD4rk/HackBrowserData/tree/dev) branch -- [ ] All checks passed (lint, unit, build tests etc.) with my changes +- [ ] Pull request targets the `main` branch +- [ ] All CI checks pass (lint, test, build) - [ ] I have added tests that prove my fix is effective or that my feature works -- [ ] I have added necessary documentation (if appropriate) \ No newline at end of file +- [ ] I have added necessary documentation (if appropriate) +- [ ] go.mod directive remains `go 1.20` (do not bump) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f993c6d..9a308dd 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,7 +9,8 @@ updates: ignore: - dependency-name: "modernc.org/sqlite" versions: [">=1.32.0"] # v1.32+ requires Go 1.21, project is pinned to Go 1.20 - - dependency-name: "golang.org/x/text" # will be removed in upcoming refactoring + - dependency-name: "golang.org/x/text" # indirect dep, newer versions may require Go 1.21+ + - dependency-name: "golang.org/x/sys" # newer versions require Go 1.21+ - package-ecosystem: "github-actions" directory: "/" schedule: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1d01002..d2279a7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,6 +23,16 @@ jobs: with: go-version-file: go.mod + - name: Check Go version constraint + if: matrix.os == 'ubuntu-latest' + run: | + GO_VERSION=$(grep '^go ' go.mod | awk '{print $2}') + if [ "$GO_VERSION" != "1.20" ]; then + echo "::error::go.mod directive must remain 'go 1.20' (Windows 7 support requirement)" + echo "::error::Current value: go $GO_VERSION" + exit 1 + fi + - name: Check spelling if: matrix.os == 'ubuntu-latest' uses: crate-ci/typos@master diff --git a/.gitignore b/.gitignore index 7802907..68a168a 100644 --- a/.gitignore +++ b/.gitignore @@ -25,14 +25,13 @@ !CONTRIBUTING.md !CODE_OF_CONDUCT.md !LOGO.png -!CONTRIBUTORS.svg # === GitHub === !.github/workflows/*.yml !.github/ISSUE_TEMPLATE/*.md +!.github/ISSUE_TEMPLATE/*.yml !.github/PULL_REQUEST_TEMPLATE.md !.github/dependabot.yml -!.github/release-drafter.yml # === RFCs === !rfcs/*.md