File tree Expand file tree Collapse file tree 3 files changed +21
-20
lines changed Expand file tree Collapse file tree 3 files changed +21
-20
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ import {
2525  type  GithubReleaseAssetData , 
2626  getGithubReleaseByTag , 
2727  getAuthorizationHeaders , 
28-   ownerOfRepository , 
2928  repoNameOfRepository , 
3029  githubApiUnauthorized , 
3130}  from  "./githubREST.mjs" ; 
@@ -43,6 +42,7 @@ import {
4342  HTTP_STATUS_FORBIDDEN , 
4443  HTTP_STATUS_OK , 
4544  HTTP_STATUS_UNAUTHORIZED , 
45+   ownerOfRepository , 
4646  WINDOWS_ARM64_PYTHON_DOWNLOAD_URL , 
4747  WINDOWS_X86_PYTHON_DOWNLOAD_URL , 
4848}  from  "./sharedConstants.mjs" ; 
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {
1515  HTTP_STATUS_NOT_MODIFIED , 
1616  HTTP_STATUS_OK , 
1717  HTTP_STATUS_UNAUTHORIZED , 
18+   ownerOfRepository , 
1819}  from  "./sharedConstants.mjs" ; 
1920
2021/** 
@@ -36,25 +37,6 @@ export type GithubReleaseAssetData = {
3637  id : number ; 
3738} ; 
3839
39- /** 
40-  * Get the url friendly owner of a repository on GitHub. 
41-  * 
42-  * @param  repository The repository to get the owner of 
43-  * @returns  The owner of the repository on GitHub 
44-  */ 
45- export  function  ownerOfRepository ( repository : GithubRepository ) : string  { 
46-   switch  ( repository )  { 
47-     case  GithubRepository . picoSDK :
48-     case  GithubRepository . tools :
49-     case  GithubRepository . picotool :
50-       return  "raspberrypi" ; 
51-     case  GithubRepository . cmake :
52-       return  "Kitware" ; 
53-     case  GithubRepository . ninja :
54-       return  "ninja-build" ; 
55-   } 
56- } 
57- 
5840/** 
5941 * Convert a GithubRepository enum value to the url friendly name 
6042 * of the repository on GitHub it represents. 
Original file line number Diff line number Diff line change @@ -60,6 +60,25 @@ export enum GithubRepository {
6060  picotool  =  4 , 
6161} 
6262
63+ /** 
64+  * Get the url friendly owner of a repository on GitHub. 
65+  * 
66+  * @param  repository The repository to get the owner of 
67+  * @returns  The owner of the repository on GitHub 
68+  */ 
69+ export  function  ownerOfRepository ( repository : GithubRepository ) : string  { 
70+   switch  ( repository )  { 
71+     case  GithubRepository . picoSDK :
72+     case  GithubRepository . tools :
73+     case  GithubRepository . picotool :
74+       return  "raspberrypi" ; 
75+     case  GithubRepository . cmake :
76+       return  "Kitware" ; 
77+     case  GithubRepository . ninja :
78+       return  "ninja-build" ; 
79+   } 
80+ } 
81+ 
6382// NOTE: The primary rate limit for unauthenticated requests is 60 requests per hour. 
6483export  const  SDK_REPOSITORY_URL  =  "https://github.com/raspberrypi/pico-sdk.git" ; 
6584export  const  NINJA_REPOSITORY_URL  =  "https://github.com/ninja-build/ninja.git" ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments