This is an automated email from the ASF dual-hosted git repository. tvalentyn pushed a commit to branch tvalentyn-patch-2 in repository https://gitbox.apache.org/repos/asf/beam.git
commit 13cfb1624148af654ac5f8d3f0e308a7c74ed8f6 Author: tvalentyn <[email protected]> AuthorDate: Wed Aug 26 04:36:44 2026 -0700 Update build.gradle.kts Allow referencing both issues and PRs in release notes. --- build.gradle.kts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index d0cc5fbb32b..4ffa09a9371 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -765,15 +765,15 @@ tasks.register("validateChanges") { println(" No bracketed language reference found") } - // Rule 2: Check if each entry has an issue link - val issueLinkPattern = "\\(\\[#[0-9a-zA-Z]+\\]\\(https://github\\.com/apache/beam/issues/[0-9a-zA-Z]+\\)\\)" - val issueLinkRegex = Regex(issueLinkPattern) + // Rule 2: Check if each entry links an issue or a PR + val linkPattern = "\\(\\[#[0-9a-zA-Z]+\\]\\(https://github\\.com/apache/beam/(?:issues|pull)/[0-9a-zA-Z]+\\)\\)" + val linkRegex = Regex(linkPattern) - val hasIssueLink = issueLinkRegex.containsMatchIn(line) - println(" Has issue link: $hasIssueLink") + val hasLink = linkRegex.containsMatchIn(line) + println(" Has issue link: $hasLink") - if (!hasIssueLink) { - val error = "Line ${i+1}: Missing or malformed issue link. Each entry should end with ([#X](https://github.com/apache/beam/issues/X)): $line" + if (!hasLink) { + val error = "Line ${i+1}: Missing or malformed issue link. Each entry must end with a reference to an Issue or a PR, for example: ([#X](https://github.com/apache/beam/issues/X)): $line" println(" Adding error: $error") errors.add(error) }
