Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Many edX tools and scripts depend upon consistency in Git commit messages
    • Many tools including GitHub assume the presence of a short title
    • Release scripts and others can extract the ticket numbers to include in a list of commits
    • JIRA links tickets to any commits that include that ticket's number
      • e.g. 
        Jira Legacy
        serverJIRA (openedx.atlassian.net)
        serverId13fd1930-5608-3aac-a5dd-21b934d3a4b4
        keyLEARNER-1696
  • We follow the 50/72 rule for writing commit messages
    • The first line of a commit message should be a title in 50 characters or less.
    • Further comments should be paragraphs wrapped to 72 characters
    • Include the JIRA ticket number on its own line to be picked up by scripts
  • Example commit message:
    • https://github.com/edx/edx-platform/commit/978e9fe656bb249237ba1ceea0ebec1aa0b06fa7

      No Format
      Fix inline discussions to use cached static assets
      
      In production environments, the DiscussionXBlock was generating CSS and
      JS asset URLs that pointed to the unminified versions of those bundled
      assets. Due to our nginx rules, this would cause the assets to be
      served without the long expiration times, forcing the user's browser to
      constantly refetch these assets while browsing a course.
      
      PERF-431


  • Here are a few blog posts that explain the rationale behind these rules:

...