Contribution Guidelines - Janssen Documentation (original) (raw)

Contributing to Janssen Project#

Purpose of this guide is to provide necessary information and resources to community in order to make successful contribution to the Janssen Project.

There are many ways you can contribute. Of course you can contribute code. But we also need people to write documentation and guides, to help us with testing, to answer questions on the forums and chat, to review PR's, to help us with devops and CI/CD, to provide feedback on usability, and to promote the project through outreach. Also, by sharing metrics with us, we can gain valuable insights into how the software performs in the wild.

First Time Contributors#

In case you are first-time contributor, then you can start with our good first issues list These are issues where you can easily contribute and community members will guide and support your contribution as always.

If you need Janssen installation to test out your fix, here are the steps.

We are really glad you are reading this, because we need volunteer developers to help this project come to fruition.

Code of Conduct#

Janssen project has aCode of Conductto which all contributors must adhere, please read it before interacting with the repository or the community in any way.

About Issues#

There are four kinds of issues you can open:

The best way to get involved in the project is through issues, you can help in many ways:

Triaging#

Triage is a process of evaluating issues and PRs in order to determine their characteristics and take quick actions if possible.

When you triage an issue, you:

Here is how we continously triage new issues and PRs so that contributors can contribute faster and better.

Code Conventions and Guidelines#

Commits#

Janssen Project mandates all commits to follow guidelines as below.

As commit convention, we adopt Conventional Commits v1.0.0, we have an history of commits that do not adopt the convention but any new commit must follow it to be eligible for merge.

Branches#

Branch name should have component name as prefix, eg jans-core-mybranch

PRs#

Issues#

Backport changes to a different version#

Backport changes are now supported through a workflow through labels prefixed with backport/. For-example to backport changes in a certain PR to version v1.0.0 a label to that PR matching the version must be added i.e backport/v1.0.0. The flow consists of creating a new branch, cherry-picking the changes of the original PR and creating a new PR to merge them.

The Janssen Project uses Apache-2.0 license. Any existing or new code file has to start with the license header as shown below:

`/*

If the developers sign a CLA(Contributor License Agreement) they can retain the copyright. Once the CLA has been signed, contributions can be accepted from the contributor with the License header as below. Make sure to replace [github-username] with contributor's GitHub username:

`/*

Signing the CLA

The current version of CLA can be foundhere. This is just for your reference. This same CLA will be signed digitally by following the steps below:

  1. The contributor sends an e-mail (legal@jans.io) expressing willingness to contribute and sign the CLA. In the email, mention your GitHub account username from which the contributions will be made. If contributions will be made on behalf of an organization, then along with the GitHub username, mention the job title and organization's name in the email.
  2. Contributor receives an email with CLA and instructions on how to sign digitally. Follow the instructions and complete the signing process.

Project Maturity Stages#

Graduated

Incubating

Experimental

Demo

Sunsetting

Contributing to the documentation#

Great documentation is a reflection of software's maturity and the great community that stands behind it. Contributing to the Janssen Project documentation is the easiest way to learn about the Janssen Project and to get involved in the community process.

In order to ensure consistency of style, language, format, and terminology across all documents, please follow the guidelines below:

Glossary of terms#

This glossary helps to keep terms and their meanings consistent across documentation.

Documentation Style Guide#

Janssen Project documentation uses Markdown. Guidelines below are intended to bring consistency in writing and formatting documents.

Testing

Janssen Project documentation site is published using MkDocs. Markdown parsers used by GitHub and the one used by MkDocs may have slight variations in how they generate HTML. So, for a small number of cases, document may look different between GitHub and Janssen Project documentation site. Hence it is critical to test documentation changes locally before pushing to repository. This will ensure that final HTML rendering of documents by MkDocs is as desired.

Document Title#

The document title summarises what the document aims to achieve and at the same time, it plays a critical role in making the document easy to find via search. Below are a few guidelines to write good titles for documents.

Document Tags#

Janssen Project documentation uses tags to make the search more accurate and add context to search results. Following are guidelines and examples to follow while adding tags to a document.

Example:

Let's look at how to add tags to a document that is located on documentation site at path Administration -> Installation -> VM installation. Also, assume that the document describes the steps to install Janssen Project on the Ubuntu platform. Tags below would be recommended:

`--- tags: - administration - installation - vm - ubuntu

`

Referencing Janssen Project Release in Documents#

We often need to reference release numbers in the documentation. For example, Ubuntu package installation guide. In this guide, the following command is documented:

wget https://github.com/JanssenProject/jans/releases/download/v1.1.4/jans_1.1.4.ubuntu20.04_amd64.deb -P /tmp

Above command contains references to the release number at two places. v1.1.4 in the URL and 1.1.4 as part of the file name. There are many such places throughout the documentation when release numbers need to be mentioned. Whenever we make a new release, these numbers need to change as they point to the latest release number. This becomes a manual task.

To avoid this manual, error-prone approach the Janssen Project uses a release marker, replace-janssen-version instead of writing actual release numbers in the head(latest) documentation branch. So, when there is a need to mention the release number, instead of writing the actual release number, use the release marker. Let's see how to document the above command (at the head version) so that it stays up-to-date release after release.

wget https://github.com/JanssenProject/jans/releases/download/vreplace-janssen-version/jans_replace-janssen-version.ubuntu20.04_amd64.deb -P /tmp

Warning

General Text#

Page Setup#

Lists#

  1. This is the second item
  2. This is the third item
    It will look like this: 1. This is the first item
  3. This is the second item
  4. This is the third item
    `
  1. The following list item
    `

It will look like this:

  1. This is the first item in a list There are four spaces to start this line Another four spaces here This keeps all text inside the list, before starting...
  2. The following list item

Other formatting considerations

    ```
    This is code  
    This is also code.
    ```
1. This is the second item  

It will look like this:

  1. This is the first item
    This is code This is also code.
  2. This is the second item

Headings#

Code Formatting#

Examples & Navigation#

It will look like this:

Navigate to Configuration > Authentication and click the Passport tab

Linking#

We recommend using relative linking syntax when linking to other artifacts in repository. Linking to a page within the same repo use this format: [text for the link](../where/the/link/goes.md)

Service Commands

The Janssen Server supports many different Operating Systems (e.g. Ubuntu, SUSE etc.). Service commands can vary. Rather than "hard coding" service commands into documentation, please instead reference the dedicated documentation page for Service Commands.

In documenting a process that involves a service restart, the Service Command documentation is linked:

`` ## Add the attribute to MySQL

The word Restart is simply linked to the dedicated doc for Service Commands.

Tables#

text |This |Is |A |Table | |--------|-------|------|---------| |1 |2 |3 |4 | |Word |Code |Text |Table |

It looks like this:

This Is A Table
1 2 3 4
Word Code Text Table

Help On Technical Writing#

It is essential for everyone in the community to actively participate in the documentation. At the same time, not everyone is formally trained or experienced in writing technical documents. To help everyone understand the basics of good technical writing, we have listed a few resources below. Going through these resources will not take a lot of time and will help in writing better technical documents.

Contribution Workflow#

Find something to work on#

Best place to find something to work on is to look at currently open issues. If you are a first time contributor then starting with list of good first issues is best.

Start a discussion#

Start a GitHub Discussion about what you are planning to contribute. Explain the feature or issue that you are planning to contribute and what your proposed solution or implementation approach is. Janssen is a community-driven project and it's helpful to get the community's view about it.

Create an issue#

Take your time to write a proper issue including a good summary and description. Outcome of GitHub discussion about your contribution can help you create good content for the issue. As a first step when creating a new issue, an issue template has to be selected. Select appropriate issue template and it'll help you create an issue with right content.

Remember that issue may be the first thing a reviewer of your PR will look at to get an idea of what you are proposing. It will also be used by the community in the future to find about what new features and enhancements are included in new releases.

Implement the change#

All contributions to Janssen Project should be made via GitHub pull requests (PR).

New to PR workflow?? Learn and practice it at first-contributions

Create a Fork#

Fork Janssen repository. And create a clone.

Implement the Change#

Start working on changes as required.

Document#

Raise a PR#

Follow Through#

Once the PR is raised, wait for reviewers to start review. Reviewers will start review at the first opportunity available. If you want to draw attention, give a gentle reminder in PR comments. But please be patient.

Follow activities on your PR closely till the time PR is merged. PR reviewer may want to suggest a change or may need to ask a question to get more clarity. Make sure you are actively collaborating. Once Reviewer has completed the review and approved the changes, the PR will be merged.

That's it!! Congratulations on successful contribution. 🥳 🤟