public override void PreCommit(PreCommitArgs args) { if (!GlobalSettings.AnkhSvnIntegrationEnabled) { return; } JiraActiveIssueManager.ActiveIssue issue = AtlassianPanel.Instance.Jira.ActiveIssueManager.CurrentActiveIssue; if (issue == null || (!String.IsNullOrEmpty(args.CommitMessage))) { return; } string commitMessage = issue.Key + (issue.Summary != null ? " - " + issue.Summary : ""); DialogResult res = MessageBox.Show( "Do you want to set your commit message to\n\n\"" + commitMessage + "\"", Constants.QUESTION_CAPTION, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (res != DialogResult.Yes) { return; } args.CommitMessage = commitMessage; }
private static string getCommentText() { JiraActiveIssueManager.ActiveIssue issue = AtlassianPanel.Instance.Jira.ActiveIssueManager.CurrentActiveIssue; if (issue == null || !issue.Enabled) { return(NO_ISSUE_SELECTED); } return("Commit message is set to: \"" + issue.Key + (issue.Summary != null ? " - " + issue.Summary : "") + "\""); }