yaooqinn opened a new pull request, #53633:
URL: https://github.com/apache/spark/pull/53633

   ### What changes were proposed in this pull request?
   
   This PR adds a new GitHub Action workflow that automatically validates pull 
request titles and extracts JIRA ticket information. The workflow includes:
   
   1. **JIRA ID Extraction**: Automatically extracts JIRA IDs (e.g., 
`SPARK-12345`) from PR titles
   2. **[MINOR] Tag Support**: Allows PRs without JIRA IDs if they are prefixed 
with `[MINOR]` for minor changes
   3. **JIRA Information Display**: Fetches and displays JIRA ticket details 
(type, summary, assignee, status, affected versions) as a PR comment
   4. **Title Validation**: Posts a reminder comment when PR titles lack both 
JIRA IDs and [MINOR] tags
   
   The workflow runs on `pull_request_target` events (opened, edited, reopened) 
and uses the public Apache JIRA API (no authentication required).
   
   **Output Format Example:**
   ```
   === Task SPARK-54859 ===
   Summary Arrow-optimized Python UD(T)F Docs
   Assignee None
   Status Open
   Affected ["4.2.0"]
   ```
   
   ### Why are the changes needed?
   
   Currently, Apache Spark PRs require manual verification of JIRA ticket 
associations. This automation:
   
   - **Improves contributor experience**: Provides immediate feedback on PR 
title format
   - **Streamlines review process**: Displays JIRA context directly in the PR, 
eliminating manual lookups
   - **Enforces consistency**: Ensures all non-minor PRs are linked to JIRA 
tickets
   - **Reduces review overhead**: Reviewers can quickly understand the context 
without switching to JIRA
   
   This is particularly useful for new contributors who may not be familiar 
with Apache's PR conventions.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. This is an infrastructure change that only affects the GitHub PR 
workflow.
   
   ### How was this patch tested?
   
   1. **Local Testing**: Validated the logic using `test-jira-action.py` which 
simulates the GitHub Action behavior
      - Tested JIRA ID extraction for various title formats
      - Verified [MINOR] tag detection (case-insensitive)
      - Confirmed JIRA API calls return expected data
   
   2. **Test Cases**:
      - `[SPARK-54859] Title` → Displays JIRA info (✓ tested successfully)
      - `[SPARK-111][SPARK-222] Multiple` → Displays multiple JIRA infos
      - `[MINOR] Fix typo` → Silently skips validation
      - `Fix bug` → Posts reminder to add JIRA ID or [MINOR] tag
   
   3. **Real JIRA Verification**: Tested with actual Apache JIRA tickets 
(SPARK-54859, SPARK-50000) to confirm API responses
   
   The workflow will be fully tested once this PR is created, as it 
demonstrates the feature with SPARK-54860 (valid) and SPARK-999999 (invalid) in 
the title.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: GitHub Copilot (Claude Sonnet 4.5)


-- 
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