pvarki / python-rasenmaeher-api

1 stars 0 forks source link

Disable direct commits to main/master branch #11

Closed aarne33 closed 1 year ago

aarne33 commented 1 year ago

Pre-commit-check fails while merging pull request into the main branch saying: https://github.com/pvarki/python-rasenmaeher-api/actions/runs/5143990180/jobs/9259703190 ...

don't commit to branch.......................................................Failed
- hook id: no-commit-to-branch
- exit code: 1

Two potential changes:

  1. disable the direct commits/pushes into the main branch
  2. .github/workflows/main.yml to run only on "pull request" (i.e. remove "push")
Aciid commented 1 year ago

This is a wide issue that touches base on all projects created with org best-pratices.

Suggest opening this to https://github.com/pvarki/markdown-pvarki-best_practises too. Regarding file https://github.com/pvarki/markdown-pvarki-best_practises/blob/main/.pre-commit-config.yaml

Then use the proposed solution when comfortable as an example when drafting CI / testing best-pratices documentation on how to solve automation related issues.

Cheers

rambo commented 1 year ago

Branch protection rules are set up for main.