Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add author and date #84

Merged
merged 3 commits into from Oct 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Build-Solution.ps1
Expand Up @@ -14,4 +14,4 @@ param(
$scriptPath = Split-Path $MyInvocation.MyCommand.Path
$projFile = join-path $scriptPath SeeGit.msbuild

& "$(get-content env:windir)\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" $projFile /t:$build /p:Configuration=$config /verbosity:$MSBuildVerbosity
& "$(get-content env:programfiles)\MSBuild\14.0\Bin\msbuild.exe" $projFile /t:$build /p:Configuration=$config /verbosity:$MSBuildVerbosity
18 changes: 17 additions & 1 deletion SeeGitApp/Models/CommitVertex.cs
Expand Up @@ -60,17 +60,22 @@ public string AdornerMessageVisibilityType
set
{
if (value.Equals("Visible"))
{
AdornerMessageVisibility = true;
}
else if (value.Equals("Hidden"))
{
AdornerMessageVisibility = false;
}
_adornerMessageVisibilityType = value;
RaisePropertyChanged(() => AdornerMessageVisibility);
}
}

public string Sha
{
get; }
get;
}

public string ShortSha => Sha.AtMost(ShaLength);

Expand All @@ -84,6 +89,17 @@ public string Description
get;
set;
}
public string Author
{
get;
set;
}

public DateTimeOffset CommitDate
{
get;
set;
}

public BranchCollection Branches
{
Expand Down
8 changes: 7 additions & 1 deletion SeeGitApp/Models/RepositoryGraphBuilder.cs
Expand Up @@ -156,7 +156,13 @@ private CommitVertex GetCommitVertex(Commit commit)
CommitVertex commitVertex;
if (!_vertices.TryGetValue(commit.Sha, out commitVertex))
{
commitVertex = new CommitVertex(commit.Sha, commit.MessageShort) { Description = commit.Message };
commitVertex = new CommitVertex(commit.Sha, commit.MessageShort)
{
Description = commit.Message,
Author = commit.Author.Name,
CommitDate = commit.Author.When

};
_vertices.Add(commit.Sha, commitVertex);
}

Expand Down
2 changes: 2 additions & 0 deletions SeeGitApp/Views/CommitVertexView.xaml
Expand Up @@ -102,6 +102,8 @@
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding Message}" Foreground="White" TextWrapping="Wrap" MaxWidth="150" Visibility="{Binding DescriptionShown, Converter={StaticResource InverseBooleanToVisibilityConverter}}" />
<TextBlock Text="{Binding Description}" Foreground="White" TextWrapping="Wrap" MaxWidth="250" Visibility="{Binding DescriptionShown, Converter={StaticResource BooleanToVisibilityConverter}}" />
<TextBlock Text="{Binding Author}" Foreground="#cccccc" TextWrapping="Wrap" MaxWidth="250" Visibility="{Binding DescriptionShown, Converter={StaticResource BooleanToVisibilityConverter}}" Padding="0,10,0,0" />
<TextBlock Text="{Binding CommitDate}" Foreground="#cccccc" TextWrapping="Wrap" MaxWidth="250" Visibility="{Binding DescriptionShown, Converter={StaticResource BooleanToVisibilityConverter}}" />
</StackPanel>
</Expander>
</Border>
Expand Down