From a0daabb897ee7c05be3f710128ea00e6da2e0c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Respaut?= Date: Fri, 17 Mar 2023 11:50:39 +0100 Subject: [PATCH] AZ-989: Github templates and configs --- .config/tflint.hcl | 2 +- .github/ISSUE_TEMPLATE/Bug_Report.yml | 98 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/Documentation.yml | 16 ++++ .github/ISSUE_TEMPLATE/Feature_Request.yml | 47 +++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/pull_request_template.md | 16 ++++ .github/workflows/github-ci.yml | 2 +- .pre-commit-config.yaml | 1 + 8 files changed, 181 insertions(+), 2 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/Bug_Report.yml create mode 100644 .github/ISSUE_TEMPLATE/Documentation.yml create mode 100644 .github/ISSUE_TEMPLATE/Feature_Request.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/pull_request_template.md diff --git a/.config/tflint.hcl b/.config/tflint.hcl index 4e7a772..6cf31d9 100644 --- a/.config/tflint.hcl +++ b/.config/tflint.hcl @@ -1,7 +1,7 @@ plugin "azurerm" { enabled = true source = "github.com/terraform-linters/tflint-ruleset-azurerm" - version = "0.20.0" + version = "0.21.0" } config { diff --git a/.github/ISSUE_TEMPLATE/Bug_Report.yml b/.github/ISSUE_TEMPLATE/Bug_Report.yml new file mode 100644 index 0000000..e1c2741 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Bug_Report.yml @@ -0,0 +1,98 @@ +name: Bug Report +description: If something isn't working as expected. +title: "[BUG] ..." +labels: [bug] +body: + - type: textarea + id: community + attributes: + label: Community Note + description: This note is for the community, please leave and skip this. + value: | + + + * Please vote on this issue by adding a :thumbsup: [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request + * Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request + * If you are interested in working on this issue or have submitted a pull request, please leave a comment + + + validations: + required: true + - type: input + id: terraform + attributes: + label: Terraform Version + description: Which Terraform version are you using? + placeholder: 1.0.0 + validations: + required: true + - type: input + id: azurerm + attributes: + label: AzureRM Provider Version + description: Which AzureRM Provider version are you using? + placeholder: 3.0.0 + validations: + required: true + - type: input + id: resource + attributes: + label: Affected Resource(s)/Data Source(s) + description: Please list the affected resources and/or data sources. + placeholder: azurerm_XXXXX + validations: + required: true + - type: textarea + id: config + attributes: + label: Terraform Configuration Files + description: | + Please provide a minimal Terraform configuration that can reproduce the issue. + + For large Terraform configs, please use a service like Dropbox and share a link to the ZIP file. + render: hcl + validations: + required: true + - type: textarea + id: debug + attributes: + label: Debug Output/Panic Output + description: | + For long debug logs please provide a link to a GitHub Gist containing the complete debug output. Please do NOT paste the debug output in the issue; just paste a link to the Gist. + + To obtain the debug output, see the [Terraform documentation on debugging](https://www.terraform.io/docs/internals/debugging.html). + render: shell + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected Behaviour + description: What should have happened? + - type: textarea + id: actual + attributes: + label: Actual Behaviour + description: What actually happened? + - type: textarea + id: reproduce + attributes: + label: Steps to Reproduce + description: | + Please list the steps required to reproduce the issue, e.g. + + 1. `terraform apply` + - type: input + id: facts + attributes: + label: Important Factoids + description: | + Are there anything atypical about your accounts that we should know? For example: Running in a Azure China/Germany/Government? + - type: textarea + id: references + attributes: + label: References + description: | + Information about referencing Github Issues: https://help.github.com/articles/basic-writing-and-formatting-syntax/#referencing-issues-and-pull-requests + + Are there any other GitHub issues (open or closed) or pull requests that should be linked here? Such as vendor documentation? diff --git a/.github/ISSUE_TEMPLATE/Documentation.yml b/.github/ISSUE_TEMPLATE/Documentation.yml new file mode 100644 index 0000000..4b9ad5f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Documentation.yml @@ -0,0 +1,16 @@ +name: Documentation +description: Additions, improvement or patch about documentation +title: "[DOC] ..." +labels: [documentation, enhancement] +body: + - type: textarea + id: description + attributes: + label: Description + description: Please leave a helpful description. + value: | + **Explain what part of documentation is missing or not enough** + Like I don't understand how to do this, or it miss context for that.. + + **Give us some suggestions** + Here are some suggestions or, even better, here is a pull request. diff --git a/.github/ISSUE_TEMPLATE/Feature_Request.yml b/.github/ISSUE_TEMPLATE/Feature_Request.yml new file mode 100644 index 0000000..63a9387 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Feature_Request.yml @@ -0,0 +1,47 @@ +name: Feature Request +description: I have a suggestion (and might want to implement myself)! +title: "[FEAT] ..." +labels: [feature, enhancement] +body: + - type: textarea + id: community + attributes: + label: Community Note + description: This note is for the community, please leave and skip this. + value: | + + + * Please vote on this issue by adding a :thumbsup: [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request + * Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request + * If you are interested in working on this issue or have submitted a pull request, please leave a comment + + + validations: + required: true + - type: textarea + id: description + attributes: + label: Description + description: Please leave a helpful description of the feature request here. + validations: + required: true + - type: input + id: resource + attributes: + label: New or Affected Resource(s)/Data Source(s) + description: Please list the new or affected resources and/or data sources. + placeholder: azurerm_XXXXX + validations: + required: true + - type: textarea + id: config + attributes: + label: Potential Terraform Configuration + description: Please provide an example of what the new resource or enhancement could look like in a Terraform config. + render: hcl + - type: textarea + id: references + attributes: + label: References + description: | + Information about referencing Github Issues: https://help.github.com/articles/basic-writing-and-formatting-syntax/#referencing-issues-and-pull-requests 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/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..44ceb39 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,16 @@ +Fixes #(issue) . + +## Type of change + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update + +## Changes proposed in this pull request + +- +- +- + +@claranet/fr-azure-reviewers diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index fd0bc84..cb5f7d0 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -1,5 +1,5 @@ name: CI -on: [push] +on: [push, pull_request] jobs: ci: uses: claranet/terraform-modules-ci/.github/workflows/ci-modules.yaml@main diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b9aac5b..ecd361c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,6 +19,7 @@ repos: - id: terraform_docs args: - --args=--config=.config/terraform-docs.yml + exclude: '^modules|^example|^tools' - id: terraform_validate exclude: ^examples - id: terraform_tflint