Worker uses the github access token

This commit is contained in:
Zoe Roux
2022-03-03 17:13:59 +01:00
parent 7271820644
commit c5bf43de37
3 changed files with 6 additions and 4 deletions
+4 -3
View File
@@ -10,10 +10,11 @@ export class Github extends BaseService {
private _github: Octokit;
private _websocket: Webhooks;
constructor(_: Pipeline) {
constructor(pipeline: Pipeline) {
super();
///TODO Get various credentials
this._github = new Octokit();
if (!("Github" in pipeline.userData))
throw new Error("User not authenticated via github");
this._github = new Octokit({auth: pipeline.userData["Github"].accessToken});
this._websocket = new Webhooks({
secret: "bidibi"
});