Automatically creating patches for Drupal Modules using CI

Automatically creating patches for Drupal Modules using CI

Wednesday, Apr 3, 2019
Anyone who has maintained open-source software has probably felt the burnout or challenge of maintaining software around their day job. Wouldn’t it be great if you could use CI to get some merge/pull requests against your projects when the coding standards that you are following are updated? If the answer is yes then look no further. Drupal Coding Standard Patch Generation phpcs-drupal: image: willhallonline/drupal-phpcs:alpine allow_failure: yes script: - phpcs ./ phpcbf-drupal: image: willhallonline/drupal-phpcs:alpine allow_failure: yes script: - set +e - phpcbf ./ - git status - git -c user.name='Will Hall' -c user.email='incoming+willhallonline/[email protected]' commit -am "Coding Standards Formatting" - git diff origin/$CI_COMMIT_REF_NAME > $CI_COMMIT_SHA.patch artifacts: paths: - $CI_COMMIT_SHA.patch expire_in: 1 week The process of this is rather simple: ...

Read more