Skip to content

Commit

Permalink
fix: bug with errors from fork prs (#1239)
Browse files Browse the repository at this point in the history
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
  • Loading branch information
3 people committed Jun 8, 2023
1 parent c784b6f commit e208eb4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
10 changes: 5 additions & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions src/env.ts
Expand Up @@ -35,8 +35,10 @@ type GithubEvent = {
}
before?: string
base_ref?: string
head_repo?: {
fork: string
head?: {
repo?: {
fork: string
}
}
}

Expand All @@ -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 || '',
Expand Down

0 comments on commit e208eb4

Please sign in to comment.