Drumbeat/Website/Hacking

From MozillaWiki
Jump to: navigation, search
Draft-template-image.png THIS PAGE IS A WORKING DRAFT Pencil-emoji U270F-gray.png
The page may be difficult to navigate, and some information on its subject might be incomplete and/or evolving rapidly.
If you have any questions or ideas, please add them as a new topic on the discussion page.


Once you have a local copy of drumbeat.org installed, you will want to pick a bug to work on (if you don't have one in mind already).

Process

  • Pick a bug (or file one - all changes need an associated bug)
  • Work on it
  • Create a patch
  • Test it
  • Attach it to the bug, where it will be reviewed
  • Respond to review comments, perhaps with another patch
  • Check your patch in, or add the "checkin-needed" keyword if you don't have SVN access
  • When the patch is checked in, mark the bug RESOLVED FIXED, adding a comment giving the commit revision/URL
  • Get the patch pushed to staging, and retest it there
  • Get the 'production' tag moved to a revision which includes the patch
  • When you have seen the change pushed to production and working, mark the bug VERIFIED FIXED

Bugs

Do's and Don'ts

  • Follow the Drupal coding standards
  • Always comment your code.
    • Function definition blocks at the least
    • Inline comments for complex code, use your best judgement
  • Don't embed HTML code in module files.
    • Define templates and keep presentation separate from logic code.
  • Don't touch the Drupal core.
  • Don't touch the Drupal core. (Yes, it's worth repeating!)

SVN Access

If you have SVN access, there are some additional things you need to know.

When checking in, please follow standard Mozilla procedure:

  • Make sure you have attached a copy of the patch to the bug (if your change doesn't have a bug associated with it, it should have)
  • When writing checkin comments:
    • Always include the bug number
    • Always include a description of what you changed and why
    • Include the names of your reviewer(s), if any
  • Paste the checkin output into the bug comment when you mark the bug RESOLVED

A good checkin comment looks like this:

Bug 125643 - removed code in foo_bar module which displays "the admin is an
idiot" in the header on the 13th of every month. r=gerv.

Do not move the 'production' tag without the consent of mhaggerty.

Fixing Drupal Itself

We are trying to avoid forking Drupal. So, if the bug fixes a problem with a contributed module on drupal.org then create a patch and submit to the module maintainer for review, via its project page on drupal.org. As soon as the patch is accepted and the module updated on drupal.org then update the bug on mozilla.org with the name of the module and the tag attached to the new release so that the module can be updated on Drumbeat.