Create a fork and fool around - following your own rules. But if you wish any of your contributions merged into the product's main
prepare a pull request in your own fork and consider:
- No commit can be accepted on our
main
, unless it references a GitHub issue1 in the commit message. - Development branches must be clearly marked which issue they refer to.
- Develompent branches with more than one commit not reachable from
main
will be squashed in to main (so you may as well just squash it yourself) - keep the commit message on branch tip crip! - Development branches must be fast-forward only when merged into our
main
. You can achieve this by always syncing your fork and rebasing your dev branch against ourmain
before you create the pull request. - Coverage on all unittests should be at least the same percentage — or higher, as it was in the commit you branhced out from.
The development environment is designed to be run from the devcontainer defined in the repo. Simply start it up in VS Code and run the container locally in Docker or run it in a GitHub codespace.
The postCreateCommand
will intilize the pipenv to use by running
pipenv sync
This will create the venv
and install the dependncies defined in Pipfile.lock
.
After that, you should do ONE THING manually😱2: In the Command Palette in VC Code search for and select Python: Select interpreter...
. It's likely that you are presented with several options. You should pick the one that specifically mentions (gh-semver*)
in the title.
![](https://private-user-images.githubusercontent.com/155492/401504089-92391bee-ffe4-473e-b83a-900dcac4cf52.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTk2MDUsIm5iZiI6MTczOTM1OTMwNSwicGF0aCI6Ii8xNTU0OTIvNDAxNTA0MDg5LTkyMzkxYmVlLWZmZTQtNDczZS1iODNhLTkwMGRjYWM0Y2Y1Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxMTIxNDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wOWQ5OGI5MjE5N2ZlNzZiMDcxODI4Mjc3N2EyNjg0NTFiMjFiMmE2YjliM2UyMzhjY2NkNGI4ODYzM2QzNDViJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.XLZxSQWV67JJ1lN0VDz5-0S7ZZnS3hLAiATeUdy9Y7o)
test_gh-semver-smoketest.py
test_gh-semver-unittests.py
You should mainly pay attention to the the unittests. Run them. And run them again with coverage. If you wish to contribute to this product you should at least gurantee that coverage is the same or higher when you push to main.
The shell script gh-semver
is not included in the tests, but you can run it from the terminal like this:
./gh-semver
You can also execute the extension as a locally installed gh extension.
To install the extenison locally it's required that you gh is set up right
gh auth status # should say that you are successfull y logged in if not run...
gh auth login -p https -h github.com --web # run gh authl login -h to learn more details
When you are authenticated correctly install is like this:
gh extension install .
gh semver # after the install you can use gh to invoke it. use 'gh extension remove gh-semver' to remvoe it
Note that end-users will install it using the global syntax:
gh extension install lakruzz/gh-semver # it will pull latest version from GitHub
gh extension upgrade gh-semver # 'upgrade' is not supported on extenions installed with the locla syntax
Your feedback - or requst for help - is always welcome: Use the Issues on GitHub to communicate.
Footnotes
-
If there isn't any issue to work on, feel free to create it. The repo is Open Source, and while you don't have access to push to main, you do have access to create new issues. ↩
-
This is not ideal, but I havn't figured out how to add this specific setting to the configuration - please chip in with suggestions if you know how! ↩