Child pages
  • Using Git with Sling
Skip to end of metadata
Go to start of metadata

This page documents decisions we made while finding out how to best work with Git as well and various quality-of-life tips related to Git.

Accepting new contributions

When accepting an external contribution we will import it into the sling-whiteboard repository. Before making a new release, we will move it to its own repository with the release manager also proposing a proper artifact id and therefore repository name.

It is recommended to provide ownership

See also dev@sling - Where do we put new git modules?

Creating new repositories

Git repository creation

When creating new repositories we follow the convention of deriving the repository name from the Maven artifactId. The full logic can be found in the script, but the gist is:

  1. Append sling- to the artifact id if not there ( required by ASF infra conventions )
  2. Replace all dots with dashes ( ASF infra does not allow dots in repository names )

It is recommended to announce the intention on the mailing list, without calling a formal vote, since renaming repositories requires ASF infra manual intervention.

Creating a new repository is done using the web UI at . Please use the module name from the pom file as the repository name.

Update the repo manifest

Regenerate the default.xml manifest form the sling-aggregator repo using  groovy collect-sling-repos.groovy > default.xml .

Boilerplate files

Ensure that at a minimum the repository contains the following files:

  • - brief description of the module
  • LICENSE - the standard Apache-2.0 license file
  • .gitignore

Enroll in Kibble

Add the repository as a source in the Apache Kibble demo instance to make sure development statistics are collected from it.

Creating links to Git commits

To quickly create links to Git commits in JIRA a script such as the one below can be used:
#!/bin/sh -e
if [ $# -eq 0 ]; then
hash=$(git rev-parse --short ${commit})
base=$(git remote get-url origin)
echo "[commit ${hash}|${url}]"
  • No labels