refactor: clean up github and rewrite its auth
This commit is contained in:
@@ -1,25 +1,10 @@
|
||||
import {
|
||||
IService,
|
||||
IAuthentication,
|
||||
IApp,
|
||||
IJSONObject,
|
||||
} from '@automatisch/types';
|
||||
import Authentication from './authentication';
|
||||
import Triggers from './triggers';
|
||||
import Data from './data';
|
||||
|
||||
export default class Github implements IService {
|
||||
authenticationClient: IAuthentication;
|
||||
triggers: Triggers;
|
||||
data: Data;
|
||||
|
||||
constructor(
|
||||
appData: IApp,
|
||||
connectionData: IJSONObject,
|
||||
parameters: IJSONObject
|
||||
) {
|
||||
this.authenticationClient = new Authentication(appData, connectionData);
|
||||
this.data = new Data(connectionData, parameters);
|
||||
this.triggers = new Triggers(connectionData, parameters);
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'Github',
|
||||
key: 'github',
|
||||
baseUrl: 'https://github.com',
|
||||
apiBaseUrl: 'https://api.github.com',
|
||||
iconUrl: '{BASE_URL}/apps/github/assets/favicon.svg',
|
||||
authDocUrl: 'https://automatisch.io/docs/connections/github',
|
||||
primaryColor: '000000',
|
||||
supportsConnections: true,
|
||||
};
|
||||
|
Reference in New Issue
Block a user