Skip to content

Add Spring milestone repository and update release notes generation#104

Open
mercyblitz wants to merge 12 commits intomicrosphere-projects:dev-1.xfrom
mercyblitz:dev-1.x
Open

Add Spring milestone repository and update release notes generation#104
mercyblitz wants to merge 12 commits intomicrosphere-projects:dev-1.xfrom
mercyblitz:dev-1.x

Conversation

@mercyblitz
Copy link
Copy Markdown
Contributor

This pull request introduces several improvements to the Maven publishing workflow and refines the actuator auto-configuration logic. The most significant changes are the automation of release notes generation using GitHub Copilot, improvements to conditional bean creation for better compatibility, and enhancements to the test suite for stronger type checks. Additionally, a new repository is added to the Maven parent POM to support milestone dependencies.

Workflow and Release Automation

  • The Maven publishing workflow (.github/workflows/maven-publish.yml) now automatically generates release notes using GitHub Copilot by summarizing commits between tags and formatting them into markdown sections. The generated notes are appended to release-notes.md and used in the GitHub release step.
  • Workflow permissions are updated: the build job now explicitly requests contents: read, and the publish job requests both contents: write and models: read for Copilot API access. [1] [2]
  • After publishing, both pom.xml and release-notes.md are staged and committed for version bumping.

Spring Boot Actuator Auto-Configuration

  • The actuator auto-configuration now uses a string-based type for the @ConditionalOnBean check (METER_REGISTRY_CLASS_NAME) instead of a direct class reference, improving compatibility with optional dependencies. [1] [2]
  • The METER_REGISTRY_CLASS_NAME constant is introduced for this purpose, and relevant imports are adjusted. [1] [2]

Testing Improvements

  • The test suite for actuator auto-configuration is updated to verify the new METER_REGISTRY_CLASS_NAME constant, including a strong type check against MeterRegistry.class.getName(). [1] [2] [3]

Maven Parent POM Updates

  • The Spring Portfolio Milestone Repository is added to the repositories section in microsphere-spring-boot-parent/pom.xml to enable resolving milestone dependencies. [1] [2]

Add a <repositories> section to microsphere-spring-boot-parent/pom.xml registering the Spring Portfolio milestone repository (id: spring-milestone, url: https://repo.spring.io/milestone). This enables resolving Spring milestone artifacts from the parent POM.
Update maven-publish workflow to generate release notes via a Copilot/Models API step. Adds limited permissions (contents: read for build and models: read for the publish job), a Python-based step that collects commits since the previous tag, calls the model to produce concise markdown release notes, appends them to release-notes.md and writes /tmp/current-release-notes.md for the release step. The Create Release step now uses --notes-file and the job also stages release-notes.md so it gets committed after publishing.
Avoid a direct compile-time dependency on Micrometer by replacing @ConditionalOnBean(MeterRegistry.class) with @ConditionalOnBean(type = METER_REGISTRY_CLASS_NAME). Added a string constant METER_REGISTRY_CLASS_NAME (with javadoc) and removed the MeterRegistry import so the conditional is resolved by class name at runtime.
Import MeterRegistry and add assertions in ActuatorAutoConfigurationTest to verify the METER_REGISTRY_CLASS_NAME constant equals the expected fully-qualified name ("io.micrometer.core.instrument.MeterRegistry") and matches MeterRegistry.class.getName(). This strengthens the test by ensuring the constant correctly references the MeterRegistry class name.
Update README: bump branch table versions for 0.2.x and 0.1.x to 0.2.11 and 0.1.11, respectively. Apply minor formatting fixes (adjust blank lines around badges and code blocks, and wrap the 'Before you log a bug' line) to improve readability.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ Complexity Δ
...tuate/autoconfigure/ActuatorAutoConfiguration.java 100.00% <ø> (ø) 2.00 <0.00> (ø)

... and 3 files with indirect coverage changes

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

Delete the <repositories> section from microsphere-spring-boot-parent/pom.xml, removing the spring-milestone repository entry (id: spring-milestone, url: https://repo.spring.io/milestone). This cleans up the parent POM to avoid relying on the Spring milestone repository during builds.
Remove the `permissions: contents: read` block from the build job in the maven-publish workflow. This simplifies the workflow by relying on repository/default permissions instead of an explicit read permission; no other functional changes were made.
Add explicit GitHub Actions permissions block to the Maven workflow, granting read-only access to repository contents. This limits the workflow's token scope and ensures the job has the necessary read access for checkout and related steps.
Give the build job read access to repo contents and improve release notes generation. The AI prompt was expanded to include more structured sections (New Features, Bug Fixes, Documentations, Dependency Updates, Test Improvements, Build and Workflow Enhancements, Other Changes). A Full Changelog link is now generated and appended to the repository NOTES file and the temporary release notes file. Also normalize newlines and use the raw inputs.revision (no implicit "v" prefix) when checking/creating GitHub releases, plus small whitespace/end-of-file fixes.
Change .mvn/wrapper/maven-wrapper.properties to point to Apache's official distribution URL and upgrade the Maven binary from 3.9.9 to 3.9.14 (dlcdn.apache.org). This ensures the wrapper fetches the official Apache Maven 3.9.14 release instead of the previous mirror.
Update the parent POM version from 0.2.6 to 0.2.7 to pick up the latest changes from io.github.microsphere-projects:microsphere-build (build fixes/dependency updates).
Update the <microsphere-spring.version> property in the parent POM from 0.1.9 to 0.1.11 so child modules use the newer microsphere-spring release.
@sonarqubecloud
Copy link
Copy Markdown

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.

1 participant