coala / gh-board

:octocat: Kanban for GitHub Issues
https://coala-gh-board.netlify.com/
GNU Affero General Public License v3.0
21 stars 25 forks source link

Add reaction mutation functionality #147

Closed li-boxuan closed 6 years ago

li-boxuan commented 6 years ago

Users can do meta-reviews directly on the gh-board.

Closes https://github.com/coala/gh-board/issues/146

TravisBuddy commented 6 years ago

Travis tests have failed

Hey @li-boxuan, Please read the following log in order to understand the failure reason. It'll be awesome if you fix what's wrong and commit the changes.

Node.js: undefined

npm run test ``` > gh-board@0.0.0 test /home/travis/build/coala/gh-board > ./script/run-test.sh +script/verify-files.sh +files=("issues.json" "recent-issues.json") +for file in '"${files[@]}"' +[[ -f issues.json ]] +echo 'File issues.json exists.' File issues.json exists. +for file in '"${files[@]}"' +[[ -f recent-issues.json ]] +echo 'File recent-issues.json exists.' File recent-issues.json exists. ++npm bin +/home/travis/build/coala/gh-board/node_modules/.bin/jest FAIL test/src/components/reactions.test.js ● Test suite failed to run ReferenceError: window is not defined 32 | constructor() { 33 | // Pull data from `localStorage` > 34 | this.storage = window.localStorage; | ^ 35 | const cache = this.storage.getItem('octokat-cache'); 36 | if (cache) { 37 | this.cachedETags = JSON.parse(cache); at new CacheHandler (src/github-client.js:34:20) at Object. (src/github-client.js:31:22) at Object. (src/components/reactions.jsx:4:1) at Object. (test/src/components/reactions.test.js:2:1) -------------------------|----------|----------|----------|----------|-------------------| File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | -------------------------|----------|----------|----------|----------|-------------------| All files | 0 | 0 | 0 | 0 | | script | 0 | 0 | 0 | 0 | | fetch-issues.js | 0 | 0 | 0 | 0 |... 58,159,162,166 | src | 0 | 0 | 0 | 0 | | bipartite-graph.js | 0 | 0 | 0 | 0 |... 15,17,18,38,41 | card-model.js | 0 | 0 | 0 | 0 |... 41,243,244,247 | database.js | 0 | 0 | 0 | 0 |... 42,344,345,349 | filter-store.js | 0 | 0 | 0 | 0 |... 79,180,182,184 | gantt-chart.js | 0 | 0 | 0 | 0 |... 24,325,326,329 | gfm-dom.js | 0 | 0 | 0 | 0 |... 35,136,137,138 | github-client.js | 0 | 0 | 0 | 0 |... 50,251,253,255 | github-graphql.js | 0 | 0 | 0 | 0 |... 31,637,642,645 | helpers.js | 0 | 0 | 0 | 0 |... 84,85,86,88,89 | history.js | 0 | 100 | 100 | 0 | 1 | index.js | 0 | 100 | 100 | 0 | 1,2,3,4,6,7,9 | initial-data.js | 0 | 0 | 0 | 0 | 1,2,4,5,6,9,10,17 | issue-store.js | 0 | 0 | 0 | 0 |... 93,594,596,598 | new-version-checker.js | 0 | 0 | 0 | 0 |... 32,34,35,36,39 | progress.js | 0 | 0 | 0 | 0 |... 26,29,30,33,34 | route-utils.js | 0 | 0 | 0 | 0 |... 02,403,404,405 | router.jsx | 0 | 100 | 0 | 0 |... 81,90,94,95,96 | settings-store.js | 0 | 0 | 0 | 0 |... 99,100,102,105 | user-store.js | 0 | 0 | 0 | 0 |... 38,40,41,42,47 | src/components | 0 | 0 | 0 | 0 | | anonymous-modal.jsx | 0 | 0 | 100 | 0 |... 16,17,18,20,23 | async-button.jsx | 0 | 0 | 100 | 0 |... 77,79,80,82,84 | batch-labels.jsx | 0 | 0 | 0 | 0 |... 22,324,325,328 | board.jsx | 0 | 0 | 0 | 0 |... 35,136,139,142 | burnup.jsx | 0 | 0 | 0 | 0 |... 06,232,239,241 | by-milestone-view.jsx | 0 | 0 | 0 | 0 |... 34,135,139,151 | by-user-view.jsx | 0 | 0 | 0 | 0 |... 08,109,112,124 | chart.jsx | 0 | 0 | 100 | 0 |... 70,71,72,74,76 | colored-icon.jsx | 0 | 0 | 0 | 0 |... 15,17,18,19,22 | dashboard.jsx | 0 | 0 | 0 | 0 |... 65,366,371,380 | diff-envs.jsx | 0 | 0 | 0 | 0 |... 62,63,65,68,71 | etherpad-file.jsx | 0 | 0 | 0 | 0 |... 29,30,31,35,36 | etherpad-issue.jsx | 0 | 0 | 0 | 0 |... 27,28,31,32,36 | etherpad-modal.jsx | 0 | 0 | 0 | 0 |... 48,51,58,73,83 | etherpad.jsx | 0 | 0 | 0 | 0 |... 63,164,165,167 | gantt-view.jsx | 0 | 0 | 0 | 0 |... 20,221,226,228 | gfm.jsx | 0 | 0 | 0 | 0 |... 70,272,276,279 | issue-blurb.jsx | 0 | 0 | 0 | 0 |... 43,144,146,149 | issue-list.jsx | 0 | 0 | 0 | 0 |... 53,154,160,163 | issue.jsx | 0 | 0 | 0 | 0 |... 59,560,562,567 | label-badge.jsx | 0 | 0 | 0 | 0 |... 32,35,36,48,64 | loadable.jsx | 0 | 0 | 0 | 0 |... 83,84,85,86,88 | login-modal.jsx | 0 | 0 | 0 | 0 |... 46,52,59,70,95 | merged-since.jsx | 0 | 0 | 0 | 0 |... 85,186,190,194 | move-modal.jsx | 0 | 0 | 0 | 0 |... 67,169,172,193 | not-found.jsx | 0 | 100 | 0 | 0 | 1,4 | reactions.jsx | 0 | 0 | 0 | 0 |... 29,130,137,169 | repo-kanban.jsx | 0 | 0 | 0 | 0 |... 03,204,206,217 | review-blurb.jsx | 0 | 100 | 0 | 0 |... 20,21,22,24,27 | review-list.jsx | 0 | 0 | 100 | 0 |... 56,57,58,64,67 | review.jsx | 0 | 0 | 0 | 0 |... 20,126,169,170 | time.jsx | 0 | 0 | 0 | 0 |... 73,76,77,78,79 | src/components/app | 0 | 0 | 0 | 0 | | filter-dropdown.jsx | 0 | 0 | 0 | 0 |... 68,369,370,373 | footer.jsx | 0 | 0 | 0 | 0 |... 78,79,80,81,84 | index.jsx | 0 | 0 | 100 | 0 |... 37,42,46,47,49 | nav.jsx | 0 | 0 | 0 | 0 |... 86,187,192,282 | saved-filters.jsx | 0 | 0 | 0 | 0 |... 47,49,50,55,57 | src/lib | 0 | 100 | 0 | 0 | | columns.js | 0 | 100 | 0 | 0 | 1,2,4,9,12,16,17 | -------------------------|----------|----------|----------|----------|-------------------| Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 33.066s Ran all test suites. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! gh-board@0.0.0 test: `./script/run-test.sh` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the gh-board@0.0.0 test script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/travis/.npm/_logs/2018-08-04T02_54_20_700Z-debug.log ```
blazeu commented 6 years ago

If using still like using HOC, you can make HOC from component with render prop, and use HOC if you only need to pass data props down and use component if only needed. i.e. in Dashboard component.

jayvdb commented 6 years ago

ack https://github.com/coala/gh-board/pull/147/commits/b062087825f01c1169accb646f0eaf0d1f0e7cb8 https://github.com/coala/gh-board/pull/147/commits/d4705c5332ecd8e4329f0b62f7df3c9312c35a01 https://github.com/coala/gh-board/pull/147/commits/d1a9bf25061800510cd9cf7d1c089900d2cbd1f1

jayvdb commented 6 years ago

@gitmate-bot ff

gitmate-bot commented 6 years ago

Hey! I'm GitMate.io! This pull request is being fastforwarded automatically. Please DO NOT push while fastforward is in progress or your changes would be lost permanently :warning:

gitmate-bot commented 6 years ago

Automated fastforward with GitMate.io was successful! :tada: