Skip to content

Commit 4c11cec

Browse files
committed
Improving Readme and non-English Language support
1 parent d8bdd82 commit 4c11cec

File tree

13 files changed

+40
-30
lines changed

13 files changed

+40
-30
lines changed

.env.example

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# The ID of your GitHub App
1+
# Required. Details about your GitHub App
22
APP_ID=
33
PRIVATE_KEY=
44
WEBHOOK_SECRET=development
5+
# Optional. Language to be used for the bot. If empty, it will default to English
6+
BOT_LANGUAGE=en
57

6-
# Use `trace` to get verbose logging or `info` to show less
8+
# Optional. Use `trace` to get verbose logging or `info` to show less
79
LOG_LEVEL=debug

README.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ As more companies adopt GitHub Copilot, it becomes increasingly important to mea
88

99
Quantitative feedback from the Developer at the time of creating a PR provides valuable insights on the time savings experienced by the Developer. Time savings is needed first before other downstream impacts like velocity increases, or other improvements can happen. The level of granularity provides multiple feedback opportunities for Developers and can capture a variety of PRs so we can understand adoption challenges and improvement opportunities. If helpful, the Survey results may also be combined with Key Performance Indicators (KPIs) that the product provides to further contextualize the survey responses.
1010

11-
The survey responses are stored in a file called results.csv in a new branch "copilot-survey-engine-results" to provide insights into how developers are using the tool, the value they report, and the challenges they encounter.
11+
The survey responses are stored in a file called **results.csv** in the **copilot-survey-engine-results** branch to provide insights into how developers are using the tool, the value they report, and the challenges they encounter.
1212

1313
We hope that this project provides value to your organization, and we encourage you to contribute and build upon it. Your contributions can help further enhance the survey capabilities and provide even greater insights into the developer experience with Copilot.
1414

@@ -18,14 +18,14 @@ The application actively monitors three key events: the closure of a pull reques
1818

1919
### How a survey gets created
2020

21-
When a pull request is closed, the app automatically creates an issue that prompts the user with relevant survey questions. Our application is equipped to handle multiple languages, including English, Spanish, Portuguese, and French. For this, the engine performs a language analysis on the pull request description, matching it with the appropriate language when generating the corresponding issue.
21+
When a pull request is closed, the app automatically creates an issue that prompts the user with relevant survey questions. Our application is equipped to handle multiple languages, including English, Spanish, Portuguese, and French. Selection will be made according to the `BOT_LANGUAGE` value in the .env file.
2222

23-
Note: *If the env file does not contain a Language API Key or Endpoint, the analysis will be skipped and the default language will always be English.*
23+
> **Note**: *If the env file does not contain a value for `BOT_LANGUAGE` the default language will always be English.*
2424
2525
### Sample screenshot of a survey
2626
### Copilot Usage Survey
2727

28-
1. ***Did you use Copilot in developing this PR? (If you select No, just answer question 5***
28+
1. ***Did you use Copilot in developing this PR? (If you select No, just answer question 5)***
2929
- [ ] No
3030
- [ ] Yes
3131

@@ -36,8 +36,8 @@ Note: *If the env file does not contain a Language API Key or Endpoint, the anal
3636
(Example: The PR would normally take 5 days, but only took 4 days with Copilot then the answer is 20%)
3737
- [ ] 0%
3838
- [ ] > 0% but < 10%
39-
- [ ] > 11% but < 20%
40-
- [ ] > 21% but < 30%
39+
- [ ] 11% but < 20%
40+
- [ ] 21% but < 30%
4141
- [ ] ≥ 31% but < 40%
4242
- [ ] ≥ 41%
4343

@@ -62,9 +62,9 @@ Note: *If the env file does not contain a Language API Key or Endpoint, the anal
6262
- [ ] Work on other items in the backlog
6363
- [ ] Other. Please explain in the comment
6464

65-
### Where does the app store surveys?
65+
### Where does the app store survey results?
6666

67-
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.
67+
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 on a new branch called *copilot-survey-engine-results*.
6868

6969
## Setup. Deploy on your own environment
7070

@@ -75,7 +75,7 @@ The web server is the minimum requirement for this app to work and can be hosted
7575

7676
### Step 1. Execute locally and configure secrets
7777

78-
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:
78+
To run the application on you local machine you'll need to have installed [NodeJS](https://nodejs.org/). Once you have it, you can access to the folder where you've cloned this project and run the following:
7979

8080
```sh
8181
# Install dependencies
@@ -85,11 +85,19 @@ npm install
8585
npm start
8686
```
8787

88-
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.
88+
Once the service is running, you will see a listening endpoint in your terminal. Please follow the link, and you will find a screen like the following image.
89+
90+
![Alt text](image-1.png)
91+
92+
As a first time execution probot is prompting you for creating a new GitHub App or connect it with an existing GitHub 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.
93+
94+
> **Note**: Make sure to delete the `WEBHOOK_PROXY_URL` value from the env file and confirm that all details regarding the GitHub App are correct.
8995
9096
### Step 3. Deploy your App!
9197

92-
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.
98+
Once you have your source code deployed in the web server or hosting platform of your choosing, finally go to your GitHub App General settings and update your webhook URL to reflect your Web Server URL.
99+
100+
![Alt text](image-2.png)
93101

94102
### Step 4. Test your App!
95103

image-1.png

129 KB
Loading

image-2.png

76 KB
Loading

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = (app) => {
1919
let pr_number = context.payload.pull_request.number;
2020
let pr_author = context.payload.pull_request.user.login;
2121
let organization_name = context.payload.repository.owner.login;
22-
let detectedLanguage = "en";
22+
let detectedLanguage = process.env.BOT_LANGUAGE ? process.env.BOT_LANGUAGE : "en";
2323

2424
// read file that aligns with detected language
2525
const issue_body = fs.readFileSync(

issue_template/copilot-usage-en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ For Pull Request XXX:
1111
(Example: The PR would normally take 5 days, but only took 4 days with Copilot then the answer is 20%)
1212
- [ ] 0%
1313
- [ ] > 0% but < 10%
14-
- [ ] > 11% but < 20%
15-
- [ ] > 21% but < 30%
14+
- [ ] 11% but < 20%
15+
- [ ] 21% but < 30%
1616
- [ ] ≥ 31% but < 40%
1717
- [ ] ≥ 41%
1818

issue_template/copilot-usage-es.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Para el Pull Request XXX:
44

5-
1. *** ¿Utilizó Copilot para desarrollar este PR? (Si selecciona No, simplemente responda la pregunta 5)***
5+
1. ***¿Utilizó Copilot para desarrollar este PR? (Si selecciona No, simplemente responda la pregunta 5)***
66
- [ ] No
77
- [ ] Si
88

@@ -11,8 +11,8 @@ Para el Pull Request XXX:
1111
(Ejemplo: el PR normalmente tomaría 5 días, pero solo tomó 4 días con Copilot, entonces la respuesta es 20%)
1212
- [ ] 0%
1313
- [ ] > 0% pero < 10%
14-
- [ ] > 11% pero < 20%
15-
- [ ] > 21% pero < 30%
14+
- [ ] 11% pero < 20%
15+
- [ ] 21% pero < 30%
1616
- [ ] ≥ 31% pero < 40%
1717
- [ ] ≥ 41%
1818

@@ -22,7 +22,7 @@ Para el Pull Request XXX:
2222

2323
4. ***¿Con qué frecuencia usaste Copilot en este PR?***
2424
- [ ] Todo o la mayor parte del tiempo
25-
- [] Aproximadamente la mitad del tiempo
25+
- [ ] Aproximadamente la mitad del tiempo
2626
- [ ] Algo de tiempo
2727
- [ ] No mucho
2828

issue_template/copilot-usage-fr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Pour le Pull Request XXX :
1111
(Exemple : le PR prendrait normalement 5 jours, mais n'a pris que 4 jours avec Copilot alors la réponse est 20 %)
1212
- [ ] 0%
1313
- [ ] > 0 % mais < 10 %
14-
- [ ] > 11 % mais < 20 %
15-
- [ ] > 21 % mais < 30 %
14+
- [ ] 11 % mais < 20 %
15+
- [ ] 21 % mais < 30 %
1616
- [ ] ≥ 31 % mais < 40 %
1717
- [ ] ≥ 41%
1818

issue_template/copilot-usage-pt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Para o Pull Request XXX:
1111
(Exemplo: o PR normalmente levaria 5 dias, mas demorou apenas 4 dias com o Copilot, então a resposta é 20%)
1212
- [ ] 0%
1313
- [ ] > 0% mas < 10%
14-
- [ ] > 11% mas < 20%
15-
- [ ] > 21% mas < 30%
14+
- [ ] 11% mas < 20%
15+
- [ ] 21% mas < 30%
1616
- [ ] ≥ 31% mas < 40%
1717
- [ ] ≥ 41%
1818

test/fixtures/issue_body.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ For Pull Request #44:
1111
(Example: The PR would normally take 5 days, but only took 4 days with Copilot then the answer is 20%)
1212
- [ ] 0%
1313
- [ ] > 0% but < 10%
14-
- [ ] > 11% but < 20%
15-
- [ ] > 21% but < 30%
14+
- [ ] 11% but < 20%
15+
- [ ] 21% but < 30%
1616
- [ ] ≥ 31% but < 40%
1717
- [ ] ≥ 41%
1818

0 commit comments

Comments
 (0)