feat: setup Danger #1289
9 changed files with 566 additions and 37 deletions
|
@ -38,6 +38,7 @@ script:
|
||||||
else
|
else
|
||||||
yarn build
|
yarn build
|
||||||
fi
|
fi
|
||||||
|
- yarn danger ci
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
- "/^v\\d+\\.\\d+\\.\\d+$/"
|
- "/^v\\d+\\.\\d+\\.\\d+$/"
|
||||||
|
|
|
@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
||||||
* Show exact wallet balance on mouse hover over ([#1305](https://github.com/lbryio/lbry-app/pull/1305))
|
* Show exact wallet balance on mouse hover over ([#1305](https://github.com/lbryio/lbry-app/pull/1305))
|
||||||
* New dark mode ([#1269](https://github.com/lbryio/lbry-app/pull/1269))
|
* New dark mode ([#1269](https://github.com/lbryio/lbry-app/pull/1269))
|
||||||
* Pre-fill publish URL after clicking "Put something here" link ([#1303](https://github.com/lbryio/lbry-app/pull/1303))
|
* Pre-fill publish URL after clicking "Put something here" link ([#1303](https://github.com/lbryio/lbry-app/pull/1303))
|
||||||
|
* Add Danger JS to automate code reviews ([#1289](https://github.com/lbryio/lbry-app/pull/1289))
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
* Add flair to snackbar ([#1313](https://github.com/lbryio/lbry-app/pull/1313))
|
* Add flair to snackbar ([#1313](https://github.com/lbryio/lbry-app/pull/1313))
|
||||||
|
|
17
dangerfile.js
Normal file
17
dangerfile.js
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
|
import { danger, warn } from 'danger';
|
||||||
|
|
||||||
|
// No PR is too small to include a description of why you made a change
|
||||||
|
if (!danger.github.pr.body || danger.github.pr.body.length < 10) {
|
||||||
|
const title = ':grey_question: No Description';
|
||||||
|
const idea = 'Please include a description of your PR changes.';
|
||||||
|
warn(`${title} - <i>${idea}</i>`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for a CHANGELOG entry
|
||||||
|
const hasChangelog = danger.git.modified_files.some(f => f === 'CHANGELOG.md');
|
||||||
|
if (!hasChangelog) {
|
||||||
|
const title = ':page_facing_up: Changelog Entry Missing';
|
||||||
|
const idea = 'Please add a changelog entry for your changes.';
|
||||||
|
warn(`${title} - <i>${idea}</i>`);
|
||||||
|
}
|
|
@ -86,6 +86,9 @@
|
||||||
"babel-preset-env": "^1.6.1",
|
"babel-preset-env": "^1.6.1",
|
||||||
"babel-preset-react": "^6.24.1",
|
"babel-preset-react": "^6.24.1",
|
||||||
"babel-preset-stage-2": "^6.18.0",
|
"babel-preset-stage-2": "^6.18.0",
|
||||||
|
"danger": "^3.6.0",
|
||||||
|
"danger-plugin-eslint": "^0.1.0",
|
||||||
|
"danger-plugin-yarn": "^1.3.0",
|
||||||
"decompress": "^4.2.0",
|
"decompress": "^4.2.0",
|
||||||
"del": "^3.0.0",
|
"del": "^3.0.0",
|
||||||
"devtron": "^1.4.0",
|
"devtron": "^1.4.0",
|
||||||
|
|
|
@ -45,7 +45,7 @@ export default class Address extends React.PureComponent<Props> {
|
||||||
clipboard.writeText(address);
|
clipboard.writeText(address);
|
||||||
doNotify({
|
doNotify({
|
||||||
message: __('Address copied'),
|
message: __('Address copied'),
|
||||||
displayType: ['snackbar']
|
displayType: ['snackbar'],
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -20,7 +20,10 @@ type Props = {
|
||||||
|
|
||||||
class ShapeShift extends React.PureComponent<Props> {
|
class ShapeShift extends React.PureComponent<Props> {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { shapeShiftInit, shapeShift: { hasActiveShift, shiftSupportedCoins } } = this.props;
|
const {
|
||||||
|
shapeShiftInit,
|
||||||
|
shapeShift: { hasActiveShift, shiftSupportedCoins },
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
if (!hasActiveShift && !shiftSupportedCoins.length) {
|
if (!hasActiveShift && !shiftSupportedCoins.length) {
|
||||||
// calls shapeshift to see list of supported coins for shifting
|
// calls shapeshift to see list of supported coins for shifting
|
||||||
|
|
|
@ -48,7 +48,13 @@ class ModalRemoveFile extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { claimIsMine, closeModal, deleteFile, fileInfo: { outpoint }, title } = this.props;
|
const {
|
||||||
|
claimIsMine,
|
||||||
|
closeModal,
|
||||||
|
deleteFile,
|
||||||
|
fileInfo: { outpoint },
|
||||||
|
title,
|
||||||
|
} = this.props;
|
||||||
const { deleteChecked, abandonClaimChecked } = this.state;
|
const { deleteChecked, abandonClaimChecked } = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue