# Inspired by:
# - The previous RFC template.
# - the OpenTofu RFC template: https://raw.githubusercontent.com/opentofu/opentofu/main/.github/ISSUE_TEMPLATE/rfc.yml

name: RFC
description: Submit a Request For Comments (RFC) to significantly change Terragrunt.
labels: ["rfc", "pending-decision"]
body:
  - type: markdown
    attributes:
      value: |
        # Request For Comments

        This form will guide you through the process for submitting a Request For Comments (RFC) for a change.

        ## Before you start

        - Make sure you search for an issue that would already cover your RFC in the [issues tab](https://github.com/gruntwork-io/terragrunt/issues?q=is%3Aissue).
        - Search through [Terragrunt documentation](https://docs.terragrunt.com/) to see if your RFC is already supported.

        ## After you submit

        - Share your RFC with your community for feedback and reactions! The more activity and feedback you get, the more likely it is to be reviewed by the maintainers.
        - If your RFC has enough traction, it will be reviewed by the maintainers and a decision will be made.
        - Once a decision is made, one of two things will happen:
          1. If the RFC is accepted, the `pending-decision` label will be replaced with the `accepted` label. At this stage, pull requests can be submitted by maintainers or the community to implement the RFC, with a description including `Closes #<RFC number>`.
          2. If the RFC is rejected, the `pending-decision` label will be replaced with the `rejected` label. The maintainers will provide a reason for the rejection. If applicable, it might be made clear that a new RFC with changes is welcome.

  - type: textarea
    id: summary
    attributes:
      label: Summary
      description: A brief summary of the RFC.
    validations:
      required: true

  - type: textarea
    id: motivation
    attributes:
      label: Motivation
      description: What is the problem you're trying to solve? What are the goals you're trying to achieve?
    validations:
      required: true

  - type: textarea
    id: proposal
    attributes:
      label: Proposal
      description: |
        In a manner that is as specific as possible, describe the proposal you have in mind. This should include:
        - As minimally technical a description of the proposal as possible.
        - An explanation of how the proposal addresses the motivation above.
        - Examples of how the proposal might present itself to a user if implemented.
    validations:
      required: true

  - type: textarea
    id: technical-details
    attributes:
      label: Technical Details
      description: |
        Provide technical details for the proposal. This should include:
        - List of components that will be affected by the proposal.
        - How those components will be affected.
        - Any documentation that will help in understanding or developing a solution to the proposal.
    validations:
      required: true

  - type: textarea
    id: press-release
    attributes:
      label: Press Release
      description: If this RFC were implemented, how would you describe it to the community in a mock press release?
    validations:
      required: true

  - type: textarea
    id: drawbacks
    attributes:
      label: Drawbacks
      description: What are the drawbacks of the proposal, if any?
    validations:
      required: false

  - type: textarea
    id: alternatives
    attributes:
      label: Alternatives
      description: What are the alternatives to the proposal, if any?
    validations:
      required: false

  - type: textarea
    id: migration-strategy
    attributes:
      label: Migration Strategy
      description: If this proposal requires a migration strategy for existing code bases, what is it?
    validations:
      required: false

  - type: textarea
    id: unresolved-questions
    attributes:
      label: Unresolved Questions
      description: |
        What parts of the proposal are still unresolved?
        - Is there anything that you're unsure about?
        - Are there any questions that you have that you haven't answered yet?
        - Would you like to encourage feedback on any particular part of the proposal you haven't fully fleshed out?
    validations:
      required: false

  - type: textarea
    id: references
    attributes:
      label: References
      description: |
        Are there any references that should be linked here?
        - Links to other RFCs, issues, or documentation.
    validations:
      required: false

  - type: textarea
    id: poc-pull-request
    attributes:
      label: Proof of Concept Pull Request
      description: If you have a proof of concept or an in-draft pull request that demonstrates the proposal, please link it here.
    validations:
      required: false

  - type: checkboxes
    id: support
    attributes:
      label: Support Level
      description: Please let us know if you are a paying customer. This helps us prioritize RFCs that are important to our customers.
      options:
        - label: I have Terragrunt Enterprise Support
          required: false
        - label: I am a paying Gruntwork customer
          required: false

  - type: input
    id: customer-name
    attributes:
      label: Customer Name
      description: If you are a paying Gruntwork customer, please provide your name.
    validations:
      required: false
