Skip to content

Commit

Permalink
CI: Detect duplicate versions in the CHANGELOG (#402)
Browse files Browse the repository at this point in the history
<!-- Remember that you can run `/merge` to enable auto-merge in the PR
-->

<!-- Remember to modify the changelog. If you don't need to modify it,
you can check the following box.
Instead, if you have already modified it, simply delete the following
line. -->

- [x] Does not require a CHANGELOG entry
  • Loading branch information
bkchr authored Jul 29, 2024
1 parent a17f1e6 commit 87467d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
9 changes: 9 additions & 0 deletions .github/changelog-processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
lines = changelog.readlines()

if args.validate_changelog:
versions = set()

for line in lines:
if line.startswith("##"):
if line.startswith("###"):
Expand All @@ -57,6 +59,13 @@
print("Only Major.Minor.Patch are supported as versioning")
print(line)
sys.exit(-1)
else:
version = line.strip().removeprefix("## [").split("]")[0]
if version in versions:
print("Found version '" + version + "' more than once")
sys.exit(-1)
else:
versions.add(version)
elif line.startswith("#"):
if line.strip() != "# Changelog":
print("Line starting with `#` is only allowed for `# Changelog`")
Expand Down
13 changes: 3 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

- Kusama: Relay General Admin Origin mapping to xcm Location ([polkadot-fellows/runtimes#383](https://github.com/polkadot-fellows/runtimes/pull/383))
- Encointer, PeopleKusama, PeoplePolkadot: Configure delivery fees for UMP ([polkadot-fellows/runtimes#390](https://github.com/polkadot-fellows/runtimes/pull/390))

### Changed

- Bounties: Remove payout delay ([polkadot-fellows/runtimes#386](https://github.com/polkadot-fellows/runtimes/pull/386))
- Polkadot System Chains: Reduce the base transaction fee by half

## [1.2.8] 03.07.2024

### Added

- All runtimes: XcmPaymentApi and DryRunApi ([polkadot-fellows/runtimes#380](https://github.com/polkadot-fellows/runtimes/pull/380))

#### From [#322](https://github.com/polkadot-fellows/runtimes/pull/322):
Expand Down Expand Up @@ -50,6 +40,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Changed

- Bounties: Remove payout delay ([polkadot-fellows/runtimes#386](https://github.com/polkadot-fellows/runtimes/pull/386))
- Polkadot System Chains: Reduce the base transaction fee by half

#### From [#322](https://github.com/polkadot-fellows/runtimes/pull/322):

- AdaptPrice trait is now price controlled ([SDK v1.13 #4521](https://github.com/paritytech/polkadot-sdk/pull/4521)).
Expand Down

0 comments on commit 87467d3

Please sign in to comment.