Run Roadmap automation when pull requests merge [skip ci] - #5000
Conversation
Signed-off-by: YanxuanLiu <yanxuanl@nvidia.com>
Signed-off-by: YanxuanLiu <yanxuanl@nvidia.com>
|
build |
Greptile SummaryThis PR extends project automation to run when pull requests close after merging while preserving existing behavior for newly opened issues and pull requests.
Confidence Score: 5/5The PR appears safe to merge, with the documented shared-action dependency remaining an acknowledged integration prerequisite. The event condition preserves opened-event execution, runs the action for merged pull requests, and excludes pull requests closed without merging; no actionable defect remains. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
E[GitHub event] --> O{Action is opened?}
O -->|Yes| A[Run add-to-project action]
O -->|No| C{Closed PR is merged?}
C -->|Yes| A
C -->|No| S[Skip job]
Reviews (1): Last reviewed commit: "Merge branch 'main' into roadmap-on-pr-m..." | Re-trigger Greptile |
## Summary - preserve the existing behavior that adds issues and pull requests to the configured GitHub Project - for merged pull requests in `NVIDIA/cudf-spark` and `NVIDIA/cudf-spark-jni`, read the root `pom.xml` at the event's immutable merged-result SHA and derive the `YY.MM` release - set the Project `Roadmap` field only when it is empty, preserving existing values and re-checking immediately before the update - report missing or ambiguous POM versions and Roadmap options without assigning a value ## Why Roadmap should reflect the release branch at merge time. A pull request that stays open across release cycles is therefore assigned from the branch state it actually merges into, rather than from its state when opened. Consumer workflow updates add the merged `closed` event while continuing to add issues and pull requests on `opened`: - NVIDIA/cudf-spark#15674 - NVIDIA/cudf-spark-jni#5000 ## Validation - Python 3.9 and 3.14 syntax checks - 14 focused tests covering add-only behavior for opened/unmerged events, both target repositories on merge, existing values and the final pre-update re-check, merged-result SHA POM reads, malformed or ambiguous versions, and missing or duplicate options - `git diff --check` --------- Signed-off-by: YanxuanLiu <yanxuanl@nvidia.com>
There was a problem hiding this comment.
Pull request overview
Updates the repository’s “add to NVIDIA Project” workflow so the shared Roadmap automation runs not only when PRs are opened, but also when PRs are closed and merged, while still skipping closed-but-unmerged PRs. This aligns the repo with the shared spark-rapids-common/add-to-project@main behavior described in the PR.
Changes:
- Add
pull_request_target: closedas an additional trigger. - Gate the job so it runs on
openedevents and onclosedevents only whenpull_request.merged == true. - Update the copyright header year range.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
spark-rapids-common/add-to-project@mainBehavior
After NVIDIA/spark-rapids-common#59 is merged, the shared action adds the PR to the Project on
opened, but only derives and setsRoadmapon the mergedclosedevent. IfRoadmapwas assigned manually before merge, it is preserved.Testing note
This is a draft integration PR and depends on NVIDIA/spark-rapids-common#59.
pull_request_targetuses the workflow from the base repository's default branch, so this PR's newclosedtrigger will not execute until the workflow change exists on the default branch.Validation
git diff --checkCommon action PR: NVIDIA/spark-rapids-common#59