File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const isPR = (path) => /^\/[^/]+\/[^/]+\/pull\/\d+/.test(path);
66const isIssue = ( path ) => / ^ \/ [ ^ / ] + \/ [ ^ / ] + \/ i s s u e s \/ \d + / . test ( path ) ;
77const getCurrentUser = ( ) => $ ( ".js-menu-target img" ) . attr ( "alt" ) . slice ( 1 ) || "" ;
88const isPrivate = ( ) => $ ( ".repo-private-label" ) . length > 0 ;
9- let showOrgOnly = false ;
9+ let statsScope = "repo" ;
1010
1111function getContributor ( ) {
1212 let $contributor = $ ( ".timeline-comment-wrapper .timeline-comment-header-text strong" ) ;
@@ -31,7 +31,7 @@ function getContributorInfo() {
3131 } ;
3232
3333 // global variable
34- if ( showOrgOnly ) {
34+ if ( statsScope === "org" ) {
3535 ret . user = org ;
3636 }
3737
@@ -211,7 +211,7 @@ ${dropdown}
211211 $inThisRepo . html ( 'in this repo' ) ;
212212 $dropdownText . html ( 'across this org' ) ;
213213 // global
214- showOrgOnly = true ;
214+ statsScope = "org" ;
215215 update ( getContributorInfo ( ) ) ;
216216 } ) ;
217217
@@ -222,7 +222,7 @@ ${dropdown}
222222 $acrossThisOrg . html ( 'across this org' ) ;
223223 $dropdownText . html ( 'in this repo' ) ;
224224 // global
225- showOrgOnly = false ;
225+ statsScope = "repo" ;
226226 update ( getContributorInfo ( ) ) ;
227227 } ) ;
228228}
You can’t perform that action at this time.
0 commit comments