From 7f74f3c02a52720ea420400e8bcc4a3888e27c15 Mon Sep 17 00:00:00 2001 From: Ashish Chandra Date: Tue, 2 Jul 2024 19:50:52 -0500 Subject: [PATCH] Initial commit for public repo standards --- .gitignore | 1 + changelog.md | 26 ++++++++++ code_of_conduct.md | 125 +++++++++++++++++++++++++++++++++++++++++++++ contributing.md | 93 +++++++++++++++++++++++++++++++++ release_process.md | 71 +++++++++++++++++++++++++ 5 files changed, 316 insertions(+) create mode 100644 changelog.md create mode 100644 code_of_conduct.md create mode 100644 contributing.md create mode 100644 release_process.md diff --git a/.gitignore b/.gitignore index 432c291..61d3434 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ release/ .vscode/ .DS_Store build/ +tmp/ diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..8d58a29 --- /dev/null +++ b/changelog.md @@ -0,0 +1,26 @@ +# Changelog + +## Unreleased + +### Features + + +### Changes + +### Fixes + +## `v0.1.5` Current Stable Release + +### Changes + +- Add bash to docker image by @emanuelconunaemme in [PR-7](#7) +- Push multi-platform docker image by @emanuelconunaemme in [PR-8](#8) +- Fix hardcoded version in the build command by @rkollar in [PR-9](#9) +- Enable ledger by default in Makefile by @lukitsbrian in [PR-10](#10) + +## `v0.1.4` +## `v0.1.3` +## `v0.1.2` +## `v0.1.1` + +Initial release. diff --git a/code_of_conduct.md b/code_of_conduct.md new file mode 100644 index 0000000..a84738d --- /dev/null +++ b/code_of_conduct.md @@ -0,0 +1,125 @@ +# Contributor Covenant Code of Conduct + +## Our pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct that could reasonably be considered inappropriate in a + professional setting + +## Enforcement responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting by using an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Report instances of abusive, harassing, or otherwise unacceptable behavior to the community leaders responsible for +enforcement at +. + +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement guidelines + +Community leaders will follow these community impact guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This restriction +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary ban + +**Community impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent ban + +**Community impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from +the [Contributor Covenant](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html). + +Community impact guidelines are inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +See the [FAQ](https://www.contributor-covenant.org/faq) for answers to common questions about this code of +conduct. [Translations](https://www.contributor-covenant.org/translations) are also available. diff --git a/contributing.md b/contributing.md new file mode 100644 index 0000000..0ffef38 --- /dev/null +++ b/contributing.md @@ -0,0 +1,93 @@ +# Contributing guidelines + +- [Contributing guidelines](#contributing-guidelines) + - [Providing Feedback](#providing-feedback) + - [Opening pull requests (PRs)](#opening-pull-requests-prs) + - [Choose a good PR title](#choose-a-good-pr-title) + - [Review your own code](#review-your-own-code) + - [Do not rebase commits in your branch](#do-not-rebase-commits-in-your-branch) + - [Contributing to documentation](#contributing-to-documentation) + - [Ask for help](#ask-for-help) + - [Prioritizing issues with milestones](#prioritizing-issues-with-milestones) + +Before you create a new PR on the Saga Security Chain repo, make sure that you read and comply with this document. + +To prepare for success, see [installing Saga Security Chain](https://github.com/sagaxyz/ssc/blob/main/readme.md). + +Thank you for your contribution! + +## Providing Feedback + +* Before you open an issue, do a web search, and check + for [existing open and closed GitHub Issues](https://github.com/sagaxyz/ssc/issues) to see if your question has already + been asked and answered. If you find a relevant topic, you can comment on that issue. + +* To provide feedback or ask a question, create a [GitHub issue](https://github.com/sagaxyz/ssc/issues/new). Be + sure to provide the relevant information, case study, or informative links as suggested by the Pull Request template. + + +## Opening pull requests (PRs) + +Review the issues and discussions before you open a PR. + +### Choose a good PR title + +Avoid long names in your PR titles. Make sure your title has fewer than 60 characters. + +Follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0) guidelines and keywords to find the best +title. + +Use parentheses to identify the package or feature that you worked on. For example: `feat(services/chain)` +, `fix(scaffolding)`, `docs(migration)`. + +### Review your own code + +Make sure that you manually tested the changes you're introducing before creating a PR or pushing another commit. + +Monitor your PR to make sure that all CI checks pass and the PR shows **All checks have passed** (the checkmark is +green). + +### Do not rebase commits in your branch + +Avoid rebasing after you open your PRs to reviews. Instead, add more commits to your PR. It's OK to do force pushes if +the PR is still in draft mode and was never opened to reviews before. + +A reviewer likes to see a linear commit history while reviewing. If you tend to force push from an older commit, a +reviewer might lose track in your recent changes and will have to start reviewing from scratch. + +Don't worry about adding too many commits. The commits are squashed into a single commit while merging. Your PR title is +used as the commit message. + +## Contributing to documentation + +When you open a PR for the SSC codebase, you must also update the relevant documentation. For changes to: + +* [Saga Docs](https://docs.saga.xyz/) ensure you have access to our Github Docs portal ([request access to the docs portal]()) and update the relevant documentation. Then submit a pull request in Github Docs. + +### Ask for help + +If you started a PR but couldn't finish it for whatever reason, don't give up. Instead, just ask for help. Someone else +can take over and assume the ownership. + +## Prioritizing issues with milestones + +Saga Security Chain follows Git Flow for branch +strategy . + +* Each SSC release has a milestone, see [link](). + +* Issues in each milestone have a **priority/high**, **priority/medium**, or **priority/low** label. + + * Select issues to work on for the earliest milestone. For example, select to work on an issue labeled as \*\* + priority/low\*\* in milestone v0.1.0 before you work on an issue labeled as **priority/high** in milestone v0.2.0. + +* Milestone **Next** is applied to issues that suggest adding features, docs, and so on. + + * Issues with the **Next** milestone have a higher priority than other **Issues with no milestone** (no milestone is + assigned). + + * Issues in the **Next** milestone usually have a lower priority than milestones that are associated with a release + version, like **Milestone v0.1.0**. + + +We appreciate your contribution! diff --git a/release_process.md b/release_process.md new file mode 100644 index 0000000..b02420c --- /dev/null +++ b/release_process.md @@ -0,0 +1,71 @@ +# Release Process + +This document outlines the release process for Saga Security Chain. It ensures consistency, quality, and clear communication with users. +Saga uses [semantic versioning](https://semver.org/) to indicate the stability and compatibility of releases. + +## Release Branches + +Releases are tagged from release branches. The release branch is typically named after the release version, such as `release/v1.1.2` or `release/v2.3.5`. The release branch is created from the `main` branch and contains all the changes that will be included in the release. + +## Development Branch + +The `main` branch is the development branch for SSC. All new features and bug fixes are developed on this branch. The `main` branch is typically updated daily or weekly, depending on the amount of development activity. + +## Backporting Features and Bug Fixes + +Features or bug fixes that are ready to be included in a release must be backported from the `main` branch to the release branch. This is done using Mergify, a CI/CD tool that automates the process of backporting changes. Add the `backport release/x.y.z` label to a pull request (PR) to indicate that it should be backported to the release branch. Mergify will automatically backport the PR when it is merged into the `main` branch. + +## All PRs Target Main + +All PRs should target the `main` branch. This ensures that changes are always integrated into the development branch and are ready for backporting. + +## Changelog + +The changelog lists all of the changes that have been made to SSC since the last release. The changelog must be up-to-date before a release is made. + +## Release Preparation and Testing + +Before a release is made, it is important to prepare the release branches and perform thorough testing. +The process differs depending on whether the release is a `MAJOR`, `MINOR`, or `PATCH` release. + +### Major Release + +* Freeze the `main` branch. +* Create a release branch from the `main` branch. + * Update `.github/mergify.yml` to allow backporting changes to the release branch. + * Possibly update CI/CD configuration to support the new release. +* Running all unit tests, integration tests, and manual scenarios. +* Ensuring that the release branch is still compatible with all supported environments. +* Prepare the changelog. + +### Minor and Patch Releases + +* Verifying that all wanted changes have been backported to the release branch. +* Running all unit tests, integration tests, and manual scenarios. +* Ensuring that the release branch is still compatible with all supported environments. +* Prepare the changelog. + +## Release Publication + +Once the release is ready, it can be published to the [releases page](https://github.com/sagaxyz/ssc/releases) on GitHub. This involves tagging the release branch with the release version and creating a release announcement. The release anouncement should contain the changelog of the release. + +```bash +git checkout release/v1.2.4 +git tag v1.2.4 -m "SSC Release v1.2.4 +``` + +## Post-Release Activities + +After a release has been made, it is important to monitor feedback and bug reports to inform subsequent releases. + +This includes updating the `main` branch changelog with the new release. + +In case of a new `MAJOR` release, the release author must also update the `main` branch to the next `MAJOR` version number: rename the `go.mod` and all references to the version number in the codebase. + +## Maintenance Policy + +Only the latest released version of SSC is maintained for new features and bug fixes. Older versions may continue to function, but they will not receive any updates. This ensures that SSC remains stable and reliable for all users. + +Users are encouraged to upgrade to the latest release as soon as possible to benefit from the latest features and security updates. +Saga ensures compatibility for critical Cosmos SDK based commands. +Other commands may change between major releases and may require the user to upgrade their codebase to the Cosmos SDK version SSC is using.