-
Notifications
You must be signed in to change notification settings - Fork 6
docs: add codeowner responsibilities #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ocofaigh
wants to merge
2
commits into
main
Choose a base branch
from
codeowner
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+67
−0
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Code owners | ||
|
|
||
| Every repository in the [terraform-ibm-modules](https://github.com/terraform-ibm-modules/) GitHub organization must have a primary and secondary code owner. | ||
|
|
||
| ## How to add / update repository code owners? | ||
|
|
||
| Code owners for a repository are stored in a file named `.github/CODEOWNERS`. The primary code owner should be listed first, followed by the secondary code owner. Below you will see the required format of the file where `primary-owner` and `secondary-owner` are the GitHub user names of the code owner users: | ||
|
|
||
| ``` | ||
| # Primary owner should be listed first in list of global owners, followed by any secondary owners | ||
| * @primary-owner @secondary-owner | ||
| ``` | ||
|
|
||
| It is also possible to break down the owners per directory. For example: | ||
|
|
||
| ``` | ||
| # Primary owner should be listed first in list of global owners, followed by any secondary owners | ||
| * @primary-owner @secondary-owner | ||
|
|
||
| # Order is important; the last matching pattern takes the most precedence. When someone opens a | ||
| # pull request that only modifies files in the below specified folders, only the listed owners | ||
| # and not the global owners will be requested for a review. | ||
| dev/ @dev-sre-user | ||
| stage/ @stage-sre-user | ||
| prod/ @prod-sre-user | ||
| ``` | ||
|
|
||
| For more information on the GitHub concept around code owners, see [About code owners](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners). | ||
|
|
||
| ## Code owner responsibilities | ||
|
|
||
| The primary code owner is responsible to comply with below list of code owner responsibilities. They should work closely with the secondary code owner and when needed delegate actions to them. The objective is to have a minimum of 2 experts who fully understand the code in the repository at all times. | ||
|
|
||
| ### Pull request reviews | ||
|
|
||
| Code owners are automatically requested for review when someone opens a pull request that modifies code that they own, however it is not mandated that one of the code owners has to approve the pull request for it to be merged. If another core team member has the relevant skills to review the pull request, they can review and approve the pull request (NOTE: Every pull request must be approved by a core team member before it can be merged). It is however the code owners responsibility to ensure they remain up to date with the latest changes that go into a repository. | ||
|
|
||
| #### Renovate pull requests | ||
|
|
||
| Pull requests to keep dependency versions up to date are created by [renovate](renovate.md). It is the code owners responsibility to ensure that if a renovate created pull request fails the pipeline, that some action is taken. Actions could include: | ||
| - Re-running the pipeline if it failed on some transient issues | ||
| - Cloning the code to their own branch and creating a new pull request if a code change is required | ||
|
|
||
| !> **Important**: You should never manually close a renovate created pull request. If the pull request is no longer valid, or has conflicts etc, renovate will automatically close / update the pull request. If you manually close it and do not delete the renovate branch, new renovate pull requests will not be created! | ||
|
|
||
| ?> **Tip**: It is also not recommended to commit directly to a renovate branch. If you do this, renovate will no longer manage the pull request. If this is done by accident, you can check the box in the pull request description that says "If you want to rebase/retry this PR, check this box" and on the next renovate run, it will override any changes you committed and force push a new renovate commit. | ||
|
|
||
| ### Take action on incoming GitHub issues | ||
|
|
||
| It is the code owners responsibility to ensure they are aware of new GitHub issues that may get created in repository, and ensure they are handled appropriately. Actions could include: | ||
| - Identifying an appropriate owner and assigning (for core team owned repositories the issue will be synced internally so ensure the internal issue is assigned, or appropriate labels are added to the issue for someone to pick up from the prioritized backlog). | ||
| - Responding to the creator of the issue to let them know you have seen the issue, and provide any ETA or updates as needed. | ||
|
|
||
| ### Respond to slack queries | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe a side project to add a bot to ping code owner of a module is mentioned/linked |
||
| Actively monitoring consumers slack queries in the `#terraform-ibm-modules` internal slack channel and if they are related to a repository in which you are a code owner for ensure to respond. | ||
|
|
||
| ### Building up skills and keep up to date / current on latest in area | ||
| Be or become a Subject Matter Expert (SME) by building up skills and keeping up to date on latest in the relevant area. This would include working closely with the relevant IBM Cloud teams, attending blueprint talks / playbacks etc in order to be able to participate and drive in defining general functional directions in the area. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Renovate | ||
|
|
||
| An IBM internal [Renovate](https://docs.renovatebot.com/) pipeline is run frequently against the repositories in the [terraform-ibm-modules](https://github.com/terraform-ibm-modules/) GitHub organization which will create pull requests to keep dependency versions at the latest. | ||
|
|
||
| More information coming soon... |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we ever want this? Is it overcomplicating things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use it in internal operations repo since it has so many different projects - but generally no we won't use it in any modules.