Skip to content

ci: scope PR merge guidance concurrency per PR#2041

Merged
Pouyanpi merged 1 commit into
NVIDIA-NeMo:developfrom
Pouyanpi:pouyanpi/pr-merge-guidance-concurrency
Jun 17, 2026
Merged

ci: scope PR merge guidance concurrency per PR#2041
Pouyanpi merged 1 commit into
NVIDIA-NeMo:developfrom
Pouyanpi:pouyanpi/pr-merge-guidance-concurrency

Conversation

@Pouyanpi

@Pouyanpi Pouyanpi commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Description

scope PR merge guidance concurrency per PR

Related Issue(s)

Summary by CodeRabbit

  • Chores
    • Updated GitHub Actions workflow configuration to optimize concurrent run handling across pull requests, improving CI/CD efficiency.

@github-actions github-actions Bot added the status: triaged Triaged by a maintainer; eligible for automated review (CodeRabbit/Greptile). label Jun 17, 2026
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 59a5b1f3-4829-40dc-a444-1aee7cd43c55

📥 Commits

Reviewing files that changed from the base of the PR and between 6cb7030 and be25c87.

📒 Files selected for processing (1)
  • .github/workflows/pr-merge-guidance.yml

📝 Walkthrough

Walkthrough

The concurrency.group key in .github/workflows/pr-merge-guidance.yml is updated from a repository-wide value to one scoped per pull request, using github.event.pull_request.number or github.event.inputs.pr_number with a github.ref_name fallback.

Changes

PR-Scoped Concurrency Group

Layer / File(s) Summary
PR-scoped concurrency group key
.github/workflows/pr-merge-guidance.yml
concurrency.group expression changed to incorporate the pull request number (from event payload or manual dispatch input) with a ref_name fallback, so runs are cancelled/deduplicated per PR rather than repository-wide.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • NVIDIA-NeMo/Guardrails#1971: Introduced the same .github/workflows/pr-merge-guidance.yml workflow that this PR modifies, making it a direct predecessor.
🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: scoping PR merge guidance concurrency per PR instead of repository-wide.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Test Results For Major Changes ✅ Passed Change is minor (CI workflow config only), modifying concurrency grouping in GitHub Actions. No product code, features, or breaking changes affected, so test results documentation not required.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@Pouyanpi Pouyanpi added status: triaged Triaged by a maintainer; eligible for automated review (CodeRabbit/Greptile). and removed status: triaged Triaged by a maintainer; eligible for automated review (CodeRabbit/Greptile). labels Jun 17, 2026
@greptile-apps

greptile-apps Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR tightens the concurrency group for the PR Merge Guidance workflow so that runs are queued per-PR (or per-branch for push events) rather than globally across the entire repository. Previously, any run of this workflow — regardless of which PR triggered it — would compete for a single slot, causing unrelated PRs to block each other.

  • pull_request_target / workflow_dispatch: concurrency is now scoped to the individual PR number, so multiple PRs can have their guidance computed simultaneously without queuing.
  • push to main/develop: falls back to github.ref_name, preserving serialization of bulk-processing runs for the same branch while allowing pushes to different branches to run in parallel.

Confidence Score: 5/5

Safe to merge — the change is a targeted CI efficiency fix with no impact on application logic.

The single-line change correctly scopes concurrency to per-PR for pull_request_target and workflow_dispatch triggers, and to per-branch for push triggers. All three trigger paths in the expression have the right fallback order, and cancel-in-progress remains false, so no in-flight runs are dropped.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/pr-merge-guidance.yml Concurrency group key changed from repository-scoped to per-PR-scoped using PR number, input number, or branch ref as the discriminator.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Workflow Triggered] --> B{Event Type?}
    B -->|pull_request_target| C["group: pr-merge-guidance-PR_NUMBER\ne.g. pr-merge-guidance-42"]
    B -->|workflow_dispatch| D["group: pr-merge-guidance-INPUT_PR_NUMBER\ne.g. pr-merge-guidance-99"]
    B -->|push to main/develop| E["group: pr-merge-guidance-BRANCH\ne.g. pr-merge-guidance-develop"]
    C --> F["Runs concurrently with other PRs\nQueues only for same PR"]
    D --> G["Queues only for same manual dispatch PR"]
    E --> H["Queues only for same branch push\nProcesses all open PRs for that branch"]
    style F fill:#90EE90
    style G fill:#90EE90
    style H fill:#90EE90
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[Workflow Triggered] --> B{Event Type?}
    B -->|pull_request_target| C["group: pr-merge-guidance-PR_NUMBER\ne.g. pr-merge-guidance-42"]
    B -->|workflow_dispatch| D["group: pr-merge-guidance-INPUT_PR_NUMBER\ne.g. pr-merge-guidance-99"]
    B -->|push to main/develop| E["group: pr-merge-guidance-BRANCH\ne.g. pr-merge-guidance-develop"]
    C --> F["Runs concurrently with other PRs\nQueues only for same PR"]
    D --> G["Queues only for same manual dispatch PR"]
    E --> H["Queues only for same branch push\nProcesses all open PRs for that branch"]
    style F fill:#90EE90
    style G fill:#90EE90
    style H fill:#90EE90
Loading

Reviews (2): Last reviewed commit: "ci: scope PR merge guidance concurrency ..." | Re-trigger Greptile

@Pouyanpi Pouyanpi closed this Jun 17, 2026
@Pouyanpi Pouyanpi reopened this Jun 17, 2026
@Pouyanpi Pouyanpi merged commit 48f5eeb into NVIDIA-NeMo:develop Jun 17, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XS status: triaged Triaged by a maintainer; eligible for automated review (CodeRabbit/Greptile).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant