MCPcopy
hub / github.com/leonhartX/gas-github / push

Method push

src/scm/bitbucket.js:82–100  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

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()

Callers 1

followDirectoryMethod · 0.45

Calls 4

commitFilesMethod · 0.95
getRepoFunction · 0.85
getBranchFunction · 0.85
showLogFunction · 0.85

Tested by

no test coverage detected