Skip to content

Comments

fix(notifier): Provide the types for mailClient and jiraClient#8684

Closed
mnonnenmacher wants to merge 1 commit intomainfrom
fix-notifier-properties
Closed

fix(notifier): Provide the types for mailClient and jiraClient#8684
mnonnenmacher wants to merge 1 commit intomainfrom
fix-notifier-properties

Conversation

@mnonnenmacher
Copy link
Member

Make sure that the types for mailClient and jiraClient are always defined.

Make sure that the types for `mailClient` and `jiraClient` are always
defined.

Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.com>
@codecov
Copy link

codecov bot commented May 23, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.88%. Comparing base (2bfeec1) to head (b8eb171).
⚠️ Report is 3813 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8684   +/-   ##
=========================================
  Coverage     67.88%   67.88%           
  Complexity     1165     1165           
=========================================
  Files           244      244           
  Lines          7732     7732           
  Branches        865      865           
=========================================
  Hits           5249     5249           
  Misses         2124     2124           
  Partials        359      359           
Flag Coverage Δ
funTest-docker 66.84% <ø> (ø)

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

config.mail?.let { put("mailClient", MailNotifier(it)) }
config.jira?.let { put("jiraClient", JiraNotifier(it)) }

put("mailClient", config.mail?.let { MailNotifier(it) })
Copy link
Member

Choose a reason for hiding this comment

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

As the condition is now not at the outer level anymore, buildMap can be replaced with mapOf and "mailClient" to config.mail?.let { MailNotifier(it) } etc.


override val compConfig = createJvmCompilationConfigurationFromTemplate<NotificationsScriptTemplate> {
providedProperties(customProperties.mapValues { (_, v) -> KotlinType(v::class) })
providedProperties(customPropertyTypes)
Copy link
Member

Choose a reason for hiding this comment

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

This could be inlined, like done here (using a vararg of pairs). And I'd probably inline customProperties then as well.

Comment on lines +53 to +54
"mailClient" to KotlinType(MailNotifier::class, isNullable = true),
"jiraClient" to KotlinType(JiraNotifier::class, isNullable = true),
Copy link
Member

Choose a reason for hiding this comment

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

Making these types nullable will be a breaking change because all notifier scripts will need to be adjusted.
Please change your commit message: fix(notifier)!:

@sschuberth
Copy link
Member

@mnonnenmacher are you going to continue working on this, or can it be closed?

@mnonnenmacher
Copy link
Member Author

@mnonnenmacher are you going to continue working on this, or can it be closed?

I stopped because I could not get IntelliJ syntax highlighting to work anymore, but yes, I still want to continue, maybe as part of making notifiers plugins.

@mnonnenmacher
Copy link
Member Author

I'm not planning to continue this anymore.

@mnonnenmacher mnonnenmacher deleted the fix-notifier-properties branch January 24, 2026 21:46
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.

3 participants