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

Method hasWriteAccess

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

Source from the content-addressed store, hash-verified

290 }
291
292 async hasWriteAccess() {
293 try {
294 const result: Endpoints['GET /repos/{owner}/{repo}']['response']['data'] = await this.request(
295 this.repoURL,
296 );
297 // update config repoOwner to avoid case sensitivity issues with GitHub
298 this.repoOwner = result.owner.login;
299 return result.permissions?.push ?? false;
300 } catch (error) {
301 console.error('Problem fetching repo data from GitHub');
302 throw error;
303 }
304 }
305
306 reset() {
307 // no op

Callers 1

authenticateMethod · 0.45

Calls 1

requestMethod · 0.95

Tested by

no test coverage detected