Skip to content

Commit

Permalink
Update dist to contain file linking
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanis committed Jun 11, 2020
1 parent 3a6ff06 commit e565a4d
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3830,6 +3830,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(__webpack_require__(470));
const crypto = __importStar(__webpack_require__(373));
const context_1 = __webpack_require__(973);
const constants_1 = __webpack_require__(32);
function writeComments(octokit, comments) {
Expand Down Expand Up @@ -3938,10 +3939,19 @@ function getExistingComments(octokit) {
}
exports.getExistingComments = getExistingComments;
function getCommentBody(markdown, files, prNumber, owner, repo) {
return `${markdown}${constants_1.Constants.CannedTextSeparator}${files
.map(m => ` - [${m}](https://github.com/${owner}/${repo}/pull/${prNumber}/files)`)
// const hasher = crypto.createHash('md5');
const links = files.map(file => ({
text: file,
hash: crypto
.createHash('md5')
.update(file)
.digest('hex')
}));
return `${markdown}${constants_1.Constants.CannedTextSeparator}${links
.map(link => ` - [${link.text}](https://github.com/${owner}/${repo}/pull/${prNumber}/files#diff-${link.hash})`)
.join('\n')}`;
}
exports.getCommentBody = getCommentBody;


/***/ }),
Expand Down Expand Up @@ -5552,6 +5562,13 @@ function octokitDebug(octokit) {
}


/***/ }),

/***/ 373:
/***/ (function(module) {

module.exports = require("crypto");

/***/ }),

/***/ 385:
Expand Down

0 comments on commit e565a4d

Please sign in to comment.