File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2725,7 +2725,8 @@ function sha256(message) {
27252725 return hash.digest('hex');
27262726}
27272727const getStateInstance = (options) => {
2728- const cacheKey = sha256(JSON.stringify(options));
2728+ const json = JSON.stringify(options, (key, value) => key === 'repoToken' ? undefined : value);
2729+ const cacheKey = sha256(json);
27292730 const storage = new state_cache_storage_1.StateCacheStorage(cacheKey);
27302731 return new state_1.State(storage, options);
27312732};
Original file line number Diff line number Diff line change @@ -11,7 +11,10 @@ function sha256(message: string): string {
1111}
1212
1313export const getStateInstance = ( options : IIssuesProcessorOptions ) : IState => {
14- const cacheKey = sha256 ( JSON . stringify ( options ) ) ;
14+ const json = JSON . stringify ( options , ( key , value ) =>
15+ key === 'repoToken' ? undefined : value
16+ ) ;
17+ const cacheKey = sha256 ( json ) ;
1518 const storage = new StateCacheStorage ( cacheKey ) ;
1619 return new State ( storage , options ) ;
1720} ;
You can’t perform that action at this time.
0 commit comments