[gh-flow] If Item.Message is null it tries to post empty messages (#42)

This commit is contained in:
Carlos Garcia Lalicata 2024-04-05 07:43:15 +02:00 committed by GitHub
parent b08b696145
commit cc66a1ca71
2 changed files with 9 additions and 9 deletions

View File

@ -34,7 +34,7 @@ public class Hubber : Agent
case nameof(GithubFlowEventType.DevPlanGenerated): case nameof(GithubFlowEventType.DevPlanGenerated):
case nameof(GithubFlowEventType.CodeGenerated): case nameof(GithubFlowEventType.CodeGenerated):
var contents = string.IsNullOrEmpty(item.Message)? "Sorry, I got tired, can you try again please? ": item.Message; var contents = string.IsNullOrEmpty(item.Message)? "Sorry, I got tired, can you try again please? ": item.Message;
await PostComment(item.Data["org"], item.Data["repo"], long.Parse(item.Data["issueNumber"]), item.Message); await PostComment(item.Data["org"], item.Data["repo"], long.Parse(item.Data["issueNumber"]), contents);
break; break;
case nameof(GithubFlowEventType.DevPlanCreated): case nameof(GithubFlowEventType.DevPlanCreated):
{ {

View File

@ -71,7 +71,7 @@ public class GithubService : IManageGithub
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "Error committing to branch"); _logger.LogError(ex, "Error committing to branch");
throw; throw;
} }
} }
@ -85,7 +85,7 @@ public class GithubService : IManageGithub
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "Error creating branch"); _logger.LogError(ex, "Error creating branch");
throw; throw;
} }
} }
@ -100,7 +100,7 @@ public class GithubService : IManageGithub
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "Error getting main language"); _logger.LogError(ex, "Error getting main language");
throw; throw;
} }
} }
@ -120,7 +120,7 @@ public class GithubService : IManageGithub
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "Error creating issue"); _logger.LogError(ex, "Error creating issue");
throw; throw;
} }
} }
@ -134,7 +134,7 @@ public class GithubService : IManageGithub
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "Error creating PR"); _logger.LogError(ex, "Error creating PR");
throw; throw;
} }
} }
@ -147,7 +147,7 @@ public class GithubService : IManageGithub
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "Error posting comment"); _logger.LogError(ex, "Error posting comment");
throw; throw;
} }
} }
@ -161,7 +161,7 @@ public class GithubService : IManageGithub
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "Error getting files"); _logger.LogError(ex, "Error getting files");
throw; throw;
} }
} }
@ -192,7 +192,7 @@ public class GithubService : IManageGithub
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "Error collecting files"); _logger.LogError(ex, "Error collecting files");
throw; throw;
} }
} }
} }