summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2026-04-16 10:22:01 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2026-04-16 10:22:37 +0900
commit9e5d1c370baf69b109442a168b6c18bf90f55ac9 (patch)
treefb0bdc7fe1b2b7d5b892d2db5a1c80a903484422
parent1daa0eae991de017d94e1e15334612e67a47e9c9 (diff)
Skip Redmine link comment when the URL is already in the PR body
If the PR title or body already contains the full bugs.ruby-lang.org URL for a referenced ticket, there is no need to post a redundant link in a comment. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-rwxr-xr-xtool/auto_review_pr.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/tool/auto_review_pr.rb b/tool/auto_review_pr.rb
index d659730f56..38adf9fdb7 100755
--- a/tool/auto_review_pr.rb
+++ b/tool/auto_review_pr.rb
@@ -133,6 +133,7 @@ class AutoReviewPR
text = "#{pr[:title]}\n#{pr[:body]}"
tickets = text.scan(REDMINE_TICKET_PATTERN).uniq
+ tickets.reject! { |_, number| text.include?("https://bugs.ruby-lang.org/issues/#{number}") }
if tickets.empty?
puts "Skipped: The PR ##{pr_number} doesn't reference any Redmine tickets."
return