(config: Config)
| 225 | graphQLClient?: ApolloClient<NormalizedCacheObject>; |
| 226 | |
| 227 | constructor(config: Config) { |
| 228 | this.apiRoot = config.apiRoot || 'https://gitlab.com/api/v4'; |
| 229 | this.graphQLAPIRoot = config.graphQLAPIRoot || 'https://gitlab.com/api/graphql'; |
| 230 | this.token = config.token || false; |
| 231 | this.requestFunction = config.requestFunction; |
| 232 | this.branch = config.branch || 'master'; |
| 233 | this.repo = config.repo || ''; |
| 234 | this.repoURL = `/projects/${encodeURIComponent(this.repo)}`; |
| 235 | this.squashMerges = config.squashMerges; |
| 236 | this.initialWorkflowStatus = config.initialWorkflowStatus; |
| 237 | this.cmsLabelPrefix = config.cmsLabelPrefix; |
| 238 | if (config.useGraphQL === true) { |
| 239 | this.graphQLClient = this.getApolloClient(); |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | getApolloClient() { |
| 244 | const authLink = setContext((_, { headers }) => { |
nothing calls this directly
no test coverage detected