@@ -58,6 +58,8 @@ export class BitbucketService {
5858 async getCommits ( projectKey : string , repositorySlug : string , path ?: string , since ?: string , until ?: string ,
5959 limit ?: number
6060 ) {
61+ projectKey = projectKey . toUpperCase ( ) ;
62+ repositorySlug = repositorySlug . toLowerCase ( ) ;
6163 return handleApiOperation (
6264 ( ) => RepositoryService . getCommits (
6365 projectKey ,
@@ -99,6 +101,7 @@ export class BitbucketService {
99101 * @returns Promise with project data
100102 */
101103 async getProject ( projectKey : string ) {
104+ projectKey = projectKey . toUpperCase ( ) ;
102105 return handleApiOperation (
103106 ( ) => ProjectService . getProject ( projectKey ) ,
104107 'Error fetching project'
@@ -113,6 +116,7 @@ export class BitbucketService {
113116 * @returns Promise with repositories data
114117 */
115118 async getRepositories ( projectKey : string , start ?: number , limit ?: number ) {
119+ projectKey = projectKey . toUpperCase ( ) ;
116120 return handleApiOperation (
117121 ( ) => ProjectService . getRepositories ( projectKey , start , limit ?? this . getPageSize ( ) ) ,
118122 'Error fetching repositories'
@@ -126,6 +130,8 @@ export class BitbucketService {
126130 * @returns Promise with repository data
127131 */
128132 async getRepository ( projectKey : string , repositorySlug : string ) {
133+ projectKey = projectKey . toUpperCase ( ) ;
134+ repositorySlug = repositorySlug . toLowerCase ( ) ;
129135 return handleApiOperation (
130136 ( ) => ProjectService . getRepository ( projectKey , repositorySlug ) ,
131137 'Error fetching repository'
@@ -162,6 +168,8 @@ export class BitbucketService {
162168 start ?: number ,
163169 limit ?: number
164170 ) {
171+ projectKey = projectKey . toUpperCase ( ) ;
172+ repositorySlug = repositorySlug . toLowerCase ( ) ;
165173 return handleApiOperation (
166174 ( ) => PullRequestsService . getPage (
167175 projectKey ,
@@ -193,6 +201,8 @@ export class BitbucketService {
193201 repositorySlug : string ,
194202 pullRequestId : string
195203 ) {
204+ projectKey = projectKey . toUpperCase ( ) ;
205+ repositorySlug = repositorySlug . toLowerCase ( ) ;
196206 return handleApiOperation (
197207 ( ) => PullRequestsService . get3 ( projectKey , pullRequestId , repositorySlug ) ,
198208 'Error fetching pull request'
@@ -208,6 +218,8 @@ export class BitbucketService {
208218 output : BitbucketOutputMode = 'compact' ,
209219 includeResolved = false
210220 ) {
221+ projectKey = projectKey . toUpperCase ( ) ;
222+ repositorySlug = repositorySlug . toLowerCase ( ) ;
211223 const result = await handleApiOperation (
212224 ( ) => PullRequestsService . getActivities (
213225 projectKey ,
@@ -256,6 +268,8 @@ export class BitbucketService {
256268 limit ?: number ,
257269 output : BitbucketOutputMode = 'compact'
258270 ) {
271+ projectKey = projectKey . toUpperCase ( ) ;
272+ repositorySlug = repositorySlug . toLowerCase ( ) ;
259273 const result = await handleApiOperation (
260274 ( ) => PullRequestsService . streamChanges1 (
261275 projectKey ,
@@ -308,6 +322,8 @@ export class BitbucketService {
308322 pending ?: boolean ,
309323 output : BitbucketMutationOutputMode = 'ack'
310324 ) {
325+ projectKey = projectKey . toUpperCase ( ) ;
326+ repositorySlug = repositorySlug . toLowerCase ( ) ;
311327 const comment : any = {
312328 text
313329 } ;
@@ -404,6 +420,8 @@ export class BitbucketService {
404420 status : 'APPROVED' | 'NEEDS_WORK' | 'UNAPPROVED' ,
405421 lastReviewedCommit ?: string
406422 ) {
423+ projectKey = projectKey . toUpperCase ( ) ;
424+ repositorySlug = repositorySlug . toLowerCase ( ) ;
407425 const requestBody : any = {
408426 status,
409427 ...( lastReviewedCommit ? { lastReviewedCommit } : { } )
@@ -448,6 +466,8 @@ export class BitbucketService {
448466 untilId ?: string ,
449467 whitespace ?: string
450468 ) {
469+ projectKey = projectKey . toUpperCase ( ) ;
470+ repositorySlug = repositorySlug . toLowerCase ( ) ;
451471 return handleApiOperation (
452472 ( ) => __request ( OpenAPI , {
453473 method : 'GET' ,
@@ -500,6 +520,8 @@ export class BitbucketService {
500520 reviewers ?: string [ ] ,
501521 output : BitbucketMutationOutputMode = 'ack'
502522 ) {
523+ projectKey = projectKey . toUpperCase ( ) ;
524+ repositorySlug = repositorySlug . toLowerCase ( ) ;
503525 const pullRequestData : any = {
504526 title,
505527 description,
@@ -567,6 +589,8 @@ export class BitbucketService {
567589 reviewers ?: string [ ] ,
568590 output : BitbucketMutationOutputMode = 'ack'
569591 ) {
592+ projectKey = projectKey . toUpperCase ( ) ;
593+ repositorySlug = repositorySlug . toLowerCase ( ) ;
570594 const pullRequestData : any = {
571595 version
572596 } ;
@@ -622,6 +646,8 @@ export class BitbucketService {
622646 sourceRepoId ?: string ,
623647 targetRepoId ?: string
624648 ) {
649+ projectKey = projectKey . toUpperCase ( ) ;
650+ repositorySlug = repositorySlug . toLowerCase ( ) ;
625651 return handleApiOperation (
626652 ( ) => PullRequestsService . getReviewers (
627653 projectKey ,
0 commit comments