Ejemplo n.º 1
0
        public void LogUser(string user, string pwd, string url = "https://github.com")
        {
            try
            {
                _user     = user;
                _password = pwd;
                var ghe = new Uri(url);
                _client = new GitHubClient(new ProductHeaderValue("Droid-Infra"), ghe);
                Task <Octokit.User> taskUser = _client.User.Get(_user);
                _currentUser = taskUser.Result;

                var basicAuth = new Credentials(user, pwd);
                _client.Credentials = basicAuth;

                if (StatusChanged != null)
                {
                    StatusChanged();
                }
            }
            catch (Exception exp)
            {
                Console.WriteLine(exp.Message);
                if (ConnectionFailled != null)
                {
                    ConnectionFailled();
                }
            }
        }
Ejemplo n.º 2
0
 public Repository(string url, string htmlUrl, string cloneUrl, string gitUrl, string sshUrl, string svnUrl, string mirrorUrl, long id, User owner, string name, string fullName, string description, string homepage, string language, bool @private, bool fork, int forksCount, int stargazersCount, string defaultBranch, int openIssuesCount, DateTimeOffset? pushedAt, DateTimeOffset createdAt, DateTimeOffset updatedAt, RepositoryPermissions permissions, Repository parent, Repository source, bool hasIssues, bool hasWiki, bool hasDownloads, bool? allowRebaseMerge, bool? allowSquashMerge, bool? allowMergeCommit)
 {
     Url = url;
     HtmlUrl = htmlUrl;
     CloneUrl = cloneUrl;
     GitUrl = gitUrl;
     SshUrl = sshUrl;
     SvnUrl = svnUrl;
     MirrorUrl = mirrorUrl;
     Id = id;
     Owner = owner;
     Name = name;
     FullName = fullName;
     Description = description;
     Homepage = homepage;
     Language = language;
     Private = @private;
     Fork = fork;
     ForksCount = forksCount;
     StargazersCount = stargazersCount;
     DefaultBranch = defaultBranch;
     OpenIssuesCount = openIssuesCount;
     PushedAt = pushedAt;
     CreatedAt = createdAt;
     UpdatedAt = updatedAt;
     Permissions = permissions;
     Parent = parent;
     Source = source;
     HasIssues = hasIssues;
     HasWiki = hasWiki;
     HasDownloads = hasDownloads;
     AllowRebaseMerge = allowRebaseMerge;
     AllowSquashMerge = allowSquashMerge;
     AllowMergeCommit = allowMergeCommit;
 }
Ejemplo n.º 3
0
        public IssueAssigneeViewModel(
            Func<Task<IReadOnlyList<User>>> loadAssignees,
            Func<Task<User>> loadSelectedFunc,
            Func<User, Task> saveFunc)
        {
            var assignees = new ReactiveList<IssueAssigneeItemViewModel>();
            Assignees = assignees.CreateDerivedCollection(
                x => x,
                filter: x => x.Name.ContainsKeyword(SearchKeyword),
                signalReset: this.WhenAnyValue(x => x.SearchKeyword));

            this.WhenAnyValue(x => x.Selected)
                .Subscribe(x => {
                    foreach (var a in Assignees)
                        a.IsSelected = string.Equals(a.User.Login, x?.Login);
                });

            DismissCommand = ReactiveCommand.Create();

            SaveCommand = ReactiveCommand.CreateAsyncTask(_ => {
                DismissCommand.ExecuteIfCan();
                return Selected != _previouslySelected ? saveFunc(_selected) : Task.FromResult(0);
            });

            LoadCommand = ReactiveCommand.CreateAsyncTask(async _ => {
                _previouslySelected = Selected = await loadSelectedFunc();
                assignees.Reset((await loadAssignees()).Select(CreateItemViewModel));
            });
        }
Ejemplo n.º 4
0
 public PullRequest(Uri url, Uri htmlUrl, Uri diffUrl, Uri patchUrl, Uri issueUrl, Uri statusesUrl, int number, ItemState state, string title, string body, DateTimeOffset createdAt, DateTimeOffset updatedAt, DateTimeOffset? closedAt, DateTimeOffset? mergedAt, GitReference head, GitReference @base, User user, User assignee, bool? mergeable, User mergedBy, int comments, int commits, int additions, int deletions, int changedFiles)
 {
     Url = url;
     HtmlUrl = htmlUrl;
     DiffUrl = diffUrl;
     PatchUrl = patchUrl;
     IssueUrl = issueUrl;
     StatusesUrl = statusesUrl;
     Number = number;
     State = state;
     Title = title;
     Body = body;
     CreatedAt = createdAt;
     UpdatedAt = updatedAt;
     ClosedAt = closedAt;
     MergedAt = mergedAt;
     Head = head;
     Base = @base;
     User = user;
     Assignee = assignee;
     Mergeable = mergeable;
     MergedBy = mergedBy;
     Comments = comments;
     Commits = commits;
     Additions = additions;
     Deletions = deletions;
     ChangedFiles = changedFiles;
 }
Ejemplo n.º 5
0
        private async void layoutRoot_Loaded(object sender, RoutedEventArgs e)
        {
            
            UserData = await InstanceLocator.Instance.GitClient.User.Get("liquidboy");
            
            profileView.DataContext = UserData;

        }
Ejemplo n.º 6
0
 public User(Octokit.User octokitUser)
 {
     Name       = octokitUser.Name;
     Followers  = octokitUser.Followers;
     Followings = octokitUser.Following;
     CreatedOn  = octokitUser.CreatedAt.LocalDateTime;
     UpdatedOn  = octokitUser.UpdatedAt.LocalDateTime;
 }
Ejemplo n.º 7
0
 public GistHistory(string url, string version, User user, GistChangeStatus changeStatus, DateTimeOffset committedAt)
 {
     Url = url;
     Version = version;
     User = user;
     ChangeStatus = changeStatus;
     CommittedAt = committedAt;
 }
Ejemplo n.º 8
0
 public GitTag(string url, string label, string @ref, string sha, User user, Repository repository, string tag, string message, Committer tagger, TagObject objectVar)
     : base(url, label, @ref, sha, user, repository)
 {
     Tag = tag;
     Message = message;
     Tagger = tagger;
     Object = objectVar;
 }
Ejemplo n.º 9
0
        public static GithubUser ToDBUser(this Octokit.User pr, GithubUser inPR)
        {
            inPR = new GithubUser();
            inPR.GithubUserId = pr.Id;
            inPR.Login        = pr.Name;

            return(inPR);
        }
Ejemplo n.º 10
0
 public SerializableUser(User usr)
 {
     Login = usr.Login;
     Name = usr.Name;
     Email = usr.Email;
     Company = usr.Company;
     URL = usr.Url;
     Hireable = usr.Hireable.HasValue ? usr.Hireable.ToString() : string.Empty;
 }
Ejemplo n.º 11
0
        public async Task <Models.User> Get(string login)
        {
            GitHubClient github = GitHubHelper.GetClient();

            Octokit.User userBase = await github.User.Get(login);

            Models.User user = new Models.User(userBase);
            return(user);
        }
Ejemplo n.º 12
0
 public GitReference(string url, string label, string @ref, string sha, User user, Repository repository)
 {
     Url = url;
     Label = label;
     Ref = @ref;
     Sha = sha;
     User = user;
     Repository = repository;
 }
Ejemplo n.º 13
0
 public GistComment(int id, Uri url, string body, User user, DateTimeOffset createdAt, DateTimeOffset? updatedAt)
 {
     Id = id;
     Url = url;
     Body = body;
     User = user;
     CreatedAt = createdAt;
     UpdatedAt = updatedAt;
 }
Ejemplo n.º 14
0
 private IssueAssigneeItemViewModel CreateItemViewModel(User x)
 {
     var vm = new IssueAssigneeItemViewModel(x);
     vm.IsSelected = x.Id == _selected?.Id;
     vm.GoToCommand.Subscribe(_ => {
         Selected = vm.IsSelected ? x : null;
         SaveCommand.ExecuteIfCan();
     });
     return vm;
 }
Ejemplo n.º 15
0
 public IssueComment(int id, Uri url, Uri htmlUrl, string body, DateTimeOffset createdAt, DateTimeOffset? updatedAt, User user)
 {
     Id = id;
     Url = url;
     HtmlUrl = htmlUrl;
     Body = body;
     CreatedAt = createdAt;
     UpdatedAt = updatedAt;
     User = user;
 }
Ejemplo n.º 16
0
 public Activity(string type, bool @public, Repository repo, User actor, Organization org, DateTimeOffset createdAt, string id)
 {
     Type = type;
     Public = @public;
     Repo = repo;
     Actor = actor;
     Org = org;
     CreatedAt = createdAt;
     Id = id;
 }
Ejemplo n.º 17
0
 public EventInfo(int id, Uri url, User actor, User assignee, Label label, EventInfoState @event, string commitId, DateTimeOffset createdAt)
 {
     Id = id;
     Url = url;
     Actor = actor;
     Assignee = assignee;
     Label = label;
     Event = @event;
     CommitId = commitId;
     CreatedAt = createdAt;
 }
Ejemplo n.º 18
0
 public PagesBuild(string url, PagesBuildStatus status, ApiError error, User pusher, Commit commit, TimeSpan duration, DateTime createdAt, DateTime updatedAt)
 {
     Url = url;
     Status = status;
     Error = error;
     Pusher = pusher;
     Commit = commit;
     Duration = duration;
     CreatedAt = createdAt;
     UpdatedAt = updatedAt;
 }
Ejemplo n.º 19
0
 public RepositoryInvitation(int id, Repository repository, User invitee, User inviter, InvitationPermissionType permissions, DateTimeOffset createdAt, string url, string htmlUrl)
 {
     Id = id;
     Repository = repository;
     Invitee = invitee;
     Inviter = inviter;
     Permissions = permissions;
     CreatedAt = createdAt;
     Url = url;
     HtmlUrl = htmlUrl;
 }
Ejemplo n.º 20
0
        public Commit(string url, string label, string @ref, string sha, User user, Repository repository, string message, Committer author, Committer committer, GitReference tree, IEnumerable<GitReference> parents, int commentCount)
            : base(url, label, @ref, sha, user, repository)
        {
            Ensure.ArgumentNotNull(parents, "parents");

            Message = message;
            Author = author;
            Committer = committer;
            Tree = tree;
            Parents = new ReadOnlyCollection<GitReference>(parents.ToList());
            CommentCount = commentCount;
        }
Ejemplo n.º 21
0
 public GitHubCommit(string url, string label, string @ref, string sha, User user, Repository repository, Author author, string commentsUrl, Commit commit, Author committer, string htmlUrl, GitHubCommitStats stats, IReadOnlyList<GitReference> parents, IReadOnlyList<GitHubCommitFile> files)
     : base(url, label, @ref, sha, user, repository)
 {
     Author = author;
     CommentsUrl = commentsUrl;
     Commit = commit;
     Committer = committer;
     HtmlUrl = htmlUrl;
     Stats = stats;
     Parents = parents;
     Files = files;
 }
Ejemplo n.º 22
0
        public async void TestUserLoadedCorrectly()
        {
            var currentUser = new User(null, null, null, 0, null, DateTimeOffset.UtcNow, 0, null, 0, 0, null, null, 0, 0,
                null, null, "mock user", 0, null, 0, 0, 0, null, false);
            GitHubClientMock.Setup(m => m.User.Current()).Returns(() => Task.FromResult(currentUser));

            var vm = new UserDetailsViewModel();
            await vm.Refresh();

            GitHubClientMock.Verify(m => m.User.Current(), Times.AtLeastOnce());
            Assert.AreEqual("mock user", vm.User.Name);
        }
Ejemplo n.º 23
0
 public Deployment(int id, string sha, string url, User creator, IReadOnlyDictionary<string, string> payload, DateTimeOffset createdAt, DateTimeOffset updatedAt, string description, string statusesUrl)
 {
     Id = id;
     Sha = sha;
     Url = url;
     Creator = creator;
     Payload = payload;
     CreatedAt = createdAt;
     UpdatedAt = updatedAt;
     Description = description;
     StatusesUrl = statusesUrl;
 }
Ejemplo n.º 24
0
        public void User_UpdateInvalid(int limit, int parallelSize)
        {
            Console.WriteLine($"Update invalid users, {nameof(limit)}: {Math.Max(limit, 0)}");
            var updatedUsers = new List <User>();

            try
            {
                List <string> userLogins = DatabaseManager.Instance.UserLogin_SelectInvalidAll(limit);
                if (userLogins.Count == 0)
                {
                    return;
                }

                if (parallelSize > 1)
                {
                    foreach (List <string> logins in userLogins.Split(parallelSize))
                    {
                        Console.WriteLine($"Get {logins.Count} users");
                        Octokit.User[] o_users = GitHubAPI.Instance.Users_GetByLogin(logins);
                        if (o_users == null)
                        {
                            Console.WriteLine($"Get result is null, skip {logins.Count} users");
                            continue;
                        }

                        updatedUsers.AddRange(o_users.Select(o_user => new User(o_user, true)));
                    }
                }
                else
                {
                    foreach (string login in userLogins)
                    {
                        Console.WriteLine($"Get user: {login}");
                        Octokit.User o_user = GitHubAPI.Instance.User_GetByLogin(login);
                        if (o_user == null)
                        {
                            Console.WriteLine($"Get result is null, skip user: {login}");
                            continue;
                        }

                        updatedUsers.Add(new User(o_user, true));
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine($"{e.GetType().Name} detected, jump to DB stage");
                Console.WriteLine(e);
            }

            Console.WriteLine($"Save updated users to DB, count: {updatedUsers.Count}");
            DatabaseManager.Instance.User_InsertOrUpdate(updatedUsers);
        }
Ejemplo n.º 25
0
 public CommitStatus(DateTimeOffset createdAt, DateTimeOffset updatedAt, CommitState state, Uri targetUrl, string description, string context, int id, Uri url, User creator)
 {
     CreatedAt = createdAt;
     UpdatedAt = updatedAt;
     State = state;
     TargetUrl = targetUrl;
     Description = description;
     Context = context;
     Id = id;
     Url = url;
     Creator = creator;
 }
Ejemplo n.º 26
0
 public DeploymentStatus(int id, string url, DeploymentState state, User creator, IReadOnlyDictionary<string, string> payload, string targetUrl, DateTimeOffset createdAt, DateTimeOffset updatedAt, string description)
 {
     Id = id;
     Url = url;
     State = state;
     Creator = creator;
     Payload = payload;
     TargetUrl = targetUrl;
     CreatedAt = createdAt;
     UpdatedAt = updatedAt;
     Description = description;
 }
Ejemplo n.º 27
0
 public IssueEvent(int id, Uri url, User actor, User assignee, Label label, EventInfoState @event, string commitId, DateTimeOffset createdAt, Issue issue, Uri commitUrl)
 {
     Id = id;
     Url = url;
     Actor = actor;
     Assignee = assignee;
     Label = label;
     Event = @event;
     CommitId = commitId;
     CreatedAt = createdAt;
     Issue = issue;
     CommitUrl = commitUrl;
 }
Ejemplo n.º 28
0
        public async Task LoadUserProfile(Octokit.User user = null)
        {
            if (user != null)
            {
                userProfile = user;
                userProfile = await Core.GetUserProfile(userProfile.Login);

                formattedEmailStr = EmailUriFormatter.GetFormattedEmailStr(userProfile.Email);
                LoadAllUserPerformedEvents(userProfile.Login);
                LoadAllUserFollowers(userProfile.Login);
                LoadAllUserFollowings(userProfile.Login);
            }
        }
Ejemplo n.º 29
0
        public async static Task <Octokit.User> GetUserProfile(string login = null)
        {
            if (login == null)
            {
                userProfile = await client.User.Current();

                return(userProfile);
            }
            else
            {
                return(await client.User.Get(login));
            }
        }
Ejemplo n.º 30
0
 public Milestone(Uri url, int number, ItemState state, string title, string description, User creator, int openIssues, int closedIssues, DateTimeOffset createdAt, DateTimeOffset? dueOn)
 {
     Url = url;
     Number = number;
     State = state;
     Title = title;
     Description = description;
     Creator = creator;
     OpenIssues = openIssues;
     ClosedIssues = closedIssues;
     CreatedAt = createdAt;
     DueOn = dueOn;
 }
Ejemplo n.º 31
0
 public IssuesFilterModel(User assignee = null, string creator = null, string mentioned = null, IReadOnlyList<Label> labels = null,
     Milestone milestone = null, IssueState issueState = IssueState.Open, 
     IssueSort sortType = IssueSort.None, bool ascending = false)
 {
     Assignee = assignee;
     Creator = creator;
     Mentioned = mentioned;
     Labels = labels;
     this.Milestone = milestone;
     this.IssueState = issueState;
     SortType = sortType;
     Ascending = ascending;
 }
Ejemplo n.º 32
0
 public TimelineEventInfo(int id, string url, User actor, string commitId, EventInfoState @event, DateTimeOffset createdAt, Label label, User assignee, Milestone milestone, SourceInfo source, RenameInfo rename)
 {
     Id = id;
     Url = url;
     Actor = actor;
     CommitId = commitId;
     Event = @event;
     CreatedAt = createdAt;
     Label = label;
     Assignee = assignee;
     Milestone = milestone;
     Source = source;
     Rename = rename;
 }
Ejemplo n.º 33
0
 public CommitComment(int id, Uri url, Uri htmlUrl, string body, string path, int position, int? line, string commitId, User user, DateTimeOffset createdAt, DateTimeOffset? updatedAt)
 {
     Id = id;
     Url = url;
     HtmlUrl = htmlUrl;
     Body = body;
     Path = path;
     Position = position;
     Line = line;
     CommitId = commitId;
     User = user;
     CreatedAt = createdAt;
     UpdatedAt = updatedAt;
 }
Ejemplo n.º 34
0
        public static User CreateUser(string username)
        {
            if (_GitHubClient == null)
            {
                throw new Exception();
            }

            Octokit.User octokitUser = new Octokit.User();
            Task.Run(async() =>
            {
                octokitUser = await _GitHubClient.User.Get(username);
            }).GetAwaiter().GetResult();

            return(new User(octokitUser));
        }
Ejemplo n.º 35
0
        public static IEnumerable<Issue> Filter(this IEnumerable<Issue> issues, User user, UserFilterType filter)
        {
            if (user == null) return issues;

            switch (filter)
            {
            case UserFilterType.AssignedToMe:
                    return issues.Where(i => i.Assignee != null && i.Assignee.Id == user.Id);
            case UserFilterType.ReportedByMe:
                    return issues.Where(i => i.User != null && i.User.Id == user.Id);
            case UserFilterType.Unassigned:
                    return issues.Where(i => i.Assignee == null);
            default:
                    return issues;
            }
        }
Ejemplo n.º 36
0
        private async Task <Octokit.User> GetCurrentUserInternal()
        {
            try
            {
                logger.Trace("Getting Organizations");

                userCache = await githubClient.User.Current();
            }
            catch (Exception ex)
            {
                logger.Error(ex, "Error Getting Current User");
                throw;
            }

            return(userCache);
        }
 public PullRequestReviewComment(Uri url, int id, string diffHunk, string path, int? position, int? originalPosition, string commitId, string originalCommitId, User user, string body, DateTimeOffset createdAt, DateTimeOffset updatedAt, Uri htmlUrl, Uri pullRequestUrl)
 {
     Url = url;
     Id = id;
     DiffHunk = diffHunk;
     Path = path;
     Position = position;
     OriginalPosition = originalPosition;
     CommitId = commitId;
     OriginalCommitId = originalCommitId;
     User = user;
     Body = body;
     CreatedAt = createdAt;
     UpdatedAt = updatedAt;
     HtmlUrl = htmlUrl;
     PullRequestUrl = pullRequestUrl;
 }
Ejemplo n.º 38
0
 public Issue(Uri url, Uri htmlUrl, int number, ItemState state, string title, string body, User user, IReadOnlyList<Label> labels, User assignee, Milestone milestone, int comments, PullRequest pullRequest, DateTimeOffset? closedAt, DateTimeOffset createdAt, DateTimeOffset? updatedAt)
 {
     Url = url;
     HtmlUrl = htmlUrl;
     Number = number;
     State = state;
     Title = title;
     Body = body;
     User = user;
     Labels = labels;
     Assignee = assignee;
     Milestone = milestone;
     Comments = comments;
     PullRequest = pullRequest;
     ClosedAt = closedAt;
     CreatedAt = createdAt;
     UpdatedAt = updatedAt;
 }
Ejemplo n.º 39
0
 public Gist(string url, string id, string description, bool @public, User owner, IReadOnlyDictionary<string, GistFile> files, int comments, string commentsUrl, string htmlUrl, string gitPullUrl, string gitPushUrl, DateTimeOffset createdAt, DateTimeOffset updatedAt, IReadOnlyList<GistFork> forks, IReadOnlyList<GistHistory> history)
 {
     Url = url;
     Id = id;
     Description = description;
     Public = @public;
     Owner = owner;
     Files = files;
     Comments = comments;
     CommentsUrl = commentsUrl;
     HtmlUrl = htmlUrl;
     GitPullUrl = gitPullUrl;
     GitPushUrl = gitPushUrl;
     CreatedAt = createdAt;
     UpdatedAt = updatedAt;
     Forks = forks;
     History = history;
 }
Ejemplo n.º 40
0
        public Octokit.User User_GetByLogin(string userLogin)
        {
            for (int tryCount = 1; tryCount <= maximumRequestRetry; tryCount++)
            {
                try
                {
                    lastCoreRequest = DateTime.Now;
                    Octokit.User user = gitHubClient.User.Get(userLogin).Result;
                    CoreRateLimit = gitHubClient.GetLastApiInfo().RateLimit;
                    return(user);
                }
                catch (AggregateException ae)
                {
                    HandleAggregateExceptionForCore(tryCount, ae);
                }
            }

            return(null);
        }
Ejemplo n.º 41
0
        public void User_Fetch(string userLogin)
        {
            Octokit.User o_user = GitHubAPI.Instance.User_GetByLogin(userLogin);
            if (o_user == null)
            {
                Console.WriteLine($"No match user: {userLogin}");
                return;
            }

            var user = new User(o_user, true);

            DatabaseManager.Instance.Account_InsertOrUpdate(user);

            var o_userRepos = GitHubAPI.Instance.Repositories_GetAllForUser(userLogin);

            if (o_userRepos == null)
            {
            }
        }
Ejemplo n.º 42
0
        public async Task <IActionResult> AddOAuthToken([FromQuery(Name = "code")] string code, [FromQuery(Name = "state")] string state)
        {
            //ObjectId currentUser = ObjectId.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value);

            var db             = _mongoService.GetDb;
            var csrfCollection = db.GetCollection <CSRF>(_mongoService.GetDBSettings.OGitAuthCollectionName);
            var csrfFilter     = Builders <CSRF> .Filter.Eq(c => c.Csrf, state);

            CSRF currentUser = (await csrfCollection.FindAsync <CSRF>(csrfFilter)).FirstOrDefault();

            var gitHubClient = _githubClientService.GetGitHubClient(currentUser.Id);

            var userCollection = db.GetCollection <Models.User>("Users");
            var filter         = Builders <Models.User> .Filter.Eq(u => u.Id, currentUser.UserId);

            var user = (await userCollection.FindAsync <Models.User>(filter)).FirstOrDefault();

            if (!user.CSRF.Equals(state))
            {
                throw new InvalidOperationException("SECURITY FAIL!");
            }
            //Session["CSRF:State"]

            var token = await gitHubClient.Oauth.CreateAccessToken(
                new OauthTokenRequest(_configuration.GetSection("GithubOAuth:ClientId").Value,
                                      _configuration.GetSection("GithubOAuth:ClientSecret").Value,
                                      code));

            gitHubClient.Credentials = new Credentials(token.AccessToken);

            Octokit.User githubProfile = await gitHubClient.User.Current();

            var update = Builders <Models.User> .Update.Set("OAuthToken", token.AccessToken)
                         .Set("GithubLogin", githubProfile.Login)
                         .Set("GithubFullName", githubProfile.Name);

            await userCollection.UpdateOneAsync(filter, update);

            return(Ok());
        }
Ejemplo n.º 43
0
        private async Task <IEnumerable <string> > ValidateUsers(IEnumerable <string> usernames)
        {
            // Do the users exist or not?
            var doesNotExist = new List <String>();

            foreach (var username in usernames)
            {
                Octokit.User user = null;

                try
                {
                    user = await Client.User.Get(username);
                }
                catch (Octokit.NotFoundException) { }

                if (user == null)
                {
                    doesNotExist.Add(username);
                }
            }

            return(doesNotExist);
        }
Ejemplo n.º 44
0
 public Issue(string url, string htmlUrl, string commentsUrl, string eventsUrl, int number, ItemState state, string title, string body, User closedBy, User user, IReadOnlyList<Label> labels, User assignee, IReadOnlyList<User> assignees, Milestone milestone, int comments, PullRequest pullRequest, DateTimeOffset? closedAt, DateTimeOffset createdAt, DateTimeOffset? updatedAt, int id, string nodeId, bool locked, Repository repository, ReactionSummary reactions)
 {
     Id = id;
     NodeId = nodeId;
     Url = url;
     HtmlUrl = htmlUrl;
     CommentsUrl = commentsUrl;
     EventsUrl = eventsUrl;
     Number = number;
     State = state;
     Title = title;
     Body = body;
     ClosedBy = closedBy;
     User = user;
     Labels = labels;
     Assignee = assignee;
     Assignees = assignees;
     Milestone = milestone;
     Comments = comments;
     PullRequest = pullRequest;
     ClosedAt = closedAt;
     CreatedAt = createdAt;
     UpdatedAt = updatedAt;
     Locked = locked;
     Repository = repository;
     Reactions = reactions;
 }
 private static IssueComment CreateIssueDto(
     Octokit.User user)
 {
     return(new IssueComment(
 public GithubUserViewModel(Octokit.User user)
 {
     this.user = user;
 }
Ejemplo n.º 47
0
 public TimelineEventInfo(int id, string url, User actor, string commitId, EventInfoState @event, DateTimeOffset createdAt, Label label, User assignee, Milestone milestone, SourceInfo source, RenameInfo rename)
 {
     Id        = id;
     Url       = url;
     Actor     = actor;
     CommitId  = commitId;
     Event     = @event;
     CreatedAt = createdAt;
     Label     = label;
     Assignee  = assignee;
     Milestone = milestone;
     Source    = source;
     Rename    = rename;
 }
Ejemplo n.º 48
0
 public IndexViewModel(IEnumerable <Repository> repositories, Octokit.User user)
 {
     Repositories = repositories;
     User         = user;
 }
Ejemplo n.º 49
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     Octokit.User user = e.Parameter as Octokit.User;
     this.user = user;
 }