Esempio n. 1
0
        private WorkItem GetWorkItemFromIssue(BearerTokenConnection connection, string issueId,
                                              ClockifyWebhookModel clockifyWebhook)
        {
            var timeTrackingService = connection.CreateTimeTrackingService();
            var workItems           = timeTrackingService.GetWorkItemsForIssue(issueId).Result.ToList();
            var workItem            = workItems.FirstOrDefault(item => IsTimeStampIdExists(item.Description, clockifyWebhook.id));

            return(workItem);
        }
Esempio n. 2
0
 public YouTrackService()
 {
     serverUrl  = "https://kpfu-net.myjetbrains.com/youtrack";
     connection = new BearerTokenConnection(serverUrl,
                                            "perm:YW5nZWxh.NTUtMw==.PBKFTDQmoWvoxdzM7t5TPWPtKrTeOI");
     issueService   = connection.CreateIssuesService();
     timeService    = connection.CreateTimeTrackingService();
     projectService = connection.CreateProjectsService();
 }
Esempio n. 3
0
        private void DeleteWorkItemForIssue(BearerTokenConnection connection, string issueId, string workItemId)
        {
            var timeTrackingService = connection.CreateTimeTrackingService();

            timeTrackingService.DeleteWorkItemForIssue(issueId, workItemId);
        }
Esempio n. 4
0
        private void UpdateWorkItemForIssue(BearerTokenConnection connection, string issueId, WorkItem workItem)
        {
            var timeTrackingService = connection.CreateTimeTrackingService();

            timeTrackingService.UpdateWorkItemForIssue(issueId, workItem.Id, workItem);
        }