public Task <int> Interceptor(
     InterceptorExecutionDelegate next, CancellationToken cancellationToken,
     JiraApiSettings jiraApiSettings, WorkspaceSettings workspaceSettings)
 {
     _jiraContext         = new JiraContext(jiraApiSettings, workspaceSettings, cancellationToken);
     _migrationRepository = new MigrationRepository(_jiraContext.LocalDirs);
     return(next());
 }
Exemplo n.º 2
0
 public HomeController(UserManager <ApplicationUser> userManager,
                       SignInManager <ApplicationUser> signInManager,
                       RoleManager <IdentityRole> roleManager,
                       JiraContext context)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     roleManagers   = roleManager;
     _context       = context;
 }
        public void JiraContext_TicketLinkToJiraShouldUseAutoProperties()
        {
            var context = new JiraContext();

            context.TicketLinkToJira.Add(new TicketLinkToJira()
            {
                id = 1
            });
            Assert.IsNotNull(context.TicketLinkToJira);
        }
Exemplo n.º 4
0
 public static Task EnsureAdminUserIsCreated(JiraContext dbContext, AuthSettings authOptions)
 {
     dbContext.Users.Add(new User
     {
         Id       = Guid.NewGuid().ToString(),
         Email    = authOptions.AdminEmail,
         Password = authOptions.AdminPassword
     });
     return(dbContext.SaveChangesAsync());
 }
        public Task <int> Interceptor(
            InterceptorExecutionDelegate next,
            JiraApiSettings jiraApiSettings, WorkspaceSettings workspaceSettings)
        {
            _jiraContext              = new JiraContext(jiraApiSettings, workspaceSettings, _cancellationToken);
            _jiraApi                  = _jiraContext.Api;
            _jiraApiSettings          = _jiraContext.ApiSettings;
            _migrationMetaDataService = new MigrationMetaDataService(_jiraContext);

            return(next());
        }
Exemplo n.º 6
0
        public WorkItemImporter(bool force, MigrationRepository migrationRepository, AdoContext adoContext,
                                JiraContext jiraContext, StatusCsvMapper statusMapper, IssueTypeCsvMapper issueTypeCsvMapper)
        {
            // TODO: interface for the mappers to alternate mapping strategies

            _force = force;
            _migrationRepository = migrationRepository ?? throw new ArgumentNullException(nameof(migrationRepository));
            _adoContext          = adoContext ?? throw new ArgumentNullException(nameof(adoContext));
            _jiraContext         = jiraContext ?? throw new ArgumentNullException(nameof(jiraContext));
            _statusMapper        = statusMapper ?? throw new ArgumentNullException(nameof(statusMapper));
            _issueTypeCsvMapper  = issueTypeCsvMapper ?? throw new ArgumentNullException(nameof(issueTypeCsvMapper));

            _adoApi  = _adoContext.Api;
            _jiraApi = _jiraContext.Api;
        }
Exemplo n.º 7
0
        public Task <int> Intercept(
            InterceptorExecutionDelegate next,
            AdoApiSettings adoApiSettings, WorkspaceSettings workspaceSettings, JiraApiSettings jiraApiSettings)
        {
            _adoContext = new AdoContext(adoApiSettings, _cancellationToken);
            if (!_adoContext.TryConnect())
            {
                _console.Out.WriteLine("Unable to connect to TFS");
                return(Task.FromResult(1));
            }
            _jiraContext              = new JiraContext(jiraApiSettings, workspaceSettings, _cancellationToken);
            _migrationRepository      = new MigrationRepository(_jiraContext.LocalDirs);
            _migrationMetaDataService = new MigrationMetaDataService(_jiraContext);

            return(next());
        }
        public static Context ToContext(this ReleaseNotesRequest releaseNotesRequest)
        {
            IIssueTrackerContext issueTrackerContext = null;

            var lowercaseUrl = releaseNotesRequest.IssueTrackerUrl.ToLower();
            if (lowercaseUrl.Contains("bitbucket"))
            {
                issueTrackerContext = new BitBucketContext
                {
                    Url = releaseNotesRequest.IssueTrackerUrl
                };
            }

            if (lowercaseUrl.Contains("atlassian"))
            {
                issueTrackerContext = new JiraContext
                {
                    Url = releaseNotesRequest.IssueTrackerUrl
                };
            }

            if (lowercaseUrl.Contains("github"))
            {
                issueTrackerContext = new GitHubContext
                {
                    Url = releaseNotesRequest.IssueTrackerUrl
                };
            }

            if (lowercaseUrl.Contains("youtrack"))
            {
                issueTrackerContext = new YouTrackContext
                {
                    Url = releaseNotesRequest.IssueTrackerUrl
                };
            }

            var context = new Context(issueTrackerContext);

            context.Repository.Url = releaseNotesRequest.RepositoryUrl;
            context.Repository.Branch = releaseNotesRequest.RepositoryBranch;

            context.IssueTracker.ProjectId = releaseNotesRequest.IssueTrackerProjectId;

            return context;
        }
 public TblChatDirectsController(JiraContext context)
 {
     _context = context;
 }
Exemplo n.º 10
0
 public TblDisputesController(JiraContext context)
 {
     _context = context;
 }
Exemplo n.º 11
0
 public TblUserCertificationsController(JiraContext context, UserManager <ApplicationUser> userManager, IHostingEnvironment environment)
 {
     _context     = context;
     _usermanager = userManager;
     _environment = environment;
 }
Exemplo n.º 12
0
 public TblPaymentDeductionsController(JiraContext context)
 {
     _context = context;
 }
 public TblJobAttachmentsController(JiraContext context)
 {
     _context = context;
 }
Exemplo n.º 14
0
 public AppController(JiraContext dbContext, IOptions <AuthSettings> authOptions)
 {
     this.dbContext   = dbContext;
     this.authOptions = authOptions.Value;
 }
Exemplo n.º 15
0
 public AuthenticationService(JiraContext dbContext, IOptions <AuthSettings> authOptions)
 {
     this.dbContext = dbContext;
     authSettings   = authOptions.Value;
 }
Exemplo n.º 16
0
 public TblJobAttachmentsController(JiraContext context, IHostingEnvironment environment)
 {
     _context     = context;
     _environment = environment;
 }
Exemplo n.º 17
0
 public CommentService(JiraContext context)
 {
     dbContext = context;
 }
 public TblUserSkillsController(JiraContext context, UserManager <ApplicationUser> userManager)
 {
     _context     = context;
     _usermanager = userManager;
 }
Exemplo n.º 19
0
 public TicketService(JiraContext context)
 {
     dbContext = context;
 }
Exemplo n.º 20
0
 public MassagesController(JiraContext context, UserManager <ApplicationUser> userManager)
 {
     _context     = context;
     _usermanager = userManager;
 }
Exemplo n.º 21
0
 public TblWorkspacesController(JiraContext context)
 {
     _context = context;
 }
 public TblUserPaymentHistoriesController(JiraContext context)
 {
     _context = context;
 }
Exemplo n.º 23
0
 public MigrationMetaDataService(JiraContext jiraContext)
 {
     _jiraContext         = jiraContext;
     _migrationRepository = new MigrationRepository(jiraContext.LocalDirs);
 }
Exemplo n.º 24
0
 public TblDepositDeductions1Controller(JiraContext context)
 {
     _context = context;
 }
Exemplo n.º 25
0
 public CategoryService(JiraContext context)
 {
     dbContext = context;
 }