11

I maintain several modules on drupal.org. Having spent years doing things "the drupal way" (remember CVS?) I'd like to make my life a bit easier and use GitHub.

While there may be political reasons this could be undesirable, are there any technical reasons? I imagine one-way syncing could be as simple as a cron job that does a fast-forward push from a github repo to the corresponding drupal.org repo.

Is that all there is to it? Are there existing tools to facilitate this?

1
  • I can understand the frustration that leads to this decision...
    – Wtower
    Commented Apr 10, 2015 at 7:20

4 Answers 4

5

Technically, this post on SO covers pushing/pulling from multiple git remotes. In your case, it sounds like you'd set up 2 remotes (git.drupal.org & github.com), pull/push from github.com as needed, then push to git.drupal.org when you're ready to publish updates.

As far as the politics, checkout this thread on g.d.o. It might contain some thoughts/insights from other people who are in the same situation you're in.

2
  • Thanks. This answers everything except for my question about automated syncing.
    – Coleman
    Commented Apr 6, 2015 at 18:14
  • Glad to help. The automation part can be done with cron bash script job (assuming the cron user has the right keys to access your repos), but that really falls outside the scope of Drupal. Plus it's probably already been answered on another SE site.
    – Shawn Conn
    Commented Apr 6, 2015 at 18:23
3

The maintainers of the RESTful module were talking recently about their reasons and experience developing the module entirely on Github:

https://www.lullabot.com/blog/podcasts/drupalizeme-podcast/55-restful-module

(minute 38:32)

Hope it helps,

2

You could consider the http://hubdrop.org/ service

http://thinkdrop.net/blog-entry/february-26-2014-902am/introducing-hubdropio-bridging-gap-between-drupalorg-and-github

2
  • That project appears to be abandoned. At least, the project page hubdrop.io is a dead link.
    – Coleman
    Commented Jun 15, 2015 at 1:00
  • my bad. They've changed their URL to hubdrop.org
    – ryancross
    Commented Jun 15, 2015 at 1:04
1

It makes a lot of sense to use GitHub if you want to publish experimental code. The modules that you'll never plan to publish as a full project.

When you manage a contributed module, everyone is free to participate. Besides, drupal.org has tight integration with git.drupal.org, so you really have to use it.

  • Commit attribution
  • Issue mentions in commit messages fed back to the mentioned issue.
  • Vetting process for new developers.
  • Project release integration (branches and tags).
  • Module security reviews and project ownership transfers.

I do not think it would be better if you move your code over to GitHub and ask others to participate there. Besides, I'm really happy with the version control systems now we have and how they have advanced over time.

However, if you maintain any other Drupal addons, for example, an configuration file for an IDE, a site migration script, proof of concepts, or something like that, I think github would fit better. Also, there is a requirement to publish your code under GPL if you want to use drupal.org git.

I also maintain some modules, and I add github remote handler in addition to the drupal.org one. When you push your code, you can simply push it to GitHub the same way.

3
  • This is pure opinion and doesn't answer the question. Also it's misleading to suggest that git.drupal.org features (attribution, releases, etc) would somehow stop working. Syncing an external repo like github to git.drupal.org has nothing to do with those functions.
    – Coleman
    Commented Apr 6, 2015 at 18:12
  • 2
    So is the question asking for it. Module packaging is a technical reason why you can't move your project to github. Move, I said. You can host your code in multiple repos, and that's very basic point of a distributed VCS that I don't have to explicitly mention to someone who maintain several modules :)
    – AKS
    Commented Apr 6, 2015 at 19:42
  • I understand different people can have different opinions on hosting a project on Github over Drupal.org, but I believe we should focus on the topic here: how to automate it. There are other topics, even linked in some comments here, that discuss the "should I do this" question.
    – pedrorocha
    Commented Nov 21, 2016 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.