Skip to content

Commit

Permalink
Use user changelog if present (#2485)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruhan1 authored Dec 3, 2024
1 parent 56309a3 commit 4e6c799
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@

import static java.util.Collections.emptyMap;
import static java.util.Collections.emptySet;
import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.commonjava.indy.db.common.StoreUpdateAction.STORE;
import static org.commonjava.indy.model.core.ArtifactStore.METADATA_CHANGELOG;
import static org.commonjava.indy.model.core.StoreType.hosted;

@SuppressWarnings( "unchecked" )
Expand Down Expand Up @@ -142,8 +144,12 @@ protected ArtifactStore putArtifactStoreInternal( StoreKey key, ArtifactStore st
try
{
Class<ArtifactStore> storeCls = (Class<ArtifactStore>) key.getType().getStoreClass();
client.module( IndyStoresClientModule.class )
.create( store, String.format( "Create store %s", key ), storeCls );
String changelog = store.getMetadata( METADATA_CHANGELOG );
if ( isBlank(changelog) )
{
changelog = String.format( "Create store %s", key );
}
client.module( IndyStoresClientModule.class ).create( store, changelog, storeCls );
return store;
}
catch ( IndyClientException e )
Expand Down

0 comments on commit 4e6c799

Please sign in to comment.