-
Notifications
You must be signed in to change notification settings - Fork 348
Integrate cml publish with cml send-comment
#1026
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bcaaaeb
36b6c6b
afe8be5
869ad75
8325f92
c18317e
448f0cf
f416c11
4701660
44e3826
ac54496
4c21ff5
ab28d8d
5fba6fc
e9465da
a54bd35
362d9f9
2ea74c7
e78bbec
484143d
ca2621a
303fe2a
c0730c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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; | ||||||||||
|
|
@@ -7,10 +6,9 @@ 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'); | ||||||||||
| opts.markdownFile = opts.markdownfile; | ||||||||||
| const cml = new CML(opts); | ||||||||||
| console.log(await cml.commentCreate({ ...opts, report })); | ||||||||||
| console.log(await cml.commentCreate(opts)); | ||||||||||
| }; | ||||||||||
|
|
||||||||||
| exports.builder = (yargs) => | ||||||||||
|
|
@@ -27,6 +25,25 @@ exports.builder = (yargs) => | |||||||||
| default: 'HEAD', | ||||||||||
| description: 'Commit SHA linked to this comment' | ||||||||||
| }, | ||||||||||
| publish: { | ||||||||||
| type: 'boolean', | ||||||||||
| description: | ||||||||||
| 'Upload local files and images linked from the Markdown report' | ||||||||||
| }, | ||||||||||
| watch: { | ||||||||||
| type: 'boolean', | ||||||||||
| description: 'Watch for changes and automatically update the report' | ||||||||||
| }, | ||||||||||
| triggerFile: { | ||||||||||
casperdcl marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| type: 'string', | ||||||||||
| description: 'File used to trigger the watcher', | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Trigger how?
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exactly as stated in the “using a trigger file” section on #1026 (comment)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's hard to describe in a help text. 😅
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to do #762 before rewording this again :)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. update: If you'd prefer to do #762 immediately after this PR please do feel free to leave this unresolved here @0x2b3bfa0
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given that this is a
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. resolving unresolved |
||||||||||
| hidden: true | ||||||||||
| }, | ||||||||||
| native: { | ||||||||||
| type: 'boolean', | ||||||||||
| description: | ||||||||||
| "Uses driver's native capabilities to upload assets instead of CML's storage. Not available on GitHub." | ||||||||||
0x2b3bfa0 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| }, | ||||||||||
| update: { | ||||||||||
| type: 'boolean', | ||||||||||
| description: | ||||||||||
|
|
||||||||||
Uh oh!
There was an error while loading. Please reload this page.