/// <summary> /// Initializes stuff from Github (commits etc). /// </summary> protected async void InitGithub() { divCommitFeed.InnerHtml = ""; divLanguages.InnerHtml = ""; try { // Commit feed List <GitHubCommit> commits = await Github.GetCommits(activeProject.github_username, activeProject.github_reponame); if (commits != null && commits.Count > 0) { foreach (GitHubCommit c in commits) { divCommitFeed.InnerHtml += string.Format("<div class='feed-item'><div class='date'>{0}<br/>{1} pushed a commit:</div><div class='text'><a href='{2}'>{3}</a></div></div>", c.Commit.Author.Date.DateTime.ToShortDateString(), c.Commit.Author.Name, c.HtmlUrl, c.Commit.Message); } } // Programming languages List <RepositoryLanguage> languages = await Github.GetLanguages(activeProject.github_username, activeProject.github_reponame); if (languages != null && languages.Count > 0) { foreach (RepositoryLanguage l in languages) { divLanguages.InnerHtml += string.Format("<span class='label label-info' style='margin-right:5px'>{0}</span>", l.Name); } } } catch (Exception) { lblMessages.Text = "Failed loading stuff from Github! Probably API rate limit exceeded for your IP..."; } }