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