Skip to content

Local commits / uncommitted changes are always reset when using gitlab webhooks #45

@sk1ll10

Description

@sk1ll10

When using gitlab webhooks the field "checkout_sha" will always be present. This causes the deployer to execute this block always which can have unwanted side effects.

if (!empty($sha)) {
                // write to the log
                fputs($file, "*** RESET TO HASH INITIATED ***" . "\n");

                exec(GIT . " reset --hard {$sha} 2>&1", $output, $exit);

Of course this makes sense since you do not want to have merge conflicts when using an auto deploy mechanism. In our case we have local sql-lite db running in the webapp that always got deleted although it was never checked in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions