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: learn-pr/azure/monitor-github-events-with-a-function-triggered-by-a-webhook/includes/10-summary.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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.
Copy file name to clipboardExpand all lines: learn-pr/azure/monitor-github-events-with-a-function-triggered-by-a-webhook/includes/5-exercise-setup-webhook-for-github-repo.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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.
2
2
3
3
## Setup
4
4
@@ -24,7 +24,7 @@ In this exercise, you'll set up a webhook for a GitHub repository. You'll learn
24
24
25
25
**Gollum** is the name of a GitHub event that is fired whenever a page in a repository's wiki is created or updated.
26
26
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.
28
28
29
29
1. On the home page, in the top menu bar, select **Settings**. The **Settings** pane appears.
30
30
@@ -72,7 +72,7 @@ In this exercise, you'll set up a webhook for a GitHub repository. You'll learn
72
72
73
73
1. In the list, select the top (latest) delivery entry by selecting the ellipsis (**...**).
74
74
75
-
You'll see the **Headers** section, including the *Event*:
75
+
You should see the **Headers** section, including the *Event*:
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:
91
91
92
92
```json
93
93
"pages": [
@@ -113,4 +113,4 @@ In this exercise, you'll set up a webhook for a GitHub repository. You'll learn
113
113
114
114
1. Under the **Recent Deliveries** tab, select the **Response** tab.
115
115
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*.
Copy file name to clipboardExpand all lines: learn-pr/azure/monitor-github-events-with-a-function-triggered-by-a-webhook/includes/6-trigger-function-with-github-event.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
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.
2
2
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.
4
4
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.
6
6
7
7
## Gollum event payload
8
8
@@ -48,7 +48,7 @@ For example, a payload might look like the following code.
48
48
}
49
49
```
50
50
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.
Copy file name to clipboardExpand all lines: learn-pr/azure/monitor-github-events-with-a-function-triggered-by-a-webhook/includes/7-exercise-trigger-function-with-github-event.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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.
2
2
3
3
## Update your function to parse the webhook payload
4
4
@@ -28,7 +28,7 @@ In this exercise, you'll update your function to parse information from the GitH
28
28
}
29
29
```
30
30
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:
32
32
33
33
```JavaScript
34
34
module.exports = async function (context, req) {
@@ -77,7 +77,7 @@ In this exercise, you'll update your function to parse information from the GitH
77
77
78
78
1. Select the latest (top) delivery entry (*redelivery*) by selecting its ellipsis button (**...**).
79
79
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:
81
81
82
82
```text
83
83
Page is Home, Action is edited, Event Type is gollum
Copy file name to clipboardExpand all lines: learn-pr/azure/monitor-github-events-with-a-function-triggered-by-a-webhook/includes/8-secure-webhook-payloads-with-secret.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
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.
2
2
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.
4
4
5
5
In this unit, you'll learn how to secure your webhook payload with a secret and validate payloads from GitHub.
Copy file name to clipboardExpand all lines: learn-pr/azure/monitor-github-events-with-a-function-triggered-by-a-webhook/index.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ metadata:
10
10
ms.service: azure-functions
11
11
manager: susanpotter
12
12
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.
0 commit comments