WIP - changing POST to PUT

This commit is contained in:
Marcin Grzejszczak
2017-10-23 11:38:19 +02:00
parent 687e9d7c03
commit d0c0f949f4
15 changed files with 74 additions and 25 deletions

View File

@@ -4,6 +4,7 @@ import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.cloud.release.internal.ReleaserProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.Assert;
import org.springframework.web.client.RestTemplate;
/**
@@ -19,6 +20,7 @@ class SaganConfiguration {
}
private RestTemplate restTemplate(ReleaserProperties properties) {
Assert.hasText(properties.getGit().getOauthToken(), "In order to connect to Sagan you need to pass the Github OAuth token");
return new RestTemplateBuilder()
.basicAuthorization(properties.getGit().getOauthToken(), "")
.build();

View File

@@ -52,8 +52,8 @@ class Tasks {
args.releaser.createTweet(args.versionFromScRelease);
args.releaser.createReleaseNotes(args.versionFromScRelease, args.projects);
});
static Task UPDATING_SAGAN = task("updatingSagan", "g",
"UPDATING SAGAN",
static Task UPDATE_SAGAN = task("updateSagan", "g",
"UPDATE SAGAN",
"Updating Sagan with release info",
args -> {
args.releaser.updateSagan(args.project, args.versionFromScRelease);
@@ -69,7 +69,7 @@ class Tasks {
Tasks.PUSH,
Tasks.CLOSE_MILESTONE,
Tasks.CREATE_TEMPLATES,
Tasks.UPDATING_SAGAN
Tasks.UPDATE_SAGAN
).collect(Collectors.toList());
static Task RELEASE = Tasks.task("release", "r",

View File

@@ -0,0 +1 @@
spring.main.web-environment: false