Skip to content

Run Roadmap automation when pull requests merge [skip ci] - #5000

Merged
YanxuanLiu merged 3 commits into
NVIDIA:mainfrom
YanxuanLiu:roadmap-on-pr-merge
Aug 17, 2026
Merged

Run Roadmap automation when pull requests merge [skip ci]#5000
YanxuanLiu merged 3 commits into
NVIDIA:mainfrom
YanxuanLiu:roadmap-on-pr-merge

Conversation

@YanxuanLiu

@YanxuanLiu YanxuanLiu commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep adding issues and pull requests to the NVIDIA Project when they are opened
  • also run the shared action when a pull request is closed and merged
  • skip pull requests that are closed without merging
  • use spark-rapids-common/add-to-project@main

Behavior

After NVIDIA/spark-rapids-common#59 is merged, the shared action adds the PR to the Project on opened, but only derives and sets Roadmap on the merged closed event. If Roadmap was 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_target uses the workflow from the base repository's default branch, so this PR's new closed trigger will not execute until the workflow change exists on the default branch.

Validation

  • YAML parsed successfully
  • git diff --check
  • event-condition review: issue opened and PR opened run; merged PR runs; closed-unmerged PR is skipped

Common action PR: NVIDIA/spark-rapids-common#59

Signed-off-by: YanxuanLiu <yanxuanl@nvidia.com>
Signed-off-by: YanxuanLiu <yanxuanl@nvidia.com>
@YanxuanLiu
YanxuanLiu marked this pull request as ready for review August 17, 2026 05:01
@YanxuanLiu
YanxuanLiu requested a review from a team as a code owner August 17, 2026 05:01
@YanxuanLiu YanxuanLiu changed the title Run Roadmap automation when pull requests merge Run Roadmap automation when pull requests merge [skip ci] Aug 17, 2026
@YanxuanLiu

Copy link
Copy Markdown
Collaborator Author

build

@greptile-apps

greptile-apps Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR extends project automation to run when pull requests close after merging while preserving existing behavior for newly opened issues and pull requests.

  • Adds the pull_request_target.closed trigger.
  • Gates closed events on the pull request's merged state.
  • Continues invoking NVIDIA/spark-rapids-common/add-to-project@main.

Confidence Score: 5/5

The 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

Filename Overview
.github/workflows/add-to-project.yml Adds merged-PR processing while correctly retaining opened issue and pull-request processing and skipping closed-unmerged pull requests.

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

Reviews (1): Last reviewed commit: "Merge branch 'main' into roadmap-on-pr-m..." | Re-trigger Greptile

YanxuanLiu added a commit to NVIDIA/spark-rapids-common that referenced this pull request Aug 17, 2026
## 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>
@YanxuanLiu
YanxuanLiu requested review from NvTimLiu and yinqingh and a lite review from Copilot August 17, 2026 07:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: closed as an additional trigger.
  • Gate the job so it runs on opened events and on closed events only when pull_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.

@YanxuanLiu
YanxuanLiu merged commit 6d59aef into NVIDIA:main Aug 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants