spark-test commented on code in PR #59666:
URL: https://github.com/apache/spark/pull/59666#discussion_r4506389131


##########
.github/PULL_REQUEST_TEMPLATE:
##########
@@ -52,8 +52,8 @@ If benchmark tests were added, please run the benchmarks in 
GitHub Actions for t
 
 ### Was this patch authored or co-authored using generative AI tooling?
 <!--
-If generative AI tooling has been used in the process of authoring this patch, 
please include the
-phrase: 'Generated-by: ' followed by the name of the tool and its version.
 If no, write 'No'.
+If generative AI tooling was used in the process of authoring this patch, 
please include the phrase: `Assisted-by: <Name of Tool> <Version>`

Review Comment:
   **Non-blocking (P2):** `dev/merge_spark_pr.py` removes the template's HTML 
comments from the PR description before using it as the squash commit message, 
with `re.sub(re.compile(r"<!--[^>]*-->\n?", re.DOTALL), "", body)` (line 2432). 
Because `[^>]*` cannot cross a `>`, the `<Name of Tool>` and `<Version>` 
placeholders on this line and the next make this comment unmatchable. Replaying 
that expression on a description built from this template with its comments 
kept removes the other five comments but leaves this whole block, so it is 
committed even when the committer accepts the stripped body, and backports copy 
it to release branches. If it is the only comment left, the description does 
not change and the script does not prompt at all. The leftover text contains 
`Assisted-by: <Name of Tool> <Version>`, so a plain search of commit messages 
for `Assisted-by:` would also match PRs that answered "No". On the base branch 
no template comment contains `>`, so all six are removed. Writing 
 the placeholders without angle brackets, for example `Assisted-by: [Name of 
Tool] [Version]` here and `[Version]` on the next line, keeps the comment 
removable.
   
   **Verification:**
   - **Regression:** Apply the merge script's comment-strip expression to a PR 
description built from the updated template, with every comment kept and an 
answer under each section, using both LF and CRLF line endings. Neither '<!--' 
nor any of the generative-AI instruction text, including the Assisted-by 
placeholder line, may remain.
   - **Inspection:** Check that no comment block in the template contains '>' 
and that the generative-AI section still asks for an Assisted-by phrase naming 
the tool, with the version optional.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to