feat: setup Danger #1289

Merged
IGassmann merged 6 commits from setup-danger into master 2018-04-25 21:31:59 +02:00
9 changed files with 566 additions and 37 deletions

View file

@ -38,6 +38,7 @@ script:
else
yarn build
fi
- yarn danger ci
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"

View file

@ -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))
* 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))
* Add Danger JS to automate code reviews ([#1289](https://github.com/lbryio/lbry-app/pull/1289))
### Changed
* Add flair to snackbar ([#1313](https://github.com/lbryio/lbry-app/pull/1313))

17
dangerfile.js Normal file
View 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>`);
}

View file

@ -86,6 +86,9 @@
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"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",
"del": "^3.0.0",
"devtron": "^1.4.0",

View file

@ -45,7 +45,7 @@ export default class Address extends React.PureComponent<Props> {
clipboard.writeText(address);
doNotify({
message: __('Address copied'),
displayType: ['snackbar']
displayType: ['snackbar'],
});
}}
/>

View file

@ -30,7 +30,7 @@ const FileDetails = (props: Props) => {
}
const { description, language, license } = metadata;
const mediaType = contentType || 'unknown';
const downloadPath = fileInfo ? path.normalize(fileInfo.download_path) : null;

View file

@ -20,7 +20,10 @@ type Props = {
class ShapeShift extends React.PureComponent<Props> {
componentDidMount() {
const { shapeShiftInit, shapeShift: { hasActiveShift, shiftSupportedCoins } } = this.props;
const {
shapeShiftInit,
shapeShift: { hasActiveShift, shiftSupportedCoins },
} = this.props;
if (!hasActiveShift && !shiftSupportedCoins.length) {
// calls shapeshift to see list of supported coins for shifting

View file

@ -48,7 +48,13 @@ class ModalRemoveFile extends React.PureComponent<Props, State> {
}
render() {
const { claimIsMine, closeModal, deleteFile, fileInfo: { outpoint }, title } = this.props;
const {
claimIsMine,
closeModal,
deleteFile,
fileInfo: { outpoint },
title,
} = this.props;
const { deleteChecked, abandonClaimChecked } = this.state;
return (

564
yarn.lock

File diff suppressed because it is too large Load diff