From d26f092124b3ad090fe6cd2de7458f6971565471 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Thu, 23 Dec 2021 16:14:21 +0800 Subject: [PATCH] github: refurbish issue forms and pull request templates (#312) --- .editorconfig | 9 ++++ .github/ISSUE_TEMPLATE/bug_report.md | 23 --------- .github/ISSUE_TEMPLATE/bug_report.yml | 51 ++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/documentation.yml | 30 ++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 -------- .github/ISSUE_TEMPLATE/feature_request.yml | 45 ++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 12 ++++- .github/contributing.md | 55 ++++++++++++++++++++++ .gitignore | 1 + 10 files changed, 202 insertions(+), 45 deletions(-) create mode 100644 .editorconfig 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/documentation.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/contributing.md diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..433be2a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +# http://editorconfig.org + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index ab57ef7..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -A code snippet to reproduce the problem described above. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Additional context** -Add any other context about the problem here, or any suggestion to fix the problem. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..9048e7d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,51 @@ +name: Bug report +description: File a bug report to help us improve +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + - Before you file an issue read the [Contributing guide](https://github.com/go-ini/ini/blob/main/.github/contributing.md). + - Check to make sure someone hasn't already opened a similar [issue](https://github.com/go-ini/ini/issues). + - type: input + attributes: + label: Version + description: Please specify the exact Go module version you're reporting for. + validations: + required: true + - type: textarea + attributes: + label: Describe the bug + description: A clear and concise description of what the bug is. + validations: + required: true + - type: textarea + attributes: + label: To reproduce + description: A code snippet to reproduce the problem described above. + validations: + required: true + - type: textarea + attributes: + label: Expected behavior + description: A clear and concise description of what you expected to happen. + validations: + required: true + - type: textarea + attributes: + label: Additional context + description: | + Links? References? Suggestions? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: checkboxes + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](https://go.dev/conduct) + options: + - label: I agree to follow this project's Code of Conduct + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml new file mode 100644 index 0000000..1400a6e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -0,0 +1,30 @@ +name: Improve documentation +description: Suggest an idea or a patch for documentation +labels: ["documentation"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this form! + + - Before you file an issue read the [Contributing guide](https://github.com/go-ini/ini/blob/main/.github/contributing.md). + - Check to make sure someone hasn't already opened a similar [issue](https://github.com/go-ini/ini/issues). + - type: textarea + attributes: + label: What needs to be improved? Please describe + description: A clear and concise description of what is wrong or missing. + validations: + required: true + - type: textarea + attributes: + label: Why do you think it is important? + description: A clear and concise explanation of the rationale. + validations: + required: true + - type: checkboxes + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](https://go.dev/conduct) + options: + - label: I agree to follow this project's Code of Conduct + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -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 0000000..33896ac --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,45 @@ +name: Feature request +description: Suggest an idea for this project +labels: ["feature"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this form! + + - Before you file an issue read the [Contributing guide](https://github.com/go-ini/ini/blob/main/.github/contributing.md). + - Check to make sure someone hasn't already opened a similar [issue](https://github.com/go-ini/ini/issues). + - type: textarea + attributes: + label: Describe the feature + description: A clear and concise description of what the problem is, e.g. I'm always frustrated when [...] + validations: + required: true + - type: textarea + 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 + 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 + attributes: + label: Additional context + description: | + Links? References? Suggestions? Anything that will give us more context about the feature you are requesting! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + - type: checkboxes + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](https://go.dev/conduct) + options: + - label: I agree to follow this project's Code of Conduct + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b4565ae..94bb3d3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,11 @@ -### What problem should be fixed? +### Describe the pull request -### Have you added test cases to catch the problem? +A clear and concise description of what the pull request is about, i.e. what problem should be fixed? + +Link to the issue: + +### Checklist + +- [ ] I agree to follow the [Code of Conduct](https://go.dev/conduct) by submitting this pull request. +- [ ] I have read and acknowledge the [Contributing guide](https://github.com/go-ini/ini/blob/main/.github/contributing.md). +- [ ] I have added test cases to cover the new code. diff --git a/.github/contributing.md b/.github/contributing.md new file mode 100644 index 0000000..79a3ee9 --- /dev/null +++ b/.github/contributing.md @@ -0,0 +1,55 @@ +# Welcome to go-ini contributing guide + +Thank you for investing your time in contributing to our projects! + +Read our [Code of Conduct](https://go.dev/conduct) to keep our community approachable and respectable. + +In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR. + +Use the table of contents icon on the top left corner of this document to get to a specific section of this guide quickly. + +## New contributor guide + +To get an overview of the project, read the [README](/README.md). Here are some resources to help you get started with open source contributions: + +- [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github) +- [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git) +- [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow) +- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests) + +In addition to the general guides with open source contributions, you would also need to: + +- Have basic knowledge about INI configuration format and programming in [Go](https://go.dev/). +- Have a working local development setup with a reasonable good IDE or editor like [Visual Studio Code](https://code.visualstudio.com/docs/languages/go), [GoLand](https://www.jetbrains.com/go/) or [Vim](https://github.com/fatih/vim-go). + +## Issues + +### Create a new issue + +- [Check to make sure](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments) someone hasn't already opened a similar [issue](https://github.com/go-ini/ini/issues). +- If a similar issue doesn't exist, open a new issue using a relevant [issue form](https://github.com/go-ini/ini/issues/new/choose). + +### Pick up an issue to solve + +- Scan through our [existing issues](https://github.com/go-ini/ini/issues) to find one that interests you. +- The [good first issue](https://github.com/go-ini/ini/labels/good%20first%20issue) is a good place to start exploring issues that are well-groomed for newcomers. +- Do not hesitate to ask for more details or clarifying questions on the issue! +- Communicate on the issue you are intended to pick up _before_ starting working on it. +- Every issue that gets picked up will have an expected timeline for the implementation, the issue may be reassigned after the expected timeline. Please be responsible and proactive on the communication 🙇‍♂️ + +## Pull requests + +When you're finished with the changes, create a pull request, or a series of pull requests if necessary. + +Contributing to another codebase is not as simple as code changes, it is also about contributing influence to the design. Therefore, we kindly ask you that: + +- Please acknowledge that no pull request is guaranteed to be merged. +- Please always do a self-review before requesting reviews from others. +- Please expect code review to be strict and may have multiple rounds. +- Please make self-contained incremental changes, pull requests with huge diff may be rejected for review. +- Please use English in code comments and docstring. +- Please do not force push unless absolutely necessary. Force pushes make review much harder in multiple rounds, and we use [Squash and merge](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-pull-request-commits) so you don't need to worry about messy commits and just focus on the changes. + +## Your PR is merged! + +Congratulations 🎉🎉 Thanks again for taking the effort to have this journey with us 🌟 diff --git a/.gitignore b/.gitignore index 1241112..588388b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ ini.sublime-workspace testdata/conf_reflect.ini .idea /.vscode +.DS_Store