From 7c83b11798a3e4cf418fc2c3e4a9291089bc2727 Mon Sep 17 00:00:00 2001 From: Sam Richard Date: Sun, 12 May 2024 06:50:05 -0700 Subject: [PATCH] Update issue and PR templates and PR title checker --- .github/ISSUE_TEMPLATE/bug_report.md | 40 ------------- .github/ISSUE_TEMPLATE/bug_report.yml | 65 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 14 +++++ .github/ISSUE_TEMPLATE/docs.yml | 50 +++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 19 ------- .github/ISSUE_TEMPLATE/feature_request.yml | 49 ++++++++++++++++ .github/commit-convention.md | 63 +++++++++++++++++++++ .github/pr-title-checker-config.json | 4 +- .github/pull_request_template.md | 27 +++++++-- 9 files changed, 266 insertions(+), 65 deletions(-) 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 create mode 100644 .github/ISSUE_TEMPLATE/docs.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/commit-convention.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 3acf1c6d..00000000 --- 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: 'problem: bug' -assignees: '' ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: - -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - -- OS: [e.g. iOS] -- Browser [e.g. chrome, safari] -- Version [e.g. 22] - -**Smartphone (please complete the following information):** - -- Device: [e.g. iPhone6] -- OS: [e.g. iOS8.1] -- Browser [e.g. stock browser, safari] -- Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..901c0a31 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,65 @@ +name: "\U0001F41E Bug report" +description: Report an issue with ChromeOS.dev. To report an issue with ChromeOS, see the "Report a ChromeOS problem or send feedback" link below +labels: ["problem: bug"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! This form should only be used to file bugs for ChromeOS.dev, our developer documentation and news site. If you're looking to report a bug for ChromeOS, please [report a ChromeOS problem or send feedback](https://support.google.com/chromebook/answer/2982029?hl=en) instead, or [report a ChromeOS bug](https://www.chromium.org/chromium-os/developer-library/guides/bugs/reporting-bugs/) directly. + - type: textarea + id: bug-description + attributes: + label: Describe the bug + description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks! + placeholder: I am doing ... What I expect is ... What actually happening is ... + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Reproduction + description: Please provide clear steps to reproduce the bug you're seeing. + placeholder: | + Steps to reproduce the behavior: + + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + - type: input + id: browser + attributes: + label: Browser context + description: Browser, browser version, operating system, and optional device. Please include if reporting a site bug. + placeholder: Chrome 124 on ChromeOS 124, Google Pixelbook + validation: + required: false + - type: textarea + id: system-info + attributes: + label: System Info + description: Output of `npx envinfo --system --binaries --browsers`. Please include if reporting a development bug. + render: shell + placeholder: System, Binaries, Browsers + validations: + required: false + - type: checkboxes + id: checkboxes + attributes: + label: Validations + description: Before submitting the issue, please make sure you do the following + options: + - label: Follow our [Code of Conduct](https://github.com/chromeos/chromeos.dev/blob/main/CODE_OF_CONDUCT.md) + required: true + - label: Read the [Contributing Guidelines](https://github.com/chromeos/chromeos.dev/blob/main/CONTRIBUTING.md). + required: true + - label: Check that there isn't [already an issue](https://github.com/chromeos/chromeos.dev/issues) that reports the same bug to avoid creating a duplicate. + required: true + - label: Make sure this is a ChromeOS.dev (the ChromeOS documentation and news site) issue and not a general ChromeOS issue. If you're looking to report a bug for ChromeOS, please [report a ChromeOS problem or send feedback](https://support.google.com/chromebook/answer/2982029?hl=en) instead. + required: true + - label: Check that this is a concrete bug. For Q&A, either ask in the [Chromebook Help Community](https://support.google.com/chromebook/community?sjid=4749359234014638826-NA) or join the `#chromeos` or `#chromeos-forum` channels in the [Google Developer Community Discord](https://discord.gg/google-dev-community). + required: true + - label: You've included either your browser context or system info, depending on what type of bug you're filing. + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..db16ae8e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,14 @@ +blank_issues_enabled: false +contact_links: + - name: Report a ChromeOS problem or send feedback + url: https://support.google.com/chromebook/answer/2982029?hl=en + about: How to report a problem or send feedback about ChromeOS + - name: Report a ChromeOS bug + url: https://www.chromium.org/chromium-os/developer-library/guides/bugs/reporting-bugs/ + about: How to report bugs for ChromeOS + - name: Google Developer Community Discord + url: https://discord.gg/google-dev-community + about: "Official Google Discord community for developers working with Google technology. Join us in the #chromeos and #chromeos-forum channels." + - name: Chromebook Help Community + url: https://support.google.com/chromebook/community?sjid=4749359234014638826-NA + about: Community help forum where Chromebook Product Experts and other Chromebook users can help you. diff --git a/.github/ISSUE_TEMPLATE/docs.yml b/.github/ISSUE_TEMPLATE/docs.yml new file mode 100644 index 00000000..56a9d71e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/docs.yml @@ -0,0 +1,50 @@ +name: "\U0001F4DA Documentation" +description: Suggest an update to, or new, developer documentation on ChromeOS.dev +labels: ["experience: documentation", "scope: content"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to request updates to, or new developer documentation for ChromeOS! + - type: checkboxes + id: documentation_is + attributes: + label: Documentation is + options: + - label: Missing + - label: Outdated + - label: Confusing + - label: Not sure? + - type: input + id: url + attributes: + label: URL of existing documentation + description: If reporting outdated or confusing documentation, please include the current page URL. + - type: textarea + id: description + attributes: + label: Explain in Detail + description: A clear and concise description of your suggestion. + placeholder: The description of ... page is not clear. I thought it meant ... but it wasn't. + validations: + required: true + - type: textarea + id: suggestion + attributes: + label: Your Suggestion for Changes + validations: + required: true + - type: checkboxes + id: checkboxes + attributes: + label: Validations + description: Before submitting the issue, please make sure you do the following + options: + - label: Follow our [Code of Conduct](https://github.com/chromeos/chromeos.dev/blob/main/CODE_OF_CONDUCT.md) + required: true + - label: Read the [Contributing Guidelines](https://github.com/chromeos/chromeos.dev/blob/main/CONTRIBUTING.md). + required: true + - label: Check that there isn't [already an issue](https://github.com/chromeos/chromeos.dev/issues) that requests the same updates to avoid creating a duplicate. + required: true + - label: Check that this is a concrete documentation request. For Q&A, either ask in the [Chromebook Help Community](https://support.google.com/chromebook/community?sjid=4749359234014638826-NA) or join the `#chromeos` or `#chromeos-forum` channels in the [Google Developer Community Discord](https://discord.gg/google-dev-community). + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index c1031cdc..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: 'enhancement: feature' -assignees: '' ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**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 00000000..b1efd748 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,49 @@ +name: "\U0001F680 New ChromeOS.dev feature request" +description: Propose a new feature to be added to ChromeOS.dev +labels: ["enhancement: feature"] +body: + - type: markdown + attributes: + value: | + Thanks for your interest and taking the time to fill out this feature request! This form should only be used to request features for ChromeOS.dev, our developer documentation and news site. If you're looking to request a feature for ChromeOS, please [report a ChromeOS problem or send feedback](https://support.google.com/chromebook/answer/2982029?hl=en) instead, or [request a ChromeOS feature](https://www.chromium.org/chromium-os/developer-library/guides/bugs/reporting-bugs/) directly. + - type: textarea + id: feature-description + attributes: + label: Description + description: "Clear and concise description of the problem. Please make the reason and usecases as detailed as possible. If you intend to submit a PR for this issue, tell us in the description. Thanks!" + placeholder: As a developer using ChromeOS.dev I want [goal / wish] so that [benefit]. + validations: + required: true + - type: textarea + id: suggested-solution + attributes: + label: Suggested solution + description: "In section [xy] we could provide [ab]..." + validations: + required: true + - type: textarea + id: alternative + attributes: + label: Alternative + description: Clear and concise description of any alternative solutions or features you've considered. + - type: textarea + id: additional-context + attributes: + label: Additional context + description: Any other context or screenshots about the feature request here. + - type: checkboxes + id: checkboxes + attributes: + label: Validations + description: Before submitting the issue, please make sure you do the following + options: + - label: Follow our [Code of Conduct](https://github.com/chromeos/chromeos.dev/blob/main/CODE_OF_CONDUCT.md) + required: true + - label: Read the [Contributing Guidelines](https://github.com/chromeos/chromeos.dev/blob/main/CONTRIBUTING.md). + required: true + - label: Check that there isn't [already an issue](https://github.com/chromeos/chromeos.dev/issues) that requests the same feature to avoid creating a duplicate. + required: true + - label: Make sure this is a ChromeOS.dev (the ChromeOS documentation and news site) issue and not a general ChromeOS issue. If you're looking to request a feature for ChromeOS, please [report a ChromeOS problem or send feedback](https://support.google.com/chromebook/answer/2982029?hl=en) instead. + required: true + - label: Check that this is a concrete feature request. For Q&A, either ask in the [Chromebook Help Community](https://support.google.com/chromebook/community?sjid=4749359234014638826-NA) or join the `#chromeos` or `#chromeos-forum` channels in the [Google Developer Community Discord](https://discord.gg/google-dev-community). + required: true diff --git a/.github/commit-convention.md b/.github/commit-convention.md new file mode 100644 index 00000000..c7ec2fc6 --- /dev/null +++ b/.github/commit-convention.md @@ -0,0 +1,63 @@ +## Git Commit Message Convention + +> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular) to use Emoji for type. + +#### TL;DR: + +Messages must be matched by the following regex: + + +```js +/^(🐛|🆕|📝|♻️|💎|🐎|📌){1}(\((site|cms|repo|ci|tests|config|lib|types|components|layouts|pages|js|desk|schema|scripts)\))? {1}([A-Z]\w(\w|\s|\d|.|,|\-)*[^(\.|\s)])$/ +``` + +#### Examples + +``` +🐛(component) Fix menu rendering if style queries not available +🐎(ci) Cache build output +📌(site) Update to latest minor versions +♻️(test) Update to new major lint version +``` + +### Emoji + +| Emoji | Use | +| :---: | :----------------------- | +| 🐛 | Bug fix | +| 🆕 | New feature | +| 📝 | Documentation update | +| ♻️ | Pure refactor | +| 💎 | Styling update | +| 🐎 | Performance improvements | +| 📌 | Dependency update | + +### Scope + +The scope that updates are being made to. General scopes should be used only if there isn't a more specific scope, or if multiple scopes are included in one PR. Our recgonized scopes are: + +| Scope | Usage | +| :----------: | :---------------------------------- | +| `site` | General updates to the site | +| `cms` | General updates to the CMS | +| `repo` | General updates to the repo | +| `ci` | Continuous integration system | +| `tests` | Code test or linting updates | +| `config` | Meta config updates | +| `lib` | Site or CMS library (`lib`) updates | +| `types` | TypeScript types | +| `components` | Site or CMS components | +| `layouts` | Site layouts | +| `pages` | Site page templates | +| `js` | Site browser JS | +| `desk` | CMS desk updates | +| `schema` | CMS schemas | +| `scripts` | CMS automation scripts | + +### Subject + +The subject contains a succinct description of the change, written in English, that: + +- starts with a capital letter +- uses the imperative, present tense: "change" not "changed" nor "changes" +- does not end with a period (.) or extra whitespace at the end diff --git a/.github/pr-title-checker-config.json b/.github/pr-title-checker-config.json index 4b53a44f..049b52f0 100644 --- a/.github/pr-title-checker-config.json +++ b/.github/pr-title-checker-config.json @@ -4,11 +4,11 @@ "color": "#db2780" }, "CHECKS": { - "regexp": "^(🐎|🐛|🆕|📝|♻️|📌|💎){1}(\\((site|functions|build|tests|content)\\))? {1}\\w(\\w|\\s|\\d|.|,|\\-)*$" + "regexp": "^(🐛|🆕|📝|♻️|💎|🐎|📌){1}(\\((site|cms|repo|ci|tests|config|lib|types|components|layouts|pages|js|desk|schema|scripts)\\))? {1}([A-Z]\\w(\\w|\\s|\\d|.|,|\\-)*[^(\\.|\\s)])$" }, "MESSAGES": { "success": "All OK", - "failure": "Please make sure your PR title matches the following format: 🐎|🐛|🆕|📝|♻️|📌|💎(site|functions|build|tests|content) title. Title can contain letters, spaces, numbers, dashes, commas, and dots, and must start with a letter", + "failure": "Please make sure your PR title matches the following format: 🐛|🆕|📝|♻️|💎|🐎|📌(scope) subject. Subject must be written in English, start with a capital letter, can contain letters, spaces, numbers, dashes, commas, and dots, and must not end with a period or extra whitespace.", "notice": "" } } diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 21f29311..5236c594 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,7 +1,26 @@ -**Please describe what your Pull Request does** + -A clear and concise description of what your Pull Request does. +### Description -**Please tag each issue this Pull Request resolves** + -- Resolves # +### Additional context + + + +--- + +### What is the purpose of this pull request? + + + +- [ ] Bug fix +- [ ] New Feature +- [ ] Other + +### Before submitting the PR, please make sure you do the following + +- [ ] Read the [Contributing Guidelines](https://github.com/chromeos/chromeos.dev/blob/main/CONTRIBUTING.md). +- [ ] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate. +- [ ] Provide a description in this PR that addresses **what** the PR is solving, or reference the issue that it solves (e.g. `fixes #123`). +- [ ] Ensure your PR title matches the following format: 🐛|🆕|📝|♻️|💎|🐎|📌(scope) subject. Subject must be written in English, start with a capital letter, can contain letters, spaces, numbers, dashes, commas, and dots, and must not end with a period or extra whitespace. See our [commit convention](https://github.com/chromeos/chromeos.dev/blob/main/.github/commit-convention.md) for emoji descriptions, scopes and their descriptions, and full examples.