From b4a5cabbb3198e67bac8f35e686147818462a531 Mon Sep 17 00:00:00 2001 From: Edwin Kofler Date: Mon, 6 Nov 2023 02:59:31 -0800 Subject: [PATCH] Overhaul CONTRIBUTING document --- CONTRIBUTING.md | 34 +++++++++++++++++++++++++--------- Readme.md | 12 ------------ 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3a03fd685..7b9df91af 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,15 +1,30 @@ -## Your new git-extra command should support +# Contributing -* OSX, Linux, BSD (You may need to browse their man page)* -* Bash 3.2+ (If you aren't sure, see [the Bash changelog](https://www.tldp.org/LDP/abs/html/bash2.html)) -* Git 2.1+ +Thanks for contributing -*If you aren't able to test your new command on a platform, -make that clear in your PR and someone else may be able to test it on their system. +## Supported Platforms -## To submit a new command, you should +Any changes must support the following platforms: -Let's assume your new command is named `foo`. +- macOS, Linux, BSDs (You may need to browse their man page) +- Bash 3.2+ (If you aren't sure, see the [Bash changelog](https://git.savannah.gnu.org/cgit/bash.git/tree/NEWS?h=devel) to see a detailed list of version support for features) +- Git 2.1+ + +If you aren't able to test your new command on a platform, make that clear in your PR; someone else may be able to test it on their system. + +## Testing + +We now have a testing suite. Run it with `make test`. + +It uses the following dependencies (same or later versions): + +- `python==3.10` +- `pytest==7.4.0` +- `GitPython==3.1.36` + +## Adding a New Command + +Let's say you wish to add a new command. Assuming your new command is named `foo`: 1. Write a bash script under `./bin` called `git-foo`. The script should be started with `#!/usr/bin/env bash`. 2. Read `./man/Readme.md` and write documentation for `git-foo`. @@ -17,6 +32,7 @@ Let's assume your new command is named `foo`. 4. Update `./etc/git-extras-completion.zsh`. Just follow existing code. 5. (Optional) Update `./etc/bash_completion.sh`. 6. (Optional) Update `./etc/git-extras.fish`. -7. Run `./check_integrity.sh foo` to check if all done. +7. (Optional) Add a test under `./tests`. +8. Run `./check_integrity.sh foo` to check if all done. You are welcome to open up an issue to discuss new commands or features before opening a pull request. diff --git a/Readme.md b/Readme.md index 21d864411..885499a5c 100644 --- a/Readme.md +++ b/Readme.md @@ -18,18 +18,6 @@ Go to the [Commands](Commands.md) page for basic usage and examples. __GIT utilities__ -- repo summary, repl, changelog population, author commit percentages and more -## Test - -Nowaday the continues integrations test is coming and you can access it via the `make test` easily. - -The CI depends on - -* `python==3.10` -* `pytest==7.4.0` -* `GitPython==3.1.36` - -So the version or higher is recommended. - ## Contributing Interested in contributing? Awesome!