Removing unnecessary Pull Request Metadata check
@@ -4,13 +4,9 @@ import java.io.IOException;
import org.gradle.api.logging.Logger;
import org.gradle.api.logging.Logging;
-import org.shipkit.internal.gradle.util.StringUtil;
import org.shipkit.internal.util.GitHubApi;
import org.shipkit.internal.util.IncubatingWarning;
-import static org.shipkit.internal.gradle.util.StringUtil.isEmpty;
-
-
class CreatePullRequest {
private static final Logger LOG = Logging.getLogger(CreatePullRequest.class);
@@ -25,8 +21,6 @@ class CreatePullRequest {
return;
}
- checkPullRequestMetadata(task);
-
String headBranch = getHeadBranch(task.getForkRepositoryName(), task.getVersionBranch());
IncubatingWarning.warn("creating pull requests");
@@ -44,15 +38,6 @@ class CreatePullRequest {
gitHubApi.post("/repos/" + task.getUpstreamRepositoryName() + "/pulls", body);
}
- private void checkPullRequestMetadata(CreatePullRequestTask task) {
- if (isEmpty(task.getPullRequestTitle())) {
- throw new IllegalArgumentException("Cannot create pull request for empty pull request title. Set it with git.pullRequestTitle property in configuration.");
- }
-
- if (isEmpty(task.getPullRequestDescription())) {
- throw new IllegalArgumentException("Cannot create pull request for empty pull request description. Set it with git.pullRequestDescription property in configuration.");
- }
- }
private String getHeadBranch(String forkRepositoryName, String headBranch) {
return getUserOfForkRepo(forkRepositoryName) + ":" + headBranch;
