Skip to content

Conversation

TingluoHuang
Copy link
Member

@TingluoHuang TingluoHuang requested a review from a team as a code owner November 25, 2024 20:38
@@ -629,7 +629,7 @@ protected override void OnEventWritten(EventWrittenEventArgs eventData)
payload[0] = Enum.Parse(typeof(GitHub.Services.Common.VssCredentialsType), ((int)payload[0]).ToString());
}

if (payload.Length > 0)
if (payload.Length > 0 && !string.IsNullOrEmpty(eventData.Message))
{
message = String.Format(eventData.Message.Replace("%n", Environment.NewLine), payload);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eventData.Message.Replace() will throw if eventData.Message is null.

@TingluoHuang TingluoHuang merged commit 078eb3b into main Nov 25, 2024
9 checks passed
@TingluoHuang TingluoHuang deleted the users/tihuang/nullref branch November 25, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants