Skip to content

Commit 04b0007

Browse files
committed
Support for transitions
1 parent 07934f5 commit 04b0007

File tree

6 files changed

+12
-4
lines changed

6 files changed

+12
-4
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
language: go
2+
23
go:
34
- 1.8
45
- tip

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ If you have any issues, please open one here on Github or hit me up on twitter [
112112

113113
## CHANGELOG
114114

115+
## 1.6.0
116+
117+
* Added transitions to the config and outputting the transitions to STDout to
118+
verify the config.
115119

116120
## 1.4.0
117121

cmd/gong/.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.4.0
2+
current_version = 1.6.0
33
commit = False
44
tag = False
55

cmd/gong/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
bumpversion $1
1+
bumpversion $1 --allow-dirty
22
go build

cmd/gong/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
func main() {
1515
app := cli.NewApp()
16-
app.Version = "1.4.0"
16+
app.Version = "1.6.0"
1717

1818
var branchType string
1919

jira.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"errors"
55
"fmt"
66
"regexp"
7+
"strings"
78

89
"github.com/andygrunwald/go-jira"
910
)
@@ -127,11 +128,12 @@ func indexOf(status string, data []string) int {
127128

128129
// Start : Start an issue
129130
func (j *JiraClient) Start(issueType string, issueID string) (string, error) {
130-
allowed := []string{"Ready", "Start"}
131+
allowed := strings.Split(j.config["transitions"], ",")
131132

132133
fmt.Println(issueID)
133134

134135
transitions, response, err := j.client.Issue.GetTransitions(issueID)
136+
fmt.Println(transitions)
135137

136138
if err != nil {
137139
fmt.Println(err)
@@ -176,6 +178,7 @@ func (j *JiraClient) GetAuthFields() map[string]bool {
176178
"domain": true,
177179
"password": true,
178180
"project_prefix": false,
181+
"transitions": false,
179182
}
180183
}
181184

0 commit comments

Comments
 (0)