mirror of
https://github.com/microsoft/autogen.git
synced 2025-08-05 23:32:30 +00:00
[gh-flow] If Item.Message is null it tries to post empty messages (#42)
This commit is contained in:
parent
b08b696145
commit
cc66a1ca71
@ -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):
|
||||||
{
|
{
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user