Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 52,303
    • Issues 52,303
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,542
    • Merge requests 1,542
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #241710
Closed
Open
Issue created Aug 27, 2020 by Claus Strasburger@cfs-ninja

Push Options don't allow newlines in values

Problem to solve

When creating a Merge Request with the Push Options feature, I can't create a description that contains newlines.

Example:

$ git push -o merge_request.create -o merge_request.title="Do something" -o merge_request.description='
# Summary
Do something.

# Testing
Deploy this on your box. Then test it.
'

> fatal: push options must not have new line characters

Git does not allow newlines in push options. When I try to emulate them via "\n", they get copied verbatim, and my MR looks like this:

Summary\nDo something.\n# Testing\nDeploy this on your box.\n\nThen test it.

The \n's are pasted verbatim, everything is parsed as a single line.

Intended users

  • Sasha (Software Developer)

    • Sasha might want to create a script to quickly create merge requests from their local box, maybe using a description previously drafted in a text file.
  • Devon (DevOps Engineer)

    • Devon might want to create automated merge-requests to alert developers about release branches not being in sync, and requesting them to fix merge conflicts.

User experience goal

The user should be able to create merge requests containing a multiline description via push options.

Proposal

When parsing push options, replace "\n" by newlines, so that users can create multiline descriptions.

Documentation

Update https://docs.gitlab.com/ee/user/project/push_options.html with the possibility to add newlines

Edited Sep 01, 2020 by Claus Strasburger
Assignee
Assign to
Time tracking