A software company would have lots of projects. A developers would be working on a couple of them every day. Company can decide to store the code on their hardware or can use third party services such as
- Github
- Gitlab
- Bitbucket
- AWS CodeCommit and so on
Depending on the size of a project, it would be broken down into subprojects and relevant repositories would be created. One project can have one repository or it can have many repositories.
A repository is an area from where
- a developer would copy existing code and store it on their machine
- improve existing code/add new features and transfer it from their machine to repo on centralized service
As more features are added to a project and committed to a repository/repositories. It becomes more valuable. Just like any other valuable item, we need to make sure who can read/write to our repos on centralized service. This is also referred as Access Control.
In following diagram, there are multiple projects on Centralized Service such as Github or Gitlab. User1, User2 has read/write permissions to some of the projects. UserX is an unknown person. Different services has different ways to specify such permissions/ access control. In case of AWS CodeCommit, permissions to any AWS resources are managed via Identity and Access Management(IAM).
Permissions/Access control helps to manage who can do what to a repository. Once a developer has wrote code, it can be pushed directly to a repository. It’s recommended to get your code reviewed before it’s pushed to a repository. You can decide if you want to setup a code review rule for a repository or all repositories by limiting direct push permissions and setting up a code review process.
In case of CodeCommit, this can be achieved by setting up an Approval Rule template and associate with repository. One can choose various opitions such as
- Who can approve the code?
- Do you want to limit the process to a specific branch ? You can setup a rule that would force approvals only for master branch.
In this blog post, I covered following concepts at a high level
- Code repository
- Permissions to code repository
- Code Review
Side note —
https://youtu.be/KzziRHOa5X4?t=2092 CodeCommit = Git on Simple Storage Service (S3)