This is slightly linked #1741. 

In 
https://github.com/liquibase/liquibase/blob/10a0c509c59401e9351cf7d134b4bc671b5d500f/liquibase-core/src/main/java/liquibase/hub/HubUpdater.java#L364-L383

The currently held lock is released and then reacquired again. However, when using Liquibase programatically as a library the prompt is always disabled and therefore releasing and then acquiring the lock is entirely not needed.

Can I propose a change that will do

```
if (!Scope.getCurrentScope().getUI().getAllowPrompt()) {
    return;
}
```

This will solve the problem with the polluting of the logging with "Skipping auto-registration" since registering is anyways not possible when using it as a library.



┆Issue is synchronized with this [Jira Story](https://datical.atlassian.net/browse/LB-1748) by [Unito](https://www.unito.io)

randomAccessFile.write(stringToWrite.getBytes(encoding));
        }
    }
    
    
    
    private void registerChangeLog(UUID hubProjectId, DatabaseChangeLog changeLog, String changeLogFile)
            throws LiquibaseException {
        CommandScope registerChangeLogCommand = new CommandScope("registerChangeLog");
        registerChangeLogCommand
                .addArgumentValue(RegisterChangelogCommandStep.CHANGELOG_FILE_ARG, changeLogFile);
        try {
            if (hubProjectId != null) {
                try {
                    registerChangeLogCommand.addArgumentValue(RegisterChangelogCommandStep.HUB_PROJECT_ID_ARG, hubProjectId);
                } catch (IllegalArgumentException e) {
                    throw new LiquibaseException("The command 'RegisterChangeLog' " +
                            " failed because parameter 'hubProjectId' has invalid value '" + hubProjectId +
                            "'. Learn more at https:hub.liquibase.com");
                }
            }
        } catch (IllegalArgumentException e) {
            throw new LiquibaseException("Unexpected hubProjectId format: " + hubProjectId, e);
        }
        
        
        
        CommandResults results = registerChangeLogCommand.execute();
        String registerChangeLogId = results.getResult(RegisterChangelogCommandStep.REGISTERED_CHANGELOG_ID);
        if (registerChangeLogId != null) {