diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..d5d587e --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,25 @@ +name-template: $RESOLVED_VERSION +tag-template: $RESOLVED_VERSION +categories: + - title: 'Features' + label: 'feature' + - title: 'Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' +version-resolver: + major: + labels: + - 'major' + minor: + labels: + - 'minor' + patch: + labels: + - 'patch' + default: patch +template: | + ## Changes + + $CHANGES \ No newline at end of file diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..cd78254 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,24 @@ +name: Release Drafter + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - master + # pull_request event is required only for autolabeler + pull_request: + # Only following types are handled by the action, but one can default to all as well + types: [opened, reopened, synchronize] + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml + # with: + # config-name: my-config.yml + # disable-autolabeler: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/src/main/java/io/logz/jmx2graphite/GraphiteClient.java b/src/main/java/io/logz/jmx2graphite/GraphiteClient.java index b1ca696..182799a 100644 --- a/src/main/java/io/logz/jmx2graphite/GraphiteClient.java +++ b/src/main/java/io/logz/jmx2graphite/GraphiteClient.java @@ -1,8 +1,18 @@ package io.logz.jmx2graphite; -import static io.logz.jmx2graphite.GraphiteProtocol.TCP; -import static io.logz.jmx2graphite.GraphiteProtocol.UDP; +import com.codahale.metrics.graphite.Graphite; +import com.codahale.metrics.graphite.GraphiteSender; +import com.codahale.metrics.graphite.GraphiteUDP; +import com.google.common.base.Joiner; +import com.google.common.collect.Lists; +import net.jodah.failsafe.Failsafe; +import net.jodah.failsafe.RetryPolicy; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.exception.ExceptionUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import javax.net.SocketFactory; import java.io.Closeable; import java.io.IOException; import java.net.InetAddress; @@ -12,21 +22,9 @@ import java.net.UnknownHostException; import java.util.List; -import javax.net.SocketFactory; - -import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.exception.ExceptionUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.codahale.metrics.graphite.Graphite; -import com.codahale.metrics.graphite.GraphiteSender; -import com.codahale.metrics.graphite.GraphiteUDP; -import com.google.common.base.Joiner; -import com.google.common.collect.Lists; +import static io.logz.jmx2graphite.GraphiteProtocol.TCP; +import static io.logz.jmx2graphite.GraphiteProtocol.UDP; -import net.jodah.failsafe.Failsafe; -import net.jodah.failsafe.RetryPolicy; public class GraphiteClient implements Closeable { private static final Logger logger = LoggerFactory.getLogger(GraphiteClient.class);