From 2d3c82141bbbd6c56d1da2e02454dbd15034a51d Mon Sep 17 00:00:00 2001 From: Bogdan Rosianu Date: Fri, 21 Oct 2022 15:56:09 +0300 Subject: [PATCH 1/3] change contributing and pr template --- .github/CONTRIBUTING.md | 35 +++++++++++++++++++++++++++----- .github/PULL_REQUEST_TEMPLATE.md | 9 +++++++- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c431b8b8c35..f53fdbbcbeb 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -3,15 +3,20 @@ If you are unfamiliar with the workflow of contributing to github, you can refer to this [this article](https://github.com/firstcontributions/first-contributions/blob/master/README.md) -## Fork & clone this repository +## External contributions -The development should happen in a personal fork, cloned on the local machine. +If you are not part of the team and want to contribute to this repository, you must fork & clone this repository -## Use development branch +The development should happen in a personal fork, cloned on the local machine. Make sure you use signed commits before opening +a pull request. -External contributions should happen against the `development` branch. +For external contributors, the PRs should be targeted towards the `master` branch. A team responsible will instruct +the PR owner to re-target it against another branch, in accordance to internal branches management. -Other branches may be used by the team members in accordance to internal decisions. +tl;dr: +- fork `elrond-go` and use `master` branch +- use signed commits +- open a PR against `ElrondNetwork/elrond-go`'s `master` branch ## Use linter @@ -44,3 +49,23 @@ Although the nominal use case looks good, the linter runs without issues, as wel Depending on the PR type, there are multiple ways of manual testing the new code: - if it only affects an API, a log, or something not critical, one could sync a node with new code on Testnet or Devnet and see if everything works good. - if the changes would affect the entire network (consensus, processing, and so on), a local testnet should be started. Also, make sure backwards compatibility is maintained. + +## Branches management + +Internal Branches/Releases Management (to be checked by both the code owner and the reviewers) + +### `elrond-go` +If the PR is: +1. a hotfix: it will be targeted towards `master` branch. +2. a feature: + 2.1. a small feature (a single PR is needed): targeted towards an `rc` branch. + 2.2. a big feature (more than one PR is needed): create a feature branch (`feat/...`) that is targeted towards an `rc` branch. + +### Satellite projects (`elrond-vm-common`, `elrond-go-core`, and so on) +If the PR is: +1. a hotfix: it will be targeted towards `master`/`main` branch. +2. a feature: + 2.1. a small feature (a single PR is needed): targeted towards an `rc` branch and create a new tag&release after merging, and reference it in `elrond-go` (if needed). + 2.2. a big feature: + 2.2.1. a small satellite PR: targeted towards an `rc` branch. For each change, reference just the commit hash on `elrond-go` and create a tag&pre-release when the `elrond-go` PR is to be merged. + 2.2.2. a big satellite PR: create a feature branch (`feat/...`) targeted towards an `rc` branch. For each change, reference just the commit hash on `elrond-go` and create a tag&pre-release when the `feat` branch is merged diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2bad3c860d5..112c1dc3f96 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,4 @@ -## Description of the reasoning behind the pull request (what feature was missing / how the problem was manifesting itself / what was the motive behind the refactoring) +## Reasoning behind the pull request - - - @@ -12,3 +12,10 @@ - - - + +## Pre-requisites + +Based on the [Contributing Guidelines](https://github.com/ElrondNetwork/elrond-go/blob/master/.github/CONTRIBUTING.md#branches-management) the PR author and the reviewers must check the following requirements are met: +- was the PR targeted to the correct branch? +- if this is a larger feature that probably needs more than one PR, is there a `feat` branch created? +- if this is a `feat` branch merging, do all sattelites projects have a proper tag inside `go.mod`? From 557b57cf54063ee4269353619d092892684dc9f1 Mon Sep 17 00:00:00 2001 From: Bogdan Rosianu Date: Fri, 21 Oct 2022 16:26:55 +0300 Subject: [PATCH 2/3] fixes after review --- .github/CONTRIBUTING.md | 11 +++++------ .github/PULL_REQUEST_TEMPLATE.md | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index f53fdbbcbeb..0323f2a4d9b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -7,16 +7,15 @@ If you are unfamiliar with the workflow of contributing to github, you can refer If you are not part of the team and want to contribute to this repository, you must fork & clone this repository -The development should happen in a personal fork, cloned on the local machine. Make sure you use signed commits before opening -a pull request. +The development should happen in a personal fork, cloned on the local machine. **Make sure you use signed commits before opening** a pull request. For external contributors, the PRs should be targeted towards the `master` branch. A team responsible will instruct the PR owner to re-target it against another branch, in accordance to internal branches management. -tl;dr: -- fork `elrond-go` and use `master` branch -- use signed commits -- open a PR against `ElrondNetwork/elrond-go`'s `master` branch +**tl;dr**: +- fork `elrond-go` and use `master` branch. +- use signed commits. [docs](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits). +- open a PR against the `master` branch of `ElrondNetwork/elrond-go`. ## Use linter diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 112c1dc3f96..f499a858e4d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,7 +3,7 @@ - - -## Proposed Changes +## Proposed changes - - - @@ -15,7 +15,7 @@ ## Pre-requisites -Based on the [Contributing Guidelines](https://github.com/ElrondNetwork/elrond-go/blob/master/.github/CONTRIBUTING.md#branches-management) the PR author and the reviewers must check the following requirements are met: +Based on the [Contributing Guidelines](CONTRIBUTING.md#branches-management) the PR author and the reviewers must check the following requirements are met: - was the PR targeted to the correct branch? - if this is a larger feature that probably needs more than one PR, is there a `feat` branch created? -- if this is a `feat` branch merging, do all sattelites projects have a proper tag inside `go.mod`? +- if this is a `feat` branch merging, do all satellites projects have a proper tag inside `go.mod`? From 255707dd997233fa197d5e57a2450491af3013a3 Mon Sep 17 00:00:00 2001 From: Bogdan Rosianu Date: Fri, 21 Oct 2022 16:36:37 +0300 Subject: [PATCH 3/3] small fix --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f499a858e4d..38d32618601 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -18,4 +18,4 @@ Based on the [Contributing Guidelines](CONTRIBUTING.md#branches-management) the PR author and the reviewers must check the following requirements are met: - was the PR targeted to the correct branch? - if this is a larger feature that probably needs more than one PR, is there a `feat` branch created? -- if this is a `feat` branch merging, do all satellites projects have a proper tag inside `go.mod`? +- if this is a `feat` branch merging, do all satellite projects have a proper tag inside `go.mod`?