Exemplo n.º 1
0
    public List <Commit> TodayCommits()
    {
        CurrentContext.Validate();

        lock (_lockTodayCommits)
        {
            DateTime now = DateTime.Now;
            if ((now - _dtOut).TotalSeconds > 60)
            {
                Git    git = new Git(Settings.CurrentSettings.WORKGITLOCATION);
                Branch b   = new Branch(git);
                _TodayCommits = b.TodayCommits();
                foreach (var c in _TodayCommits)
                {
                    c.TTSUMMARY = Defect.GetTaskDispName(c.TTID);
                    if (string.IsNullOrEmpty(c.TTSUMMARY))
                    {
                        c.TTSUMMARY = c.NOTES;
                    }
                }
                _dtOut = now;
            }
        }

        return(_TodayCommits);
    }