|
1 |
| -import { danger, markdown } from 'danger'; |
| 1 | +import { danger, markdown, fail } from 'danger'; |
| 2 | +import simpleGit, {SimpleGit} from 'simple-git'; |
| 3 | +const git: SimpleGit = simpleGit(); |
2 | 4 |
|
3 | 5 | const modifiedDefinitionJson = danger.git.fileMatch('src/theme/definition.json');
|
4 | 6 |
|
5 | 7 | if (modifiedDefinitionJson.edited) {
|
6 | 8 | markdown(`
|
7 |
| -Hey dear reviewer, I'm the Gravitee.io bot :robot: |
| 9 | +Hey dude, I'm the Gravitee.io bot :robot: |
8 | 10 |
|
9 | 11 | I just want to tell you that \`definition.json\` has been updated in this PR. As this file is used to theme clients' portals you should carefully review it to avoid any regression!
|
10 | 12 |
|
11 | 13 | Also, after merging this PR, you should update the \`definition.json\` of [APIM Rest API](https://github.com/gravitee-io/gravitee-management-rest-api).
|
12 | 14 | `);
|
13 | 15 | }
|
14 | 16 |
|
15 |
| -const packageJson = danger.git.fileMatch('package.json'); |
| 17 | +git.status().then(result => { |
| 18 | + if(result.modified.length > 0) { |
| 19 | + fail(` |
| 20 | +Hey dude, I'm the Gravitee.io bot :robot: |
16 | 21 |
|
17 |
| -if (packageJson.edited) { |
18 |
| - markdown(` |
19 |
| -Hey dear reviewer, I'm the Gravitee.io bot :robot: |
20 |
| -
|
21 |
| -I just want to tell you that \`package.json\` has been updated in this PR. |
22 |
| -
|
23 |
| -Some components are based on third party libraries, for integration into a web component, we extract the css from its libraries as assets. |
| 22 | +There is some untracked files after \`npm run build\` command. |
24 | 23 |
|
25 |
| -WARNING: When \`codemirror\`, \`highlight.js\` or \`github-markdown-css\` are updated, we must run \`npm run build\` task to update the css. |
| 24 | +Could you run build command locally and fix-it ? |
26 | 25 | `);
|
27 |
| -} |
| 26 | + |
| 27 | + } |
| 28 | +}); |
0 commit comments