A golang port of the nodejs git-mob tool,
go-git-mob
assists with managing co-authors when mob programming.
README
·
CHANGELOG
.
CONTRIBUTING
Report Bug
·
Request Feature
Contributions make the open source community an great place to learn, inspire, and create.
Please review this contribution guide to streamline your experience.
Please review existing issues before reporting bug reports or requesting new features.
A quick discussion to coordinate a proposed change before you start can save hours of rework.
The v1.0 - feature parity project board tracks progress through the remaining work in this current release.
-
Make - often comes bundled with C compiler tools
-
- with a working go installation:
go install golang.org/dl/go1.18@latest go1.18 download
- open a terminal with
go1.18
as the linkedgo
binary
- with a working go installation:
-
ruby 3.0.2
- this project uses ruby and cucumber/aruba for integration tests and includes a
.ruby-version
file which specifies the supported/required version of ruby - use a ruby version manager like rbenv or asdf; or
- install directly from ruby-lang.org
- this project uses ruby and cucumber/aruba for integration tests and includes a
-
Clone your fork
git clone https://github.com/your-github-name/go-git-mob.git
This repository includes a doctor.sh
script which validates development dependencies.
- Verify dependencies
./.tools/doctor.sh
This script attempts to fix basic issues, for example by running go get
or bundle install
.
If doctor.sh
reports an issue that it can't resolve you may need to help it by taking action.
Please log any issues with the doctor script by reporting a bug.
- Build and run the tests
make cit
- Run from source
go run main.go version go run main.go --help
make install
This target builds the app and copies it into your GOPATH and makes it executable from any terminal which includes GOPATH in its path.
To install you can run either
make uninstall
or
git mob implode
This repository includes a Makefile
for help running common tasks.
Run make
with no arguments to list the available targets:
$ make
go-git-mob 0.0.0 - available targets:
build-all build for all platforms
build build for current platform
changelog Generate/update CHANGELOG.md
clean clean build output
deploy-local deploy binaries locally (for testing)
deploy deploy binaries
doctor run .tools/doctor.sh to sort out development dependencies
gen invoke go generate
install build and install locally into GOPATH
test run tests
version show current version
---------- ------------------
release-major release major version
release-minor release minor version
release-patch release patch version
This project follows a standard open source fork/pull-request workflow:
-
Create your Feature Branch
git checkout -b 123-amazing-feature
-
Commit your Changes
git commit -m 'Add some AmazingFeature'
-
Make sure the code builds and all tests pass
make cit
-
Push to the Branch
git push origin 123-amazing-feature
-
Open a Pull Request
https://github.com/davidalpert/go-git-mob/compare/123-amazing-feature
When working on a pull request to address or resolve a Github issue, prefix the branch name with the Github issue number.
In the preceding example, after picking up an issue with an id of 123, create a branch which starts with GH-123
or just 123-
and a hyphenated description:
git checkout -b 123-amazing-feature
This project uses conventional commits to generate CHANGELOG.
Format of a conventional commit:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
List of supported commit type tags include:
- "build" # Changes that affect the build system or external dependencies
- "ci" # Changes to our CI configuration files and scripts
- "docs" # Documentation only changes
- "feat" # A new feature
- "fix" # A bug fix
- "perf" # A code change that improves performance
- "refactor" # A code change that neither fixes a bug nor adds a feature
- "test" # Adding missing tests or correcting existing tests
Prefix your commits with one of these type tags to automatically include the commit description in the CHANGELOG for the next release.
This project includes integration tests written in gherkin, a domain-specific language designed to specify given-when-then style specifications.
These specs live in the ./features/git-mob
folder:
Scenario: start mob with one coauthor
Given I cd to "example"
When I run git mob `ad`
Then the output should contain:
"""
Jane Doe <jane@example.com>
Amy Doe <amy@findmypast.com>
"""
This project uses the ruby cucumber implementation and the cucumber/aruba gem which provides step definitions to manipulate files and run command-line applications.
To enable git-mob
's debug logs set the following environment variables:
Given I set the environment variables to:
| variable | value |
| GITMOB_LOG_LEVEL | debug |
| GITMOB_LOG_FILE | .git/mob.log |
Show the log later with a step like:
And I successfully run `cat .git/mob.log`
This project includes several useful domain-specific step definitions, including:
Then the most recent commit log should contain:
"""
empty mobbed commit
Co-Authored-By: Amy Doe <amy@findmypast.com>
"""
That step uses git log -1 --format=full
to read the formatted log message of
the previous git commit (at HEAD~1
) and compare it to the provided string.
When feature specs using this step misbehave, decorate your features or scenarios with following custom announcer to print the full log message to STDOUT while running the tests:
@announce-gitmob-log