Last active
October 26, 2018 23:48
-
-
Save the-vampiire/46b2263c101d395e8f34dfe7d18dae52 to your computer and use it in GitHub Desktop.
github app webhook event types (.json and .txt)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file may be used to create an environment using: | |
# $ conda create --name <env> --file <this file> | |
# platform: osx-64 | |
beautifulsoup4=4.6.3=py36_0 | |
ca-certificates=2018.03.07=0 | |
certifi=2018.10.15=py36_0 | |
libcxx=4.0.1=h579ed51_0 | |
libcxxabi=4.0.1=hebd6815_0 | |
libedit=3.1.20170329=hb402a30_2 | |
libffi=3.2.1=h475c297_4 | |
ncurses=6.1=h0a44026_0 | |
openssl=1.1.1=h1de35cc_0 | |
pip=10.0.1=py36_0 | |
python=3.6.7=haf84260_0 | |
readline=7.0=h1de35cc_5 | |
setuptools=40.4.3=py36_0 | |
sqlite=3.25.2=ha441bb4_0 | |
tk=8.6.8=ha441bb4_0 | |
wheel=0.32.2=py36_0 | |
xz=5.2.4=h1de35cc_4 | |
zlib=1.2.11=hf3cbc9b_2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"*": { | |
"description": "Any time an event is triggered", | |
"url": "https://developer.github.com/webhooks/#wildcard-event" | |
}, | |
"check_run": { | |
"url": "https://developer.github.com/v3/activity/events/types/#checkrunevent", | |
"description": "Any time a check run is created, requested, or rerequested." | |
}, | |
"check_suite": { | |
"url": "https://developer.github.com/v3/activity/events/types/#checksuiteevent", | |
"description": "Any time a check suite is completed, requested, or rerequested." | |
}, | |
"commit_comment": { | |
"url": "https://developer.github.com/v3/activity/events/types/#commitcommentevent", | |
"description": "Any time a Commit is commented on." | |
}, | |
"create": { | |
"url": "https://developer.github.com/v3/activity/events/types/#createevent", | |
"description": "Any time a Branch or Tag is created." | |
}, | |
"delete": { | |
"url": "https://developer.github.com/v3/activity/events/types/#deleteevent", | |
"description": "Any time a Branch or Tag is deleted." | |
}, | |
"deployment": { | |
"url": "https://developer.github.com/v3/activity/events/types/#deploymentevent", | |
"description": "Any time a Repository has a new deployment created from the API." | |
}, | |
"deployment_status": { | |
"url": "https://developer.github.com/v3/activity/events/types/#deploymentstatusevent", | |
"description": "Any time a deployment for a Repository has a status update from the API." | |
}, | |
"fork": { | |
"url": "https://developer.github.com/v3/activity/events/types/#forkevent", | |
"description": "Any time a Repository is forked." | |
}, | |
"github_app_authorization": { | |
"url": "https://developer.github.com/v3/activity/events/types/#githubappauthorizationevent", | |
"description": "Any time someone revokes their authorization of a GitHub App. GitHub Apps receive this webhook by default and cannot unsubscribe from this event." | |
}, | |
"gollum": { | |
"url": "https://developer.github.com/v3/activity/events/types/#gollumevent", | |
"description": "Any time a Wiki page is updated." | |
}, | |
"installation": { | |
"url": "https://developer.github.com/v3/activity/events/types/#installationevent", | |
"description": "Any time a GitHub App is installed or uninstalled." | |
}, | |
"installation_repositories": { | |
"url": "https://developer.github.com/v3/activity/events/types/#installationrepositoriesevent", | |
"description": "Any time a repository is added or removed from an installation." | |
}, | |
"issue_comment": { | |
"url": "https://developer.github.com/v3/activity/events/types/#issuecommentevent" | |
}, | |
"issues": { | |
"url": "https://developer.github.com/v3/activity/events/types/#issuesevent", | |
"description": "Any time an Issue is assigned, unassigned, labeled, unlabeled, opened, edited, milestoned, demilestoned, closed, or reopened." | |
}, | |
"label": { | |
"url": "https://developer.github.com/v3/activity/events/types/#labelevent", | |
"description": "Any time a Label is created, edited, or deleted." | |
}, | |
"marketplace_purchase": { | |
"url": "https://developer.github.com/v3/activity/events/types/#marketplacepurchaseevent" | |
}, | |
"member": { | |
"url": "https://developer.github.com/v3/activity/events/types/#memberevent", | |
"description": "Any time a user accepts an invitation or is removed as a collaborator to a repository, or has their permissions modified." | |
}, | |
"membership": { | |
"url": "https://developer.github.com/v3/activity/events/types/#membershipevent", | |
"description": "Any time a User is added or removed from a team.Organization hooks only." | |
}, | |
"milestone": { | |
"url": "https://developer.github.com/v3/activity/events/types/#milestoneevent", | |
"description": "Any time a Milestone is created, closed, opened, edited, or deleted." | |
}, | |
"organization": { | |
"url": "https://developer.github.com/v3/activity/events/types/#organizationevent", | |
"description": "Any time a user is added, removed, or invited to an Organization.Organization hooks only." | |
}, | |
"org_block": { | |
"url": "https://developer.github.com/v3/activity/events/types/#orgblockevent", | |
"description": "Any time an organization blocks or unblocks a user.Organization hooks only." | |
}, | |
"page_build": { | |
"url": "https://developer.github.com/v3/activity/events/types/#pagebuildevent", | |
"description": "Any time a Pages site is built or results in a failed build." | |
}, | |
"project_card": { | |
"url": "https://developer.github.com/v3/activity/events/types/#projectcardevent", | |
"description": "Any time a Project Card is created, edited, moved, converted to an issue, or deleted." | |
}, | |
"project_column": { | |
"url": "https://developer.github.com/v3/activity/events/types/#projectcolumnevent", | |
"description": "Any time a Project Column is created, edited, moved, or deleted." | |
}, | |
"project": { | |
"url": "https://developer.github.com/v3/activity/events/types/#projectevent", | |
"description": "Any time a Project is created, edited, closed, reopened, or deleted." | |
}, | |
"public": { | |
"url": "https://developer.github.com/v3/activity/events/types/#publicevent", | |
"description": "Any time a Repository changes from private to public." | |
}, | |
"pull_request_review_comment": { | |
"url": "https://developer.github.com/v3/activity/events/types/#pullrequestreviewcommentevent" | |
}, | |
"pull_request_review": { | |
"url": "https://developer.github.com/v3/activity/events/types/#pullrequestreviewevent", | |
"description": "Any time a pull request review is submitted, edited, or dismissed." | |
}, | |
"pull_request": { | |
"url": "https://developer.github.com/v3/activity/events/types/#pullrequestevent", | |
"description": "Any time a pull request is assigned, unassigned, labeled, unlabeled, opened, edited, closed, reopened, or synchronized (updated due to a new push in the branch that the pull request is tracking). Also any time a pull request review is requested, or a review request is removed." | |
}, | |
"push": { | |
"url": "https://developer.github.com/v3/activity/events/types/#pushevent", | |
"description": "Any Git push to a Repository, including editing tags or branches. Commits via API actions that update references are also counted.This is the default event." | |
}, | |
"repository": { | |
"url": "https://developer.github.com/v3/activity/events/types/#repositoryevent" | |
}, | |
"repository_import": { | |
"url": "https://developer.github.com/v3/activity/events/types/#repositoryimportevent", | |
"description": "Any time a successful or unsuccessful repository import finishes for a GitHub organization or a personal repository." | |
}, | |
"repository_vulnerability_alert": { | |
"url": "https://developer.github.com/v3/activity/events/types/#repositoryvulnerabilityalertevent", | |
"description": "Any time a security alert is created, dismissed, or resolved." | |
}, | |
"release": { | |
"url": "https://developer.github.com/v3/activity/events/types/#releaseevent", | |
"description": "Any time a Release is published in a Repository." | |
}, | |
"security_advisory": { | |
"url": "https://developer.github.com/v3/activity/events/types/#securityadvisoryevent", | |
"description": "Any time a security advisory is published, updated, or withdrawn. Security Advisory webhooks are available to GitHub Apps only." | |
}, | |
"status": { | |
"url": "https://developer.github.com/v3/activity/events/types/#statusevent", | |
"description": "Any time a Repository has a status update from the API." | |
}, | |
"team": { | |
"url": "https://developer.github.com/v3/activity/events/types/#teamevent", | |
"description": "Any time a team is created, deleted, modified, or added to or removed from a repository.Organization hooks only" | |
}, | |
"team_add": { | |
"url": "https://developer.github.com/v3/activity/events/types/#teamaddevent", | |
"description": "Any time a team is added or modified on a Repository." | |
}, | |
"watch": { | |
"url": "https://developer.github.com/v3/activity/events/types/#watchevent", | |
"description": "Any time a User stars a Repository." | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* | |
check_run | |
check_suite | |
commit_comment | |
create | |
delete | |
deployment | |
deployment_status | |
fork | |
github_app_authorization | |
gollum | |
installation | |
installation_repositories | |
issue_comment | |
issues | |
label | |
marketplace_purchase | |
member | |
membership | |
milestone | |
organization | |
org_block | |
page_build | |
project_card | |
project_column | |
project | |
public | |
pull_request_review_comment | |
pull_request_review | |
pull_request | |
push | |
repository | |
repository_import | |
repository_vulnerability_alert | |
release | |
security_advisory | |
status | |
team | |
team_add | |
watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
from functools import reduce | |
from bs4 import BeautifulSoup as Soup | |
html = requests.get('https://developer.github.com/webhooks').text | |
site = Soup(html, 'html.parser') | |
types = { | |
'*': { | |
'description': 'Any time an event is triggered', | |
'url': 'https://developer.github.com/webhooks/#wildcard-event' | |
} | |
} | |
last_type = "" # cycles between <td>event name and <td>description | |
for tag in site.table.find_all('td')[2:]: # first two are wildcard and break scheme | |
if tag.a == None: # descriptions have no 'a' tag | |
types[last_type]['description'] = reduce(lambda output, text: output + text, tag.stripped_strings, "") | |
elif tag.code != None: | |
event_type = tag.code.string | |
types[event_type] = {} | |
types[event_type]['url'] = f"https://developer.github.com{tag.a['href']}" | |
last_type = event_type | |
txt_types = reduce(lambda types, event_type: types + f"{event_type}\n", types.keys(), "") | |
json_types = json.dumps(types, indent=1) | |
open('event_types.txt', 'w').write(txt_types) | |
open('event_types.json', 'w').write(json_types) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment