MCPcopy Create free account
hub / github.com/decaporg/decap-cms / user

Method user

packages/decap-cms-backend-github/src/API.ts:284–293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

282 static DEFAULT_COMMIT_MESSAGE = 'Automatically generated by Decap CMS';
283
284 user(): Promise<{ name: string; login: string; email?: string }> {
285 if (!this._userPromise) {
286 this._userPromise = this.getUser({ token: this.token });
287 }
288 return this._userPromise.then(user => ({
289 name: user.name || 'Unknown',
290 login: user.login,
291 email: user.email ?? undefined,
292 }));
293 }
294
295 async hasWriteAccess() {
296 try {

Callers 1

authenticateMethod · 0.45

Calls 1

getUserMethod · 0.95

Tested by

no test coverage detected