Skip to content

Commit

Permalink
Merge pull request #7 from tot-ra/test6
Browse files Browse the repository at this point in the history
...
  • Loading branch information
tot-ra authored Sep 13, 2023
2 parents b252ace + 3574cb5 commit 5f32b29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async function reviewPR() {
const gitDiff = fs.readFileSync('diff-file', { encoding: 'utf8', flag: 'r' });
console.log('git diff:', gitDiff);

RAW_TEXT += `Here is a git diff for changes: ${gitDiff}`
RAW_TEXT += `Here is a git diff for changes: ${gitDiff}\n\n`

const ctx = {
owner: process.env.PR_OWNER,
Expand Down Expand Up @@ -80,10 +80,10 @@ async function reviewPR() {

const pr_title = data.repository.pullRequest.title
const pr_descr = data.repository.pullRequest.body
RAW_TEXT += `Last pull request was titled "${pr_title} and had a description "${pr_descr}".`;
RAW_TEXT += `Last pull request was titled "${pr_title} and had a description "${pr_descr}".\n`;

const commit_msg = data.repository.pullRequest.commits.edges[0].node.commit.message
RAW_TEXT += `Last commit message was "${commit_msg}". `
RAW_TEXT += `Last commit message was "${commit_msg}".\n`

for (let msg of data.repository.pullRequest.commits.edges[0].node.commit.tree.entries) {
if (msg.object?.text) {
Expand Down

0 comments on commit 5f32b29

Please sign in to comment.