File tree Expand file tree Collapse file tree 4 files changed +206
-124
lines changed Expand file tree Collapse file tree 4 files changed +206
-124
lines changed Original file line number Diff line number Diff line change @@ -32,4 +32,4 @@ outputs:
32
32
33
33
runs :
34
34
using : ' docker'
35
- image : ' docker://ghcr.io/paritytech/review-bot/action:2.4.0 '
35
+ image : ' docker://ghcr.io/paritytech/review-bot/action:2.4.1 '
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " review-bot" ,
3
- "version" : " 2.4.0 " ,
3
+ "version" : " 2.4.1 " ,
4
4
"description" : " Have custom review rules for PRs with auto assignment" ,
5
5
"main" : " src/index.ts" ,
6
6
"scripts" : {
38
38
"@actions/core" : " ^1.10.1" ,
39
39
"@actions/github" : " ^6.0.0" ,
40
40
"@eng-automation/js" : " ^1.0.2" ,
41
- "@polkadot/api" : " ^10.11.2 " ,
41
+ "@polkadot/api" : " ^10.13.1 " ,
42
42
"joi" : " ^17.6.4" ,
43
43
"yaml" : " ^2.3.4"
44
44
}
Original file line number Diff line number Diff line change @@ -40,12 +40,9 @@ export class PolkadotFellows implements TeamApi {
40
40
const users : Map < string , number > = new Map < string , number > ( ) ;
41
41
for ( const fellow of fellows ) {
42
42
this . logger . debug ( `Fetching identity of '${ fellow . address } ', rank: ${ fellow . rank } ` ) ;
43
- const fellowData = ( await api . query . identity . identityOf ( fellow . address ) ) . toHuman ( ) as
44
- | Record < string , unknown >
45
- | undefined ;
46
-
43
+ const identityQuery = await api . query . identity . identityOf ( fellow . address ) ;
47
44
// If the identity is null, we check if there is a super identity.
48
- if ( ! fellowData ) {
45
+ if ( identityQuery . isEmpty ) {
49
46
this . logger . debug ( "Identity is null. Checking for super identity" ) ;
50
47
const superIdentity = ( await api . query . identity . superOf ( fellow . address ) ) . toHuman ( ) as
51
48
| [ string , { Raw : string } ]
@@ -59,6 +56,8 @@ export class PolkadotFellows implements TeamApi {
59
56
continue ;
60
57
}
61
58
59
+ const [ fellowData ] = identityQuery . toHuman ( ) as [ Record < string , unknown > , unknown ] ;
60
+
62
61
// @ts -ignore
63
62
const additional = fellowData . info ?. additional as [ { Raw : string } , { Raw : string } ] [ ] | undefined ;
64
63
You can’t perform that action at this time.
0 commit comments