-
Notifications
You must be signed in to change notification settings - Fork 1
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
Setup github action to enforce branch naming conventions #26
Comments
Thanks for making an issue of this, I meant to earlier. As an update, I've watched some guides/tutorials and made some notes but haven't started building this action. Just to confirm, what is the exact branch naming convention? In terms of format (min/max length, pattern, etc) and vocabulary |
Thanks for the update. For now I have put the naming conventions along with other standards we should follow (open to modification) front and center on the albertasat github page. We should probably create a seperate repo for rule for contributing later. |
Took me a lot longer than I thought, but here is the yaml file with bash script that seems to work for enforcing our branch naming convention on my own private test repo:
How should I go about integrating this with the AlbertaSat repo (I'm assuming just the ex3_simulated_subsystems first)? How do you want me to test it thoroughly first? It's performed as expected on the few test cases I used and it has very simple logic but it's good to get into a testing workflow |
Apologies for the delayed response. I have used the ACT tool in the past to verify yaml github actions scripts locally in the past, to ensure they are behaving as expected without having a bunch of commits to a repo to test. See here: https://github.com/nektos/act I think making a PR with a branch that just includes the yaml file in a .github/workflows/ directory would be the cleanest way to integrate it into each of our repos. |
Hello, just dropping my .02. I think simply having a Git pre-commit hook should be enough for enforcing this, they're all run by Git bash so it would also work on Windows. https://itnext.io/using-git-hooks-to-enforce-branch-naming-policy-ffd81fa01e5e Yes, someone can simply override it but... why |
Desc: Setup a github action (yaml script) to fail a PR with main if the branch is not named in the standard accepted convention.
Acceptance Criteria:
The text was updated successfully, but these errors were encountered: