fix: bug with errors from fork prs (#1239)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
		
							parent
							
								
									c784b6f1c4
								
							
						
					
					
						commit
						e208eb429a
					
				
							
								
								
									
										10
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							| @ -573,7 +573,7 @@ exports.getEnv = void 0; | ||||
| const fs_1 = __nccwpck_require__(7147); | ||||
| const core = __importStar(__nccwpck_require__(2186)); | ||||
| const getEnv = () => __awaiter(void 0, void 0, void 0, function* () { | ||||
|     var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; | ||||
|     var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; | ||||
|     const eventPath = process.env.GITHUB_EVENT_PATH; | ||||
|     let eventJson = {}; | ||||
|     if (eventPath) { | ||||
| @ -587,10 +587,10 @@ const getEnv = () => __awaiter(void 0, void 0, void 0, function* () { | ||||
|         GITHUB_EVENT_BEFORE: eventJson.before || '', | ||||
|         GITHUB_EVENT_BASE_REF: eventJson.base_ref || '', | ||||
|         GITHUB_EVENT_RELEASE_TARGET_COMMITISH: ((_e = eventJson.release) === null || _e === void 0 ? void 0 : _e.target_commitish) || '', | ||||
|         GITHUB_EVENT_HEAD_REPO_FORK: ((_f = eventJson.head_repo) === null || _f === void 0 ? void 0 : _f.fork) || '', | ||||
|         GITHUB_EVENT_PULL_REQUEST_NUMBER: ((_g = eventJson.pull_request) === null || _g === void 0 ? void 0 : _g.number) || '', | ||||
|         GITHUB_EVENT_PULL_REQUEST_BASE_SHA: ((_j = (_h = eventJson.pull_request) === null || _h === void 0 ? void 0 : _h.base) === null || _j === void 0 ? void 0 : _j.sha) || '', | ||||
|         GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ((_l = (_k = eventJson.pull_request) === null || _k === void 0 ? void 0 : _k.head) === null || _l === void 0 ? void 0 : _l.sha) || '', | ||||
|         GITHUB_EVENT_HEAD_REPO_FORK: ((_g = (_f = eventJson.head) === null || _f === void 0 ? void 0 : _f.repo) === null || _g === void 0 ? void 0 : _g.fork) || '', | ||||
|         GITHUB_EVENT_PULL_REQUEST_NUMBER: ((_h = eventJson.pull_request) === null || _h === void 0 ? void 0 : _h.number) || '', | ||||
|         GITHUB_EVENT_PULL_REQUEST_BASE_SHA: ((_k = (_j = eventJson.pull_request) === null || _j === void 0 ? void 0 : _j.base) === null || _k === void 0 ? void 0 : _k.sha) || '', | ||||
|         GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ((_m = (_l = eventJson.pull_request) === null || _l === void 0 ? void 0 : _l.head) === null || _m === void 0 ? void 0 : _m.sha) || '', | ||||
|         GITHUB_EVENT_FORCED: eventJson.forced || '', | ||||
|         GITHUB_REF_NAME: process.env.GITHUB_REF_NAME || '', | ||||
|         GITHUB_REF: process.env.GITHUB_REF || '', | ||||
|  | ||||
							
								
								
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -35,10 +35,12 @@ type GithubEvent = { | ||||
|   } | ||||
|   before?: string | ||||
|   base_ref?: string | ||||
|   head_repo?: { | ||||
|   head?: { | ||||
|     repo?: { | ||||
|       fork: string | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| export const getEnv = async (): Promise<Env> => { | ||||
|   const eventPath = process.env.GITHUB_EVENT_PATH | ||||
| @ -57,7 +59,7 @@ export const getEnv = async (): Promise<Env> => { | ||||
|     GITHUB_EVENT_BASE_REF: eventJson.base_ref || '', | ||||
|     GITHUB_EVENT_RELEASE_TARGET_COMMITISH: | ||||
|       eventJson.release?.target_commitish || '', | ||||
|     GITHUB_EVENT_HEAD_REPO_FORK: eventJson.head_repo?.fork || '', | ||||
|     GITHUB_EVENT_HEAD_REPO_FORK: eventJson.head?.repo?.fork || '', | ||||
|     GITHUB_EVENT_PULL_REQUEST_NUMBER: eventJson.pull_request?.number || '', | ||||
|     GITHUB_EVENT_PULL_REQUEST_BASE_SHA: eventJson.pull_request?.base?.sha || '', | ||||
|     GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: eventJson.pull_request?.head?.sha || '', | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tonye Jack
						Tonye Jack