-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create components for new GitHub events
- Loading branch information
Showing
4 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
app/View/Components/Github/EventTypes/PullRequestReviewCommentEvent.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace App\View\Components\Github\EventTypes; | ||
|
||
use App\Models\GithubEvent; | ||
|
||
class PullRequestReviewCommentEvent extends BaseComponent | ||
{ | ||
/** | ||
* Create a new component instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct(GithubEvent $event) | ||
{ | ||
parent::__construct( | ||
$event->action ?? 'posted a review comment on', | ||
'fas fa-comment-alt', | ||
$event | ||
); | ||
|
||
// $this->preposition = 'at'; | ||
// $this->setPullRequestNumberText($this->event->source); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
app/View/Components/Github/EventTypes/PullRequestReviewEvent.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace App\View\Components\Github\EventTypes; | ||
|
||
use App\Models\GithubEvent; | ||
|
||
class PullRequestReviewEvent extends BaseComponent | ||
{ | ||
/** | ||
* Create a new component instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct(GithubEvent $event) | ||
{ | ||
parent::__construct( | ||
$event->action ?? 'reviewed a PR on', | ||
'fas fa-edit', | ||
$event | ||
); | ||
|
||
// $this->preposition = 'at'; | ||
// $this->setPullRequestNumberText($this->event->source); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
resources/views/components/github/event-types/pull-request-review-comment-event.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div class="flex flex-row relative"> | ||
<div class="text-neutral-800 dark:text-neutral-500 text-center flex-none {{ $icon }}" | ||
style="width: 2rem; font-size: 22px;"></div> | ||
|
||
<div class="pl-4 flex-grow relative"> | ||
<p class="text-neutral-800 dark:text-neutral-500"> | ||
{{ $timeElapsed }} | ||
</p> | ||
|
||
<p class="font-white mt-1 text-sm leading-none"> | ||
<strong> | ||
<a href="{{ $profileUrl() }}" target="_blank"> | ||
{{ $event->user->display_login }} | ||
</a> | ||
|
||
{{ $action }} | ||
|
||
{{-- <a href="{{ $repoUrl() }}/pull/{{ $event->source }}" target="_blank" class="text-caribbeanGreen-600 dark:text-caribbeanGreen-500">--}} | ||
{{-- {{ $pullRequestNumberText }}--}} | ||
{{-- </a>--}} | ||
|
||
{{-- {{ $preposition }}--}} | ||
|
||
<a href="{{ $repoUrl() }}" target="_blank"> | ||
{{ $event->repo }} | ||
</a> | ||
</strong> | ||
</p> | ||
</div> | ||
</div> |
30 changes: 30 additions & 0 deletions
30
resources/views/components/github/event-types/pull-request-review-event.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div class="flex flex-row relative"> | ||
<div class="text-neutral-800 dark:text-neutral-500 text-center flex-none {{ $icon }}" | ||
style="width: 2rem; font-size: 22px;"></div> | ||
|
||
<div class="pl-4 flex-grow relative"> | ||
<p class="text-neutral-800 dark:text-neutral-500"> | ||
{{ $timeElapsed }} | ||
</p> | ||
|
||
<p class="font-white mt-1 text-sm leading-none"> | ||
<strong> | ||
<a href="{{ $profileUrl() }}" target="_blank"> | ||
{{ $event->user->display_login }} | ||
</a> | ||
|
||
{{ $action }} | ||
|
||
{{-- <a href="{{ $repoUrl() }}/pull/{{ $event->source }}" target="_blank" class="text-caribbeanGreen-600 dark:text-caribbeanGreen-500">--}} | ||
{{-- {{ $pullRequestNumberText }}--}} | ||
{{-- </a>--}} | ||
|
||
{{-- {{ $preposition }}--}} | ||
|
||
<a href="{{ $repoUrl() }}" target="_blank"> | ||
{{ $event->repo }} | ||
</a> | ||
</strong> | ||
</p> | ||
</div> | ||
</div> |