diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 9e39de450..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: Bug report -about: You might have found a bug and decide to report it -title: '' -labels: 'bug :bug:' -assignees: '' ---- - -## Context & versions - - -## Steps to reproduce - - -## Actual behavior - - -## Expected behavior - diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..39d8893a8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,96 @@ +name: 🐛 Bug report +description: You found a bug! +title: '🐛 ' +labels: ["🐛 Bug"] +projects: ["IntersectMBO/projects/30", "IntersectMBO/projects/34"] +body: + - type: markdown + attributes: + value: | + ## 🌟 **Thank you for contributing to GovTool!** + - type: markdown + attributes: + value: | + Before submitting a new issue please check the [existing issues](https://github.com/IntersectMBO/govtool/issues) to avoid duplication. + + - type: dropdown + id: area + attributes: + label: Area + description: What part of GovTool does this feature affect? + options: + - Proposal Pillar + - Voting Pillar + - Delegation Pillar + - Wrapper + - Other + - Not sure + validations: + required: true + + - type: dropdown + id: domain + attributes: + label: Domain + description: Which GovTool instance were you connected to? + options: + - sanchogov.tools + - dev-sanchogov.tools + - test-sanchogov.tools + - stage-sanchogov.tools + - preview.gov.tools + - Custom setup + validations: + required: true + + - type: input + id: wallet + attributes: + label: Which wallet were you using? + description: Please provide which wallet and version you were using + placeholder: | + Eternl wallet v1.12.6.6 + validations: + required: false + + - type: textarea + id: context + attributes: + label: Context + description: Please give the context to what you were trying to achieve + placeholder: | + I was trying to register as a DRep and the following happened... + validations: + required: true + + - type: textarea + id: reproduce + attributes: + label: Steps to reproduce + description: Explain the steps to reproduce + placeholder: | + 1. Connect wallet + 2. Navigate to the dashboard + 3. Click on "Register as DRep" + validations: + required: true + + - type: textarea + id: actual-behavior + attributes: + label: Actual behavior + description: A description of the erroneous outcome + placeholder: | + A error came up on the screen stating... + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + description: A description of what you expect to happen instead + placeholder: | + The DRep registration transaction was sent and I was registered + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_idea.yml b/.github/ISSUE_TEMPLATE/feature_idea.yml index 67f24bc04..35f82a52b 100644 --- a/.github/ISSUE_TEMPLATE/feature_idea.yml +++ b/.github/ISSUE_TEMPLATE/feature_idea.yml @@ -1,44 +1,87 @@ -name: Feature idea +name: 💡 Feature idea description: Idea or request for some feature on the GovTool roadmap -labels: [':thought_balloon: idea'] +title: "💡 " +projects: ["IntersectMBO/projects/30", "IntersectMBO/projects/34"] body: - type: markdown attributes: - value: value: | - **Thank you for contributing to our project!** :green_heart: + ## 🌟 **Thank you for contributing to GovTool!** + - type: markdown + attributes: + value: | + Before submitting a new issue consider [starting a new discussion](https://github.com/IntersectMBO/govtool/discussions/new?category=ideas). - Instead of opening this issue, consider [starting a new idea discussion](https://github.com/IntersectMBO/govtool/discussions/new?category=ideas). - That way, we can discuss & refine your idea together, before we adopt it as a feature into the roadmap. + - type: dropdown + id: area + attributes: + label: Area + description: What part of GovTool does this feature affect? + options: + - Proposal Pillar + - Voting Pillar + - Delegation Pillar + - Wrapper + - Other + - Not sure + validations: + required: true - - type: textarea - id: why + - type: dropdown + id: design-needed attributes: - label: Why - description: Why do we need or want this feature - placeholder: | - Give context and describe the problem, challenge or opportunity you see + label: Is there new design needed? + description: Will this feature require new or edit to existing frontend designs? + options: + - 'Yes' + - 'No' + - Not sure validations: required: true - type: textarea id: what attributes: - label: What - description: What is this feature roughly about + label: What? + description: What is this feature? placeholder: | - For example describe a new API endpoint, a change in messaging formats, + For example describe a new API endpoint, a change in wording, a new configuration option, ... validations: required: true + - type: textarea + id: why + attributes: + label: Why? + description: Why do we need or want this feature? + placeholder: | + Give context and describe the problem the idea solves + validations: + required: true + - type: textarea id: how attributes: - label: How - description: How could we realize this feature + label: How? + description: How can we realize this feature? placeholder: | Which technical solutions, libraries or systems should be used, which components need to change, steps how to implement this, ... validations: required: true + + - type: markdown + attributes: + value: | + --- + + - type: textarea + id: user-story + attributes: + label: (Optional) User Story with acceptance criteria + description: See GovTool examples [here](https://github.com/IntersectMBO/cardano-test-plans/blob/main/userStoryInventoryChangHF.md#2g-delegate-to-self-for-registered-dreps). + placeholder: | + As a [ada holder | DRep | Direct voter], I want [some goal] so that [some reason]. + validations: + required: false \ No newline at end of file diff --git a/.github/images/voltaire-govtool-header.png b/.github/images/voltaire-govtool-header.png new file mode 100644 index 000000000..7fa135a88 Binary files /dev/null and b/.github/images/voltaire-govtool-header.png differ diff --git a/.github/workflows/label-bug-report.yml b/.github/workflows/label-bug-report.yml new file mode 100644 index 000000000..230ffefc0 --- /dev/null +++ b/.github/workflows/label-bug-report.yml @@ -0,0 +1,54 @@ +name: Add labels to 🐛 Bug report issues + +on: + issues: + types: [opened, edited] + +permissions: + issues: write + contents: read + +jobs: + apply-labels: + runs-on: ubuntu-latest + steps: + - name: Check if issue is a "🐛 Bug report" + id: check_is_bug_report + run: | + echo "## Checking if issue is a 'Feature idea'..." + if [[ "${{ github.event.issue.title }}" == "🐛 "* ]]; then + echo "is_bug_report=true" >> $GITHUB_ENV + else + echo "is_bug_report=false" >> $GITHUB_ENV + fi + + - name: Apply label based on feature area + if: ${{ env.is_bug_report == 'true' }} + uses: actions/github-script@v6 + with: + script: | + const areaMap = { + "Proposal Pillar": "📜 Proposal Pillar", + "Voting Pillar": "🗳️ Voting Pillar", + "Delegation Pillar": "♟️ Delegation Pillar", + "Wrapper": "🎁 Wrapper", + "Other": "Other area", + "Not sure": "❓Unknown area", + }; + + const issueBody = context.payload.issue.body; + + // Match the Area selected under the "### Area" header + const areaMatch = issueBody.match(/### Area\s*\n\s*(.*)\s*\n/); + const area = areaMatch ? areaMatch[1].trim() : null; + + const labelToAdd = areaMap[area]; + + if (labelToAdd) { + await github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: [labelToAdd], + }); + } diff --git a/.github/workflows/label-feature-issue.yml b/.github/workflows/label-feature-issue.yml new file mode 100644 index 000000000..9ef4d6c86 --- /dev/null +++ b/.github/workflows/label-feature-issue.yml @@ -0,0 +1,92 @@ +name: Add labels to 💡 Feature idea issues + +on: + issues: + types: [opened, edited] + +permissions: + issues: write + contents: read + +jobs: + apply-labels: + runs-on: ubuntu-latest + steps: + - name: Check if issue is a "💡 Feature idea" + id: check_is_feature_idea + run: | + echo "## Checking if issue is a 'Feature idea'..." + if [[ "${{ github.event.issue.title }}" == "💡 "* ]]; then + echo "is_feature_idea=true" >> $GITHUB_ENV + else + echo "is_feature_idea=false" >> $GITHUB_ENV + fi + + - name: Apply label based on feature area + if: ${{ env.is_feature_idea == 'true' }} + uses: actions/github-script@v6 + with: + script: | + const areaMap = { + "Proposal Pillar": "📜 Proposal Pillar", + "Voting Pillar": "🗳️ Voting Pillar", + "Delegation Pillar": "♟️ Delegation Pillar", + "Wrapper": "🎁 Wrapper", + "Other": "Other area", + "Not sure": "❓Unknown area", + }; + + const issueBody = context.payload.issue.body; + + // Match the Area selected under the "### Area" header + const areaMatch = issueBody.match(/### Area\s*\n\s*(.*)\s*\n/); + const area = areaMatch ? areaMatch[1].trim() : null; + + const labelToAdd = areaMap[area]; + + if (labelToAdd) { + await github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: [labelToAdd], + }); + } + + - name: Apply "🎨 Design Needed" label if design needed is "Yes" + if: ${{ env.is_feature_idea == 'true' }} + uses: actions/github-script@v6 + with: + script: | + const issueBody = context.payload.issue.body; + + // Match the "Yes" selection under the "### Is there new design needed?" header + const designNeededMatch = issueBody.match(/### Is there new design needed\?\s*\n\s*Yes\s*\n/); + + if (designNeededMatch) { + await github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ["🎨 Design Needed"], + }); + } + + - name: Apply "User Story Needed" label if user story not provided + if: ${{ env.is_feature_idea == 'true' }} + uses: actions/github-script@v6 + with: + script: | + const issueBody = context.payload.issue.body; + + const userStoryPattern = /### \(Optional\) User Story with acceptance criteria\s*\n\s*_No response_/; + const userStoryMissing = userStoryPattern.test(issueBody); + + if (userStoryMissing) { + await github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ["User Story Needed"], + }); + } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d1107ada0..677cd86cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ changes. - Unsancho GovTool [Issue 1637](https://github.com/IntersectMBO/govtool/issues/1637) - Add network metrics model to frontend service +- Added workflows to add labels to issues ### Fixed @@ -25,7 +26,9 @@ changes. ### Changed -- Changed stake key registration to use the newer Conway type of certificate +- Changed stake key registration to use the newer Conway type of certificate +- Changed and improved issue templates +- Changed wording and image in base README ## [sancho-v1.0.12](https://github.com/IntersectMBO/govtool/releases/tag/sancho-v1.0.12) 2024-08-01 diff --git a/README.md b/README.md index ee04c954d..5838b7bd8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
- +
@@ -18,18 +18,32 @@ ## 🌄 Purpose -The Voltaire GovTool enables ada holders to experience some of the governance features described in [CIP-1694](https://github.com/cardano-foundation/CIPs/blob/master/CIP-1694/README.md) and to test governance features. -The Voltaire GovTool is currently open for preview testing and can be accessed at [preview.gov.tools](https://preview.gov.tools/). +The Voltaire GovTool enables ada holders to experience the governance features described in [CIP-1694](https://github.com/cardano-foundation/CIPs/blob/master/CIP-1694/README.md). -Learn more; [docs.sanchogov.tools](https://docs.sanchogov.tools/). +### Instances + +#### Mainnet + +- *Coming soon* + +#### SanchoNet + +- [sanchogov.tools](https://sanchogov.tools/) + +#### Preview Testnet + +- [preview.gov.tools](https://preview.gov.tools/) + +### Documentation + +Learn more; [docs.gov.tools](https://docs.gov.tools/). ## 📍 Navigation -- [GovTool Backend](./govtool/backend/README.md) -- [GovTool Frontend](./govtool/frontend/README.md) -- [GovTool Infrastructure](./infra/terraform/README.md) -- [GovTool deployment process](./scripts/govtool/README.md) -- [Documentation](./docs/) +- [Backend](./govtool/backend/README.md) +- [Frontend](./govtool/frontend/README.md) +- [Infrastructure](./infra/terraform/README.md) +- [In repo documentation](./docs/) - [Tests](./tests/) ### Utilities @@ -50,6 +64,4 @@ Frontend is able to connect to Cardano wallets over the [CIP-30](https://github. Thanks for considering contributing and helping us on creating GovTool! 😎 -⚠️ We are in the process of improving our contributing documentation, improvements to come. - Please checkout our [Contributing Documentation](./CONTRIBUTING.md).