Skip to content

Commit 275737d

Browse files
authored
292 update docs and cli command documentation (#293)
* updated phlow command documentation * added roadmap * fixed typo in readme
1 parent 7522d29 commit 275737d

27 files changed

+165
-97
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ maintainer: groenborg
88
| ------------- | --- | ----------------- | ----- |
99
| ![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-
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, **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.
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, **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.
1212

1313
git-phlows core features include:
1414

cmd/agent.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ var agentCmd = &cobra.Command{
1616
Long: fmt.Sprintf(`
1717
%s commands are a set of commands available for ci/cd services. They are meant as a way of services to easily be compatible with %s.
1818
19-
These are not meant to used as part of your local workflow.
2019
`, ui.Format.Bold("agent"), ui.Format.Bold("the praqmatic workflow")),
2120
}
2221

cmd/auth.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ package cmd
33
import (
44
"fmt"
55

6+
"github.com/praqma/git-phlow/options"
67
"github.com/praqma/git-phlow/phlow"
78
"github.com/praqma/git-phlow/ui"
89
"github.com/spf13/cobra"
9-
"github.com/praqma/git-phlow/options"
1010
)
1111

1212
//enable command
1313
var authCmd = &cobra.Command{
1414
Use: "auth",
1515
Short: "authenticate with different services",
1616
Long: fmt.Sprintf(`
17-
%s will authenticate to a service specified in your .phlow or .gitconfig files. It will use the default service if no other is specified.
18-
Auth supports two services:
19-
- Jira
20-
- GitHub
17+
%s authorizes git-phlow towards a chosen issue management system like GitHub Issues and Jira.
18+
The auth command uses the .gitconfig file to figure out which service it tries to authorizes against. Support issue management systems right now are:
19+
:: Jira
20+
:: GitHub
2121
`, ui.Format.Bold("auth")),
2222
Run: func(cmd *cobra.Command, args []string) {
2323

cmd/bootstrap.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
package cmd
22

33
import (
4-
"github.com/spf13/cobra"
4+
"fmt"
5+
56
"github.com/praqma/git-phlow/phlow"
7+
"github.com/praqma/git-phlow/ui"
8+
"github.com/spf13/cobra"
69
)
710

811
// bootstrapCmd represents the bootstrap command
912
var bootstrapCmd = &cobra.Command{
1013
Use: "bootstrap",
1114
Short: "creates a .gitconfig file",
12-
Long: `
13-
Creates a new .gitconfig file in your local repository
14-
`,
15+
Long: fmt.Sprintf(`
16+
%s creates a new .gitconfig file in the current directory, with the default values of a git-phlow configuration.
17+
This is a good way to get started with the configuration file.
18+
`, ui.Format.Bold("bootstrap")),
1519
Run: func(cmd *cobra.Command, args []string) {
1620
phlow.Bootstrap()
1721
},

cmd/cleanup.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ var cleanCmd = &cobra.Command{
1515
Use: "cleanup",
1616
Short: "cleanup removes all delivered branches",
1717
Long: fmt.Sprintf(`
18-
%s removes all branches prefixed with 'delivered/'.
19-
It deletes safely by running 'git branch -d'. By default, both local and remote branches are deleted.
18+
%s is for tidying up the git workspace.
19+
As you follow the workflow a lot of branches prefixed with 'delivered/' will be in the workspace, and should just be deleted if they have been successfully integrated.
20+
Running the command will remove these branches locally and remote as well. A local version of this command is available, and will just remove the local branches.
21+
Some branches can not be deleted, because git cannot detect if they have been integrated into the integration branch. That can be due to a rebase or squash. Those can be deleted with the 'force' flag.
2022
`, ui.Format.Bold("cleanup")),
2123
PreRun: func(cmd *cobra.Command, args []string) {
2224
cmdperm.RequiredCurDirRepository()

cmd/config.go

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
11
package cmd
22

33
import (
4+
"fmt"
5+
6+
"github.com/praqma/git-phlow/ui"
47
"github.com/spf13/cobra"
58
)
69

710
// configCmd represents the config command
811
var configCmd = &cobra.Command{
912
Use: "config",
1013
Short: "bootstrap or show configuration",
11-
Long: `
12-
git phlow uses gits own configuration, so all your configurations can be placed everywhere git config can get them.
13-
Best practice is to create a .gitconfig in your repository with your won configurations.
14-
15-
Git phlow comes with internal defaults configured to work natively with github. So you can use git phlow
16-
without any configuration at all. If you want to customize it the default setting create an INI-block
17-
in a local .gitconfig, and make sure all mandatory fields are set.
14+
Long: fmt.Sprintf(`
15+
%s config is the top-level command for showing and creating git-phlow .gitconfig files.
16+
Manipulating the individual key-value pairs is done by using git's build in 'git config'.
1817
19-
To use a local .gitconfig file remember to add it to the config path, with this command
20-
'git config --local include.path ../.gitconfig'
18+
When using a local '.gitconfig' file, you need to tell git that it should also look for configuration in the local workspace folder by adding:
19+
'git config --local include.path ../.gitconfig'
2120
2221
[phlow] is the default ini block
2322
24-
Default configuration:
25-
[phlow]
23+
[phlow]
2624
integration_branch = master
2725
remote = origin
2826
service = jira
2927
issue_url = https://my.jira.instance.com
3028
delivery_branch_prefix = ready
31-
`,
29+
`, ui.Format.Bold("config")),
3230
Run: func(cmd *cobra.Command, args []string) {
3331
cmd.Help()
3432
},

cmd/deliver.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package cmd
22

33
import (
44
"fmt"
5+
56
"github.com/praqma/git-phlow/cmd/cmdperm"
67
"github.com/praqma/git-phlow/options"
78
"github.com/praqma/git-phlow/phlow"
@@ -14,11 +15,13 @@ var deliverCmd = &cobra.Command{
1415
Use: "deliver [args]",
1516
Short: "deliver changes to remote master",
1617
Long: fmt.Sprintf(`
17-
%s pushes your committed changes to the remote repository.
18-
Deliver only runs if you are located on an issue branch created with workon.
19-
The delivered branch's name will prefixed 'ready/', so the integration services supporting the workflow can pick up your changes.
18+
%s is the command used to hand over the work you just commited with 'wrapup'.
19+
checkout the issue branch you need to deliver and run the command. This will push local branch to the repository and prefixed it with 'ready/'.
20+
On the repository it is ready to be integrated automatically into the integration branch, if a CI server is configured.
21+
22+
When delivered, local branches will be prefixed with 'delivered/'
2023
21-
If you deliver with the 'local' option, the issue branch will be merged with your default branch, pushed to your remote's default branch and prefixed with 'delivered/'.
24+
using the '--local' option will integrate the branch locally and push the changes on the integration branch
2225
`, ui.Format.Bold("deliver")),
2326
PreRun: func(cmd *cobra.Command, args []string) {
2427
cmdperm.RequiredCurDirRepository()

cmd/issues.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ var issueCmd = &cobra.Command{
1515
Use: "issues",
1616
Short: "list issues from Task management system",
1717
Long: fmt.Sprintf(`
18-
%s lists the 30 next issues in your management system.
19-
Uses the configuration to decide target
18+
%s lists the first 30 issues from the connected issue management system.
19+
The are not picked in any specific order, and for Jira they are not picked by any specific project.
20+
The command is helpful for getting an overview of the next issues without leaving your terminal. The issue command uses the configuration 'issue-api' key-value pair to fetch the issues.
2021
`, ui.Format.Bold("issues")),
2122
PreRun: func(cmd *cobra.Command, args []string) {
2223
cmdperm.RequiredCurDirRepository()

cmd/mkalias.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@ package cmd
33
import (
44
"fmt"
55

6+
"github.com/praqma/git-phlow/phlow"
67
"github.com/praqma/git-phlow/ui"
78
"github.com/spf13/cobra"
8-
"github.com/praqma/git-phlow/phlow"
99
)
1010

1111
// mkaliasCmd represents the mkalias command
1212
var mkaliasCmd = &cobra.Command{
1313
Use: "mkalias",
1414
Short: "create aliases for phlow commands",
1515
Long: fmt.Sprintf(`
16-
%s creates aliases for the git phlow commands.
17-
This allows you to use 'git workon', rather than 'git phlow workon'.
16+
%s creates aliases for the git phlow commands. This allows you to use 'git workon', rather than 'git phlow workon'.
1817
The aliases are added to your global .gitconfig file.
1918
`, ui.Format.Bold("mkalias")),
2019
Run: func(cmd *cobra.Command, args []string) {

cmd/show.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
package cmd
22

33
import (
4-
"github.com/spf13/cobra"
4+
"fmt"
5+
56
"github.com/praqma/git-phlow/phlow"
7+
"github.com/praqma/git-phlow/ui"
8+
"github.com/spf13/cobra"
69
)
710

811
// showCmd represents the show command
912
var showCmd = &cobra.Command{
1013
Use: "show",
1114
Short: "shows configuration",
12-
Long: `
13-
Shows a specified configuration block on your configuration file.
14-
If no arguments are passed it will show the internal default configuration
15-
`,
15+
Long: fmt.Sprintf(`
16+
%s shows the configuration of the specified INI block.
17+
If no arguments are passed it will show the default configuration git phlow will use if no '-t' flag is set when a command is executed.
18+
This is good to use when debugging. Look for the 'scope: internal', this means that git phlow is using the internal default block, and not one found in a custom .gitconfig file.
19+
`, ui.Format.Bold("show")),
1620
Run: func(cmd *cobra.Command, args []string) {
1721
phlow.Show(args)
1822
},

0 commit comments

Comments
 (0)