title: Extending GitInfoContributor to add properties?
body: <p>Before I discovered Spring Boot's Info Actuator had almost everything I wanted to publish, I made a few meta endpoints to ensure that I could access build and Git information that would help when trying to validate things like:</p>
  
  <ul>
  <li>"Is the right version deployed?"</li>
  <li>"Who built this?"</li>
  <li>"When was it built?"</li>
  <li>"Which git commit is this based on?"</li>
  </ul>
  
  <p>After doing that, I did get around to discovering the Info actuator and that it answers almost all of those questions for me, but there are a few things from the Git information that I'd like to add -- mostly the commit message and the dirty flag.</p>
  
  <p>I looked at the output if I turn on full git metadata with:</p>
  
  <pre><code>management.info.git.mode=full
  </code></pre>
  
  <p>But ... that adds a lot more information, most of which I don't care about, so it's more than I really want.</p>
  
  <p>What I'd like to do is take the GitInfoContributor and extend/replace it, but I'm not totally sure how to do that. It's easy to add my own contributor, but if I add my own contributor and call builder.withDetails("git"), like this:</p>
  
  <pre><code>package ca.cpp.api.submitapi.config
  
  import org.springframework.boot.actuate.info.Info
  import org.springframework.boot.actuate.info.InfoContributor
  import org.springframework.boot.info.GitProperties
  import org.springframework.stereotype.Component
  
  @Component
  class CustomGitInfoContributor(private val properties: GitProperties): InfoContributor {
      override fun contribute(builder: Info.Builder?) {
          builder?.withDetail("git",mapOf("dirty" to properties.get("dirty"))
      }
  }
  </code></pre>
  
  <p>This replaces the whole set of git properties, and in the meantime, I think the core GitInfoContributor will still be there, still be providing information that I'm throwing away.</p>
  
  <p>Is there a reasonable way to add only the elements I want, either with my own contributor that can merge its information with the info already under "git" or by somehow extending/replacing the existing GitInfoContributor?</p>