3 Commits
Author SHA1 Message Date
Steve Kowalik 5a8bc20314 Fix two RST warnings in Webhook.rst (#1512)
The final code block in the example is not Python code, and the
underlines were incorrect, correct both.
2020-05-11 09:56:53 +10:00
Steve Kowalik b7894ea00c Drop Python 2 support (#1329)
With the Python 2 deadline gone, it's time to move with the times and
switch to Python 3 only.
2020-01-06 18:01:38 +11:00
Levi Matus 9d2129c7b9 Example: Listen for New Events with PyGithub and Pyramid (#930)
## What does this change do?
Adds a small demo implementation of how one might use webhooks to listen for
new events in a given repository.

### Additions
#### doc/examples/Webhook.rst
Adds a new `.rst` file, `Webhook.rst`, which can be used for demonstrating the usage of Webhooks in PyGithub.

The example that I've added shows how to continually listen for events using Pyramid in conjunction with PyGithub.

## Motivation
This example is in the spirit of #874. [It was asked](https://github.com/PyGithub/PyGithub/issues/874#issuecomment-429075695) that someone provide an example of how to listen to events from a repository.

## How has this been tested?
I've built the docs locally and made sure the HTML is generated as expected.

## Screenshots
![webhook1](https://user-images.githubusercontent.com/16039329/46991191-40e58900-d0db-11e8-87e4-d5cf2cc18b0a.png)
![webhook2](https://user-images.githubusercontent.com/16039329/46991193-42af4c80-d0db-11e8-9b20-678f70e6baee.png)
2018-10-16 23:14:40 +08:00