Skip to content

fix: Add missing config set jira-email#962

Open
Tof1973 wants to merge 2 commits into
openshift:mainfrom
Tof1973:clacombe/config-set-jira-email
Open

fix: Add missing config set jira-email#962
Tof1973 wants to merge 2 commits into
openshift:mainfrom
Tof1973:clacombe/config-set-jira-email

Conversation

@Tof1973

@Tof1973 Tof1973 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • fix (Bug Fix)
  • feat (New Feature)
  • docs (Documentation)
  • test (Test Coverage)
  • chore (Clean Up / Maintenance Tasks)
  • other (Anything that doesn't fit the above)

What this PR does / Why we need it?

Add missing config set jira-email argument

Which Jira/Github issue(s) does this PR fix?

  • Related Issue #
  • Closes #

Special notes for your reviewer

Unit Test Coverage

Guidelines

  • If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
  • If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR
  • Backward compatible

/label tide/merge-method-squash

Summary by CodeRabbit

  • New Features
    • The ocm backplane config set command now supports updating the Jira email setting.
    • The configured Jira email value is now persisted in the generated configuration output.
  • Bug Fixes
    • Improved the command help/validation message so the Jira email option (jira-email) is recognized as a supported setting.

@openshift-ci openshift-ci Bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jun 26, 2026
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

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: 1d1e4c80-f12a-46c1-928b-d8eb42b8401b

📥 Commits

Reviewing files that changed from the base of the PR and between 88a1c03 and 3dfda8d.

📒 Files selected for processing (2)
  • cmd/ocm-backplane/config/config.go
  • cmd/ocm-backplane/config/set.go
✅ Files skipped from review due to trivial changes (1)
  • cmd/ocm-backplane/config/config.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • cmd/ocm-backplane/config/set.go

Walkthrough

ocm backplane config set now accepts Jira email as a supported config key, includes it in the help text and error message, and reads and writes the value through viper.

Changes

Jira email config support

Layer / File(s) Summary
Help text update
cmd/ocm-backplane/config/config.go
The config command description lists the added supported variables and adjusts the supported-variable formatting.
Set command handling
cmd/ocm-backplane/config/set.go
The set command reads Jira email from existing config, accepts it in the variable dispatch, updates the supported-variable error message, and writes it back to viper.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5–15 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding the missing jira-email config set support.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci openshift-ci Bot requested review from diakovnec and smarthall June 26, 2026 16:30
@openshift-ci

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Tof1973
Once this PR has been reviewed and has the lgtm label, please assign diakovnec for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmd/ocm-backplane/config/set.go`:
- Line 120: The setConfig flow is overwriting the saved Jira email even when
updating unrelated settings because bpConfig.JiraEmail is never hydrated from
viper before viper.Set is called. In setConfig, either load the existing Jira
email from viper alongside JiraToken before writing, or guard the
viper.Set(config.JiraEmailViperKey, ...) call so it only runs in the Jira-email
update branch; use the existing setConfig logic and JiraToken/JiraEmail handling
to locate the change.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0d2a9445-2aa8-48d2-a03c-81b1244c5f4d

📥 Commits

Reviewing files that changed from the base of the PR and between 0f4969f and 88a1c03.

📒 Files selected for processing (1)
  • cmd/ocm-backplane/config/set.go

Comment thread cmd/ocm-backplane/config/set.go
@codecov-commenter

codecov-commenter commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 58.33333% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.97%. Comparing base (0f4969f) to head (3dfda8d).

Files with missing lines Patch % Lines
cmd/ocm-backplane/config/set.go 0.00% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #962      +/-   ##
==========================================
- Coverage   53.99%   53.97%   -0.02%     
==========================================
  Files          82       82              
  Lines        6323     6329       +6     
==========================================
+ Hits         3414     3416       +2     
- Misses       2463     2467       +4     
  Partials      446      446              
Files with missing lines Coverage Δ
cmd/ocm-backplane/config/config.go 100.00% <100.00%> (ø)
cmd/ocm-backplane/config/set.go 11.25% <0.00%> (-0.60%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Tof1973 Tof1973 marked this pull request as draft June 26, 2026 16:49
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 26, 2026
@Tof1973 Tof1973 force-pushed the clacombe/config-set-jira-email branch from f18c568 to 3dfda8d Compare June 26, 2026 22:39
@Tof1973 Tof1973 marked this pull request as ready for review June 26, 2026 22:41
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 26, 2026
@openshift-ci

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@Tof1973: all tests passed!

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants