INCATools / INCATools/ontology-access-kit
Protect main branch
- Dominant language
- Python
- Stars
- 198
- Forks
- 35
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 1
Description
Once we set up code quality assurance in #119, it goes completely out the window if it's ever consistently enforced. GitHub has a tool that lets you "protect" a branch from direct commits that forces all code to go through a pull request before it's merged. Here are the following settings that would be appropriate for this project:
1. All commits to the main branch must be done through a pull request
2. CI commands must pass to enable merging a pull request (i.e., testing job and linting job, for now)
3. Even repository administrators have to follow the rules
4. Related #121 helps group related commits together based on the PR itself - i.e., we don't need stuff like "fixed typo" in the commit history
We don't necessarily need to enforce any rules about review for PRs, for now it's totally fine to make a PR then directly merge it.
Instructions on how to set this up: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule
Contributor guide
Research direction
Start with the GitHub branch protection documentation linked in the issue and the repository's main branch settings. Configure pull-request-only changes, require the testing and linting CI checks, and include administrators; done means direct commits are blocked and a pull request cannot merge until those checks pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github
- Domain
- ci-cd, devops
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100