Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e9d429d
fix: test 8D by removing unecessary intercept and testid updates
kneerose Feb 14, 2025
30c7603
chore: update test id of guardrailsScript checkbox
kneerose Feb 14, 2025
5299bbd
feat: add method to calculate total abstain votes for DRep proposals
kneerose Feb 17, 2025
a5ad666
fix: remove dRepNotVoted assertion
kneerose Feb 17, 2025
7b615e3
fix: await page interaction in proposal show-all-button
kneerose Feb 17, 2025
adc750a
feat: add guardrails script handling in proposal submission
kneerose Feb 17, 2025
2f48a4c
fix: add dynamic CORS middleware to handle cross-origin requests
kneerose Feb 17, 2025
bc801ce
fix(#2929): fix high severity code smells
MSzalowski Feb 13, 2025
810ac8b
fix: type error on voting threshold value
MSzalowski Feb 14, 2025
549d7a2
refactor: use different url and hash for validation in generateValidP…
kneerose Feb 17, 2025
d8d0f07
Merge pull request #3005 from IntersectMBO/fix/enable-metadata-api-cors
kneerose Feb 17, 2025
3073c1d
Merge pull request #3004 from IntersectMBO/fix/report-315-failing-tests
kneerose Feb 17, 2025
8b53e30
refactor: replace hardcoded proposal type filters with dynamic values…
kneerose Feb 17, 2025
1449fed
feat: add and handle motionOfNoConfidence type proposal
kneerose Feb 17, 2025
285a821
Merge pull request #3011 from IntersectMBO/tests/motion-of-no-confidence
kneerose Feb 17, 2025
09e1c63
Merge pull request #2991 from IntersectMBO/fix/2929-sonarcloud-multip…
MSzalowski Feb 17, 2025
08c26fc
feat(#2993): allow searching for yourself in DRep directory
MSzalowski Feb 14, 2025
27fa10d
Merge pull request #2995 from IntersectMBO/feat/2993-drep-should-be-a…
MSzalowski Feb 17, 2025
260c8c1
fix(#2994): fix refetching the drep directory
MSzalowski Feb 17, 2025
4649ff3
Merge pull request #3013 from IntersectMBO/fix/2994-drep-directory-sh…
MSzalowski Feb 18, 2025
eb06b42
feat(#2984): add mathematical styling inside governance action metadata
MSzalowski Feb 17, 2025
66d3d5d
Merge pull request #3012 from IntersectMBO/feat/2984-add-mathematical…
MSzalowski Feb 18, 2025
17a882b
chore: add script to update GovTool version
MSzalowski Feb 18, 2025
a6cb9b9
Merge pull request #3014 from IntersectMBO/chore/add-script-to-update…
MSzalowski Feb 18, 2025
5dc6631
fix: wrong path to main metadata validation file
MSzalowski Feb 18, 2025
f144555
Merge pull request #3015 from IntersectMBO/chore/add-script-to-update…
MSzalowski Feb 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions .github/workflows/update-govtool-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Update GovTool Version and Changelog

on:
workflow_dispatch:
inputs:
version:
description: "New version (e.g., 1.0.0)"
required: true

jobs:
update-version:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org/"
node-version-file: "./govtool/frontend/.nvmrc"
scope: "@intersect.mbo"

- name: Set Version Variable
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV

- name: Update package.json files and install dependencies
run: |
jq --arg v "$VERSION" '.version = $v' govtool/frontend/package.json > temp.json && mv temp.json govtool/frontend/package.json
jq --arg v "$VERSION" '.version = $v' govtool/metadata-validation/package.json > temp.json && mv temp.json govtool/metadata-validation/package.json

echo "Running npm install to update lock files..."
cd govtool/frontend && npm install && cd ../..
cd govtool/metadata-validation && npm install && cd ../..

- name: Update vva-be.cabal version (Preserve Spacing)
run: |
sed -i -E "s/^(version:[[:space:]]+)[0-9]+\.[0-9]+\.[0-9]+/\1$VERSION/" govtool/backend/vva-be.cabal
echo "✅ Updated version in vva-be.cabal while preserving spacing."

- name: Update Dockerfile Versions
run: |
sed -i -E "s/vva-be-[0-9]+\.[0-9]+\.[0-9]+/vva-be-$VERSION/g" govtool/backend/Dockerfile
sed -i -E "s/vva-be-[0-9]+\.[0-9]+\.[0-9]+/vva-be-$VERSION/g" govtool/backend/Dockerfile.qovery
echo "✅ Updated vva-be version in Dockerfiles."

- name: Update Metadata Validation API Version
run: |
sed -i -E "s/(\.setVersion\()[\"'][0-9]+\.[0-9]+\.[0-9]+[\"']/\1\"$VERSION\"/" govtool/metadata-validation/src/main.ts
echo "✅ Updated API version in main.ts"

- name: Update CHANGELOG.md
run: |
#!/bin/bash
VERSION="${{ github.event.inputs.version }}"
TODAY=$(date +%Y-%m-%d)
RELEASE_TAG="v$VERSION"
RELEASE_LINK="[v$VERSION](https://github.com/IntersectMBO/govtool/releases/tag/$RELEASE_TAG)"
TEMP_FILE=$(mktemp)

echo "Updating CHANGELOG.md with version $VERSION and date $TODAY..."

awk -v rl="$RELEASE_LINK" -v td="$TODAY" '
BEGIN { unreleased_found = 0; print_new_unreleased = 1 }
{
if ($1 == "##" && $2 == "[Unreleased]") {
unreleased_found = 1

# Print the new Unreleased section with required sub-sections
print "## [Unreleased]\n"
print "### Added\n"
print "### Fixed\n"
print "### Changed\n"
print "### Removed\n"

# Rename the old Unreleased section with a version and date
print "## " rl " " td "\n"
next
}
print
}' CHANGELOG.md > "$TEMP_FILE"

mv "$TEMP_FILE" CHANGELOG.md

echo "✅ CHANGELOG.md updated successfully!"

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: "chore/update-govtool-to-v${{ github.event.inputs.version }}"
title: "Update GovTool to v${{ github.event.inputs.version }}"
commit-message: "chore: update GovTool to v${{ github.event.inputs.version }}"
body: |
This PR updates GovTool to version `${{ github.event.inputs.version }}`.


Workflow executed by `@${{ github.actor }}`.
sign-commits: true
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ changes.
- Add support for submitting all 7 governance action types [Issue 2258](https://github.com/IntersectMBO/govtool/issues/2258)
- Add workflow to automatically update any of the @intersect.mbo package [Issue 2968](https://github.com/IntersectMBO/govtool/issues/2968)
- Add Propose Governance Action button in governance actions dashboard [Issue 1188](https://github.com/IntersectMBO/govtool/issues/1188)
- Add click handlers to non-interactive elements [Issue 2929](https://github.com/IntersectMBO/govtool/issues/2929)
- Allow searching for yourself in DRep Directory [Issue 2993](https://github.com/IntersectMBO/govtool/issues/2993)
- Add mathematical styling for governance actions [Issue 2984](https://github.com/IntersectMBO/govtool/issues/2984)
- Add script to update GovTool version

### Fixed

- Fix calculating votes counting for governance actions
- Fix crashing backend on unhandled missing proposal from vote [Issue 2920](https://github.com/IntersectMBO/govtool/issues/2920)
- Remove abstain votes (not auto abstain) from total DRep stake
- Fix counting committee members [Issue 2948](https://github.com/IntersectMBO/govtool/issues/2948)
- Fix refetching DRep list on every enter [Issue 2994](https://github.com/IntersectMBO/govtool/issues/2994)

### Changed

Expand Down
1 change: 1 addition & 0 deletions govtool/frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ module.exports = {
},
],
"react/require-default-props": "off",
"react/no-unstable-nested-components": "off",

// TODO: This rule should be enabled in the future
"react-hooks/exhaustive-deps": "off",
Expand Down
Loading