diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000000..7e197f37bc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,48 @@ +name: Bug Report +description: |- + Create an issue for incorrect content or content that should be there but is not. +title: "[Content Bug]: " +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this documentation bug report! + - type: dropdown + id: product + attributes: + label: Product + description: What documentation is this for? + options: + - Boundary + - Consul + - HCP + - Nomad + - Packer + - Sentinel + - Terraform + - Vagrant + - Vault + - Well-Architected Framework + - Other product + - No product + default: 0 + validations: + required: true + - type: input + id: which-page + attributes: + label: Which page? + description: The page URL + placeholder: https://developer.hashicorp.com/ + value: "https://developer.hashicorp.com/..." + validations: + required: true + - type: textarea + id: what-happened + attributes: + label: What is the issue? + description: Describe the issue - what content is incorrect? + placeholder: Tell us what you see! + value: "Something is not quite right with the content..." + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..d946cfa4ef --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,9 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: BUSL-1.1 + +blank_issues_enabled: false +contact_links: + - name: Nomad docs issue + url: https://github.com/hashicorp/nomad/issues + about: Create a Nomad docs issue in the Nomad repository. + \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000000..3f8728c7ee --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,40 @@ +name: Documentation Request +description: Request new or updated documentation. +title: "[Content Request]: " +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this documentation feature request! + - type: dropdown + id: product + attributes: + label: Product + description: What documentation is this for? + options: + - Boundary + - Consul + - HCP + - Nomad + - Packer + - Sentinel + - Terraform + - Vagrant + - Vault + - Well-Architected Framework + - Other product + - No product + default: 6 + validations: + required: true + - type: textarea + id: what + attributes: + label: |- + What would you like us to document? Be specific and provide as much detail as possible. + description: + placeholder: Please document how to... + value: "Please document how to..." + validations: + required: true + diff --git a/.github/advanced-issue-labeler.yml b/.github/advanced-issue-labeler.yml new file mode 100644 index 0000000000..6f80248a1d --- /dev/null +++ b/.github/advanced-issue-labeler.yml @@ -0,0 +1,34 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: BUSL-1.1 + +# Add a label to an issue based on the selected value of the Product drop down +# in the issue form. "name" is the label, and "keys" is the value in the +# bug-report and feature-request issue forms in the ISSUE_TEMPLATE directory. + +policy: +- template: [ bug-report.yml, feature-request.yml ] + section: + - id: [ product ] + label: + - name: 'Boundary' + keys: [ 'Boundary' ] + - name: 'Consul' + keys: [ 'Consul' ] + - name: 'HCP' + keys: [ 'HCP' ] + - name: 'Nomad' + keys: [ 'Nomad' ] + - name: 'Packer' + keys: [ 'Packer' ] + - name: 'Sentinel' + keys: [ 'Sentinel' ] + - name: 'Terraform CE' + keys: [ 'Terraform' ] + - name: 'Vagrant' + keys: [ 'Vagrant' ] + - name: 'Vault' + keys: [ 'Vault' ] + - name: 'WAF' + keys: [ 'Well-Architected Framework' ] + - name: 'Triage' + keys: ['No product', 'Other product'] \ No newline at end of file diff --git a/.github/workflows/label-issues.yml b/.github/workflows/label-issues.yml new file mode 100644 index 0000000000..82687bdb2a --- /dev/null +++ b/.github/workflows/label-issues.yml @@ -0,0 +1,41 @@ +# Apply a product label based on the product selected in the issue template's +# product list. +# +# https://github.com/marketplace/actions/advanced-issue-labeler +# https://github.com/redhat-plumbers-in-action/advanced-issue-labeler +# https://github.com/redhat-plumbers-in-action/issue-forms-automation/blob/main/.github/workflows/issue-labeler.yml + +# Inspired by: https://github.com/stefanbuck/ristorante +# See: https://stefanbuck.com/blog/codeless-contributions-with-github-issue-forms + +name: Issue labeler +on: + issues: + types: [ opened, edited ] + +jobs: + label-issues-policy: + runs-on: ubuntu-latest + permissions: + issues: write + + strategy: + matrix: + template: [ bug-report.yml, feature-request.yml ] + + steps: + - uses: actions/checkout@v3 + + - name: Parse issue form + uses: stefanbuck/github-issue-parser@v3 + id: issue-parser + with: + template-path: .github/ISSUE_TEMPLATE/${{ matrix.template }} + + - name: Set labels based on policy + uses: redhat-plumbers-in-action/advanced-issue-labeler@main + with: + issue-form: ${{ steps.issue-parser.outputs.jsonString }} + template: ${{ matrix.template }} + token: ${{ secrets.GITHUB_TOKEN }} +