Skip to content

Commit cb90ac7

Browse files
committed
fix pr data missing
1 parent 8033012 commit cb90ac7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/add-checklist-to-pr.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ module.exports = async ({ github, context }) => {
2121
throw new Error("Could not read samples checklist from file. Please fix the issues and try again.")
2222
}
2323

24+
let pullRequest;
25+
2426
try {
2527
// Get the current PR
26-
const { data: pullRequest } = await github.rest.pulls.get({
28+
const { data: prData } = await github.rest.pulls.get({
2729
owner: context.repo.owner,
2830
repo: context.repo.repo,
2931
pull_number: pr_number
3032
});
33+
pullRequest = prData;
3134
} catch (getPrError) {
3235
throw new Error ("Could not get current PR from source. Please fix the issues and try again.")
3336
}

0 commit comments

Comments
 (0)