You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-23Lines changed: 5 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,23 +57,16 @@ Note: *If the env file does not contain a Language API Key or Endpoint, the anal
57
57
58
58
### Where does the app store surveys?
59
59
60
-
As we receive edits on the issue, the App will validate the responses received (options selected) and once all questions have been answered, the issue will be closed automatically and the responses will be saved into a private SQL database.
60
+
As we receive edits on the issue, the App will validate the responses received (options selected) and once all questions have been answered, the issue will be closed automatically and the responses will be saved into a results.csv file in the same repo in which the issue was created.
61
61
62
62
## Setup. Deploy on your own environment
63
63
64
64
For doing a local deployment of this GitHub App, you will need to set up an environment with the following components:
65
65
- Web Server
66
-
- SQL Database
67
-
- Azure Cognitive Service for Language (optional)
68
-
- Azure Applications Insights (optional)
69
66
70
-
The web server and SQL database are the minimum requirements for this app to work and can be hosted on any environment of your choosing (cloud or on-prem). If you decide to do the deployment on Azure, this guide will help you!
67
+
The web server is the minimum requirement for this app to work and can be hosted on any environment of your choosing (cloud or on-prem). This guide will help you on the next steps!
71
68
72
-
### Step 1. Create the resources
73
-
74
-
You can use this link to deploy all resources automatically in your Azure subscription [](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fmageroni%2Fcopilot-survey-engine%2Fmain%2Fdeployment%2Ftemplate.json)
75
-
76
-
### Step 2. Execute locally and configure secrets
69
+
### Step 1. Execute locally and configure secrets
77
70
78
71
To run the application on you local machine you'll need to have installed NodeJS. Once you have it, you can access to the folder where you've cloned this project and run the following:
79
72
@@ -87,26 +80,15 @@ npm start
87
80
88
81
As a first time execution probot will prompt you for creating a new GitHub App or connect it with an existing App. As you complete the requested information, a .env file will get created in your local source code and all the private information regarding your GitHub App will be automatically written there. If you need guidance on how to configure your first GitHub App, please review this guide https://probot.github.io/docs/development/#configuring-a-github-app.
89
82
90
-
You will also need to provide the DATABASE_CONNECTION_STRING in your env file.
91
-
92
-
Optionally if you'll be also using Application Ingishts please provide the value for APPLICATIONINSIGHTS_CONNECTION_STRING. You can search for this in your Azure Portal, going to the resource group you've created previously. Select the resource of type Application Insights and copy the Connection String in the Essentials section of the Overview page.
93
-
94
-
Optionally if you'll be also using Languange detection API please provide the value for LANGUAGE_API_ENDPOINT, LANGUAGE_API_KEY. You can search for this in your Azure Portal, going to the resource group you've created previously. Select the resource of type Language and go to Keys and Endpoint. Copy one of the keys and corresponding endpoint.
95
-
96
83
### Step 3. Deploy your App!
97
84
98
-
For a quick deployment you could open your Visual Studio Code and open the cloned project. Make sure you have the Azure Tools extension installed. If not, please install it https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-node-azure-pack
99
-
100
-
Once you have the extension sign in to Azure with your credentials go to your Explorer view and right click in the file directory to select the option "Deploy to web app". Select the subscription in which you've created the resources in step 1. Select the name you chose for the App Service created in step 1.
101
-
102
-
Finally go to your GitHub App and update your webhook URL to reflect your App Service URL.
103
-
85
+
Once you have your source code deployed in the web server or hosting platform of your choosing, finally go to your GitHub App and update your webhook URL to reflect your Web Server URL.
104
86
105
87
### Step 4. Test your App!
106
88
107
89
Make sure you have your app installed in at least one repo.
108
90
109
-
In such repo, create a pull request and close it (either close it or merge/complete it). Confirm that an issue has been created with the name "Copilot Usage - PR#XX". Answer the questions and confirm that the issue is closed and the data has been recorded into your database.
91
+
In such repo, create a pull request and close it (either close it or merge/complete it). Confirm that an issue has been created with the name "Copilot Usage - PR#XX". Answer the questions and confirm that the issue is closed and the data has been recorded into a file named results.csv
110
92
111
93
Congrats!!!!! Enjoy and keep expanding the project.
0 commit comments