[prdoc] Validate crate names (#3467)

Changes:
- Add CI script to check that the `crate` names that are mentioned in
prdocs are valid.

We can extend it lateron to also validate the correct SemVer bumps as
introduced in https://github.com/paritytech/polkadot-sdk/pull/3441.

Example output:
```pre
$ python3 .github/scripts/check-prdoc.py Cargo.toml prdoc/*.prdoc

🔎 Reading workspace polkadot-sdk/Cargo.toml.
📦 Checking 36 prdocs against 494 crates.
 All prdocs are valid.
```

Note that not all old prdocs pass the check since crates have been
renamed:
```pre
$ python3 .github/scripts/check-prdoc.py Cargo.toml prdoc/**/*.prdoc

🔎 Reading workspace polkadot-sdk/Cargo.toml.
📦 Checking 186 prdocs against 494 crates.
 Some prdocs are invalid.
💥 prdoc/1.4.0/pr_1926.prdoc lists invalid crate: node-cli
💥 prdoc/1.4.0/pr_2086.prdoc lists invalid crate: xcm-executor
💥 prdoc/1.4.0/pr_2107.prdoc lists invalid crate: xcm
💥 prdoc/1.6.0/pr_2684.prdoc lists invalid crate: xcm-builder

```

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2024-02-26 18:23:37 +01:00
committed by GitHub
parent d05f8c57fb
commit 4080632ee0
6 changed files with 83 additions and 4 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ migrations:
description: "Messages from the DMP dispatch queue will be moved over to the MQ pallet via `on_initialize`. This happens over multiple blocks and emits a `Completed` event at the end. The pallet can be un-deployed and deleted afterwards. Note that the migration reverses the order of messages, which should be acceptable as a one-off."
crates:
- name: cumulus_pallet_xcmp_queue
- name: cumulus-pallet-xcmp-queue
note: Pallet config must be altered according to the MR description.
host_functions: []
+1 -1
View File
@@ -1,7 +1,7 @@
# Schema: Parity PR Documentation Schema (prdoc)
# See doc at https://github.com/paritytech/prdoc
title: BEEFY: Support compatibility with Warp Sync - Allow Warp Sync for Validators
title: "BEEFY: Support compatibility with Warp Sync - Allow Warp Sync for Validators"
doc:
- audience: Node Operator
+1 -1
View File
@@ -6,4 +6,4 @@ doc:
Enable better req-response protocol versioning, by allowing for fallback requests on different protocols.
crates:
- name: sc_network
- name: sc-network
+1 -1
View File
@@ -13,5 +13,5 @@ doc:
crates:
- name: pallet-babe
- name: pallet-aura-ext
- name: cumulus-pallet-aura-ext
- name: pallet-session