-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: check untracked files after build
- Loading branch information
Showing
1 changed file
with
13 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
import { danger, markdown } from 'danger'; | ||
import { danger, markdown, fail } from 'danger'; | ||
import simpleGit, {SimpleGit} from 'simple-git'; | ||
const git: SimpleGit = simpleGit(); | ||
|
||
const modifiedDefinitionJson = danger.git.fileMatch('src/theme/definition.json'); | ||
|
||
if (modifiedDefinitionJson.edited) { | ||
markdown(` | ||
Hey dear reviewer, I'm the Gravitee.io bot :robot: | ||
Hey dude, I'm the Gravitee.io bot :robot: | ||
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! | ||
Also, after merging this PR, you should update the \`definition.json\` of [APIM Rest API](https://github.com/gravitee-io/gravitee-management-rest-api). | ||
`); | ||
} | ||
|
||
const packageJson = danger.git.fileMatch('package.json'); | ||
git.status().then(result => { | ||
if(result.modified.length > 0) { | ||
fail(` | ||
Hey dude, I'm the Gravitee.io bot :robot: | ||
if (packageJson.edited) { | ||
markdown(` | ||
Hey dear reviewer, I'm the Gravitee.io bot :robot: | ||
I just want to tell you that \`package.json\` has been updated in this PR. | ||
Some components are based on third party libraries, for integration into a web component, we extract the css from its libraries as assets. | ||
There is some untracked files after \`npm run build\` command. | ||
WARNING: When \`codemirror\`, \`highlight.js\` or \`github-markdown-css\` are updated, we must run \`npm run build\` task to update the css. | ||
Could you run build command locally and fix-it ? | ||
`); | ||
} | ||
|
||
} | ||
}); |