Skip to content
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

feat: setup Danger #1289

Merged
merged 6 commits into from
Apr 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ script:
else
yarn build
fi
- yarn danger ci
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
17 changes: 17 additions & 0 deletions dangerfile.js
Original file line number Diff line number Diff line change
@@ -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>`);
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/component/address/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class Address extends React.PureComponent<Props> {
clipboard.writeText(address);
doNotify({
message: __('Address copied'),
displayType: ['snackbar']
displayType: ['snackbar'],
});
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/component/fileDetails/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
5 changes: 4 additions & 1 deletion src/renderer/component/shapeShift/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion src/renderer/modal/modalRemoveFile/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Loading