Creating a Merge Request (MR)

Magnolia’s code base lives at the following GitLab instance: Magnolia projects. We use GitLab merge requests for code reviews and contributions.

As a prerequisite, you need access to Magnolia’s GitLab instance. Reach out to your technical account manager or Magnolia support contact to set this up.

  1. Fork the repository where you want to contribute.

    You can find the scm links in a Magnolia module’s Maven POM file (or in its parent).

    Work in a fork of the canonical target repository - a personal copy under your namespace.

    Expand for more details.

    1. Navigate to the repository where you want to contribute (for example, pd/platform/main) on GitLab and click the Fork button.

      Choose your personal namespace.

    2. Clone your new fork to your local machine:

      git clone <your-fork-url>
      cd <repo-name>
    3. Create a new branch.

      Always create a new, descriptive branch for your feature or fix from the main branch (for example, main or master):

      git switch -c feature/my-new-feature
  2. Commit and ensure Developer Certificate of Origin (DCO) signoff.

    Observe the following Git commit guidelines:

    • Make atomic, incremental commits, which compile each time.

    • Commit behaviour changes separately from cosmetic changes such as variable renames, method reordering, and formatting.

    • Read the conventional commit message guidelines for additional details.

      We require the DCO signoff on all commits to certify that you have the right to contribute the code.

      Expand for more details.

      1. Configure Git to ensure your local configuration uses your legal name and email address:

        git config user.name "Your Full Legal Name"
        git config user.email "your.email@example.com"
      2. Use the -s or --signoff flag when making your commits. This automatically adds the required Signed-off-by: line to your commit message.

        git commit -s -m "MAGNOLIA-123 Brief but descriptive commit message"
      3. Amend any missing signoffs.

        If you forget, you can amend the last commit before pushing:

        git commit --amend --signoff
  3. Once your changes are committed and DCO-signed on your development branch, push the branch to your fork and open an MR.

    Expand for more details.

    1. Push to your fork.

      Push your local development branch to your fork on GitLab:

      git push origin feature/my-new-feature
    2. Open an MR.

      1. Navigate to your fork on GitLab. Usually, you can see a banner prompting you to create an MR.

      2. Alternatively, go to Code > Merge Requests and click New merge request.

      3. Source: Select your branch (feature/my-new-feature) in your fork.

      4. Target: Select the main branch (for example, main or master) in the original (upstream) repository.

    3. Fill out the details.

      1. Complete the MR description, including linked issues and necessary testing details.

      2. Allow commits from project maintainers; the MR author is expected to make the necessary changes to the branch by default.

    4. Submit for review.

      Submit the MR and assign reviewers as advised by your technical account manager, as required.

Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the DX Core docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules