Skip to content

Vti 784/add ruleoptions endpoint#200

Merged
alex-heine merged 13 commits intomainfrom
VTI-784/Add_Ruleoptions_Endpoint
Mar 6, 2026
Merged

Vti 784/add ruleoptions endpoint#200
alex-heine merged 13 commits intomainfrom
VTI-784/Add_Ruleoptions_Endpoint

Conversation

@alex-heine
Copy link
Copy Markdown
Contributor

@alex-heine alex-heine commented Mar 4, 2026

What

  • Add ruleoptions endpoint
  • Change all Level references to notificaitons.Level

Why

To ensure no wrong level's are saved and the ruleoptions return everything needed to create a notification rule.

References

Checklist

  • Tests
  • Got all spots for the Rule.Level type string replaced by notifications.Level

@alex-heine alex-heine added the alpha release Set label to create an alpha pre release label Mar 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 4, 2026

Conventional Commits Report

Type Number
Changed 11
Added 1

🚀 Conventional commits found.

Comment thread pkg/services/ruleservice/ruleService.go Outdated
@alex-heine alex-heine marked this pull request as ready for review March 4, 2026 14:32
@alex-heine alex-heine requested review from a team as code owners March 4, 2026 14:32
alex-heine added a commit to greenbone/opensight-golang-libraries that referenced this pull request Mar 4, 2026
## What
- Add missing notification urgent Level
- Add AllowedLevels slice

## Why
To cover all possible notification Levels

## References
- greenbone/opensight-notification-service#200
- https://jira.greenbone.net/browse/VTI-784

## Checklist
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 21.87500% with 100 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.84%. Comparing base (c4a38c3) to head (70f2f55).
⚠️ Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
...ruleservice/mocks/NotificationChannelRepository.go 0.00% 39 Missing ⚠️
pkg/web/rulecontroller/mocks/RuleService.go 0.00% 35 Missing ⚠️
pkg/models/rule.go 0.00% 19 Missing ⚠️
pkg/web/rulecontroller/ruleController.go 16.66% 5 Missing ⚠️
pkg/models/channelType.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #200      +/-   ##
==========================================
- Coverage   20.87%   20.84%   -0.03%     
==========================================
  Files          82       83       +1     
  Lines        3976     4101     +125     
==========================================
+ Hits          830      855      +25     
- Misses       3077     3177     +100     
  Partials       69       69              
Flag Coverage Δ
unit-tests 20.84% <21.87%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alex-heine alex-heine force-pushed the VTI-784/Add_Ruleoptions_Endpoint branch from 0dcc08f to 7be26f3 Compare March 5, 2026 09:53
@alex-heine alex-heine requested a review from a team as a code owner March 5, 2026 09:53
Comment thread Dockerfile Outdated
Comment thread pkg/services/ruleservice/ruleService.go Outdated
Comment thread pkg/services/ruleservice/ruleService_test.go Outdated
Comment thread pkg/web/rulecontroller/ruleController.go Outdated
Comment thread pkg/models/rule.go Outdated
Comment thread pkg/models/rule.go Outdated
Comment thread pkg/services/ruleservice/ruleService.go Outdated
mgoetzegb
mgoetzegb previously approved these changes Mar 6, 2026
@alex-heine alex-heine enabled auto-merge March 6, 2026 10:38
@alex-heine alex-heine disabled auto-merge March 6, 2026 10:38
@alex-heine alex-heine merged commit f005717 into main Mar 6, 2026
16 checks passed
@alex-heine alex-heine deleted the VTI-784/Add_Ruleoptions_Endpoint branch March 6, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alpha release Set label to create an alpha pre release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants