From 8ccb7c8e766e79893f3ec4410a9dc6baba31d82d Mon Sep 17 00:00:00 2001 From: James Mejia Date: Mon, 9 Sep 2024 18:12:32 -0500 Subject: [PATCH] #23: Add gh issue templates (#24) --- .github/ISSUE_TEMPLATE/bug_report.yml | 50 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 32 ++++++++++++++ CONTRIBUTING.md | 30 ++++++++++--- 3 files changed, 106 insertions(+), 6 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..bd84432 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,50 @@ +name: Bug report +description: Create a report to help us improve. +title: "bixaluswds - bug: [YOUR_TITLE]" +labels: ["bug"] + +body: + - type: textarea + id: issue + attributes: + label: Describe the bug + description: "A clear and concise description of what the bug is." + validations: + required: true + - type: textarea + id: reproduce + attributes: + label: Steps to reproduce + description: "Steps to reproduce the behavior." + placeholder: | + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error... + validations: + required: true + - type: textarea + id: expectation + attributes: + label: Expected behavior + description: "A clear and concise description of what you expected to happen." + validations: + required: true + - type: textarea + id: screenshots + attributes: + label: "Screenshots" + description: "If applicable, add screenshots to help explain your problem." + - type: textarea + id: system + attributes: + label: System information + placeholder: | + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + - type: textarea + id: additional_context + attributes: + label: Additional context + description: Add any other context about the problem. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..52027a8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,32 @@ +name: Feature request +description: Suggest an idea for this project. +title: "bixaluswds - feature request: [YOUR_TITLE]" +labels: ["Feature request"] + +body: + - type: textarea + id: request + attributes: + label: Feature request + description: "A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]" + validations: + required: true + - type: textarea + id: solution + attributes: + label: Describe the solution you'd like + description: "A clear and concise description of what you want to happen." + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Describe alternatives you've considered + description: "A clear and concise description of any alternative solutions or features you've considered." + validations: + required: true + - type: textarea + id: context + attributes: + label: Additional context + description: "Add any other context or screenshots about the feature request." diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 12244fc..df5c6f9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,53 +1,71 @@ # Contribution Guide for Bixal USWDS Drupal Theme ## 1. Set up your local development environment + 1. Create a forked repository from the bixaluswds repo. See https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo for instructions on how to fork the repository. 2. Complete the Drupal standard installation following the instructions outlined here: https://github.com/rayestrada/drupalstandard. ## 2. Generate child theme, install and set as default ### Initialize child theme using drupal theme generate function + Determine what theme machine name you want to use in this example we are using `my_new_theme`. First create a `custom` directory in `themes` directory if there isn't one: `mkdir web/themes/custom`. + ``` lando php web/core/scripts/drupal generate-theme --starterkit starter_theme my_new_theme --path themes/custom lando drush cr ``` ### Remove these lines from your custom theme .info.yml file + ``` hidden: true starterkit: true ``` ### Install and set your custom theme as the default + In this example the theme machine name is `my_new_theme`. The theme dependencies are already met in the Drupal standard installation. + ``` lando drush theme:install my_new_theme ``` - ## 3. Work on an issue -### Create a feature branch off `dev` for development + +### Create a feature branch off `main` for development + Navigate into the base theme directory + ``` cd web/themes/custom/bixaluswds` ``` -Checkout the `dev` branch and pull changes + +Checkout the `main` branch and pull changes + ``` -git checkout dev +git checkout main git pull origin ``` + Create a new feature branch + ``` -git checkout -b issue/#-short-descriptive-label +git checkout -b feature/ISSUE_NO-short-descriptive-label + +# Example +feature/23-gh-issue-templates ``` ### Create a pull request + Commit your file modifications and push into your fork + ``` git push fork branch-name ``` -Visit https://github.com/Bixal/bixaluswds/compare and create a pull request from your fork branch (source) to `Bixal:dev` (target). + +Visit https://github.com/Bixal/bixaluswds/compare and create a pull request from your fork branch (source) to `Bixal:main` (target). Follow the PR template instructions to complete the PR. Then update the GitHub issue with a note that you have a PR ready for review.