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

Method constructor

packages/decap-cms-backend-gitea/src/API.ts:115–130  ·  view source on GitHub ↗
(config: Config)

Source from the content-addressed store, hash-verified

113 commitAuthor?: {};
114
115 constructor(config: Config) {
116 this.apiRoot = config.apiRoot || 'https://try.gitea.io/api/v1';
117 this.token = config.token || '';
118 this.branch = config.branch || 'master';
119 this.repo = config.repo || '';
120 this.originRepo = config.originRepo || this.repo;
121 this.repoURL = `/repos/${this.repo}`;
122 this.originRepoURL = `/repos/${this.originRepo}`;
123
124 const [repoParts, originRepoParts] = [this.repo.split('/'), this.originRepo.split('/')];
125 this.repoOwner = repoParts[0];
126 this.repoName = repoParts[1];
127
128 this.originRepoOwner = originRepoParts[0];
129 this.originRepoName = originRepoParts[1];
130 }
131
132 static DEFAULT_COMMIT_MESSAGE = 'Automatically generated by Static CMS';
133

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected