Skip to content

Commit

Permalink
Add watcher
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2b3bfa0 authored May 30, 2022
1 parent afe8be5 commit 85374e4
Show file tree
Hide file tree
Showing 5 changed files with 202 additions and 30 deletions.
5 changes: 1 addition & 4 deletions bin/cml/send-comment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const fs = require('fs').promises;
const kebabcaseKeys = require('kebabcase-keys');

const CML = require('../../src/cml').default;
Expand All @@ -7,10 +6,8 @@ exports.command = 'send-comment <markdown file>';
exports.description = 'Comment on a commit';

exports.handler = async (opts) => {
const path = opts.markdownfile;
const report = await fs.readFile(path, 'utf-8');
const cml = new CML(opts);
console.log(await cml.commentCreate({ ...opts, report }));
console.log(await cml.commentCreate(opts));
};

exports.builder = (yargs) =>
Expand Down
179 changes: 172 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@
"@octokit/graphql": "^4.8.0",
"@octokit/plugin-throttling": "^3.5.2",
"@octokit/rest": "18.0.0",
"chokidar": "^3.5.3",
"colors": "1.4.0",
"cross-platform-file-watch": "^3.5.2",
"ec2-spot-notification": "^2.0.3",
"exponential-backoff": "^3.1.0",
"form-data": "^3.0.1",
Expand Down
3 changes: 0 additions & 3 deletions report.md

This file was deleted.

Loading

0 comments on commit 85374e4

Please sign in to comment.