Skip to content

"Have your CI verify your PR" recipe for GitLab CI #478

@scop

Description

@scop

The magic HEAD~..HEAD^2 recipe for checking commits in a PR does not work in GitLab CI, would be very nice to have one for it, too.

Sample MR in https://gitlab.com/scop/test/-/merge_requests/1, pipeline fail in https://gitlab.com/scop/test/-/jobs/12913721436#L41:

$ ./committed -vv --no-merge-commit HEAD~..HEAD^2
parent 1 does not exist; class=Invalid (3); code=NotFound (-3)

This is with the GitLab CI defaults for the checkout.

Some info what it does to check out is in https://gitlab.com/scop/test/-/jobs/12913721436#L13 but I don't know if that's verbose enough to be of any use. Making the output more verbose with CI_DEBUG_TRACE=true makes it non-public.

Let me know if I can provide some data to help come up with the recipe if you're interested in figuring it out -- I guess I could eventually come up with one myself that might take some time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions