Skip to content

Commit

Permalink
Merge branch 'main' into ddc-secretary-collective
Browse files Browse the repository at this point in the history
  • Loading branch information
Doordashcon authored May 20, 2024
2 parents c203940 + 3ccb13d commit 334c35c
Show file tree
Hide file tree
Showing 172 changed files with 4,457 additions and 2,305 deletions.
46 changes: 23 additions & 23 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@
# RUSTFLAGS= cargo clippy
[target.'cfg(feature = "cargo-clippy")']
rustflags = [
"-Aclippy::all",
"-Dclippy::correctness",
"-Aclippy::if-same-then-else",
"-Asuspicious_double_ref_op",
"-Dclippy::complexity",
"-Aclippy::zero-prefixed-literal", # 00_1000_000
"-Aclippy::type_complexity", # raison d'etre
"-Aclippy::nonminimal-bool", # maybe
"-Aclippy::borrowed-box", # Reasonable to fix this one
"-Aclippy::too-many-arguments", # (Turning this on would lead to)
"-Aclippy::unnecessary_cast", # Types may change
"-Aclippy::identity-op", # One case where we do 0 +
"-Aclippy::useless_conversion", # Types may change
"-Aclippy::unit_arg", # styalistic.
"-Aclippy::option-map-unit-fn", # styalistic
"-Aclippy::bind_instead_of_map", # styalistic
"-Aclippy::erasing_op", # E.g. 0 * DOLLARS
"-Aclippy::eq_op", # In tests we test equality.
"-Aclippy::while_immutable_condition", # false positives
"-Aclippy::needless_option_as_deref", # false positives
"-Aclippy::derivable_impls", # false positives
"-Aclippy::stable_sort_primitive", # prefer stable sort
"-Aclippy::extra-unused-type-parameters", # stylistic
"-Aclippy::all",
"-Aclippy::bind_instead_of_map", # stylistic
"-Aclippy::borrowed-box", # Reasonable to fix this one
"-Aclippy::derivable_impls", # false positives
"-Aclippy::eq_op", # In tests we test equality.
"-Aclippy::erasing_op", # E.g. 0 * DOLLARS
"-Aclippy::extra-unused-type-parameters", # stylistic
"-Aclippy::identity-op", # One case where we do 0 +
"-Aclippy::if-same-then-else",
"-Aclippy::needless_option_as_deref", # false positives
"-Aclippy::nonminimal-bool", # maybe
"-Aclippy::option-map-unit-fn", # stylistic
"-Aclippy::stable_sort_primitive", # prefer stable sort
"-Aclippy::too-many-arguments", # (Turning this on would lead to)
"-Aclippy::type_complexity", # raison d'etre
"-Aclippy::unit_arg", # stylistic
"-Aclippy::unnecessary_cast", # Types may change
"-Aclippy::useless_conversion", # Types may change
"-Aclippy::while_immutable_condition", # false positives
"-Aclippy::zero-prefixed-literal", # 00_1000_000
"-Asuspicious_double_ref_op",
"-Dclippy::complexity",
"-Dclippy::correctness",
]
29 changes: 29 additions & 0 deletions .config/taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# all options https://taplo.tamasfe.dev/configuration/formatter-options.html

exclude = [
"target/**",
]

# global rules
[formatting]
reorder_arrays = true
inline_table_expand = false
array_auto_expand = false
array_auto_collapse = false
indent_string = " " # tab

# don't re-order order-dependent deb package metadata
[[rule]]
include = ["polkadot/Cargo.toml"]
keys = ["package.metadata.deb"]

[rule.formatting]
reorder_arrays = false

# don't re-order order-dependent rustflags
[[rule]]
include = [".cargo/config.toml"]
keys = ["build"]

[rule.formatting]
reorder_arrays = false
4 changes: 2 additions & 2 deletions .github/env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
RUST_STABLE_VERSION=1.76.0
RUST_NIGHTLY_VERSION=2024-03-14
RUST_STABLE_VERSION=1.77.0
RUST_NIGHTLY_VERSION=2024-04-14
5 changes: 4 additions & 1 deletion .github/workflows/check-features.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ jobs:
fetch-depth: 0 # Dont clone historic commits.

- name: Check features
run: zepter run check
run: |
zepter run check
# We will add this to the config file once its stabilized. Just run it in the CI for now.
zepter transpose dep lift-to-workspace 'regex:.*'
1 change: 1 addition & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ jobs:
- name: Clippy
run: cargo +nightly-$RUST_NIGHTLY_VERSION clippy --all-targets --locked -q
env:
RUSTFLAGS: "-D warnings"
SKIP_WASM_BUILD: 1
43 changes: 42 additions & 1 deletion .github/workflows/review-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,58 @@ on:

jobs:
trigger-review-bot:
# (It is not a draft) && (it is not a review || it is an approving review)
if: ${{ github.event.pull_request.draft != true && (github.event_name != 'pull_request_review' || (github.event.review && github.event.review.state == 'APPROVED')) }}
runs-on: ubuntu-latest
name: trigger review bot
steps:
- name: Get PR data
id: comments
run: |
echo "bodies=$(gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --json comments --jq '[.comments[].body]')" >> "$GITHUB_OUTPUT"
echo "reviews=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews --jq '[.[].state]')" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ github.token }}
- name: Get the GitHub handle of the fellows
uses: paritytech/get-fellows-action@v1.1.2
id: fellows
# Require new reviews when the author is pushing and he is not a fellow
- name: Fail when author pushes new code
# if (contains approved reviews && it's a synchronize event && was triggered by the author (who is not a fellow))
if: |
contains(fromJson(steps.comments.outputs.reviews), 'APPROVED') &&
github.event_name == 'pull_request_target' &&
github.event.action == 'synchronize' &&
github.event.sender.login == github.event.pull_request.user.login &&
contains(steps.fellows.outputs.github-handles, github.event.pull_request.user.login)
run: |
# We get the list of reviewers who approved the PR
REVIEWERS=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews \
--jq '{reviewers: [.[] | select(.state == "APPROVED") | .user.login]}')
# We request them to review again
echo $REVIEWERS | gh api --method POST repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers --input -
echo "::error::Project needs to be reviewed again"
exit 1
env:
GH_TOKEN: ${{ github.token }}
- name: Comment requirements
# If the previous step failed and github-actions hasn't commented yet we comment instructions
if: failure() && !contains(fromJson(steps.comments.outputs.bodies), 'Review required! Latest push from author must always be reviewed')
run: |
gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body "Review required! Latest push from author must always be reviewed"
env:
GH_TOKEN: ${{ github.token }}
COMMENTS: ${{ steps.comments.outputs.users }}
- name: Get PR number
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
echo "Saving PR number: $PR_NUMBER"
mkdir -p ./pr
echo $PR_NUMBER > ./pr/pr_number
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Save PR number
with:
name: pr_number
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/up-to-date.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- main
workflow_run:
workflows: [Auto Merge Bot]
types: [completed]

jobs:
updatePullRequests:
Expand All @@ -13,11 +16,11 @@ jobs:
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
uses: actions/create-github-app-token@v1.9.3
with:
app_id: ${{ secrets.MERGE_APP_ID }}
private_key: ${{ secrets.MERGE_APP_KEY }}
app-id: ${{ secrets.MERGE_APP_ID }}
private-key: ${{ secrets.MERGE_APP_KEY }}
- name: Update all the PRs
uses: paritytech/up-to-date-action@v0.2.0
uses: paritytech/up-to-date-action@v0.2.1
with:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
24 changes: 22 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,31 @@ Changelog for the runtimes governed by the Polkadot Fellowship.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]
## [1.2.4] 20.05.2024

### Changed

- Kusama chains: allow arbitrary XCM execution ([polkadot-fellows/runtimes#261](https://github.com/polkadot-fellows/runtimes/pull/261))
- Allow everything through XCM SafeCallFilter ([polkadot-fellows/runtimes#285](https://github.com/polkadot-fellows/runtimes/pull/285))

### Added

- Add `pallet-vesting` to Asset Hubs ([polkadot-fellows/runtimes#269](https://github.com/polkadot-fellows/runtimes/pull/269))
- Remove DMP queue and allow `system::authorize_upgrade` in XCM's call filter ([polkadot-fellows/runtimes#280](https://github.com/polkadot-fellows/runtimes/pull/280))
- Add Pay Salary Collectives test ([polkadot-fellows/runtimes#260](https://github.com/polkadot-fellows/runtimes/pull/260))
- Add `pallet-xcm::transfer_assets_using_type_and_then()` for complex asset transfers ([polkadot-fellows/runtimes#311](https://github.com/polkadot-fellows/runtimes/pull/311))
- The Ambassador Program ([polkadot-fellows/runtimes#291](https://github.com/polkadot-fellows/runtimes/pull/291))

### Removed

- Remove one-shot migrations from Kusama Coretime ([polkadot-fellows/runtimes#300](https://github.com/polkadot-fellows/runtimes/pull/300))
- Remove DMP queue and allow `system::authorize_upgrade` in XCM's call filter ([polkadot-fellows/runtimes#280](https://github.com/polkadot-fellows/runtimes/pull/280))
- Allow Sending XCM messages using a Signed origin on Kusama ([polkadot-fellows/runtimes#290](https://github.com/polkadot-fellows/runtimes/pull/290))

### Fixed

- Include patch to release stuck collator bonds ([polkadot-fellows/runtimes#289](https://github.com/polkadot-fellows/runtimes/pull/289))
- Safeguard pallet-balances against consumer ref underflow ([polkadot-fellows/runtimes#309](https://github.com/polkadot-fellows/runtimes/pull/309))
- Polkadot Bridge Hub: Unstuck Snowbridge ([polkadot-fellows/runtimes#313](https://github.com/polkadot-fellows/runtimes/pull/313))

## [1.2.3] 29.04.2024

Expand Down Expand Up @@ -105,6 +124,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Update the fellowship salary budget amount in alignment with the Fellowship Salary [RFC](https://github.com/polkadot-fellows/RFCs/pull/50) ([polkadot-fellows/runtimes#121](https://github.com/polkadot-fellows/runtimes/pull/121))
- Set up an account ID for the local root location on Polkadot Collectives ([polkadot-fellows/runtimes#125](https://github.com/polkadot-fellows/runtimes/pull/125))
- Increase confirmation period for treasury spend tracks on Polkadot & Kusama ([polkadot-fellows/runtimes#119](https://github.com/polkadot-fellows/runtimes/pull/119))
- Drop ED requirement for transaction payments with an exchangeable asset ([polkadot-fellows/runtimes#310](https://github.com/polkadot-fellows/runtimes/pull/310))

### Added

Expand Down
17 changes: 9 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 334c35c

Please sign in to comment.