Skip to content

[BUG] GitLab - Large PRs have incomplete created_files, modified_files and deleted_files #1249

Open
@uncaught

Description

@uncaught

Describe the bug
The files listed under danger.git.*_files are incomplete - at least in GitLab. It seems only a limited amount of files are listed and possibly only the same number of files that GitLab will show in the diff view of the merge request.

GitLab shows 898+ files, danger-js only gives me 898 files, while a git diff --name-status origin/master...origin/my_branch|wc -l shows 2549 files.

This leads to a crucial pre-merge test not to be executed for many files that are actually contained.

To Reproduce
Steps to reproduce the behavior:

  1. Have a large merge request with 900+ files in GitLab.
  2. Check danger.git.created_files or danger.git.modified_files or danger.git.deleted_files to contain all the files.

Expected behavior
All files in the merge request are contained in danger.git.

Screenshots

This is what GitLab shows:
image

These are the counts of the danger.git API that I've printed out (0 added, 2 modified, 896 deleted):
image

And this is the expected count of files included in the merge request (3 added, 10 modified, 2528 deleted):
image

Your Environment

software version
danger.js 11.0.2 (noticed with 10.6.6 then upgraded)
node 14.17.5
yarn 1.22.5
GitLab Enterprise 14.6.2
Operating System alpine3.14

Additional context
It is curious that the "898+" GitLab is showing matches so exactly to the "898" files that danger is giving me. Is there some pagination in the GitLab API that you are using and not pulling additional pages?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions