Contributing to SIMP

  1. Fork the project on GitHub.

  2. Make a new feature branch for your changes.
    • Suggestion: name the branch after the issue (e.g., 'SIMP-999')

  3. Make your changes!
    • SIMP contributions should observe the Puppet Language Style Guide's conventions where feasible.
    • Contributions should ideally include relevant spec and/or acceptance tests.
  4. Save your changes in a single commit.
    •  Use the following commit message conventions:

      (SIMP-999) Fix the broken thing [50 chars max]

      Discussion about the fix (if needed) [each line: 72 chars max]

      SIMP-998 #comment Comment on a related issue [72 chars max]
      SIMP-999 #close
    • The commit message should be the following format:

      • First line: 
        • Start with the Issue name in parentheses [e.g., "(SIMP-999)"], followed by a summary of the change.
        • No longer than 50 characters
        • Followed by a line of white space.
      • Subsequent lines:
        • Each line should be no longer than 72 characters.
      • Issue references:
        • JIRA Issues can be referenced at the end of the commit message.
        • It is recommended to only use the commands #comment and #close.
        • Avoid #resolve and #time as it will not update JIRA until after the issue is merged.

  5. Push your changes up to your forked repo on GitHub.
  6. Create a pull request ("PR") on GitHub using your new branch
    • The pull request should contain a single new commit.
      • Use git rebase -i to squash commits (use git rebase -i HEAD~n to go back n commits)

  7. Travis-CI will notice the pull request and run CI tests
    • Travis-CI will run tests based on the .travis.yml file in the repository's top-level directory
    • Travis-CI results can be seen in the PR on GitHub and are posted to the simp-project's HipChat channel

  8. After passing Travis-CI tests, the GitHub pull request must be picked up in GerritHub for code review.
    • NOTE: Currently, this is a manual process and requires a project administrator.

  9. Pull requests are code reviewed on GerritHub.
    • If you need to update an existing pull request, amend the pull request's commit using the following commands:
      • git add or delete (this stages the build with the relevant changes; add --all will add all the new changes, otherwise add or delete to tailor your changeset)

      • git commit --amend (this amends the previous commit)

        NOTE: The final line of the amended commit message must include the Gerrit review's Change-ID (example: "Change-Id: Ie536768505a1baff45d6ad3ae4de9e7501ffb53c")

      • git push --force (this sends back to master)
    • If you prefer to amend your change in Gerrithub, you can use the git-review package to make submitting patch sets easier.
      • Install the git-review package
      • Add the remote: git remote add gerrit <url>
      • Run: git-review -r gerrit

  10. After the GerritHub review is approved, the changes will be automatically merged into the original GitHub repository.