diff --git a/lib/Formats/GitHub.php b/lib/Formats/GitHub.php index d508d59..cc1fb5d 100644 --- a/lib/Formats/GitHub.php +++ b/lib/Formats/GitHub.php @@ -100,6 +100,10 @@ class GitHub { ]; } + if($type == 'comment') { + $entry['in-reply-to'] = ['https://github.com/'.$org.'/'.$repo.'/issues/'.$issue]; + } + if(!empty($data['labels'])) { $entry['category'] = array_map(function($l){ return $l['name']; diff --git a/tests/GitHubTest.php b/tests/GitHubTest.php index 4ab5272..6aef9c1 100644 --- a/tests/GitHubTest.php +++ b/tests/GitHubTest.php @@ -102,6 +102,7 @@ class GitHubTest extends PHPUnit_Framework_TestCase { $this->assertContains('', $data['data']['content']['html']); $this->assertContains('```php', $data['data']['content']['text']); $this->assertNotContains('name', $data['data']); + $this->assertContains('https://github.com/aaronpk/XRay/issues/25', $data['data']['in-reply-to']); }