Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3907745
D3560.id9360.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
11 KB
Referenced Files
None
Subscribers
None
D3560.id9360.diff
View Options
diff --git a/github/src/Events/AutoMerge.php b/github/src/Events/AutoMerge.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/AutoMerge.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace Keruald\GitHub\Events;
+
+class AutoMerge {
+ public User $enabled_by;
+ public string $merge_method;
+ public string $commit_title;
+ public string $commit_message;
+}
diff --git a/github/src/Events/CommitReference.php b/github/src/Events/CommitReference.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/CommitReference.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace Keruald\GitHub\Events;
+
+
+class CommitReference {
+ public string $label;
+ public string $ref;
+ public Repo $repo;
+ public string $sha;
+ public User $user;
+}
diff --git a/github/src/Events/CommitsPush.php b/github/src/Events/CommitsPush.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/CommitsPush.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace Keruald\GitHub\Events;
+
+use \DateTime;
+
+class CommitsPush {
+ public string $id;
+ public string $tree_id;
+ public bool $distinct;
+ public string $message;
+ public DateTime $timestamp;
+ public string $url;
+ public User $author;
+ public User $committer;
+ public array $added;
+ public array $removed;
+ public array $modified;
+}
diff --git a/github/src/Events/Label.php b/github/src/Events/Label.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/Label.php
@@ -0,0 +1,13 @@
+<?php
+
+namespace Keruald\GitHub\Events;
+
+class Label {
+ public int $id;
+ public string $node_id;
+ public string $url;
+ public string $name;
+ public string $description;
+ public string $color;
+ public bool $default;
+}
diff --git a/github/src/Events/License.php b/github/src/Events/License.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/License.php
@@ -0,0 +1,11 @@
+<?php
+
+namespace Keruald\GitHub\Events;
+
+class License {
+ public string $key;
+ public string $name;
+ public string $url;
+ public string $spdx_id;
+ public string $node_id;
+}
diff --git a/github/src/Events/Link.php b/github/src/Events/Link.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/Link.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace Keruald\GitHub\Events;
+
+class Link {
+ public string $href;
+}
diff --git a/github/src/Events/Links.php b/github/src/Events/Links.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/Links.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Keruald\GitHub\Events;
+
+class Links {
+ public Link $comments;
+ public Link $commits;
+ public Link $statuses;
+ public Link $html;
+ public Link $issue;
+ public Link $review_comments;
+ public Link $review_comment;
+ public Link $self;
+}
diff --git a/github/src/Events/Milestone.php b/github/src/Events/Milestone.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/Milestone.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Keruald\GitHub\Events;
+
+use \DateTime;
+
+class Milestone {
+ public string $url;
+ public string $html_url;
+ public string $labels_url;
+ public int $id;
+ public string $node_id;
+ public int $number;
+ public string $state;
+ public string $title;
+ public string $description;
+ public User $creator;
+ public int $open_issues;
+ public int $closed_issues;
+ public DateTime $created_at;
+ public DateTime $updated_at;
+ public DateTime $due_on;
+ public ?DateTime $closed_at;
+}
diff --git a/github/src/Events/Organization.php b/github/src/Events/Organization.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/Organization.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace Keruald\GitHub\Events;
+
+class Organization {
+ public string $login;
+ public int $id;
+ public string $node_id;
+ public string $url;
+ public string $repos_url;
+ public string $events_url;
+ public string $hooks_url;
+ public string $issues_url;
+ public string $members_url;
+ public string $public_members_url;
+ public string $avatar_url;
+ public string $description;
+}
diff --git a/github/src/Events/PullRequest.php b/github/src/Events/PullRequest.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/PullRequest.php
@@ -0,0 +1,77 @@
+<?php
+
+namespace Keruald\GitHub\Events;
+
+use \DateTime;
+
+class PullRequest {
+ public string $url;
+ public int $id;
+ public string $node_id;
+ public string $html_url;
+ public string $diff_url;
+ public string $patch_url;
+ public string $issue_url;
+ public string $commits_url;
+ public string $review_comments_url;
+ public string $review_comment_url;
+ public string $comments_url;
+ public string $statuses_url;
+ public int $number;
+ public string $state;
+ public bool $locked;
+ public string $title;
+ public User $user;
+ public string $body;
+
+ /**
+ * @var Label[]
+ */
+ public array $labels;
+
+ public ?Milestone $milestone;
+ public bool $draft;
+ public string $created_at;
+ public string $updated_at;
+ public ?string $closed_at;
+ public ?string $merged_at;
+ public ?string $merge_commit_sha;
+ public ?User $assignee;
+
+ /**
+ * @var User[]
+ */
+ public array $assignees;
+
+ /**
+ * @var User[]
+ */
+ public array $requested_reviewers;
+
+ /**
+ * @var Team[]
+ */
+ public array $requested_teams;
+
+ public CommitReference $head;
+ public CommitReference $base;
+ public Links $_links;
+ public string $author_association;
+ public ?AutoMerge $auto_merge;
+
+ public ?string $active_lock_reason;
+
+ public bool $merged;
+ public ?bool $mergeable;
+ public string $mergeable_stats;
+ public ?User $merged_by;
+ public int $comments;
+ public int $review_comments;
+ public bool $maintainer_can_modify;
+ public int $commits;
+ public int $additions;
+ public int $deletions;
+ public int $changed_files;
+ public Repo $repository;
+ public User $sender;
+}
diff --git a/github/src/Events/PullRequestEvent.php b/github/src/Events/PullRequestEvent.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/PullRequestEvent.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace Keruald\GitHub\Events;
+
+class PullRequestEvent {
+ public string $action;
+ public int $number;
+ public PullRequest $pull_request;
+ public Repo $repository;
+ public Organization $organization;
+ public User $sender;
+}
diff --git a/github/src/Events/PushEvent.php b/github/src/Events/PushEvent.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/PushEvent.php
@@ -0,0 +1,20 @@
+<?php
+
+namespace Keruald\GitHub\Events;
+
+class PushEvent {
+ public string $ref;
+ public string $before;
+ public string $after;
+ public Repo $repository;
+ public User $pusher;
+ public Organization $organization;
+ public User $sender;
+ public bool $created;
+ public bool $deleted;
+ public bool $forced;
+ public object $base_ref;
+ public string $compare;
+ public CommitsPush $commits;
+ public CommitsPush $head_commit;
+}
diff --git a/github/src/Events/Repo.php b/github/src/Events/Repo.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/Repo.php
@@ -0,0 +1,87 @@
+<?php
+
+namespace Keruald\GitHub\Events;
+
+class Repo {
+ public string $archive_url;
+ public string $assignees_url;
+ public string $blobs_url;
+ public string $branches_url;
+ public string $collaborators_url;
+ public string $comments_url;
+ public string $commits_url;
+ public string $compare_url;
+ public string $contents_url;
+ public string $contributors_url;
+ public string $deployments_url;
+ public string $description;
+ public string $downloads_url;
+ public string $events_url;
+ public bool $fork;
+ public string $forks_url;
+ public string $full_name;
+ public string $git_commits_url;
+ public string $git_refs_url;
+ public string $git_tags_url;
+ public string $hooks_url;
+ public string $html_url;
+ public int $id;
+ public string $node_id;
+ public string $issue_comment_url;
+ public string $issue_events_url;
+ public string $issues_url;
+ public string $keys_url;
+ public string $labels_url;
+ public string $languages_url;
+ public string $merges_url;
+ public string $milestones_url;
+ public string $name;
+ public string $notifications_url;
+ public User $owner;
+ public bool $private;
+ public string $pulls_url;
+ public string $releases_url;
+ public string $stargazers_url;
+ public string $statuses_url;
+ public string $subscribers_url;
+ public string $subscription_url;
+ public string $tags_url;
+ public string $teams_url;
+ public string $trees_url;
+ public string $url;
+ public string $clone_url;
+ public string $default_branch;
+ public int $forks;
+ public int $forks_count;
+ public string $git_url;
+ public bool $has_downloads;
+ public bool $has_issues;
+ public bool $has_projects;
+ public bool $has_wiki;
+ public bool $has_pages;
+ public bool $has_discussions;
+ public ?string $homepage;
+ public ?string $language;
+ public bool $archived;
+ public bool $disabled;
+ public ?string $mirror_url;
+ public int $open_issues;
+ public int $open_issues_count;
+ public ?License $license;
+ public string $pushed_at;
+ public int $size;
+ public string $ssh_url;
+ public int $stargazers_count;
+ public string $svn_url;
+ public int $watchers;
+ public int $watchers_count;
+ public string $created_at;
+ public string $updated_at;
+ public bool $allow_forking;
+ public bool $is_template;
+ public bool $web_commit_signoff_required;
+ public string $visibility;
+ public string $master_branch;
+ public string $organization;
+ public array $topics;
+}
diff --git a/github/src/Events/Team.php b/github/src/Events/Team.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/Team.php
@@ -0,0 +1,18 @@
+<?php
+namespace Keruald\GitHub\Events;
+
+class Team {
+ public string $name;
+ public int $id;
+ public string $node_id;
+ public string $slug;
+ public string $description;
+ public string $privacy;
+ public string $notification_setting;
+ public string $url;
+ public string $html_url;
+ public string $members_url;
+ public string $repositories_url;
+ public string $permission;
+ public self $parent;
+}
diff --git a/github/src/Events/User.php b/github/src/Events/User.php
new file mode 100644
--- /dev/null
+++ b/github/src/Events/User.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Keruald\GitHub\Events;
+
+class User {
+ public string $name;
+ public string $email;
+ public string $username;
+ public string $login;
+ public int $id;
+ public string $node_id;
+ public string $avatar_url;
+ public string $gravatar_id;
+ public string $url;
+ public string $html_url;
+ public string $followers_url;
+ public string $following_url;
+ public string $gists_url;
+ public string $starred_url;
+ public string $subscriptions_url;
+ public string $organizations_url;
+ public string $repos_url;
+ public string $events_url;
+ public string $received_events_url;
+ public string $type;
+ public bool $site_admin;
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 11:03 (21 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2306318
Default Alt Text
D3560.id9360.diff (11 KB)
Attached To
Mode
D3560: Create PHP event type classes to map JSON payload
Attached
Detach File
Event Timeline
Log In to Comment