diff --git a/.github/actions/assigner/dist/index.js b/.github/actions/assigner/dist/index.js index 5f728771b2..ff9ca2bce5 100644 --- a/.github/actions/assigner/dist/index.js +++ b/.github/actions/assigner/dist/index.js @@ -37,7 +37,13 @@ const fs = __importStar(__nccwpck_require__(7147)); function getIssueNum() { const issue = github.context.payload.issue; if (!issue) { - return undefined; + const pr = github.context.payload.pull_request; + if (!pr) { + return undefined; + } + else { + return pr.number; + } } else { return issue.number; diff --git a/.github/actions/assigner/src/main.ts b/.github/actions/assigner/src/main.ts index 5220b1d34b..aeb8b87952 100644 --- a/.github/actions/assigner/src/main.ts +++ b/.github/actions/assigner/src/main.ts @@ -8,7 +8,12 @@ type GHClient = ReturnType; function getIssueNum(): number | undefined { const issue = github.context.payload.issue; if (!issue) { - return undefined; + const pr = github.context.payload.pull_request; + if (!pr) { + return undefined; + } else { + return pr.number; + } } else { return issue.number; }