Repository navigation
Conversation
|
Warning Review limit reached
More reviews will be available in 37 minutes and 42 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds a new ChangesJReleaser Publisher Integration
Sequence Diagram(s)sequenceDiagram
participant User as Maven Build
participant Factory as JReleaserPublisherFactory
participant Config as JReleaserPublisherConfig
participant Publisher as JReleaserPublisher
participant StoreWriter as DefaultArtifactStoreWriter
participant JReleaser as Workflows.fullRelease
User->>Factory: doCreate(session)
Factory->>Config: new JReleaserPublisherConfig(session.config(), logger)
Factory->>Publisher: new JReleaserPublisher(session, repoSystem, config, requirements)
User->>Publisher: publish(artifactStore)
Publisher->>Config: outputDirectory()
Publisher->>StoreWriter: writeAsDirectory(artifactStore, outputDirectory)
StoreWriter->>StoreWriter: Files.createDirectories(targetDirectory)
StoreWriter-->>Publisher: done
Publisher->>Config: createContext()
Config->>Config: load jreleaser.yml, override coordinates
Config-->>Publisher: JReleaserContext
Publisher->>JReleaser: fullRelease(context)
JReleaser-->>User: release complete
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 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
`@core/src/main/java/eu/maveniverse/maven/njord/shared/impl/store/DefaultArtifactStoreWriter.java`:
- Around line 31-35: There is a TOCTOU race condition in the targetDirectory
existence check and creation logic. Instead of checking if targetDirectory
exists and then calling Files.createDirectories, remove the Files.exists check
and call Files.createDirectories directly, but wrap it in a try-catch block to
handle FileAlreadyExistsException. If the exception is caught, verify whether
the existing path is actually a directory or a file, and only throw an
IOException with the appropriate message if a file exists at that location or if
the directory should not have been pre-created. This ensures atomic directory
creation without the race condition window that currently exists between the
exists check and the createDirectories call.
In `@extension3-jreleaser/src/main/resources/META-INF/maven/extension.xml`:
- Around line 21-27: The extension.xml file is missing the install publisher
export entry from the exportedArtifacts list. Add a new exportedArtifact element
with the value eu.maveniverse.maven.njord.publisher:install to the
exportedArtifacts section alongside the other publisher entries like deploy,
apache, sonatype-central, sonatype-cp, sonatype-nx2, sonatype-nx3, and jreleaser
to ensure the install publisher is properly exported and available through this
extension.
In `@publisher/jreleaser/README.md`:
- Around line 18-21: The documentation for the altDeploymentRepository property
incorrectly states that the legacy format is not supported and only the id::url
format is expected. Since ResolverUtils.parseRemoteRepositoryString() actually
supports both the id::url format and the legacy id::layout::url format (as
confirmed by the error message and integration tests), update the README.md file
to correct this claim. Replace the statement about "does **not supports legacy
format**" with text that accurately reflects that both the id::url and legacy
id::layout::url formats are supported for the altDeploymentRepository property.
In
`@publisher/jreleaser/src/main/java/eu/maveniverse/maven/njord/publisher/jreleaser/JReleaserPublisher.java`:
- Around line 44-58: The doPublish method in JReleaserPublisher contains a
redundant try-with-resources statement wrapping the artifactStore parameter.
Since ArtifactStorePublisherSupport.publish() already manages the store
lifecycle with try-with-resources before calling doPublish(), remove the nested
try-with-resources block and use the artifactStore parameter directly throughout
the method. Additionally, replace the catch block that converts IOException to
UncheckedIOException with a catch block that propagates the IOException
directly, respecting the parent method's declared throws IOException contract
instead of converting to an unchecked exception.
In
`@publisher/jreleaser/src/main/java/eu/maveniverse/maven/njord/publisher/jreleaser/JReleaserPublisherConfig.java`:
- Around line 98-99: In the createContext() method, you are creating a
JReleaserLogger instance at line 98 and storing it in the logger variable, but
then calling getLogger(outputDirectory) again at line 128 when passing the
logger to ContextCreator.create(). Instead of creating a second logger, pass the
same logger instance created at line 98 as an argument to
ContextCreator.create(). This will prevent file truncation from the second call
to getLogger() and eliminate the resource leak from the unclosed first
PrintWriter. Update the ContextCreator.create() method signature to accept the
logger parameter and use the passed instance instead of creating a new one
internally.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 28eae399-006c-41d1-9e34-f3315927ccda
📒 Files selected for processing (13)
README.mdcore/src/main/java/eu/maveniverse/maven/njord/shared/impl/store/DefaultArtifactStoreWriter.javaextension3-jreleaser/pom.xmlextension3-jreleaser/src/main/java/eu/maveniverse/maven/njord/extension3/jreleaser/Dummy.javaextension3-jreleaser/src/main/resources/META-INF/maven/extension.xmlpom.xmlpublisher/jreleaser/README.mdpublisher/jreleaser/pom.xmlpublisher/jreleaser/src/main/java/eu/maveniverse/maven/njord/publisher/jreleaser/JReleaserLoggerAdapter.javapublisher/jreleaser/src/main/java/eu/maveniverse/maven/njord/publisher/jreleaser/JReleaserPublisher.javapublisher/jreleaser/src/main/java/eu/maveniverse/maven/njord/publisher/jreleaser/JReleaserPublisherConfig.javapublisher/jreleaser/src/main/java/eu/maveniverse/maven/njord/publisher/jreleaser/JReleaserPublisherFactory.javapublisher/pom.xml
Summary by CodeRabbit
New Features
Bug Fixes
Documentation