Skip to content

Commit 7522d29

Browse files
authored
close #283 refresh and improve documentation (#287)
* close #283 refresh and improve documentation
1 parent 6be3a5d commit 7522d29

File tree

8 files changed

+673
-338
lines changed

8 files changed

+673
-338
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11

22
## How to Contribute
33

4-
Hi. We are thrilled that you are interested in Contributing to this project. Good contributions keep this project great!
5-
This document outlines how you should contribute and helps make it easier to get your contributions accepted.
6-
7-
8-
Coding guidelines [effective go](https://golang.org/doc/effective_go.html)
4+
Hi. We are thrilled that you are interested in Contributing to this project. Good contributions keep this project great! This document outlines how you should contribute hopefully that would make it easier to get your contributions accepted.
95

106
### Getting started
11-
- clone the repository
12-
- read godocs and guidelines for writing gocode
7+
- read godocs and guidelines for writing go code
8+
- set up the project
139
- run the project and get to know it
14-
- `work on` an issue in a feature branch, then `deliver` your branch and make it available for review.
10+
- create a pull request
11+
12+
Coding guidelines [effective go](https://golang.org/doc/effective_go.html)
1513

1614
## Workflow options
17-
In general, this project runs according to the workflow described in Praqma's blogpost [A pragmatic workflow](http://www.praqma.com/stories/a-pragmatic-workflow/). We call this workflow and branching model "The Phlow".
15+
In general, this project runs according to the workflow described in Praqmas blogpost [git-phlow](https://www.praqma.com/stories/git-phlow/).
1816

1917
The super short summary of this workflow is:
2018
- create a feature branch for your issue. E.g. feature/42-some-issue-title
@@ -38,38 +36,24 @@ When you have the project up and running, check our [github issues](https://gith
3836

3937
Even though this is still a small fledgeling project, we want to make it easily accessibly to contribute, whether you are an experienced go-lang and git expert or not.
4038

41-
Some issues are labelled with `Difficulty - easy`. This label indicates that we believe the issue is of a nature where people unfamiliar with the project, unexperienced in go-lang or programming in general or just new to contributing to open source repositories, can easily get started. We might not be there quite yet, be will will try to go that extra mile in providing better descriptions and clear scopes for these issues.
39+
Some issues are labelled with `help wanted` or `good first issue`. This label indicates that we believe the issue is of a nature where people unfamiliar with the project, unexperienced in golang or programming in general or just new to contributing to open source repositories, can easily get started. We might not be there quite yet, be will will try to go that extra mile in providing better descriptions and clear scopes for these issues.
4240

43-
Please note: If you do consider yourself the target audience for these *Easy* issues, be awesome and pick some of the slightly harder tasks. It is tempting to quickly grab and complete the easy ones, but this quickly leaves no obvious tasks for newcomers to tackle.
41+
Please note: If you do not consider yourself the target audience for these *Easy* issues, be awesome and pick some of the slightly harder tasks. It is tempting to quickly grab and complete the easy ones, but this quickly leaves no obvious tasks for newcomers to tackle.
4442

4543
Another way that you can help, if you are more experienced in specific areas, is to help **groom** the *Easy* tasks, to make them even easier. Suggest how a given problem might be solved, where in the code base a given bug might probably be found, or mention in the issue that you are willing to provide specific guidance. Any help in grooming the larger issues and splitting them up into beginner friendly chunks is also greatly appreciated.
4644

4745
Most of the people so far involved with the project are all pretty new to Go. If you know little of git or extensions, but are well versed in Go, please keep your eyes open on ongoing issues and offer help where you can. Contributions to an open source project are absolutely not only about getting a code contribution merged. Helping others contribute, writing documentation, grooming tasks, triaging reported bugs and so on are all very valuable contributions and will be greatly appreciated.
4846

47+
If you haven't written go code before, we recommend to take the [go tour](https://tour.golang.org/welcome/1); it will provide great insight in the go programming language. As a reference we recommend [gobyexample](https://gobyexample.com/)
4948

50-
To understand the-phlow read praqmas great story about what is is and how it works.
51-
it will you understand what git-phlow is and what we are building
52-
[read me, please!](http://www.praqma.com/stories/a-pragmatic-workflow/)
53-
54-
If you haven't written go code before, I recommend to take the [go tour](https://tour.golang.org/welcome/1); it will provide great insight in the go programming language. As a reference i recommend [gobyexample](https://gobyexample.com/)
55-
56-
**Project dependencies**
49+
### Configure the shell for git-phlow
5750

58-
The project uses other frameworks and libraries, it is recommend to read about them to get an understanding of what they do, provide and how to use them.
51+
Download the latest release for your platform and install it. Follow the [installation guide](/docs/installation.md)
5952

60-
[Cobra](https://github.com/spf13/cobra) is both a library and a CLI, and is the library we use in our CLI. Cobra itself has a CLI, which sets up boiler plate cmd's in the cmd folder. use it by typing `cobra add <name of cmd>`
61-
62-
[GoConvey](https://github.com/smartystreets/goconvey) is the testing framework we use for unit tests, it provides and BDD expressions in your tests, like the nodejs [mocha](https://mochajs.org/) test framework
63-
64-
### Get you shell configured for the-phlow
65-
66-
**Get the latest release**
67-
Download the latest release for your platform and install it. You can follow the guidelines on the README page.
68-
69-
### Get the project set up on your machine
53+
### Setting up the project
7054

7155
Go to [get golang](https://golang.org/doc/install) and get the latest version and install it on your machine.
72-
it should be available on `brew` aswell.
56+
it should be available on `brew` aswell, running `brew install go`
7357

7458
Next you need to setup your shell for go development, this is also documented on go' website. Export GOPATH and GOBIN, in your shell config,
7559
eg. `zshrc`if you are using zsh.
@@ -80,32 +64,30 @@ export GOBIN=$GOPATH/bin
8064
export PATH=$PATH:$GOBIN
8165
```
8266

83-
Next up is getting our project. Use go's own tool `go get` or clone the repository into your GOPATH under, src/github.com/praqma/
67+
Next up is getting our project. Clone the repository into your GOPATH under, src/github.com/praqma/
8468
```bash
85-
go get -v github.com/praqma/git-phlow #downloads the project to you gopath
86-
87-
#go to the project folder /src/github.com/praqma/git-phlow and enter following command
69+
git clone [email protected]:Praqma/git-phlow.git
8870

71+
#resolve dependencies
8972
go get -d -t -v ./... #resolves all dependencies
9073
```
9174
### Running tests
9275
Go has a great toolset for running rests. As a standard go runs the test from the current directory you are in, if you want to run tests from subdirectories or just all tests, run:
9376

94-
`go test -v -p 1 ./... # -p 1 makes sure to run test in one thread. Important for the project test fixture`
77+
`ginkgo -r -v --trace`
9578

9679
For specific directories, run:
9780

98-
`go test /folder`
81+
`ginkgo` inside a folder
9982

10083

10184
### Building
102-
To build binaries go also comes with a pre installed tool, `go build`
10385

10486
To build and drop a binary in the root directory of your project, run:
10587

10688
`go build #Build and adds a binary to the root of the project`
10789

108-
To install the binary in the bin folder in your GOPATH, you can run a different command.
90+
To install the binary in the `bin` folder in your GOPATH, you can run a different command.
10991

11092
`go install`
11193

@@ -143,8 +125,6 @@ fly -t <target> trigger-job --job git-phlow/takeoff
143125
```
144126
145127
146-
147-
148128
### Tools
149129
IntelliJ has a [plugin](http://go-ide.com) for go development - I personally use this (groenborg)
150130

README.md

Lines changed: 22 additions & 168 deletions
Original file line numberDiff line numberDiff line change
@@ -4,193 +4,47 @@ maintainer: groenborg
44

55
# git phlow
66

7-
| tollgate | build | goreport | coveralls | issues |
8-
| ------------- | --- | ----------------- | ----- | ----- |
9-
| ![integration status](https://concourse.bosh.praqma.cloud/api/v1/teams/main/pipelines/git-phlow/jobs/checkin/badge) | ![build status](https://concourse.bosh.praqma.cloud/api/v1/teams/main/pipelines/git-phlow/jobs/takeoff/badge) |[![Go Report Card](https://goreportcard.com/badge/github.com/Praqma/git-phlow)](https://goreportcard.com/report/github.com/Praqma/git-phlow) | [![Coverage Status](https://coveralls.io/repos/github/Praqma/git-phlow/badge.svg?branch=master)](https://coveralls.io/github/Praqma/git-phlow?branch=master) | [![Stories in Ready](https://badge.waffle.io/Praqma/git-phlow.svg?label=ready&title=Ready)](http://waffle.io/Praqma/git-phlow) |
7+
| tollgate | build | goreport | coveralls |
8+
| ------------- | --- | ----------------- | ----- |
9+
| ![integration status](https://concourse.bosh.praqma.cloud/api/v1/teams/main/pipelines/git-phlow/jobs/checkin/badge) | ![build status](https://concourse.bosh.praqma.cloud/api/v1/teams/main/pipelines/git-phlow/jobs/takeoff/badge) |[![Go Report Card](https://goreportcard.com/badge/github.com/Praqma/git-phlow)](https://goreportcard.com/report/github.com/Praqma/git-phlow) | [![Coverage Status](https://coveralls.io/repos/github/Praqma/git-phlow/badge.svg?branch=master)](https://coveralls.io/github/Praqma/git-phlow?branch=master)
1010

11-
12-
git-phlow (pronounced _"git flow"_), is a CLI extension for git, which provides an extra set of commands to easily use our pragmatic workflow called **the phlow**. It provides a branching model which makes collaboration easy. It also provides automatic issue tracking using [GitHub](https://github.com) issues with [Waffle](https://waffle.io/). The branching model uses branches prefixed with `ready` (can be configured) to mark delivered tasks to the remote repository from where automation services can pick up and integrate the changes into the stable branch.
13-
14-
Read about the pragmatic workflow, **the phlow** [here](http://www.praqma.com/stories/a-pragmatic-workflow/).
11+
Git-phlow (pronounced _"git flow"_), is a CLI extension for git, which provides an extra set of commands to easily use our pragmatic workflow by the same name, **g´Git phlow**. It provides a branching model which makes collaboration easy. It also provides automatic issue tracking using [GitHub](https://github.com) issues or Jira.
1512

1613
git-phlows core features include:
1714

1815
- *works with GitHub and waffle*: git-phlow assigns labels to move around user stories on waffle boards, and managing your github issues.
1916

20-
- *branches based on issues*: `workon` creates a branch from a GitHub issues and moves it to "wip"
21-
22-
- *issue tracking*: having all your user stories as waffle cards or GitHub issues, git-phlow will mark them appropriately to their status.
23-
24-
- *build for pretest integration*: `deliver` pushes your branch to GitHub, ready for your pipeline to pull, integrate, test and merge back in.
25-
26-
## Using the phlow (workflow)
27-
To get started using the-phlow, read [praqmas](http://www.praqma.com/stories/a-pragmatic-workflow/) article about how the phlow works, and how to configure Waffle for your projects.
28-
A few things nees to be configured before hand:
29-
30-
- Activate __issues__ on the designated GitHub repository
31-
- Create the __labels__ used by the phlow. Read the article above to find them
32-
- Download and install _git-phlow_ using _brew_ or _wget_
33-
- Start creating tasks in GitHub issues
34-
35-
Read the official documentation [here](/docs/README.md)
36-
37-
## Installing git-phlow (tool)
38-
### Mac
39-
If you have homebrew installed, you can tap our official repository.
40-
41-
```shell
42-
# Tap our repository
43-
brew tap praqma/praqma-tap
44-
45-
# Install git-phlow
46-
brew install git-phlow
47-
48-
# Upgrade to a new version
49-
brew upgrade git-phlow
50-
```
51-
52-
### Linux
53-
Install git-phlow by running the following commands. Remember to use the latest release.
54-
55-
```shell
56-
wget https://github.com/Praqma/git-phlow/releases/download/v3.8.2/git-phlow-3.8.2-linux-amd64.tar.gz && tar -xzf git-phlow-3.8.2-linux-amd64.tar.gz && mv git-phlow /usr/local/bin
57-
```
58-
59-
### Windows
60-
61-
On Windows you have the option of using either using [scoop](http://scoop.sh/) or [Chocolatey](https://chocolatey.org/)
62-
63-
**Install using Scoop**
64-
65-
_First install Scoop if you don't have it and add our scoop-bucket_:
66-
67-
Open powershell and get the latest release of scoop
68-
```
69-
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
70-
```
71-
Add Praqmas scoop-bucket
72-
```
73-
scoop bucket add praqma-tools https://github.com/praqma/scoop-praqma-tools.git
74-
```
75-
76-
_Then install using scoop_:
77-
```
78-
scoop install git-phlow
79-
```
80-
81-
**Install using Chocolatey**
82-
83-
Package is available here, also including installation command: https://chocolatey.org/packages/git-phlow/
84-
85-
You need to have Chocolatey installed, and then just run the following command in powershell:
86-
87-
choco install git-phlow
17+
- *works with jira*: sets assignee and does transition
8818

19+
- *branches based on issues*: create a workspace from an issue to ensure traceability
8920

90-
##### Compatibility
91-
- Powershell v5.1+
92-
- Command prompt - only with the `--no-color` flag
21+
- *fully automatable*: `deliver` your branches, ready for your pipeline to integrate, test and merge
9322

94-
## Updating git-phlow (tool)
95-
### Mac
96-
On Mac using homebrew, run the upgrade command.
97-
98-
```shell
99-
brew upgrade git-phlow
100-
```
101-
### Linux
102-
In linux you run the installation again, but this time override the old `git-phlow` binary.
103-
104-
### Windows
105-
Using either Scoop or Chocolatey you installed from originally run:
106-
```
107-
scoop update git-phlow
108-
```
109-
or
110-
```
111-
choco upgrade git-phlow
112-
```
113-
_Please notice Chocolatey packages can wait on approval for being published, so there might be waiting time for latest version._
114-
115-
## Compatability Matirix
116-
117-
| | support | version |
118-
| -------------- | ------- | ------- |
119-
| GitHub | &#x2714;| v3
120-
| GitHub Premise | &#x2715;| -
121-
| Jira Cloud | &#x2715;| -
122-
| Jira Premise | &#x2714;| 7.3.0
123-
|**macOS** |
124-
| bash | &#x2714;| 3.2.57
125-
| zsh | &#x2714;| 5.4.2
126-
| **windows** |
127-
| [git bash](https://git-for-windows.github.io)| &#x2714;| 4.4.12 |
128-
| powershell | &#x2714;| 5.1.14393 |
129-
| cmd | &#x2714;| 10.0.14393 |
130-
| [cmder](http://cmder.net)| &#x2715; | - |
131-
132-
133-
## Usage
134-
- First time, authenticate to GitHub:
135-
136-
```git
137-
git phlow auth
138-
```
139-
140-
- Look at the issues by using `ghi` or going to GitHub or Waffle
141-
- Find an issue to work on, and note its id e.g. `42`
142-
- Go to the local git repository and type:
143-
144-
```git
145-
git phlow workon 42
146-
```
147-
148-
- This will create a branch: `42-some-issue-title`
149-
- Make the changes and complete the task
150-
- When done, add everything and commit with a single command:
151-
152-
```git
153-
git phlow wrapup
154-
```
155-
156-
- Now that the changes are ready, type:
157-
158-
```git
159-
git phlow deliver
160-
```
161-
162-
- It renames the local branch to: `delivered/42-some-issue-title`
163-
- It pushes remote branch named: `ready/42-some-issue-title`
164-
165-
If the automation tools have been configured to listen for __ready/__ branches, they will pick up the branch and integrate them with the stable branch.
166-
If you do not have an automation system, you can deliver the work to your default branch by doing a local deliver instead.
167-
168-
```git
169-
git phlow deliver --local
170-
```
171-
172-
- Changes branch to `master`
173-
- Merges changes from `42-some-issue-title`
174-
- Pushes changes to GitHub
23+
## Getting started
24+
To read the concepts behind git-phlow read [praqma's article](https://www.praqma.com/stories/git-phlow/) about the workflow.
25+
Consult the [official documentation](/docs/README.md) for information on how to get started using git-phlow
17526

17627
### Automation systems
177-
We use Travis CI, Concourse CI and Jenkins. They can all be configured to follow the phlow and listen for ready branches.
178-
You can see the Concourse pipeline configured for this project [here](https://concourse.bosh.praqma.cloud/teams/main/pipelines/git-phlow)
28+
We use Travis CI, Concourse CI and Jenkins. They can all be configured to follow git phlow. You can see the Concourse pipeline configured for Git-phlow [here](https://concourse.bosh.praqma.cloud/teams/main/pipelines/git-phlow)
17929

18030
### git-phlow on Windows
18131

182-
We recommend running git-phlow using _PowerShell_.
32+
git-phlow works in _PowerShell_ on windows.
18333
There are known issues with _cmd_ rendering formatted text incorrect, and _git bash_'s input being handled incorrectly.
18434

185-
## Project status
186-
This is the official repository for the git-phlow extension. The project is currently under development and many additions are still to come. but version 0.1.5 is available and stable for both linux and Mac.
187-
188-
## Getting started
189-
**Know the phlow, know go**
190-
To understand the-phlow read praqmas great story about what is is and how it works. [read me, please!](http://www.praqma.com/stories/a-pragmatic-workflow/)
35+
### Project status
36+
This is the official repository for the git-phlow extension. The project is currently stable at version 3.8.2 for both windows, macOS and linux.
19137

19238
### Contribution
19339
Contributions are welcome! Please read the [contribution guide](https://github.com/Praqma/git-phlow/blob/master/CONTRIBUTING.md)
19440

41+
42+
### Core Team
43+
| [@groenborg](https://github.com/groenborg) | [@MichaelMadsen](https://github.com/MichaelMadsen)
44+
|---|---|
45+
| [![](https://avatars1.githubusercontent.com/u/5576954?s=100&v=4)](https://github.com/groenborg) | [![](https://avatars3.githubusercontent.com/u/657289?s=100&v=4)](https://github.com/MichaelMadsen)
46+
47+
19548
### CodeScene Analysis
19649
[![](https://codescene.io/projects/1345/status.svg) Get more details at **codescene.io**.](https://codescene.io/projects/1345/jobs/latest-successful/results)
50+

0 commit comments

Comments
 (0)