Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated PR merge docs

...

Maintaining a linear history in git is preferred, especially for small contributions. To that end, we should always rebase + merge commits on GitHub instead of merging them ( which creates a merge commit ). Each commit should be buildable and correct by itself, as much as possible. Therefore, when asking contributors for revisions to small contributions (1 commit)  we should ask them to amend the  and force-push the commit so that they do not create multiple artificial commits. This is beneficial when reviewing history for changes and also when running git bisect .   Unfortunately it is not possible to rebase + squash + merge using the GitHub UI, so we need to either ask the contributors to amend + force-push, or to perform these operations locally.

In practice, we have found that:

  • for contributions which require no additional fixes we should use the 'Rebase and merge' workflow
  • for contributions which require fixes
    • in case of a single logical commit we should use the 'Squash and merge' workflow to create a single commit. This creates a fast-forward merge, so no merge commit.
    • in case of multiple separate commits we should ask the reviewer to amend the original commits with the fixes and force-push the branch that is the source of the PR
  • using the 'merge' button for PRs should be the exception

It is also important to maintain the original author of the pull request, giving them credit for their contribution. This is also useful when compiling various contribution metrics, e.g. in Kibble.

...

  • README.md - brief description of the module
  • LICENSE - the standard Apache-2.0 license file (available in the sling-aggregator repo)
  • CODE_OF_CONDUCT.md - reference to the Apache Software Foundation code of conduct (available in the sling-aggregator repo)
  • CONTRIBUTING.md - reference to the Apache Sling contribution guidelines (available in the sling-aggregator repo)
  • Jenkinsfile - delegates to the Apache Sling Pipeline library ( example available in all repos, for instance see the Jenkinsfile for the sling-org-apache-sling-api repository )
  • .gitignore
  • .asf.yaml for Github metadata, see git Git - .asf.yaml features
    • tags: include initially sling  and java  (or other programming language, as applicable )
    • homepage: module documentation on Sling website, or the Sling homepage if none exists
    • description: the name from the pom.xml 

...