Skip to content

Contribute to Drupal - Presentation 29/05/2023 #5

@theodorosploumis

Description

@theodorosploumis

Contribute to Drupal.

Types of contribution

Projects anatomy on Drupal.org

  • Explore a project anatomy (example: scrollbar)
  • Sandbox project
  • Best practices (code linting - drupal coder, local instance, easy to follow documentation)

Project issues: General

  • anatomy
  • search
  • status
  • GitLab issue forks
  • GitLab merge requests

Project issues: Testing patches

  • drupalci
  • gitlab-ci
  • Tugboat live previews

Project issues: credits

Generate patches

  • GitLab Web IDE
  • git

Apply patches - propose code changes

See https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupal

  • git (on custom module)
git clone XXX
cd XXX
...
git diff > [description]-[issue-number]-[comment-number].patch
  • composer (with a remote patch)
composer require cweagans/composer-patches
// composer.json
"extra": {
  "patches": {
    "drupal/homebox": {
      "Drupal 9 compatibility for Homebox, https://dgo.to/3146462": "https://www.drupal.org/files/issues/2020-06-05/3146462-2.patch"
    }
  }
}

OR using the Merge Request diff:

// composer.json
"extra": {
  "patches": {
    "drupal/homebox": {
      "Drupal 9 compatibility for Homebox, https://dgo.to/3146462": "https://git.drupalcode.org/project/homebox/-/merge_requests/2.diff"
    }
  }
}
// composer.json
{
  "repositories": {
    "drupal": {
      "type": "composer",
      "url": "https://packages.drupal.org/8",
      "exclude": [
        "drupal/homebox"
      ]
    },
    "drupal/homebox": {
      "type": "git",
      "url": "[email protected]:issue/homebox-3146462.git",
      "reference": "3146462-drupal-9-compatibility"
    }
  }
}

Publish a new module

  • How to publish (process)
  • What about Customer permission and code licenses?
  • Code on GitHub
  • How to make a module generic

Ideas for contributions

  • Integrations (eg Mautic, Matomo, Moodle etc)
  • Migration plugins (source, process)
  • EU Webtools JS widgets (there are none on D.O.)
  • Patches on Distributions (social, opigno etc)
  • Special modules (eg Word to PDF, Soft Onbarding, Personalization etc)

Useful tools

See also

Tools used for this presentation

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