From ab4b05adc65543c13f4b71cf3dc7e2967524f3d1 Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Wed, 14 Jul 2021 03:47:45 +0200 Subject: [PATCH] chore: add GitHub issue forms Signed-off-by: Mark Sagi-Kazar --- .github/.editorconfig | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 34 ------ .github/ISSUE_TEMPLATE/bug_report.yaml | 110 ++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 21 ---- .github/ISSUE_TEMPLATE/feature_request.yaml | 39 +++++++ 5 files changed, 150 insertions(+), 56 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yaml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yaml diff --git a/.github/.editorconfig b/.github/.editorconfig index 7bd3346..0902c6a 100644 --- a/.github/.editorconfig +++ b/.github/.editorconfig @@ -1,2 +1,2 @@ -[*.yml] +[{*.yml,*.yaml}] indent_size = 2 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index de8e272..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: 🐛 Bug report -about: Report a bug to help us improve Viper -labels: kind/bug ---- - - -**Expected behavior (what you expected to happen)**: - -**Actual behavior (what actually happened)**: - -**Repl.it link**: - - -**Code reproducing the issue**: - - -```go - -``` - - - -**Environment**: -- Viper version: -- Config source: -- File format: - -**Anything else we should know?**: diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000..93b7494 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,110 @@ +name: 🐛 Bug report +description: Report a bug to help us improve Viper +labels: [kind/bug] +body: +- type: markdown + attributes: + value: | + Thank you for submitting a bug report! + + Please fill out the template below to make it easier to debug your problem. + + If you are not sure if it is a bug or not, you can contact us via the available [support channels](https://github.com/spf13/viper/issues/new/choose). +- type: checkboxes + attributes: + label: Preflight Checklist + description: Please ensure you've completed all of the following. + options: + - label: I have searched the [issue tracker](https://www.github.com/spf13/viper/issues) for an issue that matches the one I want to file, without success. + required: true + - label: I am not looking for support or already pursued the available [support channels](https://github.com/spf13/viper/issues/new/choose) without success. + required: true +- type: input + attributes: + label: Version + description: What version of Viper are you using? + placeholder: 1.8.1 + validations: + required: true +- type: dropdown + attributes: + label: Config Source + description: What sources do you load configuration from? + options: + - Manual set + - Flags + - Environment variables + - Files + - Remove K/V stores + - Defaults + multiple: true + validations: + required: true +- type: dropdown + attributes: + label: Format + description: Which file formats do you use? + options: + - JSON + - YAML + - TOML + - Dotenv + - HCL + - Java properties + - INI + - Other (specify below) + multiple: true +- type: input + attributes: + label: Repl.it link + description: Complete example on Repl.it reproducing the issue. [Here](https://repl.it/@sagikazarmark/Viper-example) is an example you can use. + placeholder: https://repl.it/@sagikazarmark/Viper-example +- type: textarea + attributes: + label: Code reproducing the issue + description: Please provide a Repl.it link if possible. + render: go + placeholder: | + package main + + import ( + "github.com/spf13/viper" + ) + + func main() { + v := viper.New() + + // ... + + var config Config + + err = v.Unmarshal(&config) + if err != nil { + panic(err) + } + } +- 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: Actual Behavior + description: A clear description of what actually happens. + validations: + required: true +- type: textarea + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior if it is not self-explanatory. + placeholder: | + 1. In this environment... + 2. With this config... + 3. Run '...' + 4. See error... +- type: textarea + attributes: + label: Additional Information + description: Links? References? Anything that will give us more context about the issue that you are encountering! diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 22056f9..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: 🚀 Feature request -about: Suggest an idea for Viper -labels: kind/enhancement ---- - - -**Is your feature request related to a problem? Please describe.** - - -**Describe the solution you'd like to see** - - -**Describe alternatives you've considered** - - -**Additional context** - diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 0000000..a2e4e74 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,39 @@ +name: 🚀 Feature request +description: Suggest an idea for Viper +labels: [kind/enhancement] +body: +- type: markdown + attributes: + value: | + Thank you for submitting a feature request! + + Please describe what you would like to change/add and why in detail by filling out the template below. + + If you are not sure if your request fits into Viper, you can contact us via the available [support channels](https://github.com/spf13/viper/issues/new/choose). +- type: checkboxes + attributes: + label: Preflight Checklist + description: Please ensure you've completed all of the following. + options: + - label: I have searched the [issue tracker](https://www.github.com/spf13/viper/issues) for an issue that matches the one I want to file, without success. + required: true +- type: textarea + attributes: + label: Problem Description + description: A clear and concise description of the problem you are seeking to solve with this feature request. + validations: + required: true +- type: textarea + attributes: + label: Proposed Solution + description: A clear and concise description of what would you like to happen. + validations: + required: true +- type: textarea + attributes: + label: Alternatives Considered + description: A clear and concise description of any alternative solutions or features you've considered. +- type: textarea + attributes: + label: Additional Information + description: Add any other context about the problem here.