# ==================================================================================
# ==================================================================================
#                                Deriv CODEOWNERS
# ==================================================================================
# ==================================================================================
#
#  Configuration of code ownership and review approvals for the deriv-com/deriv-app repo.
#
#  More info: https://help.github.com/articles/about-codeowners/
#


# ================================================
#  General rules / philosophy
# ================================================
#
#  - we trust that people do the right thing and not approve changes they don't feel confident reviewing
#  - we use github teams so that we funnel code reviews to the most appropriate reviewer, this is why the team structure is fine-grained
#  - we enforce that only approved PRs get merged to ensure that unreviewed code doesn't get accidentally merged
#  - we delegate approval rights as much as possible so that we can scale better
#  - each group must have at least one person, but several people are preferable to avoid a single point of failure issues
#
#  Configuration nuances:
#
#  - This configuration works in conjunction with the protected branch settings that require all changes to be made via pull requests with at least one approval.
#  - This approval can come from an appropriate codeowner, or any repo collaborator (person with write access) if the PR is authored by a codeowner.
#  - Each codeowners team must have write access to the repo, otherwise their reviews won't count.
#
#  In the case of emergency, the repo administrators can bypass this requirement.



# ================================================
#  GitHub username registry
#  (just to make this file easier to understand)
# ================================================

#  ali-hosseini-deriv
#  amina-deriv
#  balakrishna-deriv
#  dan-deriv
#  farrah-deriv
#  habib-deriv
#  heorhi-deriv
#  hirad-deriv
#  jim-deriv
#  likhith-deriv
#  matin-deriv
#  nada-deriv
#  nijil-deriv
#  sandeep-deriv
#  shafin-deriv
#  vinu-deriv
#  wojciech-deriv
#  yashim-deriv
#  farabi-deriv
#  maryia-matskevich-deriv
#  shahzaib-deriv
#  rupato-deriv
#  akmal-deriv

######################################################################################################
#
# CODEOWNERS rules
# -----------------
#
# All the following rules are applied in the order specified in this file.
# The last rule that matches wins!
#
# See https://git-scm.com/docs/gitignore#_pattern_format for pattern syntax docs.
#
######################################################################################################


# ==============================================================
#  Default Owners
# (in case no pattern matches a path in a PR - this should be treated as a bug and result in adding the path to CODEOWNERS)
# ==============================================================

*                                                               @ali-hosseini-deriv @dan-deriv @matin-deriv @wojciech-deriv @yashim-deriv 


# ==============================================================
#  deriv-app/account
# ==============================================================

/packages/account/**/*                                          @ali-hosseini-deriv @amina-deriv @likhith-deriv @matin-deriv 


# ==============================================================
#  deriv-app/appstore
# ==============================================================

/packages/appstore/**/*                                         @ali-hosseini-deriv @amina-deriv @balakrishna-deriv @farrah-deriv @habib-deriv @matin-deriv @nijil-deriv @sandeep-deriv @wojciech-deriv @yashim-deriv 


# ==============================================================
#  deriv-app/bot
# ==============================================================

/packages/bot-skeleton/**/*                                     @sandeep-deriv @shafin-deriv @wojciech-deriv
/packages/bot-web-ui/**/*                                       @sandeep-deriv @shafin-deriv @wojciech-deriv
/packages/indicators/**/*                                       @sandeep-deriv @shafin-deriv @wojciech-deriv


# ==============================================================
#  deriv-app/cashier
# ==============================================================

/packages/cashier/**/*                                          @heorhi-deriv @nijil-deriv @wojciech-deriv 


# ==============================================================
#  deriv-app/cfd
# ==============================================================

/packages/cfd/**/*                                              @ali-hosseini-deriv @habib-deriv @hirad-deriv


# ==============================================================
#  deriv-app/core
# ==============================================================

/packages/core/**/*                                             @ali-hosseini-deriv @amina-deriv @balakrishna-deriv @farrah-deriv @habib-deriv @matin-deriv @nijil-deriv @sandeep-deriv @wojciech-deriv @yashim-deriv 
/packages/shared/**/*                                           @ali-hosseini-deriv @amina-deriv @balakrishna-deriv @farrah-deriv @habib-deriv @matin-deriv @nijil-deriv @sandeep-deriv @wojciech-deriv @yashim-deriv 
/packages/components/**/*                                       @ali-hosseini-deriv @amina-deriv @balakrishna-deriv @farrah-deriv @habib-deriv @matin-deriv @nijil-deriv @sandeep-deriv @wojciech-deriv @yashim-deriv 
/packages/translations/**/*                                     @ali-hosseini-deriv @amina-deriv @balakrishna-deriv @farrah-deriv @habib-deriv @matin-deriv @nijil-deriv @sandeep-deriv @wojciech-deriv @yashim-deriv @heorhi-deriv @jim-deriv @vinu-deriv @nada-deriv @hirad-deriv @farabi-deriv @likhith-deriv @maryia-matskevich-deriv @shahzaib-deriv @rupato-deriv @akmal-deriv
/packages/utils/**/*                                            @ali-hosseini-deriv @amina-deriv @balakrishna-deriv @farrah-deriv @habib-deriv @matin-deriv @nijil-deriv @sandeep-deriv @wojciech-deriv @yashim-deriv 
/packages/hooks/**/*                                            @ali-hosseini-deriv @amina-deriv @balakrishna-deriv @farrah-deriv @habib-deriv @matin-deriv @nijil-deriv @sandeep-deriv @wojciech-deriv @yashim-deriv 
/packages/stores/**/*                                           @ali-hosseini-deriv @amina-deriv @balakrishna-deriv @farrah-deriv @habib-deriv @matin-deriv @nijil-deriv @sandeep-deriv @wojciech-deriv @yashim-deriv 


# ==============================================================
#  deriv-app/p2p
# ==============================================================

/packages/p2p/**/*                                              @ali-hosseini-deriv @farrah-deriv @matin-deriv @nada-deriv


# ==============================================================
#  deriv-app/publisher
# ==============================================================

/packages/publisher/**/*                                        @ali-hosseini-deriv @wojciech-deriv 


# ==============================================================
#  deriv-app/reports
# ==============================================================

/packages/reports/**/*                                          @heorhi-deriv @nijil-deriv @vinu-deriv @wojciech-deriv 


# ==============================================================
#  deriv-app/trader
# ==============================================================

/packages/trader/**/*                                           @nijil-deriv @vinu-deriv @wojciech-deriv 


# ==============================================================
#  deriv-app/wallets
# ==============================================================

/packages/wallets/**/*                                          @heorhi-deriv @jim-deriv @nijil-deriv @wojciech-deriv 


# ==============================================================
#  deriv-app/api
#  Deprecated - do not use. For -v2 projects use api-v2. For old projects - do not use api nor api-v2, use old patterns / old hooks. 
# ==============================================================

/packages/api/**/*                                              @ali-hosseini-deriv @wojciech-deriv

# ==============================================================
#  deriv-app/api-v2
# ==============================================================

/packages/api-v2/**/*                                           @ali-hosseini-deriv @amina-deriv @balakrishna-deriv @farrah-deriv @habib-deriv @matin-deriv @nijil-deriv @sandeep-deriv @wojciech-deriv @yashim-deriv 

# ==============================================================
#  scripts/check-imports.js 
# ==============================================================

/scripts/check-imports.js                                       @ali-hosseini-deriv @matin-deriv @wojciech-deriv @yashim-deriv