Skip to content

Commit

Permalink
improved logs
Browse files Browse the repository at this point in the history
  • Loading branch information
maxymmusiienko committed Jun 27, 2024
1 parent a894711 commit df18e0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public AiValidationCommand() {

@Override
public void run(SlashCommandEvent command) {
log.info("Processing ai validation command.");
log.info("Processing ai validation on pull request {}", command.getOption(OPTION_NAME));
MessageChannel channel = command.getChannel();

if (channel.getId().equals(channelId)) {
Expand All @@ -68,13 +68,13 @@ public void run(SlashCommandEvent command) {
}
} else {
command.reply(Messages.WRONG_VALIDATION_CHANNEL).queue();
log.info("Validation command used in the wrong channel");
log.warn("Validation command used in the wrong channel, expected ai-review, actual {}", channel.getName());
}
}

@Scheduled(fixedDelay = 60000)
private void checkPulls() {
log.info("Checking pull requests.");
log.info("Checking pull requests queue.");
if (!pulls.isEmpty()) {
String pull = pulls.poll();
log.info("Validating pull request: {}", pull);
Expand All @@ -101,8 +101,8 @@ private void getProcessStreams(Process process) {
BufferedReader stdError = new BufferedReader(
new InputStreamReader(process.getErrorStream()))) {

stdInput.lines().forEach(System.out::println);
stdError.lines().forEach(System.out::println);
stdInput.lines().forEach(log::info);
stdError.lines().forEach(log::error);
} catch (IOException e) {
throw new RuntimeException("Error while opening process streams", e);
}
Expand Down
2 changes: 1 addition & 1 deletion bot/src/main/python/ai-assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def get_prompt_based_on_task(pr_url):
- Use try with resources when working with files
- There shouldn't be files in pull request like outputGlider.txt etc
- Focus on algorithm efficiency
- Shouldn't be overkill like threads"""
- Shouldn't be the use of unnecessary techniques that add complexity without significant benefits like threads"""

gc_impl_prompt = common_prompt + """ - It shouldn't be any other classes except GarbageCollectorImplementation.java` in pull request"""

Expand Down

0 comments on commit df18e0c

Please sign in to comment.