Page MenuHomeDevCentral

WatchEvent.php
No OneTemporary

WatchEvent.php

<?php
namespace Nasqueron\Notifications\Analyzers\GitHub\Events;
/**
* WatchEvent payload analyzer
*
* Triggered when an user stars a repository.
*
* The current starring action on GitHub is the old watch action. To avoid
* to break code, former event name have been kept in the API.
*
* @link https://developer.github.com/changes/2012-09-05-watcher-api/
* @link https://developer.github.com/v3/activity/events/types/#watchevent
*/
class WatchEvent extends Event {
/**
* Gets description for the payload
*
* @return string
*/
public function getDescription () : string {
return trans(
'GitHub.EventsDescriptions.WatchEvent',
[
'user' => $this->payload->sender->login,
'repository' => $this->payload->repository->full_name,
]
);
}
/**
* Gets link for the payload
*
* @return string
*/
public function getLink () : string {
return $this->payload->sender->html_url;
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Sep 12, 20:55 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2978332
Default Alt Text
WatchEvent.php (1 KB)

Event Timeline