Guard OctoMC Maven credentials to unblock CodeQL Java/Kotlin autobuild#102
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job 'Analyze (java-kotlin)'
Guard OctoMC Maven credentials to unblock CodeQL Java/Kotlin autobuild
Jun 5, 2026
There was a problem hiding this comment.
Pull request overview
This PR hardens Gradle Kotlin DSL credential wiring for the OctoMC Maven repository so CI workflows (notably GitHub Actions CodeQL Java/Kotlin autobuild) don’t fail during Gradle configuration when octomcUsername / octomcPassword properties are absent.
Changes:
- Replaced non-null casts of
findProperty("octomcUsername"/"octomcPassword")with nullable lookups. - Applied credentials to the OctoMC Maven repository only when both username and password are present.
- Extended the conditional credential behavior to the
publishingrepository configuration inOctoCore-Core.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
OctoCore-Core/build.gradle.kts |
Makes OctoMC repo + publishing credentials conditional on both properties being present. |
OctoCore-common/build.gradle.kts |
Guards OctoMC repository credentials behind a null check to avoid config-time crashes. |
OctoCore-1.8/build.gradle.kts |
Guards OctoMC repository credentials behind a null check to avoid config-time crashes. |
OctoCore-1.21/build.gradle.kts |
Guards OctoMC repository credentials behind a null check to avoid config-time crashes. |
buildSrc/src/main/kotlin/net.octopvp.java-conventions.gradle.kts |
Updates the conventions plugin repository credentials block to be conditional. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Chinay-Domitrix
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Analyze (java-kotlin)failed in GitHub Actions because Gradle configuration hard-cast missingoctomcUsername/octomcPasswordproperties, causingnull cannot be cast to non-null type kotlin.Stringbefore autobuild could run. This PR makes credential wiring conditional so CI can configure/build without private repo secrets.Root cause addressed
Build script hardening
buildSrcconvention plugin:buildSrc/src/main/kotlin/net.octopvp.java-conventions.gradle.ktsOctoCore-1.21/build.gradle.ktsOctoCore-1.8/build.gradle.ktsOctoCore-common/build.gradle.ktsOctoCore-Core/build.gradle.kts(including publishing repository credentials block)Behavior change