()
| 1807 | } |
| 1808 | |
| 1809 | function readGitHubEventPayload(): GitHubEventPayload | null { |
| 1810 | const path = process.env.GITHUB_EVENT_PATH; |
| 1811 | if (!path) return null; |
| 1812 | try { |
| 1813 | return JSON.parse(readFileSync(path, 'utf-8')) as GitHubEventPayload; |
| 1814 | } catch { |
| 1815 | return null; |
| 1816 | } |
| 1817 | } |
| 1818 | |
| 1819 | /** True when running on a PR whose head repo differs from the base repo (i.e. a fork). */ |
| 1820 | function isForkPr(): boolean { |
no outgoing calls
no test coverage detected
searching dependent graphs…