Most repositories have a name pattern like this:
open-telemetry/opentelemetry-foo
. The reason to include opentelemetry
in the
name of the repository is to simplify repositories distinction in forks. So when
one will fork the repository - fork's name will still indicate that this
repository is from OpenTelemetry organization.
Documents Community Membership and CONTRIBUTING define how permissions are typically set up for the repository.
- Every repository has three teams associated with it. Typically for the
repository
opentelemetry-foo
they will be namedfoo-triagers
,foo-approvers
, andfoo-maintainers
.foo-maintainers
is a child offoo-approvers
, andfoo-approvers
is a child offoo-triagers
, as it each group always contains a subset of people and defines a larger scope of privileges. - Every member of
foo-maintainers
should be included infoo-approvers
andfoo-triagers
explicitly, with the "Maintainer" GitHub privileges. This allows repository maintainers to invite new approvers and triagers to the team. - The team
foo-triagers
hasTriage
permissions for the repository. If repository is using the Project Boards,foo-triagers
should haveWrite
permissions to have access to the Project Boards. Note, by not adding members offoo-triagers
to CODEOWNERS file, repository restricts triagers from counting a triagers approvals for PRs. See the Policies section that suggest to ensure thatRequire review from Code Owners
is checked. - The team
foo-approvers
hasWrite
permissions for the repository. - The team
foo-maintainers
hasMaintain
permissions for the repository. In individual cases, for example, if this is required to allow maintainers to publish releases independently, the teamfoo-maintainers
can be grantedAdmin
permissions instead. - Root-level
CODEOWNERS
file on the repository should include superset of people from bothfoo-approvers
andfoo-maintainers
.
Typically main
branch is set as default. And protected with the following
policies:
- Enable
Require pull request reviews before merging
setting. Make sureRequire review from Code Owners
is checked. - The default setting for
Required approving reviews
is1
approval. Individual repositores may opt-in for bigger number of required reviews. - Every repo MUST enforce the CNCF
EasyCLA
check under theRequire status checks to pass before merging
section. (if the check isn't showing, have a CLA manager enable the check for the repo). Check with the OpenTelemetry's EasyCLA admins - It is a good practice to check the
Include administrators
setting. - Repository MUST enforce
Restrict who can push to matching branches
setting to only allow the members offoo-maintainers
to push to themain
branch.
It is recommended to follow these best practices:
- Only set "Allow squash merging" for the Merge button. It will ensure clean history for the repository.
- Set up a security scanning tool like, for example, Github CodeQL.
- Set up a test coverage scanning tool like, for example, Codecov.
- Add status badges for passing builds and scans to the root README.
In order to change repository permissions (e.g., for temporary or permanent admin access, adding branch protection rules, or adding a new triagers team), an issue in the community repository needs to be created to keep track of changes. Please use the "Repository Maintenance Request" issue template for such requests. For temporary permission changes, the issue should be kept open until the work is finished and permissions can be reverted again.