Page MenuHomeDevCentral

No OneTemporary

diff --git a/app/Analyzers/GitHubPayloadAnalyzerConfiguration.php b/app/Analyzers/GitHubPayloadAnalyzerConfiguration.php
index 6c41cb5..f0eef2b 100644
--- a/app/Analyzers/GitHubPayloadAnalyzerConfiguration.php
+++ b/app/Analyzers/GitHubPayloadAnalyzerConfiguration.php
@@ -1,26 +1,26 @@
<?php
namespace Nasqueron\Notifications\Analyzers;
class GitHubPayloadAnalyzerConfiguration {
/**
* The group for organization only events
*
* @var string
*/
public $administrativeGroup;
/**
* The default group to fallback for any event not mapped in another group
*
* @var string
*/
public $defaultGroup;
/**
* An array of RepositoryGroupMapping objects to match repositories & groups
*
* @var RepositoryGroupMapping[]
*/
public $repositoryMapping;
-}
\ No newline at end of file
+}
diff --git a/app/Notifications/GitHubNotification.php b/app/Notifications/GitHubNotification.php
index dbdf6a5..58e56b1 100644
--- a/app/Notifications/GitHubNotification.php
+++ b/app/Notifications/GitHubNotification.php
@@ -1,69 +1,69 @@
<?php
namespace Nasqueron\Notifications\Notifications;
use Nasqueron\Notifications\Analyzers\GitHubPayloadAnalyzer;
use Nasqueron\Notifications\Notification;
class GitHubNotification extends Notification {
/**
* @var GitHubPayloadAnalyzer
*/
private $analyzer = null;
public function __construct ($project, $event, $payload) {
// Straightforward properties
$this->service = "GitHub";
$this->project = $project;
$this->type = $event;
$this->rawContent = $payload;
// Analyzes and fills
$this->group = $this->getGroup();
$this->text = $this->getText();
$this->link = $this->getLink();
}
/**
* Gets analyzer
*/
private function getAnalyzer () {
if ($this->analyzer === null) {
$this->analyzer = new GitHubPayloadAnalyzer(
$this->project,
$this->type,
$this->rawContent
);
}
return $this->analyzer;
}
/**
* Gets the target notificatrion group
*
* @return string the target group for the notification
*/
public function getGroup () {
return $this->getAnalyzer()->getGroup();
}
/**
* Gets the notification text. Intended to convey a short message (thing Twitter or IRC).
*
* @return string
*/
public function getText () {
return $this->getAnalyzer()->getDescription();
}
/**
* Gets the notification URL. Intended to be a widget or icon link.
*
* @return string
*/
public function getLink () {
return $this->getAnalyzer()->getLink();
}
-}
\ No newline at end of file
+}

File Metadata

Mime Type
text/x-diff
Expires
Mon, Nov 25, 17:49 (9 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260670
Default Alt Text
(2 KB)

Event Timeline