Skip to content

Commit

Permalink
More logs
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Aug 14, 2020
1 parent 19c21b5 commit b257e53
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,11 @@ async function mergeIfLGTMAndHasAccess() {
core.info(`\n\nLooking at PR: '${issue.title}' to see if we can merge`)

const changedFiles = await getPRChangedFiles(octokit, thisRepo, issue.number)
core.info(`Changed files: \n\n - ${changedFiles.join("\n - ")}`)
core.info(`Changed files: \n - ${changedFiles.join("\n - ")}`)

const filesWhichArentOwned = getFilesNotOwnedByCodeOwner("@" + context.payload.sender.login, changedFiles, cwd)
if (filesWhichArentOwned.length !== 0) {
const missing = new Intl.ListFormat().format(filesWhichArentOwned);

console.log(`${issue.user.login} does not have access to merge ${missing}`)
console.log(`@${context.payload.sender.login} does not have access to merge \n - ${filesWhichArentOwned.join("\n - ")}`)
process.exit(0)
}

Expand Down

0 comments on commit b257e53

Please # to comment.