Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Api/Issue/IssueType.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ class IssueType
public const FEATURE = 'Feature';
public const UNKNOWN = 'Unknown';
public const RFC = 'RFC';
public const DOCUMENTATION = 'Documentation';
}
1 change: 1 addition & 0 deletions src/Command/PingStaleIssuesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 4 additions & 1 deletion src/Subscriber/AutoLabelFromContentSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand All @@ -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);

Expand Down