Все точно работает
This commit is contained in:
parent
121b19f8bc
commit
456ede8f32
@ -27,7 +27,7 @@ public class TaskCloseChange extends TaskChange {
|
||||
@Override
|
||||
public String generateMessage() {
|
||||
return MessageFormat.format(
|
||||
"{0} Задача выполнена* | [ПР]({1}){2}" +
|
||||
"{0} *Задача выполнена* | [ПР]({1}){2}" +
|
||||
"{3}: {4}",
|
||||
Smile.TASK, url, Smile.HR, authorName, messageTask
|
||||
);
|
||||
|
@ -61,9 +61,7 @@ public class SchedulerPushMessageSend {
|
||||
if (!pushMessage.isEmpty()) {
|
||||
try {
|
||||
final String json = objectMapper.writeValueAsString(pushMessage);
|
||||
// sendMessage(json);
|
||||
System.out.println(json);
|
||||
System.out.println("\n\n");
|
||||
sendMessage(json);
|
||||
} catch (JsonProcessingException e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
|
@ -11,8 +11,7 @@ public class PersonScheduler {
|
||||
|
||||
private final PersonBitbucketParser personParser;
|
||||
|
||||
// @Scheduled(cron = "0 0 0 */1 * *")
|
||||
@Scheduled(cron = "0 */1 * * * *")
|
||||
@Scheduled(cron = "${bitbucketbot.scheduler.person:0 0 0 */1 * *}")
|
||||
public void scanPersons() {
|
||||
personParser.scanNewPerson();
|
||||
}
|
||||
|
@ -96,10 +96,10 @@ public class TaskServiceImpl extends AbstractSimpleManagerService<Task, Long> im
|
||||
changeService.save(
|
||||
TaskNewChange.builder()
|
||||
.messageTask(task.getDescription())
|
||||
.authorName(task.getAuthor())
|
||||
.url(task.getUrl())
|
||||
.authorName(oldTask.getAuthor())
|
||||
.url(oldTask.getUrl())
|
||||
.telegramIds(
|
||||
personService.getAllTelegramIdByLogin(Collections.singleton(task.getResponsible()))
|
||||
personService.getAllTelegramIdByLogin(Collections.singleton(oldTask.getResponsible()))
|
||||
)
|
||||
.build()
|
||||
);
|
||||
@ -107,11 +107,11 @@ public class TaskServiceImpl extends AbstractSimpleManagerService<Task, Long> im
|
||||
case RESOLVED:
|
||||
changeService.save(
|
||||
TaskCloseChange.builder()
|
||||
.messageTask(task.getDescription())
|
||||
.authorName(task.getAuthor())
|
||||
.url(task.getUrl())
|
||||
.messageTask(oldTask.getDescription())
|
||||
.authorName(oldTask.getAuthor())
|
||||
.url(oldTask.getUrl())
|
||||
.telegramIds(
|
||||
personService.getAllTelegramIdByLogin(Collections.singleton(task.getAuthor()))
|
||||
personService.getAllTelegramIdByLogin(Collections.singleton(oldTask.getAuthor()))
|
||||
)
|
||||
.build()
|
||||
);
|
||||
|
@ -136,7 +136,7 @@ public class CommentAndTaskParser {
|
||||
}
|
||||
|
||||
private String generateUrl(@NonNull Long id, @NonNull String pullRequestUrl) {
|
||||
return MessageFormat.format("{0}/overview?commentId={1}", pullRequestUrl, id).replaceAll(" ", "");
|
||||
return MessageFormat.format("{0}/overview?commentId={1}", pullRequestUrl, Long.toString(id));
|
||||
}
|
||||
|
||||
private String getCommentUrl(long commentId, PullRequest pullRequest) {
|
||||
|
@ -18,13 +18,14 @@ spring:
|
||||
non_contextual_creation: true
|
||||
bitbucketbot:
|
||||
scheduler:
|
||||
person: 0 */1 * * * *
|
||||
comment:
|
||||
settings:
|
||||
no-comment-count: 20
|
||||
comment-count: 100
|
||||
init:
|
||||
start-comment-id: 7807
|
||||
use: false
|
||||
use: true
|
||||
server-send:
|
||||
url: http://188.225.35.149:8080/api/send
|
||||
bitbucket:
|
||||
|
@ -17,8 +17,15 @@ spring:
|
||||
lob:
|
||||
non_contextual_creation: true
|
||||
bitbucketbot:
|
||||
scheduler:
|
||||
person: 0 */1 * * * *
|
||||
comment:
|
||||
settings:
|
||||
no-comment-count: 20
|
||||
comment-count: 100
|
||||
init:
|
||||
start-comment-id:
|
||||
start-comment-id: 7807
|
||||
use: true
|
||||
server-send:
|
||||
url: http://188.225.35.149:8080/api/send
|
||||
bitbucket:
|
||||
|
@ -18,7 +18,7 @@
|
||||
</appender>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
</root>
|
||||
|
||||
</configuration>
|
Loading…
Reference in New Issue
Block a user