telegram-tt/dev/createStatoscopeComment.js

14 lines
417 B
JavaScript
Raw Normal View History

/* eslint-env node */
const fs = require('fs');
const createPRComment = require('./createPRComment');
2022-05-06 18:56:12 +02:00
const template = require('../.github/workflows/statoscope-comment');
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 });
};