Commit 678f314
committed
[SPARK-54860][INFRA] Add JIRA Ticket Validating in GHA
### 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. It's very likely for them to make mistakes like #53445 (comment)
### 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, e.g. https://github.com/yaooqinn/spark/actions/runs/20567427354/job/59067970526?pr=4
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: GitHub Copilot (Claude Sonnet 4.5)
Closes #53633 from yaooqinn/SPARK-54860.
Lead-authored-by: Kent Yao <[email protected]>
Co-authored-by: Kent Yao <[email protected]>
Signed-off-by: Kent Yao <[email protected]>1 parent 082de7f commit 678f314
1 file changed
+153
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
0 commit comments