diff options
author | sils <sils@sils.li> | 2023-04-20 19:43:58 +0200 |
---|---|---|
committer | sils <sils@sils.li> | 2023-04-20 19:43:58 +0200 |
commit | 743f12290d370cfe3e7b59430ea5e2b73709bd79 (patch) | |
tree | b8e6c062dde74e0fd52d278281d01c412fafefda /CONTRIBUTING.md | |
parent | Merge pull request 'server1_develop' (#22) from server1_develop into server1 (diff) | |
parent | Docs(contributing): Add (diff) | |
download | nixos-server-743f12290d370cfe3e7b59430ea5e2b73709bd79.tar.gz nixos-server-743f12290d370cfe3e7b59430ea5e2b73709bd79.zip |
Merge pull request 'server1_build' (#25) from server1_build into server1
Reviewed-on: https://codeberg.org/vhack.eu/nixos-server/pulls/25
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..330cbeb --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# Branches +Following branches are used: +## develop +This contains all upcoming changes for the next pull request to `main`. +All feature branches should merge into this branch. +## feature branches +These branches are created on a per-feature basis and will be merged into `develop`. This merge happens without ci testing and prior review, but a pull request should be opened to trigger a notification. +## main +Changes in this branch trigger an automatic rebuild on the server, so all merges should be peer-reviewed and tested. However, exceptions can be made for changes, which close security vulnerabilities. +The only branch able to be merged into `main` is `develop`. + +# Development process +If adding a new feature you should follow this loose guide: +1. Clone the repository +1. Allow the `.envrc`: `direnv allow` (see [development environment](#development-environment), if you don't know what this does) +1. Checkout your feature branch from develop: `git checkout -b <feature branch name> develop` +1. Actually make the changes +1. Commit them, while following conventional commits (See [their docs](https://www.conventionalcommits.org/en/v1.0.0/) for further guidance) +1. Push your change and open a pull request to `develop`: `git push --set-upstream origin <feature branch name>` + +# Development environment +All required tools should be specified in the `devShells` output of the flake. This is because we use [Direnv](https://github.com/direnv/direnv) in combination with [Nix integration](https://github.com/direnv/direnv/wiki/Nix) — in this case [Nix-direnv](https://github.com/nix-community/nix-direnv) — to enforce reliable development environments (and some uncluttering of PATH). + +Setting it up is rather easy, just see [Nix-direnv's install instructions](https://github.com/nix-community/nix-direnv#installation). |