Bitbucket - branch permission policy
Scope
Currently applicable on the below branches.
- ori-communication-service
- brand-files
- chatbot-2.0
- chatbot-dashboard-2.0
- chatbot-dashboard
- scheduler
- user_management
- email-communication-services
Pre-Requisites
Need to have a branch naming convention for each repository as, as permission can only be applied on a specific name/pattern.
- ori-communication-service
- Main | Development:
product-testFinal1 - Brand specific(current):
brand-name_product-testFinal1 - Brand specific:
brand-name-environment-master
- Main | Development:
- brand-files
- Development:
brand-name-dev - UAT:
brand-name-uat - Production:
brand-name-prod
- Development:
- chatbot-2.0
- Development:
brand-name-development-master - UAT:
brand-name-uat-master - Production:
brand-name-production-master
- Development:
- chatbot-dashboard-2.0
- Development:
brand-name-development-master - UAT:
brand-name-uat-master - Production:
brand-name-production-master
- Development:
- chatbot-dashboard
- Development:
brand-name-development-master - UAT:
brand-name-uat-master - Production:
brand-name-production-master
- Development:
- scheduler
- Development/Production :
agent-routing
- Development/Production :
- user_management
- Development/Production :
master
- Development/Production :
- email-communication-services
- Development:
brand-name-development-master - UAT:
brand-name-uat-master - Production:
brand-name-production-master
- Development:
Branch Permissions
A branch permission policy will be majorly divided in five parts:
- Ability to directly push code to the branch.
- This is required to create new branches for the patterns on which the policy will be applied.
- Ability to merge via pull requests.
- Defined minimum approvals required to allow a pull request to be merged w.r.t. 2nd point.
- Defined minimum default approvals required to allow a pull request to be merged w.r.t. 2nd point.
- Default reviewers for a repository, who's approval will also count towards the defined minimum default approvals required.
- These users will always be added as reviewers on a PR.
- Ability to delete a branch.
Furthermore, access groups will be classified using the standard linux permission model.
- Owner(s): The owner of the repository. This will be Anurag in most cases. The user(s) who solely manage a particular repository can also be included as owners. For example: Vivek for chatbot-2.0 and chatbot-dashboard-2.0
- Group(s): See below
- Other(s): All other users
Groups
Administrators:
- Members: Anurag, Nipun.
- Access: Admin all repositories and all over bitbucket Admin.
DevOps:
- Members: Nipun, Manjeet
- Access:
- Read/Write: brand-files, ori-communication-service, scheduler, user_management, chatbot-dashboard, chatbot-dashboard-2.0, chatbot-2.0, KnowledgeBase, accessManagement
Leads:
- Members: Tanuj, Shivansh, Luv, Vivek, Palash, Saddam, Ajay, Nipun, Shivanshu, Harshit
- Access:
- Read/Write: brand-files, ori-communication-service, scheduler, user_management, chatbot-dashboard, chatbot-dashboard-2.0, chatbot-2.0, chatbot-message-types, email-dashboard, chatbot, KnowledgeBase
Frontend:
- Members: All FE team members.
- Access:
- Write: chatbot-dashboard, chatbot-dashboard-2.0, chatbot-2.0, chatbot-message-types, email-dashboard, chatbot, KnowledgeBase
- Read: N/A
Backend:
- Members: All BE team members.
- Access:
- Write: brand-files, ori-communication-service, scheduler, user_management, KnowledgeBase
- Read: chatbot-dashboard, chatbot-dashboard-2.0, chatbot-2.0, chatbot-message-types
AI:
- Members: All AI team members.
- Access:
- Write: AI_Repo,Centralised_training_Module,Clustering System,Email_Bot,ai_system,KnowldgeBase,ai_system_backend,centralised-faq-training,ori-agent-assist,saas-orimon-nlp-service
- Read: AI_Repo,Centralised_training_Module,Clustering System,Email_Bot,ai_system,KnowldgeBase,ai_system_backend,centralised-faq-training,ori-agent-assist,saas-orimon-nlp-service
autorytr:
- autorytr-frontend
- Members: Resources working on project.
- Access:
- Write: autorytr-frontend
- Read: autorytr-frontend
- autorytr-backend
- Members: Resources working on project.
- Access:
- Write: autorytr-backend
- Read: autorytr-backend
- autorytr-frontend
orimon:
orimon-read
- Members: Resources working on project.
- Access:
- Write: aas-analytics-service,saas-bot-service,saas-brain-service,saas-channel-connector-service,saas-chatbot-orimon,saas-dashboard,saas-dashboard-connector-service,saas-dashboard-orimon,saas-iam-service,saas-livechat-service,saas-orimon-comon-helpers
- Read: saas-analytics-service,saas-bot-service,saas-brain-service,saas-channel-connector-service,saas-chatbot-orimon,saas-dashboard,saas-dashboard-connector-service,saas-dashboard-orimon,saas-iam-service,saas-livechat-service,saas-orimon-comon-helpers
orimon-Write
- Members: Resources working on project.
- Access:
- Write: aas-analytics-service,saas-bot-service,saas-brain-service,saas-channel-connector-service,saas-chatbot-orimon,saas-dashboard,saas-dashboard-connector-service,saas-dashboard-orimon,saas-iam-service,saas-livechat-service,saas-orimon-comon-helpers
- Read: saas-analytics-service,saas-bot-service,saas-brain-service,saas-channel-connector-service,saas-chatbot-orimon,saas-dashboard,saas-dashboard-connector-service,saas-dashboard-orimon,saas-iam-service,saas-livechat-service,saas-orimon-comon-helpers
orimon-leads
- Members: Leads working on project.
- Access:
- Write: aas-analytics-service,saas-bot-service,saas-brain-service,saas-channel-connector-service,saas-chatbot-orimon,saas-dashboard,saas-dashboard-connector-service,saas-dashboard-orimon,saas-iam-service,saas-livechat-service,saas-orimon-comon-helpers
- Read:
Delivery:
- Members: All Delivery team members.
- Access:
- Write: brand-files,KnowledgeBase
- Read: chatbot-dashboard, chatbot-dashboard-2.0, chatbot-2.0,ori-communication-service, scheduler, user_management
Brand-name_team:
- Members: Resources working on a particular assigned brand/project.
- Access: All members will also be subscribed to the Backend group and thus will inherit all permissions.
- Write: Inherited(Backend)
- Read: brand-files + Inherited(Backend)
Branching Model
- Single branch named
masteris deployed for all brands. Here and after referred to as the main branch for this repository. - Permissions will be applied to the
masterbranch name/pattern. - Owner(s):
- Anurag
- Group(s):
- Leads
- Backend
- Single branch named
- Single branch named
agent_routingis deployed for all brands. Here and after referred to as the main branch for this repository. - Permissions will be applied to the 'agent_routing' branch name/pattern.
- Owner(s):
- Anurag
- Group(s):
- Leads
- Backend
- Single branch named
- Multiple brand specific branches.
product-testFinal1is the main development branch. - Permissions will be applied to
*_product-testFinal1pattern. Going forward all product branches will have to be created keeping this naming convention in mind. - Other than this, for existing branches permissions will be added on all existing branches:
- ocs-prod
- ocs-uat
- tatasky_product-testFinal1
- apparel_product-testFinal1
- Ikea_product-testFinal1
- Dish_product-testFinal1
- vi-neo-prod
- vi-neo-dev
- These branches along with the pattern mentioned in second point, will be referred to as main branches for this repository.
- Owner(s):
- Anurag
- Group(s):
- Leads
- Backend
- Multiple brand specific branches.
- Brand and environment specific branches. ‘master’ is the main branch.
- Permissions will be applied to patterns:
brand-name-uatbrand-name-prod
- Owner(s):
- Anurag
- Group(s):
- Leads
- Brand-name_team
- Multiple brand specific branches. ‘vil-development-master’ is currently the main development branch.
- Permissions will be applied patterns:
*-development-master*-uat-master*-production-master- Going forward all product branches will have to be created keeping this naming convention in mind.
- Owner(s):
- Anurag
- Group(s):
- Leads
- Backend
Policy
Based on above branch permissions we can have the following policies:
user_management/scheduler
- Direct push to main branch:
none - Merge via pull requests
- Group(s):
Backend, Leads
- Group(s):
- Minimum approvals required:
2 - Minimum approvals required by default reviewers:
1 - Default reviewers:
- User(s):
Luv, Ajay, Tanuj, Shivansh, Anurag, Shivanshu, Harshit.
- User(s):
- Ability to delete the main branch: none
- Direct push to main branch:
ori-communication-service
- Direct push to main branches:
- Groups(s):
DevOps
- Groups(s):
- Merge via pull requests:
- Group(s):
Backend, Leads
- Group(s):
- Minimum approvals required:
1 - Minimum approvals required by default reviewers:
1 - Default reviewers:
- User(s):
Luv, Ajay, Tanuj, Shivansh, Anurag, Shivanshu, Harshit.
- User(s):
- Ability to delete the main branches:
none
- Direct push to main branches:
brand-files
- Direct push to main branches will be based on environment:
- Dev:
N/A - Uat/Prod:
- Groups(s):
DevOps
- Groups(s):
- Dev:
- Merge via pull requests:
- Group(s):
brand-name_team, Leads
- Group(s):
- Minimum approvals required:
1 - Minimum approvals required by default reviewers:
0 - Default reviewers:
N/A - Ability to delete the main branches:
none
- Direct push to main branches will be based on environment:
email-communication-services
- Direct push to main branches:
- Dev:
- Users(s):
Harshit
- Users(s):
- Uat/Prod:
- Groups(s):
DevOps
- Groups(s):
- Dev:
- Merge via pull requests:
- Group(s):
Backend, Leads
- Group(s):
- Minimum approvals required:
1 - Minimum approvals required by default reviewers:
1 - Default reviewers:
- User(s):
Harshit
- User(s):
- Ability to delete the main branches:
none
- Direct push to main branches: