ci: add misspell action (#18671)
This commit is contained in:
parent
978fffc5a6
commit
8cfdabb2ed
4
.github/.misspell-fixer.ignore
vendored
Normal file
4
.github/.misspell-fixer.ignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
\*.pulsar.go
|
||||
\*.pb.go
|
||||
\*.pb.gw.go
|
||||
\*.cosmos_orm.go
|
||||
24
.github/workflows/misspell.yml
vendored
Normal file
24
.github/workflows/misspell.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
name: Fix typos nightly
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 8 * * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: sobolevn/misspell-fixer-action@e5368f1b21585248afad4d32df9bc100451dbbff
|
||||
- uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
token: ${{ secrets.PRBOT_PAT }}
|
||||
commit-message: "chore: fixes by misspell-fixer"
|
||||
title: "chore: typos fix by misspell-fixer"
|
||||
branch: "bot/fix-typos"
|
||||
delete-branch: true
|
||||
body: |
|
||||
This PR fixes typos in the codebase.
|
||||
Please, review it and merge if everything is fine.
|
||||
If there is proto changes, please, run `make proto-gen` and commit changes.
|
||||
@ -47,11 +47,15 @@ contributors, the general procedure for contributing has been established:
|
||||
to begin work.
|
||||
5. To submit your work as a contribution to the repository follow standard GitHub best practices. See [pull request guideline](#pull-requests) below.
|
||||
|
||||
**Note:** For very small or blatantly obvious problems such as typos, you are
|
||||
**Note:** For very small or blatantly obvious problems, you are
|
||||
not required to an open issue to submit a PR, but be aware that for more complex
|
||||
problems/features, if a PR is opened before an adequate design discussion has
|
||||
taken place in a GitHub issue, that PR runs a high likelihood of being rejected.
|
||||
|
||||
**Note 2:** At this time, we will not be accepting contributions that only fix spelling
|
||||
or grammar errors in documentation, code or elsewhere. The repository has a nightly job that
|
||||
spell checks all files and will automatically open PRs for any spelling errors.
|
||||
|
||||
## Teams Dev Calls
|
||||
|
||||
The Cosmos SDK has many stakeholders contributing and shaping the project. The Core SDK team is composed of Interchain GmbH and Regen Network Development developers. Any long-term contributors and additional maintainers from other projects are welcome. We use self-organizing principles to coordinate and collaborate across organizations in structured "EPIC" that focus on specific problem domains or architectural components of the Cosmos SDK.
|
||||
|
||||
@ -459,16 +459,16 @@ func (k Keeper) GetRedelegationsFromSrcValidator(ctx context.Context, valAddr sd
|
||||
// HasReceivingRedelegation checks if validator is receiving a redelegation.
|
||||
func (k Keeper) HasReceivingRedelegation(ctx context.Context, delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) (bool, error) {
|
||||
rng := collections.NewSuperPrefixedTripleRange[[]byte, []byte, []byte](valDstAddr, delAddr)
|
||||
hasAtleastOneEntry := false
|
||||
hasReceivingRedelegation := false
|
||||
err := k.RedelegationsByValDst.Walk(ctx, rng, func(key collections.Triple[[]byte, []byte, []byte], value []byte) (stop bool, err error) {
|
||||
hasAtleastOneEntry = true
|
||||
hasReceivingRedelegation = true
|
||||
return true, nil // returning true here to stop the iterations after 1st finding
|
||||
})
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
return hasAtleastOneEntry, nil
|
||||
return hasReceivingRedelegation, nil
|
||||
}
|
||||
|
||||
// HasMaxRedelegationEntries checks if the redelegation entries reached maximum limit.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user