Skip to content

Added an option to set a body for a PR#5131

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
hector-vido:dispatcher-pr-body
Apr 24, 2026
Merged

Added an option to set a body for a PR#5131
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
hector-vido:dispatcher-pr-body

Conversation

@hector-vido

@hector-vido hector-vido commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

This adds an option inside prowjob-dispatcher to set a body on PR creation.
The intention is to disable coderabbit for dispatcher PRs.

Summary by CodeRabbit

  • New Features
    • Added a command-line flag to set pull request body content. The value provided via CLI is now passed through the create/update PR flow so created or updated pull requests include the specified body text. This makes it possible to supply custom PR descriptions directly when invoking the tool.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@coderabbitai

coderabbitai Bot commented Apr 24, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 804bcd73-4028-42d0-ad7c-c28c0ff66f62

📥 Commits

Reviewing files that changed from the base of the PR and between 77e14f5 and 5b997bd.

📒 Files selected for processing (1)
  • cmd/prow-job-dispatcher/main.go
✅ Files skipped from review due to trivial changes (1)
  • cmd/prow-job-dispatcher/main.go

Walkthrough

Adds a new --pr-body CLI flag and an options.prBody field; the value is parsed from the command line and passed into the PR upsert path (UpsertPR) during PR creation/upsert.

Changes

Cohort / File(s) Summary
PR Body Configuration
cmd/prow-job-dispatcher/main.go
Added prBody field to options struct, new --pr-body CLI flag for parsing, and threaded options.prBody into the UpsertPR call in the createPR flow.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (11 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: adding a --pr-body option to set PR body text in the dispatcher tool.
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.
Stable And Deterministic Test Names ✅ Passed PR modifies only cmd/prow-job-dispatcher/main.go with no test files added or modified, and contains no Ginkgo test declarations.
Test Structure And Quality ✅ Passed This pull request does not contain Ginkgo test code to assess. The PR only modifies main.go to add a --pr-body command-line option. Existing tests use standard Go testing patterns, not Ginkgo.
Microshift Test Compatibility ✅ Passed This PR does not add any new Ginkgo e2e tests, so the MicroShift Test Compatibility check is not applicable. It only modifies the prow-job-dispatcher CLI tool.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This custom check for Ginkgo e2e SNO compatibility tests is not applicable. The PR only modifies a command-line utility tool without adding any new e2e tests.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only cmd/prow-job-dispatcher/main.go CLI utility, adding --pr-body flag with no deployment manifests, Kubernetes resources, operators, controllers, or topology-related configurations.
Ote Binary Stdout Contract ✅ Passed The prow-job-dispatcher is a CLI utility tool without testing framework imports. PR changes only add prBody field and thread it through CLI flag parsing to PR creation function. No process-level stdout writes are introduced; logrus writes to stderr by default.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Custom check for Ginkgo e2e tests and IPv6/disconnected network compatibility does not apply to this PR, which modifies cmd/prow-job-dispatcher/main.go to add a CLI option.

✏️ 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.

@openshift-ci openshift-ci Bot requested review from deepsm007 and psalajova April 24, 2026 03:47
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 24, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cmd/prow-job-dispatcher/main.go`:
- Line 96: The help text for the --pr-body flag (fs.StringVar(&o.prBody,
"pr-body", ...)) is unclear and missing punctuation; update the flag usage
string for clarity and grammar (e.g. “The default body for pull request
messages; can include instructions to disable bots, add CCs, etc.”) by editing
the StringVar call that sets o.prBody so the message is accurate, readable, and
punctuated.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 825a8cc9-2bf2-4585-8c76-b2413ff1dacf

📥 Commits

Reviewing files that changed from the base of the PR and between 191feee and 77e14f5.

📒 Files selected for processing (1)
  • cmd/prow-job-dispatcher/main.go

Comment thread cmd/prow-job-dispatcher/main.go Outdated
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification

No second-stage tests were triggered for this PR.

This can happen when:

  • The changed files don't match any pipeline_run_if_changed patterns
  • All files match pipeline_skip_if_only_changed patterns
  • No pipeline-controlled jobs are defined for the main branch

Use /test ? to see all available tests.

@openshift-ci

openshift-ci Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

@hector-vido: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/breaking-changes 5b997bd link false /test breaking-changes

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 24, 2026
@openshift-ci

openshift-ci Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hector-vido, Prucek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot merged commit f3270da into openshift:main Apr 24, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants