(opts = {})
| 122 | |
| 123 | class CML { |
| 124 | constructor(opts = {}) { |
| 125 | fixGitSafeDirectory(); // https://github.com/iterative/cml/issues/970 |
| 126 | |
| 127 | const { driver, repo, token } = opts; |
| 128 | |
| 129 | this.repo = uriNoTrailingSlash(repo || gitRemoteUrl()).replace( |
| 130 | /\.git$/, |
| 131 | '' |
| 132 | ); |
| 133 | this.token = token || inferToken(); |
| 134 | this.driver = driver || inferDriver({ repo: this.repo }); |
| 135 | } |
| 136 | |
| 137 | async revParse({ ref = 'HEAD' } = {}) { |
| 138 | try { |
nothing calls this directly
no test coverage detected