telegram-tt/dev/createStatoscopeComment.js
2022-04-19 15:11:48 +02:00

14 lines
420 B
JavaScript

/* eslint-env node */
const fs = require('fs');
const createPRComment = require('./createPRComment');
const template = require('../.github/workflows/statoscope-comment.js');
module.exports = async ({ github, context }) => {
const data = JSON.parse(fs.readFileSync('result.json', 'utf8'));
data.prNumber = context.issue.number;
const body = template(data);
await createPRComment({ github, context, body });
};