copilot-survey-engine icon indicating copy to clipboard operation
copilot-survey-engine copied to clipboard

Setup Support

Open AadharshRamanathan10 opened this issue 1 year ago • 7 comments

Following the Read-me also couldn't help setup the app.

AadharshRamanathan10 avatar Apr 16 '24 12:04 AadharshRamanathan10

Hi @AadharshRamanathan10, can you please describe what went wrong when setting up the app? Also, please provide in which Org you've installed it - your personal account vs an organization?

mageroni avatar Apr 16 '24 19:04 mageroni

Hi @mageroni. It is a personal account I'm working on . These are summarized steps what I have followed :

  1. Created and deployed resources in Azure
  2. Created a Github App and installed it in the target repo say X.
  3. Cloned the given code , installed the packages and registered the app in the probot site.
  4. Changed the webhook to whats given in the probot site.
  5. Apart from the automatically updated env file components I also updated the env file with the deployed azure resources which was mentioned in the steps.
  6. Deployed the cloned copilot-survey-engine app in azure app services as a webapp .

According to what is mentioned in the steps if we create a PR in the X repo and merge/close it , an issue is supposed to pop up which has the survey in it and once finishing the response will be added to our deployed SQL Db . But I couldn't see any issues created . Kindly throw me some light on where I could have gone wrong .

AadharshRamanathan10 avatar Apr 17 '24 05:04 AadharshRamanathan10

Thanks for the detail @AadharshRamanathan10. I'll recommend to check the following:

  1. Let's make sure that we have probot create the app from scratch, instead of creating it beforehand and just connecting it with probot. If we use the latter, the permissions may not be set correctly.
  2. Make sure we eliminate the webhook variable that automatically pops up in the env file.
  3. Check the log stream for the app service to review any errors being logged.

If the problem persists, please share a screenshot from the log stream console in app service.

mageroni avatar Apr 18 '24 19:04 mageroni

I created the app using Probot , but the webhook secret tends to disappear as we set and save in the app created using Probot . I then registered the app and deployed it in azure. I tried with both having and not having the webhook secret in the env file and redeploying it , but either of them creates an issue while creating/closing a PR . The logs consists of get requests , but no requests are raised when PR is created or closed , ill attach my transaction summary image from app insights below. image If there are other ways to contact for support(mail , slack , etc) it will be even helpful.

AadharshRamanathan10 avatar Apr 23 '24 14:04 AadharshRamanathan10

As I'm seeing the error is produced even before it gets logged in the Application Insights, I'll recommend to check the following two places:

  1. Recent deliveries in the GitHub App and corresponding response https://docs.github.com/en/webhooks/testing-and-troubleshooting-webhooks/viewing-webhook-deliveries#viewing-deliveries-for-github-app-webhooks
  2. App Service Log Stream specifically https://techcommunity.microsoft.com/t5/apps-on-azure-blog/azure-app-service-logging-how-to-monitor-your-web-apps-in-real/ba-p/3800390

This may shed more light on what is happening.

mageroni avatar Apr 30 '24 03:04 mageroni

I have attached the screenshot for recent deliveries , I created a PR and closed it , I have attached it below image

But If I go for the app service logs using scm which I tried earlier as well , Im getting only a set of gets and loading probot logs but no error log or anything mentioning about github app.

AadharshRamanathan10 avatar Apr 30 '24 13:04 AadharshRamanathan10

Thanks for sharing @AadharshRamanathan10

In that case, please confirm whether you have installed the GitHub App in a repo that is part of an organization or part of your personal account. If it's the latter, please note that index.js includes a verification to check first if the author of the Pull Request is a user with a Copilot license assigned. If that's not case, no issue will be opened. Feel free to modify such check if you're working on your personal account as the endpoint does not exists for such and will result in no issues being opened ever.

Additionally, if you're repo belongs to an organization, but your Copilot license is assigned elsewhere, no issue will be opened either per this verification.

mageroni avatar May 06 '24 17:05 mageroni