def __init__(self, payload: dict): super().__init__(payload) self.issue = Issue(payload.get("issue")) self.changes = _optional(payload, "changes", RawDict) self.label = _optional(payload, "label", Label) self.assignee = _optional(payload, "assignee", User) self.milestone = _optional(payload, "milestone", Milestone)
def __init__(self, payload: dict): super().__init__(payload) self.number = payload.get("number") self.pull_request = PullRequest(payload.get("pull_request")) self.assignee = _optional(payload, "assignee", User) self.label = _optional(payload, "label", Label) self.changes = _optional(payload, "changes", RawDict) self.before = payload.get("before") self.after = payload.get("after") self.requested_reviewer = _optional(payload, "requested_reviewer", User)
def __init__(self, payload: dict): super().__init__(payload) self.ref = payload.get("ref") self.before = payload.get("before") self.after = payload.get("after") self.created = payload.get("created") self.deleted = payload.get("deleted") self.forced = payload.get("forced") self.base_ref = payload.get("base_ref") self.compare = payload.get("compare") self.commits = [Commit(commit) for commit in payload.get("commits")] self.head_commit = _optional(payload, "head_commit", Commit) self.pusher = CommitUser(payload.get("pusher"))
def __init__(self, payload: dict): self.payload = payload self.action = payload.get("action") self.sender = User(payload.get("sender")) # Not present in GitHubAppAuthorizationEvent, InstallationEvent, SponsorshipEvent try: self.repository = Repository(payload.get("repository")) except AttributeError: pass # Only present in some events try: self.organization = Organization(payload.get("organization")) except AttributeError: pass self.enterprise = _optional(payload, "enterprise", Enterprise)
def __init__(self, payload: dict): super().__init__(payload) self.sponsorship = Sponsorship(payload.get("sponsorship")) self.changes = _optional(payload, "changes", RawDict) self.effective_date = payload.get("effective_date", None)
def __init__(self, payload: dict): super().__init__(payload) self.comment = Comment(payload.get("comment")) self.pull_request = PullRequest(payload.get("pull_request")) self.changes = _optional(payload, "changes", RawDict)
def __init__(self, payload: dict): super().__init__(payload) self.project_column = ProjectColumn(payload.get("project_column")) self.changes = _optional(payload, "changes", RawDict)
def __init__(self, payload: dict): super().__init__(payload) self.milestone = Milestone(payload.get("milestone")) self.changes = _optional(payload, "changes", RawDict)
def __init__(self, payload: dict): super().__init__(payload) self.label = Label(payload.get("label")) self.changes = _optional(payload, "changes", RawDict)
def __init__(self, payload: dict): super().__init__(payload) self.issue = Issue(payload.get("issue")) self.comment = Comment(payload.get("comment")) self.changes = _optional(payload, "changes", RawDict)