Skip to content

Commit

Permalink
Merge pull request #13 from Staffbase/fix-title
Browse files Browse the repository at this point in the history
✨include PR title in test name
  • Loading branch information
jreimone authored Jul 10, 2023
2 parents 118df25 + 3e2e553 commit 19610e8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/retrievePayload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,15 @@ async function createPayload() {
Util.throwErrorAndPrepareErrorMessage("Provided json is not conform to schema", errorFileName);
}

const pullRequest:any = await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}', {
const pullRequest = await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}', {
owner: github.context.repo.owner,
repo: github.context.repo.repo,
pull_number: github.context.issue.number,
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
})

const prTitle = pullRequest.title;
const prTitle = pullRequest.data.title;
if (!prTitle) {
console.log("The pull request received:");
console.log(JSON.stringify(pullRequest, null, 2));
Expand Down

0 comments on commit 19610e8

Please sign in to comment.