Configuring your Git repository
In this section, we will see how to properly protect our Git repository by doing the following:
- Setting the code owners of our smart contract
- Protecting the master branch
- Configuring Git for commit signing and validation
- Testing the process by submitting a pull request
Setting the code owners of our smart contract
We will start by defining the code owners for our smart contract.
Ideally, in a large consortium, the code owners should not be the same group as the one that modifies the code. Remember, these steps are meant to reinforce the trust in the network.
Code owners are defined in a file called CODEOWNERS
, which can reside either in the root directory or the .Github
directory. GitHub allows us to define different code owners depending on file patterns, so while we could get very creative, we will focus on a few artifacts from our Hyperledger composer project:
package.json
: As it controls the build and packaging process, this represents a key file to control.header...