JoinColony / colonyNetwork

Colony Network smart contracts
https://colony.io/
GNU General Public License v3.0
436 stars 106 forks source link

Fix version check script #1278

Closed area closed 3 months ago

area commented 3 months ago

@chmanie 's eagle-eyes noted that it was suspicious that votingReputation had not had its version bumped, but every other extension had. He was right, we should have done as part of #1248 (at least).

I've reworked a fair chunk of the version check script, simply because some of it didn't work. Bash if statements remain a real blind spot for me, but this seems to work.

In summary:

The version bump means that some of the tests had to be updated, so I've written a upgradeExtensionOnceThenToLatest helper that mirrors the colony equivalent. Not my finest work (an ideal solution would be to look for all relevant ExtensionAddedToNetwork events and take the biggest number), but thanks to my local setup those specific tests for v9 motions are now hard to test locally, and I wanted this out the door to unblock things downstream. If they work locally for you, I'd appreciate you switching out that logic for something event-based. No longer required, managed to do it myself :smile:

area commented 3 months ago

Curious, how did my rebase not end up dismissing your review? Is it only if the rebase touches files that were previously approved?

kronosapiens commented 3 months ago

Good Q. My guess would be a rebase which does not touch PR-related files doesn't void the review.

More info: https://github.blog/changelog/2023-06-06-security-enhancements-to-required-approvals-on-pull-requests/