Browse Source

add in-reply-to for issue comments

pull/39/head
Aaron Parecki 7 years ago
parent
commit
2a3d7b4923
No known key found for this signature in database GPG Key ID: 276C2817346D6056
2 changed files with 5 additions and 0 deletions
  1. +4
    -0
      lib/Formats/GitHub.php
  2. +1
    -0
      tests/GitHubTest.php

+ 4
- 0
lib/Formats/GitHub.php View File

@ -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'];

+ 1
- 0
tests/GitHubTest.php View File

@ -102,6 +102,7 @@ class GitHubTest extends PHPUnit_Framework_TestCase {
$this->assertContains('<code class="language-php">', $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']);
}

Loading…
Cancel
Save