Skip to content

Commit

Permalink
Merge pull request #47 from boherm/improve-check-table-command
Browse files Browse the repository at this point in the history
  • Loading branch information
boherm authored Jun 11, 2024
2 parents 1f01408 + 4e6653e commit cd7385d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ public function getSponsor(): ?string

public function isLinkedIssuesNeeded(): bool
{
// If "n/a" is found, it means that the PR doesn't need an issue anyway.
if ('n/a' === $this->extractWithRegex('Fixed issue or discussion')) {
return false;
}

return in_array($this->getType(), ['bug fix', 'new feature']) && !in_array($this->getCategory(), ['TE', 'ME', 'PM']);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,23 @@ public static function provideTestHandle(): array
true,
['Feature'],
],
[
new PullRequestId(
repositoryOwner: 'PrestaShop',
repositoryName: 'PrestaShop',
pullRequestNumber: 'fake'
),
'
| Type? | new feature
| Category? | BO
| Fixed issue or discussion? | n/a
',
[],
[],
false,
true,
['Feature'],
],
[
new PullRequestId(
repositoryOwner: 'PrestaShop',
Expand Down

0 comments on commit cd7385d

Please sign in to comment.