Skip to content

Commit

Permalink
Associate or Resolve items based on regex
Browse files Browse the repository at this point in the history
  • Loading branch information
sc68cal committed Feb 17, 2012
1 parent 4aca0cc commit 10ac06f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion GitTfs/Commands/Rcheckin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,16 @@ private int PerformRCheckin(TfsChangesetInfo parentChangeset)
string commitMessage = repo.GetCommitMessage(target, currentParent).Trim(' ', '\r', '\n');
if ((workitemMatches = Sep.Git.Tfs.GitTfsConstants.TfsWorkItemRegex.Matches(commitMessage)).Count > 0)
{
// TODO: associate work items
foreach(Match match in workitemMatches){
switch(match.Groups["action"].Value){
case "associate":
_checkinOptions.WorkItemsToAssociate.Add(match.Groups["item_id"].Value);
break;
case "resolve":
_checkinOptions.WorkItemsToResolve.Add(match.Groups["item_id"].Value);
break;
}
}
}
_stdout.WriteLine("Starting checkin of {0} '{1}'", target.Substring(0, 8), commitMessage);
_checkinOptions.CheckinComment = commitMessage;
Expand Down

0 comments on commit 10ac06f

Please sign in to comment.