66 * [Requirements](#requirements)
77 * [Environment Variables and Test Data](#environment-variables-and-test-data)
88 * [Refresh Test Data](#refresh-test-data)
9- * [Branching](#branching)
109 * [Issue Tracker](#issue-tracker)
10+ * [Branching](#branching)
11+ * [Code Generator](#code-generator)
12+ * [Good Commit Message Examples](#good-commit-message-examples)
1113 * [Before Pushing your Commit](#before-pushing-your-commit)
12- * [ Custom Packages] ( #custom-packages )
14+ * [Tips and Tricks](#tips-and-tricks)
15+ * [ Custom Packages we are using] ( #custom-packages-we-are-using )
1316* [ Test Driven Development] ( #test-driven-development )
1417* [ How the Commands Authenticate] ( #how-the-commands-authenticate )
1518* [ Commands Pattern] ( #commands-pattern )
@@ -58,6 +61,14 @@ source testdata/credentials.sh
5861testdata/seeder.sh
5962```
6063
64+ ### Issue Tracker
65+
66+ [ ![ Throughput Graph] ( http://graphs.waffle.io/devopsctl/gitlabctl/throughput.svg )] ( https://waffle.io/devopsctl/gitlabctl/metrics )
67+
68+ * Ensure that you are working on an [ Issue] ( https://github.com/devopsctl/gitlabctl/issues )
69+ and is visible in [ Waffle Issue Tracker] ( https://waffle.io/devopsctl/gitlabctl ) .
70+ * Ensure to create a branch for your Issue.
71+
6172### Branching
6273
6374* Branch name should be in the format of ` {{issueNumber}}-{{shortTaskName}} ` .
@@ -66,13 +77,17 @@ Example: `19-add-group-get-cmd`.
6677Use ` git pull --rebase origin master ` or ` git pull --rebase origin branchName `
6778as much as possible.
6879
69- ### Issue Tracker
80+ ### Code Generator
7081
71- [ ![ Throughput Graph] ( http://graphs.waffle.io/devopsctl/gitlabctl/throughput.svg )] ( https://waffle.io/devopsctl/gitlabctl/metrics )
82+ Once you get the basics of creating a gitlabctl command, you will find out that most code are repeatable.
83+ This is where the ` gitlabctl gencode ` commands can be of help.
7284
73- * Ensure that you are working on an [ Issue] ( https://github.com/devopsctl/gitlabctl/issues )
74- and is visible in [ Waffle Issue Tracker] ( https://waffle.io/devopsctl/gitlabctl ) .
75- * Ensure to create a branch for your Issue.
85+ Please use it in for your own convenience. Feedback about this command is also appreciated!
86+
87+ ### Good Commit Message Examples
88+
89+ * ` new_group: fix known issue when printing output ` - when patching an existing command
90+ * ` Add new command get labels ` - when adding a new command
7691
7792### Before Pushing your Commit
7893
@@ -86,7 +101,19 @@ community may be able to answer your questions.
86101* If you are not changing code (e.g: updating docs or adding test data),
87102use __ ci skip__ in commit message to [ Skip TravisCI build] ( https://docs.travis-ci.com/user/customizing-the-build/#Skipping-a-build )
88103
89- ## Custom Packages
104+ ### Tips and Tricks
105+
106+ Use ` grm cmd subcmd ` for ease of testing a command.
107+ * How: ` alias grm='go run main.go' `
108+ * Example Usage: ` grm get groups `
109+
110+ Use ` gt ` for ease of running ` go test ` .
111+
112+ * How: ` alias gt='go test -v ./...' `
113+ * Example Usage: ` gt -run NewGroup `
114+
115+
116+ ## Custom Packages we are using
90117
91118* Gitlab api client - https://godoc.org/github.com/xanzy/go-gitlab
92119* Commandline flags - https://github.com/spf13/cobra
@@ -105,6 +132,8 @@ Authenticate using environment variables.
105132* Private token authentication - ` GITLAB_PRIVATE_TOKEN ` and ` GITLAB_API_HTTP_URL `
106133* OAuth2 token authentication - ` GITLAB_OAUTH_TOKEN ` and ` GITLAB_API_HTTP_URL `
107134
135+ Authenticate using ` gitlabctl login ` command.
136+
108137## Commands Pattern
109138
110139The command chain format is inspired from ` kubectl ` or ` oc ` Verb -> Subject -> Flags.
0 commit comments