@@ -1412,14 +1412,13 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
1412
1412
* List the changed files in a pull request.
1413
1413
*/
1414
1414
private async getRawFileChangesInfo ( ) : Promise < IRawFileChange [ ] > {
1415
- Logger . debug (
1416
- `Fetch file changes, base, head and merge base of PR #${ this . number } - enter` ,
1417
- PullRequestModel . ID ,
1418
- ) ;
1415
+ Logger . debug ( `Fetch file changes, base, head and merge base of PR #${ this . number } - enter` , PullRequestModel . ID ) ;
1416
+
1419
1417
const githubRepository = this . githubRepository ;
1420
1418
const { octokit, remote } = await githubRepository . ensure ( ) ;
1421
1419
1422
1420
if ( ! this . base ) {
1421
+ Logger . appendLine ( 'No base branch found for PR, fetching it now' , PullRequestModel . ID ) ;
1423
1422
const info = await octokit . call ( octokit . api . pulls . get , {
1424
1423
owner : remote . owner ,
1425
1424
repo : remote . repositoryName ,
@@ -1438,6 +1437,7 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
1438
1437
}
1439
1438
1440
1439
if ( this . item . merged ) {
1440
+ Logger . appendLine ( 'PR is merged, fetching all file changes' , PullRequestModel . ID ) ;
1441
1441
const response = await restPaginate < typeof octokit . api . pulls . listFiles , IRawFileChange > ( octokit . api . pulls . listFiles , {
1442
1442
repo : remote . repositoryName ,
1443
1443
owner : remote . owner ,
@@ -1450,6 +1450,7 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
1450
1450
return response ;
1451
1451
}
1452
1452
1453
+ Logger . debug ( `Comparing commits for ${ remote . owner } /${ remote . repositoryName } with base ${ this . base . repositoryCloneUrl . owner } :${ compareWithBaseRef } and head ${ this . head ! . repositoryCloneUrl . owner } :${ this . head ! . sha } ` , PullRequestModel . ID ) ;
1453
1454
const { data } = await octokit . call ( octokit . api . repos . compareCommits , {
1454
1455
repo : remote . repositoryName ,
1455
1456
owner : remote . owner ,
@@ -1465,10 +1466,8 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
1465
1466
if ( data . files && data . files . length >= MAX_FILE_CHANGES_IN_COMPARE_COMMITS ) {
1466
1467
// compareCommits will return a maximum of 100 changed files
1467
1468
// If we have (maybe) more than that, we'll need to fetch them with listFiles API call
1468
- Logger . debug (
1469
- `More than ${ MAX_FILE_CHANGES_IN_COMPARE_COMMITS } files changed, fetching all file changes of PR #${ this . number } ` ,
1470
- PullRequestModel . ID ,
1471
- ) ;
1469
+ Logger . appendLine (
1470
+ `More than ${ MAX_FILE_CHANGES_IN_COMPARE_COMMITS } files changed in #${ this . number } ` , PullRequestModel . ID ) ;
1472
1471
files = await restPaginate < typeof octokit . api . pulls . listFiles , IRawFileChange > ( octokit . api . pulls . listFiles , {
1473
1472
owner : this . base . repositoryCloneUrl . owner ,
1474
1473
pull_number : this . number ,
0 commit comments