public void SetActivityType() { //If the payload has commits, it is a commit if (Commits != null && Commits.Length > 0) { ActivityType = GitHubActivityType.Commit; } //if the payload has Issues property set and Action is set to opened, an issue is opened else if (Issue != null && string.Equals("OPENED", Action, StringComparison.CurrentCultureIgnoreCase)) { ActivityType = GitHubActivityType.IssueOpened; } //if the payload has Issues property set and Action is set to closed, an issue is closed else if (Issue != null && string.Equals("CLOSED", Action, StringComparison.CurrentCultureIgnoreCase)) { ActivityType = GitHubActivityType.IssueClosed; } //if the payload has comment set, it is a comment else if (Comment != null && string.Equals("CREATED", Action, StringComparison.CurrentCultureIgnoreCase)) { ActivityType = GitHubActivityType.Comment; } }
public void SetActivityType() { //If the payload has commits, it is a commit if (Commits != null && Commits.Length > 0) { ActivityType = GitHubActivityType.Commit; } //if the payload has Issues property set and Action is set to opened, an issue is opened else if (Issue != null && string.Equals("OPENED", Action, StringComparison.CurrentCultureIgnoreCase)) { ActivityType = GitHubActivityType.IssueOpened; } //if the payload has Issues property set and Action is set to closed, an issue is closed else if (Issue != null && string.Equals("CLOSED", Action, StringComparison.CurrentCultureIgnoreCase)) { ActivityType = GitHubActivityType.IssueClosed; } //if the payload has comment set, it is a comment else if(Comment != null && string.Equals("CREATED", Action, StringComparison.CurrentCultureIgnoreCase)) { ActivityType = GitHubActivityType.Comment; } }