Skip to content

Commit 2824e78

Browse files
author
gitName
committed
Acrolinx
1 parent d46b905 commit 2824e78

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

learn-pr/azure/monitor-github-events-with-a-function-triggered-by-a-webhook/includes/10-summary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
In this module, you've learned about the benefits of webhooks. You created a function in Azure Functions triggered by a webhook. You saw how to set up a webhook for a GitHub repository and how to trigger your function with a GitHub event. Finally, you learned how to protect your function using a secret.
1+
In this module, you learned about the benefits of webhooks. You created a function in Azure Functions triggered by a webhook. You saw how to set up a webhook for a GitHub repository and how to trigger your function with a GitHub event. Finally, you learned how to protect your function using a secret.
22

33
[!include[](../../../includes/azure-sandbox-cleanup.md)]
44

learn-pr/azure/monitor-github-events-with-a-function-triggered-by-a-webhook/includes/5-exercise-setup-webhook-for-github-repo.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
In this exercise, you'll set up a webhook for a GitHub repository. You'll learn how to listen for specific events (in this case, the *Gollum* event), and how to make the webhook callback in your function when the event is triggered.
1+
In this exercise, you set up a webhook for a GitHub repository. You learn how to listen for specific events; in this case, the *Gollum* event. You also learn how to make the webhook callback in your function when the event is triggered.
22

33
## Setup
44

@@ -24,7 +24,7 @@ In this exercise, you'll set up a webhook for a GitHub repository. You'll learn
2424

2525
**Gollum** is the name of a GitHub event that is fired whenever a page in a repository's wiki is created or updated.
2626

27-
1. On the home page in the Wiki view is a **Pages** sidebar that lists the pages in your repo. Select **Home** to display the home page.
27+
1. On the home page in the Wiki view, there's a **Pages** sidebar that lists the pages in your repo. Select **Home** to display the home page.
2828

2929
1. On the home page, in the top menu bar, select **Settings**. The **Settings** pane appears.
3030

@@ -72,7 +72,7 @@ In this exercise, you'll set up a webhook for a GitHub repository. You'll learn
7272
7373
1. In the list, select the top (latest) delivery entry by selecting the ellipsis (**...**).
7474
75-
You'll see the **Headers** section, including the *Event*:
75+
You should see the **Headers** section, including the *Event*:
7676
7777
```json
7878
Request URL: https://testwh123456.azurewebsites.net/api/HttpTrigger1?code=aUjXIpqdJ0ZHPQuB0SzFegxGJu0nAXmsQBnmkCpJ6RYxleRaoxJ8cQ%3D%3D
@@ -87,7 +87,7 @@ In this exercise, you'll set up a webhook for a GitHub repository. You'll learn
8787
X-GitHub-Hook-Installation-Target-Type: repository
8888
```
8989
90-
You'll also see that the **Payload** section contains information indicating that your wiki page was edited. The payload contains **pages**, **repository**, and **sender** sections, which should look something like the following example:
90+
You should also see that the **Payload** section contains information indicating that your wiki page was edited. The payload contains **pages**, **repository**, and **sender** sections, which should look something like the following example:
9191
9292
```json
9393
"pages": [
@@ -113,4 +113,4 @@ In this exercise, you'll set up a webhook for a GitHub repository. You'll learn
113113
114114
1. Under the **Recent Deliveries** tab, select the **Response** tab.
115115
116-
You'll see the response message generated by the Azure function. For this example, the body should contain the message: *This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response*.
116+
You should see the response message generated by the Azure function. For this example, the body should contain the message: *This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response*.

learn-pr/azure/monitor-github-events-with-a-function-triggered-by-a-webhook/includes/6-trigger-function-with-github-event.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
The GitHub *Gollum* event lets you listen for wiki updates. When this event occurs, your Azure HttpTrigger function is triggered, and you can parse the payload to retrieve and process the data that was sent.
22

3-
You've shown your IT department that you can listen for *Gollum* events on your company's GitHub repository by setting up a webhook. You've also demonstrated how Azure Function apps enable you to run code when a function receives a webhook request.
3+
You showed your IT department that you can listen for *Gollum* events on your company's GitHub repository by setting up a webhook. You also demonstrated how Azure Function apps enable you to run code when a function receives a webhook request.
44

5-
In this unit, we'll examine the payload from the *Gollum* event so we can update our function to parse it correctly.
5+
In this unit, we examine the payload from the *Gollum* event so we can update our function to parse it correctly.
66

77
## Gollum event payload
88

@@ -48,7 +48,7 @@ For example, a payload might look like the following code.
4848
}
4949
```
5050

51-
This information is passed as the body of an HTTP POST request. We'll need to update our function logic to parse and process this information correctly.
51+
This information is passed as the body of an HTTP POST request. We need to update our function logic to parse and process this information correctly.
5252

5353
## Parse information from the Gollum event
5454

learn-pr/azure/monitor-github-events-with-a-function-triggered-by-a-webhook/includes/7-exercise-trigger-function-with-github-event.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
In this exercise, you'll update your function to parse information from the GitHub webhook payload, and display the results.
1+
In this exercise, you update your function to parse information from the GitHub webhook payload, and display the results.
22

33
## Update your function to parse the webhook payload
44

@@ -28,7 +28,7 @@ In this exercise, you'll update your function to parse information from the GitH
2828
}
2929
```
3030

31-
This code retrieves the event type from the request header, and the title and action fields from the message body. This information indicates that page has changed, and whether it has been edited or newly created. The code then constructs a response that summarizes the action. Here's what the JavaScript should look like:
31+
This code retrieves the event type from the request header, and the title and action fields from the message body. This information indicates that page changed, and whether it's been edited or newly created. The code then constructs a response that summarizes the action. Here's what the JavaScript should look like:
3232

3333
```JavaScript
3434
module.exports = async function (context, req) {
@@ -77,7 +77,7 @@ In this exercise, you'll update your function to parse information from the GitH
7777
7878
1. Select the latest (top) delivery entry (*redelivery*) by selecting its ellipsis button (**...**).
7979
80-
1. Select the **Response** tab. You'll see how the webhook has triggered your function, which then parsed the information, and sent a response similar to the following text:
80+
1. Select the **Response** tab. You should see how the webhook has triggered your function, which then parsed the information, and sent a response similar to the following text:
8181
8282
```text
8383
Page is Home, Action is edited, Event Type is gollum

learn-pr/azure/monitor-github-events-with-a-function-triggered-by-a-webhook/includes/8-secure-webhook-payloads-with-secret.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
After your function is configured to receive payloads, it listens for any payload sent to the endpoint you configured. For security reasons, you might want to limit requests to those coming from GitHub. There are a few ways to go about this. For example, you could opt to approve requests from GitHub's IP address. An easier method is to set up a secret token and validate the request using this token.
22

3-
In the example scenario, your IT Department's management are happy with the webhook-triggered function that you've created in an Azure Functions app. All of the information regarding updates to the company wiki are being parsed by that function and sent to the business each time the *Gollum* event is triggered. The management has asked how secure is the information passed from GitHub. They've asked you to find a way to secure the information, and verify it's GitHub that is sending updates.
3+
In the example scenario, your IT Department's management is happy with the webhook-triggered function that you've created in an Azure Functions app. All of the information regarding updates to the company wiki are being parsed by that function and sent to the business each time the *Gollum* event is triggered. The management has asked how secure is the information passed from GitHub. They've asked you to find a way to secure the information, and verify it's GitHub that is sending updates.
44

55
In this unit, you'll learn how to secure your webhook payload with a secret and validate payloads from GitHub.
66

learn-pr/azure/monitor-github-events-with-a-function-triggered-by-a-webhook/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ metadata:
1010
ms.service: azure-functions
1111
manager: susanpotter
1212
title: Monitor GitHub events by using a webhook with Azure Functions
13-
summary: Webhooks offer a lightweight mechanism for your app to be notified by another service when something of interest happens. In this module. you'll learn how to trigger an Azure function with a GitHub webhook and parse the payload for insights.
13+
summary: Webhooks offer a lightweight mechanism for your app to be notified by another service when something of interest happens. In this module, you'll learn how to trigger an Azure function with a GitHub webhook and parse the payload for insights.
1414
abstract: |
1515
In this module, you will:
1616
- Trigger your function with a webhook.

0 commit comments

Comments
 (0)