diff --git a/src/Api/Issue/IssueType.php b/src/Api/Issue/IssueType.php index 8eee8fd..9a924ee 100644 --- a/src/Api/Issue/IssueType.php +++ b/src/Api/Issue/IssueType.php @@ -10,4 +10,5 @@ class IssueType public const FEATURE = 'Feature'; public const UNKNOWN = 'Unknown'; public const RFC = 'RFC'; + public const DOCUMENTATION = 'Documentation'; } diff --git a/src/Command/PingStaleIssuesCommand.php b/src/Command/PingStaleIssuesCommand.php index 54bb137..99838d6 100644 --- a/src/Command/PingStaleIssuesCommand.php +++ b/src/Command/PingStaleIssuesCommand.php @@ -95,6 +95,7 @@ private function extractType(array $issue): string IssueType::FEATURE => false, IssueType::BUG => false, IssueType::RFC => false, + IssueType::DOCUMENTATION => false, ]; foreach ($issue['labels'] as $label) { diff --git a/src/Subscriber/AutoLabelFromContentSubscriber.php b/src/Subscriber/AutoLabelFromContentSubscriber.php index b5cf4a1..f63b9a7 100644 --- a/src/Subscriber/AutoLabelFromContentSubscriber.php +++ b/src/Subscriber/AutoLabelFromContentSubscriber.php @@ -40,7 +40,7 @@ public function onPullRequest(GitHubEvent $event): void $prLabels[] = $label; } - // the PR body usually indicates if this is a Bug, Feature, BC Break or Deprecation + // the PR body usually indicates if this is a Bug, Feature, BC Break, Deprecation or Documentation if (preg_match('/\|\s*Bug fix\?\s*\|\s*yes\s*/i', $prBody, $matches)) { $prLabels[] = 'Bug'; } @@ -53,6 +53,9 @@ public function onPullRequest(GitHubEvent $event): void if (preg_match('/\|\s*Deprecations\?\s*\|\s*yes\s*/i', $prBody, $matches)) { $prLabels[] = 'Deprecation'; } + if (preg_match('/\|\s*Documentation\?\s*\|\s*yes\s*/i', $prBody, $matches)) { + $prLabels[] = 'Documentation'; + } $this->labelsApi->addIssueLabels($prNumber, $prLabels, $repository);