(code)
| 80 | } |
| 81 | |
| 82 | push(code) { |
| 83 | const changed = $('.diff-file:checked').toArray().map(elem => elem.value); |
| 84 | const files = changed.filter(f => code.gas[f]).map(f => { |
| 85 | return { |
| 86 | name: f, |
| 87 | content: code.gas[f] |
| 88 | } |
| 89 | }); |
| 90 | const deleteFiles = changed.filter(f => !code.gas[f]); |
| 91 | const comment = $('#commit-comment').val(); |
| 92 | const repo = getRepo(); |
| 93 | this.commitFiles(repo.fullName, getBranch(), null, files, deleteFiles, comment) |
| 94 | .then(() => { |
| 95 | showLog(`Successfully push to ${getBranch()} of ${repo.fullName}`); |
| 96 | }) |
| 97 | .catch((err) => { |
| 98 | showLog('Failed to push', LEVEL_ERROR); |
| 99 | }); |
| 100 | } |
| 101 | |
| 102 | getAllBranches() { |
| 103 | return this.getAccessToken() |
no test coverage detected