コード例 #1
0
        public IStandardInstance standarizedIssue(root rootIssue)
        {
            IStandardInstance strdMessage = new IStandardInstance();

            strdMessage.MessageOrigin = rootIssue.webhookEvent.Split(':')[0];
            strdMessage.Action        = rootIssue.Issue_event_type_name.Split('_')[1];
            strdMessage.Summary       = rootIssue.Issue.fields.Summary;
            strdMessage.Created       = rootIssue.Issue.fields.created;
            strdMessage.Author        =
                rootIssue.Issue.fields.creator.name + "_" + rootIssue.Issue.fields.creator.emailAddress;
            strdMessage.Type = rootIssue.Issue.fields.issueType.name;
            return(strdMessage);
        }
コード例 #2
0
        public Topic ConvertToTopic(IStandardInstance stdmsg)
        {
            string[] c = stdmsg.Author.Split('_');

            Topic tpc = new Topic();

            tpc.Title        = stdmsg.Summary;
            tpc.AuthorName   = c[0];
            tpc.AuthorEmail  = c[1];
            tpc.Id           = "10ae4acd-eb20-4f8c-9ec9-4bca2aacc3ec";
            tpc.ProjectId    = "636935113624010709";
            tpc.CreationDate = stdmsg.Created;

            return(tpc);
        }