<commit_before>node {
    sh "rm -rf *"
    sh "rm -rf .git"
    checkout([
            $class: 'GitSCM',
            branches: [[name: '*/master']],
            doGenerateSubmoduleConfigurations: false,
            extensions: [[$class: 'LocalBranch', localBranch: 'master']],
            submoduleCfg: [],
            userRemoteConfigs: [[credentialsId: '6a9f959a-dc73-4c4a-a998-049d3c725d34', url: '<EMAIL>:gravitee-io/issues.git']]])

    sh "docker run --rm --env MILESTONE_VERSION=${MILESTONE_VERSION} -v '$WORKSPACE':/data graviteeio/changelog"

    echo readFile("CHANGELOG.adoc")

    sh "git add --update"
    sh "git commit -m \"Generate changelog for version ${MILESTONE_VERSION}\""
    sh "git tag ${MILESTONE_VERSION}"

    if (!Boolean.valueOf(dryRun)) {
        sh "git push --tags origin master"
    }
}<commit_msg>changelog: upgrade script to manage 'APIM - x.y.z'<commit_after>node {
    sh "rm -rf *"
    sh "rm -rf .git"
    checkout([
            $class: 'GitSCM',
            branches: [[name: '*/master']],
            doGenerateSubmoduleConfigurations: false,
            extensions: [[$class: 'LocalBranch', localBranch: 'master']],
            submoduleCfg: [],
            userRemoteConfigs: [[credentialsId: '6a9f959a-dc73-4c4a-a998-049d3c725d34', url: '<EMAIL>:gravitee-io/issues.git']]])

    sh "docker run --rm --env MILESTONE_VERSION='${MILESTONE_VERSION}' -v '$WORKSPACE':/data graviteeio/changelog"

    echo readFile("CHANGELOG.adoc")

    sh "git add --update"
    replacement = "${MILESTONE_VERSION}".replace(" ", "_")
    sh "git commit -m \"Generate changelog for version ${replacement}\""
    sh "git tag \"${replacement}\""

    if (!Boolean.valueOf(dryRun)) {
        sh "git push --tags origin master"
    }
}
{'fraction_non_alphanumeric': 0.16077537058152794, 'fraction_numerical': 0.02394526795895097, 'mean_word_length': 2.806941431670282, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5701938', 'n_tokens_mistral': 617, 'n_tokens_neox': 594, 'n_words': 134}