diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/git/GithubMilestones.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/git/GithubMilestones.java index 617a4b26..a2eabcf7 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/git/GithubMilestones.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/git/GithubMilestones.java @@ -45,7 +45,10 @@ class GithubMilestones { void closeMilestone(ProjectVersion version) { Assert.hasText(this.properties.getGit().getOauthToken(), - "You have to pass Github OAuth token for milestone closing to be operational"); + "You must set the value of the OAuth token. You can do it " + + "either via the command line [--releaser.git.oauth-token=...] " + + "or put it as an env variable in [~/.bashrc] or " + + "[~/.zshrc] e.g. [export RELEASER_GIT_OAUTH_TOKEN=...]"); String tagVersion = version.version; Milestone.Smart foundMilestone = matchingMilestone(tagVersion, openMilestones(version)); if (foundMilestone != null) { diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/git/GithubMilestonesTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/git/GithubMilestonesTests.java index bf3a8912..82ad7227 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/git/GithubMilestonesTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/git/GithubMilestonesTests.java @@ -229,7 +229,7 @@ public class GithubMilestonesTests { thenThrownBy(() -> milestones.closeMilestone(nonGaSleuthProject())) .isInstanceOf(IllegalArgumentException.class) - .hasMessageContaining("You have to pass Github OAuth token for milestone closing to be operational"); + .hasMessageContaining("You must set the value of the OAuth token"); } ReleaserProperties withToken() {