Skip to content

Commit

Permalink
Support for transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
KensoDev committed Aug 5, 2017
1 parent 07934f5 commit 04b0007
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: go

go:
- 1.8
- tip
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ If you have any issues, please open one here on Github or hit me up on twitter [

## CHANGELOG

## 1.6.0

* Added transitions to the config and outputting the transitions to STDout to
verify the config.

## 1.4.0

Expand Down
2 changes: 1 addition & 1 deletion cmd/gong/.bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.4.0
current_version = 1.6.0
commit = False
tag = False

Expand Down
2 changes: 1 addition & 1 deletion cmd/gong/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
bumpversion $1
bumpversion $1 --allow-dirty
go build
2 changes: 1 addition & 1 deletion cmd/gong/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

func main() {
app := cli.NewApp()
app.Version = "1.4.0"
app.Version = "1.6.0"

var branchType string

Expand Down
5 changes: 4 additions & 1 deletion jira.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"regexp"
"strings"

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

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

fmt.Println(issueID)

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

if err != nil {
fmt.Println(err)
Expand Down Expand Up @@ -176,6 +178,7 @@ func (j *JiraClient) GetAuthFields() map[string]bool {
"domain": true,
"password": true,
"project_prefix": false,
"transitions": false,
}
}

Expand Down

0 comments on commit 04b0007

Please sign in to comment.