Skip to content

MR command: check git push successful before running glab mr command #111

@waako

Description

@waako

Problem

When running ddev mr, the git push trigger pre-push hooks and sanity-check command.
If sanity check fails or aborted, currently the command continues with the glab mr create command, if branch not pushed at all this will error.

Reproduce

In a project with issues such as: views.view.files.yml is missing 'operations' and feature branch not yet pushed to GitLab.

  • ddev mr
  • Sanity-check fail. Continue pushing anyway?: enter N
  • now offers: ? Choose a template: for Gitlab MR creation, which will fail as no branch pushed.

Proposition:

use set -e to exit command at first failure, easiest approach for now.

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