Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR - rebased of ibre5041/master #55

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions backup-commons/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ apply plugin: 'maven'
group 'com.opsgenie.tools'
version '0.23.8'

sourceCompatibility = 1.6
targetCompatibility = 1.6
sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
mavenLocal()
Expand All @@ -17,11 +17,16 @@ apply plugin: 'java'
apply plugin: 'project-report'

dependencies {
compile 'org.apache.logging.log4j:log4j-api:2.16.0'
compile 'org.apache.logging.log4j:log4j-core:2.16.0'
compile "org.apache.logging.log4j:log4j-slf4j-impl:2.16.0"
compile 'org.apache.logging.log4j:log4j-api:2.17.2'
compile 'org.apache.logging.log4j:log4j-core:2.17.2'
compile "org.apache.logging.log4j:log4j-slf4j-impl:2.17.2"
compile "com.beust:jcommander:1.48"
compile 'org.eclipse.jgit:org.eclipse.jgit:4.5.0.201609210915-r'
compile 'org.apache.httpcomponents:httpclient:4.5.13'
compile 'org.apache.httpcomponents:httpcore:4.4.15'
//compile 'com.jcraft:jsch:0.1.55'
compile 'org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r'
compile 'org.eclipse.jgit:org.eclipse.jgit.ssh.apache:5.13.0.202109080827-r'
compile 'org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:5.13.0.202109080827-r'
compile "com.opsgenie.oas:opsgenie-sdk-swagger:1.0.12"
compile ('com.fasterxml.jackson.core:jackson-databind:2.10.4') {
force = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.eclipse.jgit.transport.JschConfigSessionFactory;
import org.eclipse.jgit.transport.OpenSshConfig;
import org.eclipse.jgit.transport.CredentialsProviderUserInfo;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.UnsupportedEncodingException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private int getApiLimitForDomain(DomainNames domain, int periodInSeconds) {
resultLimit = domainLimitDto.getLimit();
}
}
return resultLimit;
return Math.max(resultLimit, 1);
}

public int getRateLimit(DomainNames domain, int period) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static String readFile(String fileName) throws IOException {

public static RateLimitsDto generateRateLimits(String apiKey, String opsGenieHost) throws IOException {
try {
HttpClient client = HttpClientBuilder.create().build();
HttpClient client = HttpClientBuilder.create().useSystemProperties().build();

HttpGet httpGet = new HttpGet(opsGenieHost + "/v2/request-limits/");
httpGet.addHeader(HttpHeaders.AUTHORIZATION, "GenieKey " + apiKey);
Expand Down
2 changes: 1 addition & 1 deletion backup-export/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version '0.23.8'

apply plugin: 'java'

sourceCompatibility = 1.6
sourceCompatibility = 1.8

dependencies {
compile project(':backup-commons')
Expand Down
2 changes: 1 addition & 1 deletion backup-import/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version '0.23.8'

apply plugin: 'java'

sourceCompatibility = 1.6
sourceCompatibility = 1.8

dependencies {
compile project(':backup-commons')
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ apply plugin: 'maven'
group 'com.opsgenie.tools'
version '0.23.8'

sourceCompatibility = 1.6
targetCompatibility = 1.6
sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
mavenLocal()
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-bin.zip