Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d04553c12 | ||
|
|
387d53b928 | ||
|
|
df63a96d3e | ||
|
|
883cae9c25 | ||
|
|
6188da74d2 | ||
|
|
90912664bf | ||
|
|
2b9799b5b7 | ||
|
|
553f581537 |
+1
-1
@@ -1 +1 @@
|
|||||||
1.0.72
|
1.0.79
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace JiraTimeBot.Configuration
|
|||||||
public int MinuterPerWorkDay { get; set; }
|
public int MinuterPerWorkDay { get; set; }
|
||||||
public int RoundToMinutes { get; set; }
|
public int RoundToMinutes { get; set; }
|
||||||
|
|
||||||
public string JiraUrl = "https://myteam.aeroclub.ru";
|
public string JiraUrl { get; set; }
|
||||||
public bool PullBeforeProcess { get; set; }
|
public bool PullBeforeProcess { get; set; }
|
||||||
public string RepositoryPath { get; set; }
|
public string RepositoryPath { get; set; }
|
||||||
public string MercurialAuthorEmail { get; set; }
|
public string MercurialAuthorEmail { get; set; }
|
||||||
|
|||||||
@@ -2,13 +2,11 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using JiraTimeBot.Configuration;
|
using JiraTimeBot.Configuration;
|
||||||
using JiraTimeBot.Mercurial.Modifiers;
|
using JiraTimeBot.Mercurial.Modifiers;
|
||||||
using JiraTimeBot.TaskTime.Objects;
|
using JiraTimeBot.TaskTime.Objects;
|
||||||
using LibGit2Sharp;
|
using LibGit2Sharp;
|
||||||
using LibGit2Sharp.Handlers;
|
|
||||||
|
|
||||||
namespace JiraTimeBot.Mercurial
|
namespace JiraTimeBot.Mercurial
|
||||||
{
|
{
|
||||||
@@ -73,15 +71,31 @@ namespace JiraTimeBot.Mercurial
|
|||||||
_log?.Trace($" - Не получается сделать pull для репозитория: {directoryInfo.Name} - {ex.Message}");
|
_log?.Trace($" - Не получается сделать pull для репозитория: {directoryInfo.Name} - {ex.Message}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var filter = new CommitFilter { SortBy = CommitSortStrategies.Time };
|
|
||||||
|
var allCommits = new List<Commit>();
|
||||||
|
|
||||||
foreach (Commit commit in repo.Commits.QueryBy(filter).Take(200))
|
var reflog = repo.Refs.Log(repo.Refs.Head);
|
||||||
|
foreach (var reflogItem in reflog)
|
||||||
|
{
|
||||||
|
if (reflogItem.Committer.When.Date != date.Value.Date || reflogItem.Committer.Email != settings.MercurialAuthorEmail)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var commit = repo.Lookup<LibGit2Sharp.Commit>(reflogItem.To.Sha);
|
||||||
|
if (commit != null && allCommits.All(f => f.Sha != commit.Sha))
|
||||||
|
{
|
||||||
|
allCommits.Add(commit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (Commit commit in allCommits)
|
||||||
{
|
{
|
||||||
if (cancellationToken.IsCancellationRequested)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
return new List<TaskTimeItem>();
|
return new List<TaskTimeItem>();
|
||||||
}
|
}
|
||||||
if (commit.Author.When.DateTime.Date != date || commit.Author.Email != settings.MercurialAuthorEmail)
|
if (commit.Author.When.DateTime.Date != date.Value.Date || commit.Author.Email != settings.MercurialAuthorEmail)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -94,11 +108,15 @@ namespace JiraTimeBot.Mercurial
|
|||||||
}
|
}
|
||||||
|
|
||||||
var commitMessage = commit.MessageShort;
|
var commitMessage = commit.MessageShort;
|
||||||
|
commitMessage = _technicalInfoSkipper.StripBranchPrefix(branch, commitMessage);
|
||||||
|
|
||||||
if (_commitSkipper.IsNeedToSkip(branch, commitMessage))
|
if (_commitSkipper.IsNeedToSkip(branch, commitMessage))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
commitMessage = _technicalInfoSkipper.StripTechnicalInfo(commitMessage);
|
commitMessage = _technicalInfoSkipper.StripTechnicalInfo(commitMessage);
|
||||||
|
var files = FilesToMerge(commit, repo);
|
||||||
|
|
||||||
var task = new TaskTimeItem(branch,
|
var task = new TaskTimeItem(branch,
|
||||||
commitMessage,
|
commitMessage,
|
||||||
@@ -106,51 +124,13 @@ namespace JiraTimeBot.Mercurial
|
|||||||
commit.Committer.When.DateTime,
|
commit.Committer.When.DateTime,
|
||||||
TimeSpan.Zero,
|
TimeSpan.Zero,
|
||||||
1,
|
1,
|
||||||
1, //changeset.PathActions.Count,
|
files.Length, //changeset.PathActions.Count,
|
||||||
"",
|
"",
|
||||||
GetCommitType(branch));
|
GetCommitType(branch));
|
||||||
workTasks.Add(task);
|
workTasks.Add(task);
|
||||||
|
|
||||||
_log?.Trace($" - Найден commit: {commit.Committer.When.DateTime} - {branch} - {commit.Author.Email} - {commitMessage}");
|
_log?.Trace($" - Найден commit: {commit.Committer.When.DateTime} - {branch} - {commit.Author.Email} - {commitMessage}");
|
||||||
}
|
}
|
||||||
|
|
||||||
//foreach (var changeset in log)
|
|
||||||
//{
|
|
||||||
|
|
||||||
// var commitMessage = FixEncoding(changeset.CommitMessage);
|
|
||||||
// if (_commitSkipper.IsNeedToSkip(changeset.Branch, commitMessage))
|
|
||||||
// {
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
// commitMessage = _technicalInfoSkipper.StripTechnicalInfo(commitMessage);
|
|
||||||
|
|
||||||
// var task = new TaskTimeItem(changeset.Branch,
|
|
||||||
// commitMessage,
|
|
||||||
// directoryInfo.Name,
|
|
||||||
// changeset.Timestamp,
|
|
||||||
// TimeSpan.Zero,
|
|
||||||
// 1,
|
|
||||||
// changeset.PathActions.Count,
|
|
||||||
// "",
|
|
||||||
// GetCommitType(changeset.Branch));
|
|
||||||
|
|
||||||
// if (task.Type == CommitType.Release && task.Description.StartsWith("Merge with", StringComparison.CurrentCultureIgnoreCase))
|
|
||||||
// {
|
|
||||||
// var description = task.Description;
|
|
||||||
// if (description.Contains("\n"))
|
|
||||||
// {
|
|
||||||
// description = description.Split('\n')[0];
|
|
||||||
// }
|
|
||||||
// var branch = description.Replace("Merge with", "").Replace(" ", "");
|
|
||||||
// var release = task.Branch.Replace("release", "");
|
|
||||||
|
|
||||||
// task.Branch = branch;
|
|
||||||
// task.Description = $"Подготовка и публикация версии {task.Project} {release}.";
|
|
||||||
// task.ReleaseVersion = release;
|
|
||||||
// }
|
|
||||||
// workTasks.Add(task);
|
|
||||||
// _log?.Trace($" - Найден changeset: {changeset.Timestamp} - {changeset.Branch} - {changeset.AuthorEmailAddress} - {commitMessage}");
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
if (!workTasks.Any())
|
if (!workTasks.Any())
|
||||||
{
|
{
|
||||||
@@ -165,16 +145,19 @@ namespace JiraTimeBot.Mercurial
|
|||||||
return branch.StartsWith("release") ? CommitType.Release : CommitType.Task;
|
return branch.StartsWith("release") ? CommitType.Release : CommitType.Task;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string FixEncoding(string source)
|
public String[] FilesToMerge(Commit commit, Repository repo)
|
||||||
{
|
{
|
||||||
//перекодируем сообщение - ибо оно криво забирается в 1252
|
var fileList = new List<String>();
|
||||||
Encoding srcEncodingFormat = Encoding.GetEncoding("windows-1252");
|
foreach (var parent in commit.Parents)
|
||||||
byte[] originalByteString = srcEncodingFormat.GetBytes(source);
|
{
|
||||||
var commitMessage = Encoding.UTF8.GetString(originalByteString);
|
foreach (TreeEntryChanges change in repo.Diff.Compare<TreeChanges>(parent.Tree, commit.Tree))
|
||||||
return commitMessage;
|
{
|
||||||
|
fileList.Add(change.Path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return fileList.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private IEnumerable<Branch> ListBranchesContaininingCommit(Repository repo, string commitSha)
|
private IEnumerable<Branch> ListBranchesContaininingCommit(Repository repo, string commitSha)
|
||||||
{
|
{
|
||||||
bool directBranchHasBeenFound = false;
|
bool directBranchHasBeenFound = false;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ namespace JiraTimeBot.Mercurial.Modifiers
|
|||||||
//Пропускаем Close и Merge коммиты
|
//Пропускаем Close и Merge коммиты
|
||||||
if (commitMessage.StartsWith($"Close {branch}", StringComparison.InvariantCultureIgnoreCase) ||
|
if (commitMessage.StartsWith($"Close {branch}", StringComparison.InvariantCultureIgnoreCase) ||
|
||||||
commitMessage.StartsWith($"Merge with", StringComparison.InvariantCultureIgnoreCase) ||
|
commitMessage.StartsWith($"Merge with", StringComparison.InvariantCultureIgnoreCase) ||
|
||||||
|
commitMessage.StartsWith($"Merged", StringComparison.InvariantCultureIgnoreCase) ||
|
||||||
commitMessage.StartsWith($"Merge branch", StringComparison.InvariantCultureIgnoreCase))
|
commitMessage.StartsWith($"Merge branch", StringComparison.InvariantCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
{
|
{
|
||||||
public interface ITechnicalInfoSkipper
|
public interface ITechnicalInfoSkipper
|
||||||
{
|
{
|
||||||
|
string StripBranchPrefix(string branch, string commitMessage);
|
||||||
string StripTechnicalInfo(string commitMessage);
|
string StripTechnicalInfo(string commitMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,26 @@
|
|||||||
using System.Text;
|
using System;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
namespace JiraTimeBot.Mercurial.Modifiers
|
namespace JiraTimeBot.Mercurial.Modifiers
|
||||||
{
|
{
|
||||||
public class TechnicalInfoSkipper : ITechnicalInfoSkipper
|
public class TechnicalInfoSkipper : ITechnicalInfoSkipper
|
||||||
{
|
{
|
||||||
|
public string StripBranchPrefix(string branch, string commitMessage)
|
||||||
|
{
|
||||||
|
if (commitMessage.StartsWith(branch, StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
return commitMessage.TrimStart(branch.ToCharArray()).Trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
var quotedBranch = $"[{branch}]";
|
||||||
|
if (commitMessage.StartsWith(quotedBranch, StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
return commitMessage.TrimStart(quotedBranch.ToCharArray()).Trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
return commitMessage;
|
||||||
|
}
|
||||||
|
|
||||||
public string StripTechnicalInfo(string commitMessage)
|
public string StripTechnicalInfo(string commitMessage)
|
||||||
{
|
{
|
||||||
if (!commitMessage.Contains("Signed-by:"))
|
if (!commitMessage.Contains("Signed-by:"))
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
[assembly: AssemblyTitle("JiraTimeBot")]
|
[assembly: AssemblyTitle("JiraTimeBot")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("JiraTimeBot")]
|
[assembly: AssemblyProduct("JiraTimeBot")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
// to COM components. If you need to access a type in this assembly from
|
// to COM components. If you need to access a type in this assembly from
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
[assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")]
|
[assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")]
|
||||||
// Version information for an assembly consists of the following four values:
|
// Version information for an assembly consists of the following four values:
|
||||||
//
|
//
|
||||||
// Major Version
|
// Major Version
|
||||||
// Minor Version
|
// Minor Version
|
||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("1.0.72")]
|
[assembly: AssemblyVersion("1.0.79")]
|
||||||
[assembly: AssemblyFileVersion("1.0.72")]
|
[assembly: AssemblyFileVersion("1.0.79")]
|
||||||
[assembly: AssemblyInformationalVersion("1.0.72")]
|
[assembly: AssemblyInformationalVersion("1.0.79")]
|
||||||
|
|||||||
+67
-44
@@ -30,8 +30,6 @@
|
|||||||
{
|
{
|
||||||
this.label5 = new System.Windows.Forms.Label();
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
this.txtRoundTo = new System.Windows.Forms.TextBox();
|
this.txtRoundTo = new System.Windows.Forms.TextBox();
|
||||||
this.label4 = new System.Windows.Forms.Label();
|
|
||||||
this.txtRepoPath = new System.Windows.Forms.TextBox();
|
|
||||||
this.label2 = new System.Windows.Forms.Label();
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
this.txtMercurialEmail = new System.Windows.Forms.TextBox();
|
this.txtMercurialEmail = new System.Windows.Forms.TextBox();
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
@@ -54,12 +52,16 @@
|
|||||||
this.label9 = new System.Windows.Forms.Label();
|
this.label9 = new System.Windows.Forms.Label();
|
||||||
this.txtRandomMinutes = new System.Windows.Forms.TextBox();
|
this.txtRandomMinutes = new System.Windows.Forms.TextBox();
|
||||||
this.chkPullBeforeProcess = new System.Windows.Forms.CheckBox();
|
this.chkPullBeforeProcess = new System.Windows.Forms.CheckBox();
|
||||||
|
this.txtRepoPath = new System.Windows.Forms.TextBox();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.lblJiraUrl = new System.Windows.Forms.Label();
|
||||||
|
this.txtJiraUrl = new System.Windows.Forms.TextBox();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// label5
|
// label5
|
||||||
//
|
//
|
||||||
this.label5.AutoSize = true;
|
this.label5.AutoSize = true;
|
||||||
this.label5.Location = new System.Drawing.Point(33, 153);
|
this.label5.Location = new System.Drawing.Point(33, 175);
|
||||||
this.label5.Name = "label5";
|
this.label5.Name = "label5";
|
||||||
this.label5.Size = new System.Drawing.Size(100, 13);
|
this.label5.Size = new System.Drawing.Size(100, 13);
|
||||||
this.label5.TabIndex = 28;
|
this.label5.TabIndex = 28;
|
||||||
@@ -67,33 +69,16 @@
|
|||||||
//
|
//
|
||||||
// txtRoundTo
|
// txtRoundTo
|
||||||
//
|
//
|
||||||
this.txtRoundTo.Location = new System.Drawing.Point(133, 150);
|
this.txtRoundTo.Location = new System.Drawing.Point(133, 169);
|
||||||
this.txtRoundTo.Name = "txtRoundTo";
|
this.txtRoundTo.Name = "txtRoundTo";
|
||||||
this.txtRoundTo.Size = new System.Drawing.Size(100, 20);
|
this.txtRoundTo.Size = new System.Drawing.Size(100, 20);
|
||||||
this.txtRoundTo.TabIndex = 27;
|
this.txtRoundTo.TabIndex = 27;
|
||||||
this.txtRoundTo.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtRoundTo_KeyPress);
|
this.txtRoundTo.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtRoundTo_KeyPress);
|
||||||
//
|
//
|
||||||
// label4
|
|
||||||
//
|
|
||||||
this.label4.AutoSize = true;
|
|
||||||
this.label4.Location = new System.Drawing.Point(53, 48);
|
|
||||||
this.label4.Name = "label4";
|
|
||||||
this.label4.Size = new System.Drawing.Size(76, 13);
|
|
||||||
this.label4.TabIndex = 26;
|
|
||||||
this.label4.Text = "Путь до репо:";
|
|
||||||
this.label4.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
|
||||||
//
|
|
||||||
// txtRepoPath
|
|
||||||
//
|
|
||||||
this.txtRepoPath.Location = new System.Drawing.Point(133, 45);
|
|
||||||
this.txtRepoPath.Name = "txtRepoPath";
|
|
||||||
this.txtRepoPath.Size = new System.Drawing.Size(100, 20);
|
|
||||||
this.txtRepoPath.TabIndex = 25;
|
|
||||||
//
|
|
||||||
// label2
|
// label2
|
||||||
//
|
//
|
||||||
this.label2.AutoSize = true;
|
this.label2.AutoSize = true;
|
||||||
this.label2.Location = new System.Drawing.Point(47, 127);
|
this.label2.Location = new System.Drawing.Point(47, 149);
|
||||||
this.label2.Name = "label2";
|
this.label2.Name = "label2";
|
||||||
this.label2.Size = new System.Drawing.Size(82, 13);
|
this.label2.Size = new System.Drawing.Size(82, 13);
|
||||||
this.label2.TabIndex = 24;
|
this.label2.TabIndex = 24;
|
||||||
@@ -102,7 +87,7 @@
|
|||||||
//
|
//
|
||||||
// txtMercurialEmail
|
// txtMercurialEmail
|
||||||
//
|
//
|
||||||
this.txtMercurialEmail.Location = new System.Drawing.Point(133, 124);
|
this.txtMercurialEmail.Location = new System.Drawing.Point(133, 146);
|
||||||
this.txtMercurialEmail.Name = "txtMercurialEmail";
|
this.txtMercurialEmail.Name = "txtMercurialEmail";
|
||||||
this.txtMercurialEmail.Size = new System.Drawing.Size(100, 20);
|
this.txtMercurialEmail.Size = new System.Drawing.Size(100, 20);
|
||||||
this.txtMercurialEmail.TabIndex = 23;
|
this.txtMercurialEmail.TabIndex = 23;
|
||||||
@@ -110,7 +95,7 @@
|
|||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
this.label1.AutoSize = true;
|
this.label1.AutoSize = true;
|
||||||
this.label1.Location = new System.Drawing.Point(62, 100);
|
this.label1.Location = new System.Drawing.Point(62, 122);
|
||||||
this.label1.Name = "label1";
|
this.label1.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(71, 13);
|
this.label1.Size = new System.Drawing.Size(71, 13);
|
||||||
this.label1.TabIndex = 22;
|
this.label1.TabIndex = 22;
|
||||||
@@ -118,7 +103,7 @@
|
|||||||
//
|
//
|
||||||
// txtJiraPassword
|
// txtJiraPassword
|
||||||
//
|
//
|
||||||
this.txtJiraPassword.Location = new System.Drawing.Point(133, 97);
|
this.txtJiraPassword.Location = new System.Drawing.Point(133, 119);
|
||||||
this.txtJiraPassword.Name = "txtJiraPassword";
|
this.txtJiraPassword.Name = "txtJiraPassword";
|
||||||
this.txtJiraPassword.PasswordChar = '*';
|
this.txtJiraPassword.PasswordChar = '*';
|
||||||
this.txtJiraPassword.Size = new System.Drawing.Size(100, 20);
|
this.txtJiraPassword.Size = new System.Drawing.Size(100, 20);
|
||||||
@@ -127,7 +112,7 @@
|
|||||||
// lbl1
|
// lbl1
|
||||||
//
|
//
|
||||||
this.lbl1.AutoSize = true;
|
this.lbl1.AutoSize = true;
|
||||||
this.lbl1.Location = new System.Drawing.Point(69, 74);
|
this.lbl1.Location = new System.Drawing.Point(69, 96);
|
||||||
this.lbl1.Name = "lbl1";
|
this.lbl1.Name = "lbl1";
|
||||||
this.lbl1.Size = new System.Drawing.Size(64, 13);
|
this.lbl1.Size = new System.Drawing.Size(64, 13);
|
||||||
this.lbl1.TabIndex = 20;
|
this.lbl1.TabIndex = 20;
|
||||||
@@ -135,7 +120,7 @@
|
|||||||
//
|
//
|
||||||
// txtJiraLogin
|
// txtJiraLogin
|
||||||
//
|
//
|
||||||
this.txtJiraLogin.Location = new System.Drawing.Point(133, 71);
|
this.txtJiraLogin.Location = new System.Drawing.Point(133, 93);
|
||||||
this.txtJiraLogin.Name = "txtJiraLogin";
|
this.txtJiraLogin.Name = "txtJiraLogin";
|
||||||
this.txtJiraLogin.Size = new System.Drawing.Size(100, 20);
|
this.txtJiraLogin.Size = new System.Drawing.Size(100, 20);
|
||||||
this.txtJiraLogin.TabIndex = 19;
|
this.txtJiraLogin.TabIndex = 19;
|
||||||
@@ -143,7 +128,7 @@
|
|||||||
// label3
|
// label3
|
||||||
//
|
//
|
||||||
this.label3.AutoSize = true;
|
this.label3.AutoSize = true;
|
||||||
this.label3.Location = new System.Drawing.Point(41, 232);
|
this.label3.Location = new System.Drawing.Point(41, 254);
|
||||||
this.label3.Name = "label3";
|
this.label3.Name = "label3";
|
||||||
this.label3.Size = new System.Drawing.Size(91, 13);
|
this.label3.Size = new System.Drawing.Size(91, 13);
|
||||||
this.label3.TabIndex = 30;
|
this.label3.TabIndex = 30;
|
||||||
@@ -152,7 +137,7 @@
|
|||||||
// actTime
|
// actTime
|
||||||
//
|
//
|
||||||
this.actTime.Format = System.Windows.Forms.DateTimePickerFormat.Time;
|
this.actTime.Format = System.Windows.Forms.DateTimePickerFormat.Time;
|
||||||
this.actTime.Location = new System.Drawing.Point(133, 228);
|
this.actTime.Location = new System.Drawing.Point(133, 250);
|
||||||
this.actTime.Name = "actTime";
|
this.actTime.Name = "actTime";
|
||||||
this.actTime.Size = new System.Drawing.Size(100, 20);
|
this.actTime.Size = new System.Drawing.Size(100, 20);
|
||||||
this.actTime.TabIndex = 29;
|
this.actTime.TabIndex = 29;
|
||||||
@@ -160,7 +145,7 @@
|
|||||||
// chkAddComments
|
// chkAddComments
|
||||||
//
|
//
|
||||||
this.chkAddComments.AutoSize = true;
|
this.chkAddComments.AutoSize = true;
|
||||||
this.chkAddComments.Location = new System.Drawing.Point(65, 336);
|
this.chkAddComments.Location = new System.Drawing.Point(65, 366);
|
||||||
this.chkAddComments.Name = "chkAddComments";
|
this.chkAddComments.Name = "chkAddComments";
|
||||||
this.chkAddComments.Size = new System.Drawing.Size(133, 17);
|
this.chkAddComments.Size = new System.Drawing.Size(133, 17);
|
||||||
this.chkAddComments.TabIndex = 31;
|
this.chkAddComments.TabIndex = 31;
|
||||||
@@ -169,7 +154,7 @@
|
|||||||
//
|
//
|
||||||
// btnSave
|
// btnSave
|
||||||
//
|
//
|
||||||
this.btnSave.Location = new System.Drawing.Point(86, 382);
|
this.btnSave.Location = new System.Drawing.Point(86, 412);
|
||||||
this.btnSave.Name = "btnSave";
|
this.btnSave.Name = "btnSave";
|
||||||
this.btnSave.Size = new System.Drawing.Size(75, 23);
|
this.btnSave.Size = new System.Drawing.Size(75, 23);
|
||||||
this.btnSave.TabIndex = 32;
|
this.btnSave.TabIndex = 32;
|
||||||
@@ -203,7 +188,7 @@
|
|||||||
// label7
|
// label7
|
||||||
//
|
//
|
||||||
this.label7.AutoSize = true;
|
this.label7.AutoSize = true;
|
||||||
this.label7.Location = new System.Drawing.Point(100, 179);
|
this.label7.Location = new System.Drawing.Point(100, 201);
|
||||||
this.label7.Name = "label7";
|
this.label7.Name = "label7";
|
||||||
this.label7.Size = new System.Drawing.Size(29, 13);
|
this.label7.Size = new System.Drawing.Size(29, 13);
|
||||||
this.label7.TabIndex = 37;
|
this.label7.TabIndex = 37;
|
||||||
@@ -211,7 +196,7 @@
|
|||||||
//
|
//
|
||||||
// txtJQL
|
// txtJQL
|
||||||
//
|
//
|
||||||
this.txtJQL.Location = new System.Drawing.Point(133, 176);
|
this.txtJQL.Location = new System.Drawing.Point(133, 198);
|
||||||
this.txtJQL.Name = "txtJQL";
|
this.txtJQL.Name = "txtJQL";
|
||||||
this.txtJQL.Size = new System.Drawing.Size(99, 20);
|
this.txtJQL.Size = new System.Drawing.Size(99, 20);
|
||||||
this.txtJQL.TabIndex = 36;
|
this.txtJQL.TabIndex = 36;
|
||||||
@@ -219,7 +204,7 @@
|
|||||||
// label8
|
// label8
|
||||||
//
|
//
|
||||||
this.label8.AutoSize = true;
|
this.label8.AutoSize = true;
|
||||||
this.label8.Location = new System.Drawing.Point(-2, 206);
|
this.label8.Location = new System.Drawing.Point(-2, 228);
|
||||||
this.label8.Name = "label8";
|
this.label8.Name = "label8";
|
||||||
this.label8.Size = new System.Drawing.Size(133, 13);
|
this.label8.Size = new System.Drawing.Size(133, 13);
|
||||||
this.label8.TabIndex = 39;
|
this.label8.TabIndex = 39;
|
||||||
@@ -227,7 +212,7 @@
|
|||||||
//
|
//
|
||||||
// txtTimeControlTask
|
// txtTimeControlTask
|
||||||
//
|
//
|
||||||
this.txtTimeControlTask.Location = new System.Drawing.Point(133, 202);
|
this.txtTimeControlTask.Location = new System.Drawing.Point(133, 224);
|
||||||
this.txtTimeControlTask.Name = "txtTimeControlTask";
|
this.txtTimeControlTask.Name = "txtTimeControlTask";
|
||||||
this.txtTimeControlTask.Size = new System.Drawing.Size(99, 20);
|
this.txtTimeControlTask.Size = new System.Drawing.Size(99, 20);
|
||||||
this.txtTimeControlTask.TabIndex = 38;
|
this.txtTimeControlTask.TabIndex = 38;
|
||||||
@@ -235,7 +220,7 @@
|
|||||||
// chkAutostart
|
// chkAutostart
|
||||||
//
|
//
|
||||||
this.chkAutostart.AutoSize = true;
|
this.chkAutostart.AutoSize = true;
|
||||||
this.chkAutostart.Location = new System.Drawing.Point(65, 313);
|
this.chkAutostart.Location = new System.Drawing.Point(65, 343);
|
||||||
this.chkAutostart.Name = "chkAutostart";
|
this.chkAutostart.Name = "chkAutostart";
|
||||||
this.chkAutostart.Size = new System.Drawing.Size(96, 17);
|
this.chkAutostart.Size = new System.Drawing.Size(96, 17);
|
||||||
this.chkAutostart.TabIndex = 40;
|
this.chkAutostart.TabIndex = 40;
|
||||||
@@ -245,7 +230,7 @@
|
|||||||
// lblWorkDay
|
// lblWorkDay
|
||||||
//
|
//
|
||||||
this.lblWorkDay.AutoSize = true;
|
this.lblWorkDay.AutoSize = true;
|
||||||
this.lblWorkDay.Location = new System.Drawing.Point(15, 258);
|
this.lblWorkDay.Location = new System.Drawing.Point(15, 280);
|
||||||
this.lblWorkDay.Name = "lblWorkDay";
|
this.lblWorkDay.Name = "lblWorkDay";
|
||||||
this.lblWorkDay.Size = new System.Drawing.Size(117, 13);
|
this.lblWorkDay.Size = new System.Drawing.Size(117, 13);
|
||||||
this.lblWorkDay.TabIndex = 42;
|
this.lblWorkDay.TabIndex = 42;
|
||||||
@@ -253,7 +238,7 @@
|
|||||||
//
|
//
|
||||||
// txtWorkDayDuration
|
// txtWorkDayDuration
|
||||||
//
|
//
|
||||||
this.txtWorkDayDuration.Location = new System.Drawing.Point(133, 254);
|
this.txtWorkDayDuration.Location = new System.Drawing.Point(133, 276);
|
||||||
this.txtWorkDayDuration.Name = "txtWorkDayDuration";
|
this.txtWorkDayDuration.Name = "txtWorkDayDuration";
|
||||||
this.txtWorkDayDuration.Size = new System.Drawing.Size(99, 20);
|
this.txtWorkDayDuration.Size = new System.Drawing.Size(99, 20);
|
||||||
this.txtWorkDayDuration.TabIndex = 41;
|
this.txtWorkDayDuration.TabIndex = 41;
|
||||||
@@ -261,7 +246,7 @@
|
|||||||
// label9
|
// label9
|
||||||
//
|
//
|
||||||
this.label9.AutoSize = true;
|
this.label9.AutoSize = true;
|
||||||
this.label9.Location = new System.Drawing.Point(30, 284);
|
this.label9.Location = new System.Drawing.Point(30, 306);
|
||||||
this.label9.Name = "label9";
|
this.label9.Name = "label9";
|
||||||
this.label9.Size = new System.Drawing.Size(101, 13);
|
this.label9.Size = new System.Drawing.Size(101, 13);
|
||||||
this.label9.TabIndex = 44;
|
this.label9.TabIndex = 44;
|
||||||
@@ -269,7 +254,7 @@
|
|||||||
//
|
//
|
||||||
// txtRandomMinutes
|
// txtRandomMinutes
|
||||||
//
|
//
|
||||||
this.txtRandomMinutes.Location = new System.Drawing.Point(133, 280);
|
this.txtRandomMinutes.Location = new System.Drawing.Point(133, 302);
|
||||||
this.txtRandomMinutes.Name = "txtRandomMinutes";
|
this.txtRandomMinutes.Name = "txtRandomMinutes";
|
||||||
this.txtRandomMinutes.Size = new System.Drawing.Size(99, 20);
|
this.txtRandomMinutes.Size = new System.Drawing.Size(99, 20);
|
||||||
this.txtRandomMinutes.TabIndex = 43;
|
this.txtRandomMinutes.TabIndex = 43;
|
||||||
@@ -277,18 +262,54 @@
|
|||||||
// chkPullBeforeProcess
|
// chkPullBeforeProcess
|
||||||
//
|
//
|
||||||
this.chkPullBeforeProcess.AutoSize = true;
|
this.chkPullBeforeProcess.AutoSize = true;
|
||||||
this.chkPullBeforeProcess.Location = new System.Drawing.Point(65, 359);
|
this.chkPullBeforeProcess.Location = new System.Drawing.Point(65, 389);
|
||||||
this.chkPullBeforeProcess.Name = "chkPullBeforeProcess";
|
this.chkPullBeforeProcess.Name = "chkPullBeforeProcess";
|
||||||
this.chkPullBeforeProcess.Size = new System.Drawing.Size(83, 17);
|
this.chkPullBeforeProcess.Size = new System.Drawing.Size(83, 17);
|
||||||
this.chkPullBeforeProcess.TabIndex = 45;
|
this.chkPullBeforeProcess.TabIndex = 45;
|
||||||
this.chkPullBeforeProcess.Text = "Делать pull";
|
this.chkPullBeforeProcess.Text = "Делать pull";
|
||||||
this.chkPullBeforeProcess.UseVisualStyleBackColor = true;
|
this.chkPullBeforeProcess.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
|
// txtRepoPath
|
||||||
|
//
|
||||||
|
this.txtRepoPath.Location = new System.Drawing.Point(133, 45);
|
||||||
|
this.txtRepoPath.Name = "txtRepoPath";
|
||||||
|
this.txtRepoPath.Size = new System.Drawing.Size(100, 20);
|
||||||
|
this.txtRepoPath.TabIndex = 25;
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(53, 48);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(76, 13);
|
||||||
|
this.label4.TabIndex = 26;
|
||||||
|
this.label4.Text = "Путь до репо:";
|
||||||
|
this.label4.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||||
|
//
|
||||||
|
// lblJiraUrl
|
||||||
|
//
|
||||||
|
this.lblJiraUrl.AutoSize = true;
|
||||||
|
this.lblJiraUrl.Location = new System.Drawing.Point(53, 72);
|
||||||
|
this.lblJiraUrl.Name = "lblJiraUrl";
|
||||||
|
this.lblJiraUrl.Size = new System.Drawing.Size(76, 13);
|
||||||
|
this.lblJiraUrl.TabIndex = 47;
|
||||||
|
this.lblJiraUrl.Text = "Путь до репо:";
|
||||||
|
this.lblJiraUrl.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||||
|
//
|
||||||
|
// txtJiraUrl
|
||||||
|
//
|
||||||
|
this.txtJiraUrl.Location = new System.Drawing.Point(133, 69);
|
||||||
|
this.txtJiraUrl.Name = "txtJiraUrl";
|
||||||
|
this.txtJiraUrl.Size = new System.Drawing.Size(100, 20);
|
||||||
|
this.txtJiraUrl.TabIndex = 46;
|
||||||
|
//
|
||||||
// frmSettings
|
// frmSettings
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(243, 414);
|
this.ClientSize = new System.Drawing.Size(243, 442);
|
||||||
|
this.Controls.Add(this.lblJiraUrl);
|
||||||
|
this.Controls.Add(this.txtJiraUrl);
|
||||||
this.Controls.Add(this.chkPullBeforeProcess);
|
this.Controls.Add(this.chkPullBeforeProcess);
|
||||||
this.Controls.Add(this.label9);
|
this.Controls.Add(this.label9);
|
||||||
this.Controls.Add(this.txtRandomMinutes);
|
this.Controls.Add(this.txtRandomMinutes);
|
||||||
@@ -330,8 +351,6 @@
|
|||||||
|
|
||||||
private System.Windows.Forms.Label label5;
|
private System.Windows.Forms.Label label5;
|
||||||
private System.Windows.Forms.TextBox txtRoundTo;
|
private System.Windows.Forms.TextBox txtRoundTo;
|
||||||
private System.Windows.Forms.Label label4;
|
|
||||||
private System.Windows.Forms.TextBox txtRepoPath;
|
|
||||||
private System.Windows.Forms.Label label2;
|
private System.Windows.Forms.Label label2;
|
||||||
private System.Windows.Forms.TextBox txtMercurialEmail;
|
private System.Windows.Forms.TextBox txtMercurialEmail;
|
||||||
private System.Windows.Forms.Label label1;
|
private System.Windows.Forms.Label label1;
|
||||||
@@ -354,5 +373,9 @@
|
|||||||
private System.Windows.Forms.Label label9;
|
private System.Windows.Forms.Label label9;
|
||||||
private System.Windows.Forms.TextBox txtRandomMinutes;
|
private System.Windows.Forms.TextBox txtRandomMinutes;
|
||||||
private System.Windows.Forms.CheckBox chkPullBeforeProcess;
|
private System.Windows.Forms.CheckBox chkPullBeforeProcess;
|
||||||
|
private System.Windows.Forms.TextBox txtRepoPath;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.Label lblJiraUrl;
|
||||||
|
private System.Windows.Forms.TextBox txtJiraUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,6 +28,7 @@ namespace JiraTimeBot.UI
|
|||||||
|
|
||||||
private void SetSettings(Settings settings)
|
private void SetSettings(Settings settings)
|
||||||
{
|
{
|
||||||
|
txtJiraUrl.Text = settings.JiraUrl;
|
||||||
txtJiraLogin.Text = settings.JiraUserName;
|
txtJiraLogin.Text = settings.JiraUserName;
|
||||||
txtJiraPassword.Text = settings.JiraPassword;
|
txtJiraPassword.Text = settings.JiraPassword;
|
||||||
txtMercurialEmail.Text = settings.MercurialAuthorEmail;
|
txtMercurialEmail.Text = settings.MercurialAuthorEmail;
|
||||||
@@ -62,6 +63,7 @@ namespace JiraTimeBot.UI
|
|||||||
|
|
||||||
var settings = new Settings
|
var settings = new Settings
|
||||||
{
|
{
|
||||||
|
JiraUrl = txtJiraUrl.Text,
|
||||||
JiraUserName = txtJiraLogin.Text,
|
JiraUserName = txtJiraLogin.Text,
|
||||||
JiraPassword = txtJiraPassword.Text,
|
JiraPassword = txtJiraPassword.Text,
|
||||||
MercurialAuthorEmail = txtMercurialEmail.Text,
|
MercurialAuthorEmail = txtMercurialEmail.Text,
|
||||||
|
|||||||
Reference in New Issue
Block a user