Skip to content

Commit 9e5d1c3

Browse files
hsbtclaude
andcommitted
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>
1 parent 1daa0ea commit 9e5d1c3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tool/auto_review_pr.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def review_redmine_links(pr_number, pr, existing_comments)
133133
text = "#{pr[:title]}\n#{pr[:body]}"
134134

135135
tickets = text.scan(REDMINE_TICKET_PATTERN).uniq
136+
tickets.reject! { |_, number| text.include?("https://bugs.ruby-lang.org/issues/#{number}") }
136137
if tickets.empty?
137138
puts "Skipped: The PR ##{pr_number} doesn't reference any Redmine tickets."
138139
return

0 commit comments

Comments
 (0)