From 2861b5683cb24af05ef9f47f00822566b8851f20 Mon Sep 17 00:00:00 2001 From: Eyal Keren Date: Wed, 3 Jan 2024 09:35:30 +0200 Subject: [PATCH] fix(github): can't compile to tf-aws, missing cloud.service (#50) * fix(github): using interface for credentials instead of cloud.secret * fix(github): can't compile to tf-aws, missing cloud.service * fix(github): can't compile to tf-aws, missing cloud.service --- github/lib.w | 22 ++++++++++++++-------- github/package.json | 2 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/github/lib.w b/github/lib.w index db4ea463..c84bf849 100644 --- a/github/lib.w +++ b/github/lib.w @@ -44,15 +44,21 @@ pub class ProbotApp { status: 200 }; }); - if !std.Node.of(this).app.isTestEnvironment { - let devNgrok = new ngrok.Ngrok( - url: this.api.url, - ); - - new cloud.OnDeploy(inflight () => { - this.updateWebhookUrl("{devNgrok.url}/webhook"); - }); + let target = util.env("WING_TARGET"); + if target == "sim" { + let devNgrok = new ngrok.Ngrok( + url: this.api.url, + ); + + new cloud.OnDeploy(inflight () => { + this.updateWebhookUrl("{devNgrok.url}/webhook"); + }); + } else { + new cloud.OnDeploy(inflight () => { + this.updateWebhookUrl("{this.api.url}/webhook"); + }); + } } } diff --git a/github/package.json b/github/package.json index b645338c..a4ae2c0f 100644 --- a/github/package.json +++ b/github/package.json @@ -1,7 +1,7 @@ { "name": "@winglibs/github", "description": "A Wing library for GitHub Probot", - "version": "0.0.3", + "version": "0.0.4", "author": { "name": "Elad Cohen", "email": "eladc@wing.cloud"