Skip to content

Commit

Permalink
this node env doesn't support ?.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantBirki committed Jul 31, 2024
1 parent 7f657e1 commit 8a5dda3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
14 changes: 9 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.

14 changes: 9 additions & 5 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,18 @@ async function run() {

// in most cases, ${{ github.event.number }} is the issue number
// if it is blank, then try to fetch it from the context
core.debug(
`github.context.payload.issue.number: ${github.context.payload.issue.number}`
)
const issueNumberFallback =
github &&
github.context &&
github.context.payload &&
github.context.payload.issue &&
github.context.payload.issue.number
core.debug(`issueNumberFallback: ${issueNumberFallback}`)
if (!inputs.issueNumber) {
core.debug(
`issueNumber is not set, trying to fetch from the github.context`
`issueNumber is not set, trying to set from the issueNumberFallback: ${issueNumberFallback}`
)
inputs.issueNumber = github.context.payload.issue.number
inputs.issueNumber = issueNumberFallback
}

core.debug(`Inputs: ${inspect(inputs)}`)
Expand Down

0 comments on commit 8a5dda3

Please sign in to comment.