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

Method getNamespaces

src/scm/gitlab.js:157–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155 }
156
157 getNamespaces() {
158 return getAllItems(Promise.resolve({
159 tokenParam: this.tokenParam,
160 items: [],
161 url: `${this.baseUrl}/groups?per_page=25`
162 }),
163 this.followPaginate,
164 'gitlab'
165 )
166 .then(groups => {
167 this.namespaces = [this.user].concat(groups.map(group => group.name));
168 this.namesToIds.groups = groups.reduce((obj, item) => (obj[item.name] = item.id, obj), {});
169 return this.namespaces;
170 })
171 .catch((err) => {
172 showLog('Failed to get user info.', LEVEL_ERROR);
173 });
174 }
175
176 getRepos() { // Named Projects in gitlab
177 return getAllItems(Promise.resolve({

Callers 1

initContextFunction · 0.45

Calls 2

getAllItemsFunction · 0.85
showLogFunction · 0.85

Tested by

no test coverage detected