(config: Config)
| 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 |
nothing calls this directly
no outgoing calls
no test coverage detected