Skip to content

Commit e4b6a16

Browse files
authored
Merge branch 'main' into patch-1
2 parents 3be2361 + 8285917 commit e4b6a16

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/TodoByIssueUrlRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ final class TodoByIssueUrlRule implements Rule
2626
@?[a-zA-Z0-9_-]* # optional username
2727
\s*[:-]?\s* # optional colon or hyphen
2828
\s+ # keyword/version separator
29-
(?P<url>https://github.com/(?P<owner>[\S]{2,})/(?P<repo>[\S]+)/issues/(?P<issueNumber>\d+)) # url
29+
(?P<url>https://github.com/(?P<owner>[\S]{2,})/(?P<repo>[\S]+)/(issues|pull)/(?P<issueNumber>\d+)) # url
3030
\s*[:-]?\s* # optional colon or hyphen
3131
(?P<comment>(?:(?!\*+/).)*) # rest of line as comment text, excluding block end
3232
}ix

tests/TodoByIssueUrlRuleTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ public static function provideErrors(): iterable
4242
'Should have been resolved in https://github.com/staabm/phpstan-todo-by/issues/47 : we need todo something when this issue is resolved.',
4343
5,
4444
],
45-
[
46-
'Comment should have been resolved with https://github.com/staabm/phpstan-todo-by/issues/47 .',
45+
'Comment should have been resolved with https://github.com/staabm/phpstan-todo-by/pull/155 .',
4746
6,
4847
],
4948
],

tests/data/issue-urls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace IssueUrls;
44

55
// TODO: https://github.com/staabm/phpstan-todo-by/issues/47 we need todo something when this issue is resolved
6-
// TODO: https://github.com/staabm/phpstan-todo-by/issues/47
6+
// TODO: https://github.com/staabm/phpstan-todo-by/pull/155
77

88
// FIXME: https://github.com/staabm/xhprof.io/issues/3 refencing a open issue should not trigger a error
99

0 commit comments

Comments
 (0)