Skip to content
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

Enforce branch policies on the repository #458

Open
4 of 7 tasks
toddysm opened this issue Mar 8, 2023 · 4 comments
Open
4 of 7 tasks

Enforce branch policies on the repository #458

toddysm opened this issue Mar 8, 2023 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@toddysm
Copy link

toddysm commented Mar 8, 2023

To improve the security of the ORAS project we need to enforce the branch policies for this repository. I propose that we enforce the policies as follows:

  • Use the following rules for main and release/* branches:
    • Require PR before merging
      • Require 3 approvals
      • Dismiss stale PR approvals when new commits are pushed
      • Require review from Code Owners
      • Require status checks to pass before merging
      • Require conversation resolution before merging
      • Require signed commits
      • Do not allow bypass the above settings

Please add your comments and proposals for additional changes to this issue.

@TerryHowe
Copy link
Member

TerryHowe commented Mar 8, 2023

If a code owner created the PR, is that one approval? I am assuming only approvals from code owners count.

@toddysm
Copy link
Author

toddysm commented Mar 8, 2023

That is correct @TerryHowe - only codeowners count. And no, this is in addition to the person who submitted the PR as far as I know. We can have a relaxed policy and ask for 2 codeowner approvals only.

@shizhMSFT
Copy link
Contributor

shizhMSFT commented Mar 20, 2023

Few comments:

  • release/* does not apply to libraries. Besides, we have a special branch named v1.
  • "Require 3 approvals" is not applicable to this repository since we only have 2 active code owners.
  • Additionally, we require branches to be up to date before merging, which is useful but not captured in this issue.

It is worth noting that "require branches to be up to date before merging" somehow conflicts with "dismiss stale PR approvals when new commits are pushed".

@shizhMSFT shizhMSFT added the help wanted Extra attention is needed label Mar 20, 2023
@toddysm
Copy link
Author

toddysm commented Mar 20, 2023

I am confused with that you mean with "release doesn't apply to libraries". Is this about the branch name of is it because we do not "release" libraries? Also, it will be good to be consistent with the branch names across all ORAS projects. Also, see some comments from oras-project/oras#862 (comment) they apply here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Status: In Progress
Development

No branches or pull requests

3 participants