mirror of
https://github.com/khornberg/octokit.py
synced 2026-05-15 05:02:32 +03:00
+5
-6
@@ -98,6 +98,9 @@ Webhooks::
|
||||
return_app_id
|
||||
boolean; whether or not you want to return the app id from the ping event for GitHub applications. This will only return the ``id`` if the event is the ``ping`` event. Otherwise the return value will be boolean.
|
||||
|
||||
|
||||
Note that webhook names are available at :code:`from octokit_routes import webhook_names`
|
||||
|
||||
Authentication
|
||||
--------------
|
||||
|
||||
@@ -150,13 +153,8 @@ GitHub APIs
|
||||
Data
|
||||
----
|
||||
|
||||
The :code:`octokit` client based on the available `route data <https://github.com/khornberg/octokitpy-routes>`_ and `webhook data <https://github.com/octokit/webhooks.js/blob/master/lib/webhook-names.json>`_
|
||||
The :code:`octokit` client based on the available `route data <https://github.com/khornberg/octokitpy-routes>`_ and `webhook data <https://github.com/khornberg/octokitpy-routes>`_
|
||||
|
||||
::
|
||||
|
||||
[x] Periodically, check if ``routes.json`` has changed and if so fetch and open a PR for it to be merged
|
||||
|
||||
[ ] Periodically, check if ``webhook-names.json`` has changed and if so fetch and open a PR for it to be merged
|
||||
|
||||
Tests
|
||||
-----
|
||||
@@ -204,6 +202,7 @@ Deployment
|
||||
::
|
||||
|
||||
[x] Deploy wheels
|
||||
|
||||
[x] Make GitHub releases work
|
||||
|
||||
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
[
|
||||
"*",
|
||||
"error",
|
||||
"commit_comment",
|
||||
"commit_comment.created",
|
||||
"create",
|
||||
"delete",
|
||||
"deployment",
|
||||
"deployment_status",
|
||||
"fork",
|
||||
"gollum",
|
||||
"installation",
|
||||
"installation_repositories",
|
||||
"installation_repositories.added",
|
||||
"installation_repositories.removed",
|
||||
"installation.created",
|
||||
"installation.deleted",
|
||||
"issue_comment",
|
||||
"issue_comment.created",
|
||||
"issue_comment.deleted",
|
||||
"issue_comment.edited",
|
||||
"issues",
|
||||
"issues.assigned",
|
||||
"issues.closed",
|
||||
"issues.demilestoned",
|
||||
"issues.edited",
|
||||
"issues.labeled",
|
||||
"issues.milestoned",
|
||||
"issues.opened",
|
||||
"issues.reopened",
|
||||
"issues.unassigned",
|
||||
"issues.unlabeled",
|
||||
"label",
|
||||
"label.created",
|
||||
"label.deleted",
|
||||
"label.edited",
|
||||
"marketplace_purchase",
|
||||
"marketplace_purchase.cancelled",
|
||||
"marketplace_purchase.changed",
|
||||
"marketplace_purchase.purchased",
|
||||
"member",
|
||||
"member.added",
|
||||
"member.deleted",
|
||||
"member.edited",
|
||||
"membership",
|
||||
"membership.added",
|
||||
"membership.removed",
|
||||
"milestone",
|
||||
"milestone.closed",
|
||||
"milestone.created",
|
||||
"milestone.deleted",
|
||||
"milestone.edited",
|
||||
"milestone.opened",
|
||||
"org_block",
|
||||
"org_block.blocked",
|
||||
"org_block.unblocked",
|
||||
"organization",
|
||||
"organization.member_added",
|
||||
"organization.member_invited",
|
||||
"organization.member_removed",
|
||||
"page_build",
|
||||
"ping",
|
||||
"project",
|
||||
"project_card",
|
||||
"project_card.closed",
|
||||
"project_card.created",
|
||||
"project_card.deleted",
|
||||
"project_card.edited",
|
||||
"project_card.reopened",
|
||||
"project_column",
|
||||
"project_column.created",
|
||||
"project_column.deleted",
|
||||
"project_column.edited",
|
||||
"project_column.moved",
|
||||
"project.converted",
|
||||
"project.created",
|
||||
"project.deleted",
|
||||
"project.edited",
|
||||
"project.moved",
|
||||
"public",
|
||||
"pull_request",
|
||||
"pull_request_review",
|
||||
"pull_request_review_comment",
|
||||
"pull_request_review_comment.created",
|
||||
"pull_request_review_comment.deleted",
|
||||
"pull_request_review_comment.edited",
|
||||
"pull_request_review.dismissed",
|
||||
"pull_request_review.edited",
|
||||
"pull_request_review.submitted",
|
||||
"pull_request.assigned",
|
||||
"pull_request.closed",
|
||||
"pull_request.edited",
|
||||
"pull_request.labeled",
|
||||
"pull_request.opened",
|
||||
"pull_request.reopened",
|
||||
"pull_request.review_request_removed",
|
||||
"pull_request.review_requested",
|
||||
"pull_request.synchronize",
|
||||
"pull_request.unassigned",
|
||||
"pull_request.unlabeled",
|
||||
"push",
|
||||
"release",
|
||||
"release.published",
|
||||
"repository",
|
||||
"repository.archived",
|
||||
"repository.created",
|
||||
"repository.deleted",
|
||||
"repository.privatized",
|
||||
"repository.publicized",
|
||||
"repository.unarchived",
|
||||
"status",
|
||||
"team",
|
||||
"team_add",
|
||||
"team.added_to_repository",
|
||||
"team.created",
|
||||
"team.deleted",
|
||||
"team.edited",
|
||||
"team.removed_from_repository",
|
||||
"watch",
|
||||
"watch.started"
|
||||
]
|
||||
@@ -3,7 +3,7 @@ import hmac
|
||||
import json
|
||||
from uuid import UUID
|
||||
|
||||
from octokit import utils
|
||||
from octokit_routes import webhook_names
|
||||
|
||||
|
||||
def valid_signature(headers, payload, secret):
|
||||
@@ -23,9 +23,7 @@ def valid_guid(guid):
|
||||
|
||||
|
||||
def valid_event(event, events):
|
||||
return event in utils.get_json_data("events.json") and (
|
||||
event in events or "*" in events
|
||||
)
|
||||
return event in webhook_names or "*" in webhook_names
|
||||
|
||||
|
||||
def valid_user_agent(ua):
|
||||
|
||||
Reference in New Issue
Block a user