public String suggestBranchName(Task task) { if (task.isIssue() && StringUtil.isNotEmpty(task.getNumber())) { return task.getId().replace(' ', '-'); } else { String summary = task.getSummary(); List<String> words = StringUtil.getWordsIn(summary); String[] strings = ArrayUtil.toStringArray(words); return StringUtil.join(strings, 0, Math.min(2, strings.length), "-"); } }
public String getChangelistName(Task task) { if (task.isIssue() && myConfig.changelistNameFormat != null) { return TaskUtil.formatTask(task, myConfig.changelistNameFormat); } return task.getSummary(); }