@@ -116,6 +116,7 @@ export default class BotConfig {
116116
117117 private static token : string ;
118118 private static jiraPat ?: string ;
119+ private static jiraUser ?: string ;
119120
120121 public static owners : Snowflake [ ] ;
121122
@@ -149,6 +150,7 @@ export default class BotConfig {
149150 this . logDirectory = getOrDefault ( 'logDirectory' , false ) ;
150151
151152 this . token = config . get ( 'token' ) ;
153+ this . jiraUser = getOrDefault ( 'jiraUser' , undefined ) ;
152154 this . jiraPat = getOrDefault ( 'jiraPat' , undefined ) ;
153155
154156 this . owners = getOrDefault ( 'owners' , [ ] ) ;
@@ -194,10 +196,12 @@ export default class BotConfig {
194196 public static jiraLogin ( ) : void {
195197 // TODO: integrate newErrorHandling from Jira.js
196198 MojiraBot . jira = new JiraClient ( {
197- host : 'https://bugs.mojang.com' ,
198- telemetry : false ,
199- authentication : this . jiraPat === undefined ? undefined : {
200- personalAccessToken : this . jiraPat ,
199+ host : 'https://mojira.atlassian.net' ,
200+ authentication : this . jiraPat === undefined || this . jiraUser === undefined ? undefined : {
201+ basic : {
202+ email : this . jiraUser ,
203+ apiToken : this . jiraPat ,
204+ } ,
201205 } ,
202206 } ) ;
203207 }
0 commit comments