story_branch 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +8 -0
- data/README.md +114 -59
- data/lib/story_branch/commands/configure.rb +2 -6
- data/lib/story_branch/constants.rb +17 -0
- data/lib/story_branch/issue_base.rb +21 -0
- data/lib/story_branch/linear_app/issue.rb +18 -0
- data/lib/story_branch/linear_app/team.rb +44 -0
- data/lib/story_branch/linear_app/tracker.rb +55 -0
- data/lib/story_branch/main.rb +3 -18
- data/lib/story_branch/tracker_initializer.rb +27 -0
- data/lib/story_branch/version.rb +1 -1
- data/story_branch.gemspec +2 -0
- metadata +36 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 470bb59ffdc939bd91f9700a00f467ca2b68535d7a30740b95792cb6c43b37e3
|
4
|
+
data.tar.gz: 49ca86d91a3f963f4096b84a3192ebc9a8da547a6dc0bb44fc465c4ca5eb149b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9627d3631e828b32bb5d064f0580d4b940c23dd6c19d809583be4d32e52298646978355316c009870c8d9fb05b8611137137374dfbb644c6554bb0d176f21c6a
|
7
|
+
data.tar.gz: cc087771f69a847b3822181c8156aec52515993aba41a4fb7c3af01f33961c8a32826eae0d242d931595cebf9c00c6a8f4301a8498e87bbeeb218bfcf69ef715
|
data/Changelog.md
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,29 @@
|
|
2
2
|
[![CircleCI](https://circleci.com/gh/story-branch/story_branch/tree/master.svg?style=svg)](https://circleci.com/gh/story-branch/story_branch/tree/master)
|
3
3
|
[![Maintainability](https://api.codeclimate.com/v1/badges/7dbd75908417656853d7/maintainability)](https://codeclimate.com/github/story-branch/story_branch/maintainability)
|
4
4
|
|
5
|
+
# Table of Contents
|
6
|
+
|
7
|
+
* [Installing](#installing)
|
8
|
+
* [Usage](#usage)
|
9
|
+
* [Commands available](#commands-available)
|
10
|
+
* [Commentary](#commentary)
|
11
|
+
* [Configuration](#configuration)
|
12
|
+
* [Configuring PivotalTracker](#configuring-pivotaltracker)
|
13
|
+
* [Configuring Github](#configuring-github)
|
14
|
+
* [Configuring JIRA](#configuring-jira)
|
15
|
+
* [Configuring LinearApp](#configuring-linearapp)
|
16
|
+
* [Available settings](#available-settings)
|
17
|
+
* [Issue placement](#issue-placement)
|
18
|
+
* [Branch username](#branch-username)
|
19
|
+
* [Finish tag](#finish-tag)
|
20
|
+
* [Creating a new branch following the naming convention](#creating-a-new-branch-following-the-naming-convention)
|
21
|
+
* [PivotalTracker specific commands](#pivotaltracker-specific-commands)
|
22
|
+
* [Migrating](#migrating)
|
23
|
+
* [Old configuration](#old-configuration)
|
24
|
+
* [Old commands](#old-commands)
|
25
|
+
* [Contributing](#contributing)
|
26
|
+
|
27
|
+
|
5
28
|
# Story Branch
|
6
29
|
|
7
30
|
Story branch is a CLI application that interacts with Pivotal Tracker, Github and Jira
|
@@ -46,25 +69,97 @@ Commands:
|
|
46
69
|
story_branch version # story_branch gem version
|
47
70
|
```
|
48
71
|
|
49
|
-
##
|
72
|
+
## Commentary
|
73
|
+
|
74
|
+
`story_branch configure`: Step by step configuration of a new tracker for your project
|
75
|
+
|
76
|
+
### Configuration
|
77
|
+
|
78
|
+
The configuration is split into two different files: a `.story_branch.yml` in the root folder
|
79
|
+
of the project where you're configuring the tool and a `.story_branch.yml` in user's home directory.
|
80
|
+
|
81
|
+
For the management of the home directory, story_branch relies on [XDG](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html)
|
82
|
+
specification, so if configured, it'll be installed under `~/.config` or whatever your machine
|
83
|
+
specifies.
|
84
|
+
|
85
|
+
The idea behind the two files is that the one in the root of the project should be committed to your
|
86
|
+
repository and defines basic tracker configuration settings to be shared across the contributors
|
87
|
+
to your repository. These configuration settings include the tracker type, project id in the tracker,
|
88
|
+
where you want the ticket number to be placed amongst others.
|
89
|
+
|
90
|
+
The file under your config directory is meant to be stored only locally as it will contain the api
|
91
|
+
keys needed for story branch to access your tracker. The story_branch file under your config directory
|
92
|
+
should not be published anywhere.
|
50
93
|
|
51
|
-
|
52
|
-
|
94
|
+
#### Configuring PivotalTracker
|
95
|
+
|
96
|
+
When running the command `story_branch configure` you'll be asked 3 things:
|
97
|
+
1. tracker - You should select Pivotal Tracker
|
98
|
+
2. project id - This can be fetched from the PivotalTracker url. E.g in the url `https://www.pivotaltracker.com/n/projects/651417`, the project id would be `651417`
|
99
|
+
3. api key - this is your personal api key. You can get that from [your profile page](https://www.pivotaltracker.com/profile)
|
100
|
+
|
101
|
+
#### Configuring Github
|
102
|
+
|
103
|
+
When running the command `story_branch configure` you'll be asked 3 things:
|
104
|
+
1. tracker - You should select Github
|
105
|
+
2. project id - This is the github repository name in the format `<owner>/<repo_name>`. E.g. `story-branch/story_branch`.
|
106
|
+
3. api key - this is your personal api token. You can create one under your [developer profile tokens page](https://github.com/settings/tokens)
|
107
|
+
|
108
|
+
#### Configuring JIRA
|
109
|
+
|
110
|
+
The configuration for JIRA is slightly more complex as the endpoint changes according
|
111
|
+
to your project setup. You will need an API token, which you can create a new one in your [JIRA id management page](https://id.atlassian.com/manage/api-tokens)
|
112
|
+
1. tracker - You should select JIRA
|
113
|
+
2. JIRA's subdomain - you should type the JIRA's subdomain that you use to access in your browser. E.g I'd type perxtechnologies to access to <https://perxtechnologies.atlassian.net>
|
114
|
+
3. JIRA's project key - this should match which project you want to fetch the issues from. E.g. PW is the key for my Project Whistler, so I'd type PW
|
115
|
+
4. API key that you should have gotten in the first description step
|
116
|
+
5. username used for login in the JIRA usually. If you use google email authentication, the username should be your email
|
117
|
+
|
118
|
+
#### Configuring LinearApp
|
119
|
+
|
120
|
+
When running the command `story_branch configure` you'll be asked 3 things:
|
121
|
+
1. tracker - You should select LinearApp
|
122
|
+
2. project id - This should be your team's id.
|
123
|
+
3. api key - this is your personal api token. You can create one under your [account API settings](https://linear.app/settings/api)
|
124
|
+
|
125
|
+
#### Available settings
|
126
|
+
|
127
|
+
##### Issue placement
|
128
|
+
|
129
|
+
On your local config you can add a line with `issue_placement: <Beginning|End>`.
|
130
|
+
Based on this configuration, when running `story_branch create`, the ticket id will be
|
131
|
+
used as prefix or suffix on the branch name.
|
132
|
+
|
133
|
+
E.g.
|
134
|
+
`issue_placement: Beginning`
|
53
135
|
|
54
|
-
|
136
|
+
`story_branch create` will create a branch in the format: `<issue_number>-<issue_title>`
|
55
137
|
|
56
|
-
|
57
|
-
This value will be stored in the local configuration file that will be committed
|
58
|
-
to the working repository
|
138
|
+
While
|
59
139
|
|
60
|
-
|
140
|
+
`issue_placement: End`
|
61
141
|
|
62
|
-
|
63
|
-
This value will be stored in your global configuration file that typically is
|
64
|
-
not shared with your co-workers in the repository. This way, each user will
|
65
|
-
be properly identified in the tracker
|
142
|
+
`story_branch create` will create a branch in the format: `<issue_title>-<issue_number>`
|
66
143
|
|
67
|
-
|
144
|
+
##### Branch username
|
145
|
+
|
146
|
+
In some cases your workflow requires you to have an identifier prefixing the branch name.
|
147
|
+
You can configure that by setting the configuration `branch_username` under your project's
|
148
|
+
name in the global `story_branch.yml` file (`defaults to: ~/.config/.story_branch.yml`)
|
149
|
+
|
150
|
+
E.g.
|
151
|
+
|
152
|
+
```
|
153
|
+
story-branch/story_branch:
|
154
|
+
api_key: my_fantastic_api_key
|
155
|
+
branch_username: rui
|
156
|
+
```
|
157
|
+
|
158
|
+
Doing so, when running `story_branch create`, it will create a branch in the format: `rui/<issue_number>-<issue_title>`
|
159
|
+
|
160
|
+
Naturally, the issue number will be placed based on the issue placement setting
|
161
|
+
|
162
|
+
##### Finish tag
|
68
163
|
|
69
164
|
On your local config you can add a line with `finish_tag: <Some random word>`.
|
70
165
|
This tag will be used in the commit message when running `story_branch finish`.
|
@@ -75,28 +170,11 @@ E.g.
|
|
75
170
|
`story_branch finish` will make a commit with the message
|
76
171
|
`[Resolves #12313] story title`
|
77
172
|
|
173
|
+
### Creating a new branch following the naming convention
|
78
174
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
your home folder (`~/`) and one in your project's root (`./`).
|
83
|
-
The one in your home folder will be used to store the different project's configurations
|
84
|
-
such as which api key to use. This is done so you don't need to commit your
|
85
|
-
api key to the repository but still be able to use different keys in case you
|
86
|
-
have different accounts.
|
87
|
-
|
88
|
-
The one in your project root will keep a reference to the project configuration.
|
89
|
-
For now, this reference is the project id. This file can be safely committed to
|
90
|
-
the repository and shared amongst your co-workers.
|
91
|
-
|
92
|
-
## Commentary
|
93
|
-
|
94
|
-
`story_branch create`: Creates a git branch with automatic reference to a
|
95
|
-
Pivotal Tracker Story. It will get started stories from your active
|
96
|
-
project. You can enter text and press TAB to search for a story
|
97
|
-
name, or TAB to show the full list. It will then suggest an editable
|
98
|
-
branch name. When the branch is created the `story_id` will
|
99
|
-
be appended to it.
|
175
|
+
`story_branch create`: Creates a git branch with automatic reference to a tracker ticket.
|
176
|
+
The tickets/stories that will be fetched will depend on the project type. Once you choose the
|
177
|
+
ticket to work on, a new branch will be created based on the ticket title and id.
|
100
178
|
|
101
179
|
e.g. `my-story-name-1234567`
|
102
180
|
|
@@ -107,6 +185,8 @@ e.g: `[Finishes #1234567] My story name`
|
|
107
185
|
You must stage all changes (or stash them) first. Note the commit will not
|
108
186
|
be pushed. Note: You'll be able to bail out of the commit.
|
109
187
|
|
188
|
+
### PivotalTracker specific commands
|
189
|
+
|
110
190
|
`story_branch start`: Start a story in Pivotal Tracker from the terminal.
|
111
191
|
It'll get all un-started stories in your current project. You can
|
112
192
|
enter text and press TAB to search for a story name, or TAB to show
|
@@ -117,31 +197,6 @@ It'll get all started stories in your current project. You can
|
|
117
197
|
enter text and press TAB to search for a story name, or TAB to show
|
118
198
|
the full list.
|
119
199
|
|
120
|
-
## Configuring PivotalTracker
|
121
|
-
|
122
|
-
When running the command `story_branch configure` you'll be asked 3 things:
|
123
|
-
1. tracker - You should select Pivotal Tracker
|
124
|
-
2. project id - This can be fetched from the PivotalTracker url. E.g in the url `https://www.pivotaltracker.com/n/projects/651417`, the project id would be `651417`
|
125
|
-
3. api key - this is your personal api key. You can get that from [your profile page](https://www.pivotaltracker.com/profile)
|
126
|
-
|
127
|
-
## Configuring Github
|
128
|
-
|
129
|
-
When running the command `story_branch configure` you'll be asked 3 things:
|
130
|
-
1. project id - This is the github repository name in the format `<owner>/<repo_name>`. E.g. `story-branch/story_branch`.
|
131
|
-
2. tracker - You should select Github
|
132
|
-
3. api key - this is your personal api token. You can create one under your
|
133
|
-
[developer profile tokens page](https://github.com/settings/tokens)
|
134
|
-
|
135
|
-
## Configuring JIRA
|
136
|
-
|
137
|
-
The configuration for JIRA is slightly more complex as the endpoint changes according
|
138
|
-
to your project setup. You will need an API token, which you can create a new one in your [JIRA id management page](https://id.atlassian.com/manage/api-tokens)
|
139
|
-
1. tracker - You should select JIRA
|
140
|
-
2. JIRA's subdomain - you should type the JIRA's subdomain that you use to access in your browser. E.g I'd type perxtechnologies to access to https://perxtechnologies.atlassian.net
|
141
|
-
3. JIRA's project key - this should match which project you want to fetch the issues from. E.g. PW is the key for my Project Whistler, so I'd type PW
|
142
|
-
4. API key that you should have gotten in the first description step
|
143
|
-
5. username used for login in the JIRA usually. If you use google email authentication, the username should be your email
|
144
|
-
|
145
200
|
## Migrating
|
146
201
|
|
147
202
|
### Old configuration
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative '../config_manager'
|
4
4
|
require_relative '../command'
|
5
|
+
require_relative '../constants'
|
5
6
|
require 'tty-config'
|
6
7
|
require 'tty-prompt'
|
7
8
|
|
@@ -73,12 +74,7 @@ module StoryBranch
|
|
73
74
|
def tracker
|
74
75
|
return @tracker if @tracker
|
75
76
|
|
76
|
-
|
77
|
-
'Pivotal Tracker' => 'pivotal-tracker',
|
78
|
-
'Github' => 'github',
|
79
|
-
'JIRA' => 'jira'
|
80
|
-
}
|
81
|
-
@tracker = prompt.select('Which tracker are you using?', trackers)
|
77
|
+
@tracker = prompt.select('Which tracker are you using?', StoryBranch::AVAILABLE_TRACKERS)
|
82
78
|
end
|
83
79
|
end
|
84
80
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module StoryBranch
|
4
|
+
AVAILABLE_TRACKERS = {
|
5
|
+
'Pivotal Tracker' => 'pivotal-tracker',
|
6
|
+
'Github' => 'github',
|
7
|
+
'JIRA' => 'jira',
|
8
|
+
'LinearApp' => 'linearapp'
|
9
|
+
}.freeze
|
10
|
+
|
11
|
+
TRACKERS_CLASSES = {
|
12
|
+
'pivotal-tracker' => 'StoryBranch::Pivotal::Tracker',
|
13
|
+
'github' => 'StoryBranch::Github::Tracker',
|
14
|
+
'jira' => 'StoryBranch::Jira::Tracker',
|
15
|
+
'linearapp' => 'StoryBranch::LinearApp::Tracker'
|
16
|
+
}.freeze
|
17
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module StoryBranch
|
4
|
+
# Base class to represent an issue/ticket
|
5
|
+
class IssueBase
|
6
|
+
attr_reader :title, :id, :html_url
|
7
|
+
|
8
|
+
def initialize(tracker_issue, project = nil)
|
9
|
+
@project = project
|
10
|
+
@story = tracker_issue
|
11
|
+
end
|
12
|
+
|
13
|
+
def to_s
|
14
|
+
"#{@id} - #{@title}"
|
15
|
+
end
|
16
|
+
|
17
|
+
def dashed_title
|
18
|
+
StoryBranch::StringUtils.normalised_branch_name @title
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../issue_base'
|
4
|
+
|
5
|
+
module StoryBranch
|
6
|
+
module LinearApp
|
7
|
+
# LinearApp Issue representation
|
8
|
+
class Issue < StoryBranch::IssueBase
|
9
|
+
# NOTE: project here represents the team_id only
|
10
|
+
def initialize(tracker_issue, project)
|
11
|
+
super
|
12
|
+
@title = tracker_issue['title']
|
13
|
+
@id = "#{@project}-#{tracker_issue['number']}"
|
14
|
+
@html_url = tracker_issue['url']
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'issue'
|
4
|
+
|
5
|
+
module StoryBranch
|
6
|
+
module LinearApp
|
7
|
+
# LinearApp groups tickets in teams, so this is the team representation in
|
8
|
+
# story branch. It's equivalent to a project
|
9
|
+
class Team
|
10
|
+
def initialize(team_id, client)
|
11
|
+
@team_id = team_id
|
12
|
+
@client = client
|
13
|
+
end
|
14
|
+
|
15
|
+
def stories(_options = {})
|
16
|
+
response = @client.get(graphql_query: graphql_query)
|
17
|
+
stories_json = response.data['viewer']['assignedIssues']['nodes']
|
18
|
+
stories_json.map { |story| Issue.new(story, @team_id) }
|
19
|
+
rescue StoryBranch::Graphql::Error => e
|
20
|
+
raise "Error while querying for tickets:\n#{e.message}"
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def graphql_query # rubocop:disable Metrics/MethodLength
|
26
|
+
%(
|
27
|
+
query Issue {
|
28
|
+
viewer {
|
29
|
+
assignedIssues (filter: { team: { name: { eq: "#{@team_id}"} } }) {
|
30
|
+
nodes {
|
31
|
+
id
|
32
|
+
title
|
33
|
+
description
|
34
|
+
number
|
35
|
+
url
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'story_branch/graphql'
|
4
|
+
require_relative '../tracker_base'
|
5
|
+
require_relative 'team'
|
6
|
+
|
7
|
+
module StoryBranch
|
8
|
+
module LinearApp
|
9
|
+
# Linear App API wrapper for story branch tracker
|
10
|
+
class Tracker < StoryBranch::TrackerBase
|
11
|
+
API_URL = 'https://api.linear.app/'
|
12
|
+
|
13
|
+
def initialize(project_id:, api_key:, **)
|
14
|
+
super
|
15
|
+
|
16
|
+
# NOTE: project should be the representation of linear app team
|
17
|
+
@team_id = project_id
|
18
|
+
@api_key = api_key
|
19
|
+
end
|
20
|
+
|
21
|
+
def valid?
|
22
|
+
!@api_key.nil? && !@team_id.nil?
|
23
|
+
end
|
24
|
+
|
25
|
+
# TODO: This should probably be renamed to something more meaningful
|
26
|
+
# in the sense that it should be workable stories/issues
|
27
|
+
# which depend on the tracker's workflow. PivotalTracker they need to
|
28
|
+
# be started and estimated, while for Github they just need to be open
|
29
|
+
def stories
|
30
|
+
project.stories
|
31
|
+
end
|
32
|
+
|
33
|
+
def get_story_by_id(story_id)
|
34
|
+
project.stories(id: story_id).first
|
35
|
+
end
|
36
|
+
|
37
|
+
def client
|
38
|
+
@client ||= StoryBranch::Graphql::Client.new(api_url: API_URL, api_key: @api_key)
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def configure_api
|
44
|
+
client
|
45
|
+
end
|
46
|
+
|
47
|
+
def project
|
48
|
+
return @project if @project
|
49
|
+
raise 'team must be set' unless @team_id
|
50
|
+
|
51
|
+
@project = Team.new(@team_id, client)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
data/lib/story_branch/main.rb
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative './pivotal/tracker'
|
4
|
-
require_relative './github/tracker'
|
5
|
-
require_relative './jira/tracker'
|
6
3
|
require_relative './git_utils'
|
7
4
|
require_relative './git_wrapper'
|
8
5
|
require_relative './config_manager'
|
9
6
|
require_relative './url_opener'
|
7
|
+
require_relative 'tracker_initializer'
|
8
|
+
|
10
9
|
require 'tty-prompt'
|
11
10
|
|
12
11
|
module StoryBranch
|
@@ -20,7 +19,7 @@ module StoryBranch
|
|
20
19
|
def initialize
|
21
20
|
@config = ConfigManager.new
|
22
21
|
abort(@config.errors.join("\n")) unless @config.valid?
|
23
|
-
@tracker = initialize_tracker
|
22
|
+
@tracker = StoryBranch::TrackerInitializer.initialize_tracker(config: @config)
|
24
23
|
abort('Invalid tracker configuration setting.') unless @tracker.valid?
|
25
24
|
end
|
26
25
|
|
@@ -209,20 +208,6 @@ module StoryBranch
|
|
209
208
|
def current_branch
|
210
209
|
@current_branch ||= GitWrapper.current_branch
|
211
210
|
end
|
212
|
-
|
213
|
-
def initialize_tracker
|
214
|
-
# TODO: Ideally this would be mapped out somewhere so we don't need to
|
215
|
-
# evaluate anything from the config here
|
216
|
-
tracker_type = @config.tracker_type
|
217
|
-
case tracker_type
|
218
|
-
when 'github'
|
219
|
-
StoryBranch::Github::Tracker.new(**@config.tracker_params)
|
220
|
-
when 'pivotal-tracker'
|
221
|
-
StoryBranch::Pivotal::Tracker.new(**@config.tracker_params)
|
222
|
-
when 'jira'
|
223
|
-
StoryBranch::Jira::Tracker.new(**@config.tracker_params)
|
224
|
-
end
|
225
|
-
end
|
226
211
|
end
|
227
212
|
# rubocop:enable Metrics/ClassLength
|
228
213
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './constants'
|
4
|
+
require_relative './pivotal/tracker'
|
5
|
+
require_relative './github/tracker'
|
6
|
+
require_relative './jira/tracker'
|
7
|
+
require_relative './linear_app/tracker'
|
8
|
+
|
9
|
+
module StoryBranch
|
10
|
+
# helper class to find out which tracker should be initialized based on the
|
11
|
+
# configuration values
|
12
|
+
class TrackerInitializer
|
13
|
+
def self.initialize_tracker(config:)
|
14
|
+
tracker_class = find_tracker_class(config.tracker_type)
|
15
|
+
raise 'Invalid tracker configuration' unless tracker_class
|
16
|
+
|
17
|
+
tracker_class.new(**config.tracker_params)
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.find_tracker_class(tracker_type)
|
21
|
+
tracker_str = StoryBranch::TRACKERS_CLASSES[tracker_type]
|
22
|
+
return nil unless tracker_str
|
23
|
+
|
24
|
+
Kernel.const_get(tracker_str)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/story_branch/version.rb
CHANGED
data/story_branch.gemspec
CHANGED
@@ -55,7 +55,9 @@ Gem::Specification.new do |spec|
|
|
55
55
|
|
56
56
|
spec.add_runtime_dependency 'blanket_wrapper', '~> 3.0', '> 3.0'
|
57
57
|
spec.add_runtime_dependency 'damerau-levenshtein', '~> 1.3', '> 1.3'
|
58
|
+
spec.add_runtime_dependency 'httparty', '>0'
|
58
59
|
spec.add_runtime_dependency 'jira-ruby', '> 1.7', '< 3'
|
60
|
+
spec.add_runtime_dependency 'story_branch-graphql', '~> 0.0.1'
|
59
61
|
spec.add_runtime_dependency 'thor', '> 0.20', '< 2'
|
60
62
|
spec.add_runtime_dependency 'tty-command', '~> 0.8', '> 0.8'
|
61
63
|
spec.add_runtime_dependency 'tty-config', '~> 0.2', '> 0.2'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: story_branch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rui Baltazar
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: exe
|
14
14
|
cert_chain: []
|
15
|
-
date: 2022-
|
15
|
+
date: 2022-08-10 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: blanket_wrapper
|
@@ -54,6 +54,20 @@ dependencies:
|
|
54
54
|
- - ">"
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '1.3'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: httparty
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
type: :runtime
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">"
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
57
71
|
- !ruby/object:Gem::Dependency
|
58
72
|
name: jira-ruby
|
59
73
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,6 +88,20 @@ dependencies:
|
|
74
88
|
- - "<"
|
75
89
|
- !ruby/object:Gem::Version
|
76
90
|
version: '3'
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: story_branch-graphql
|
93
|
+
requirement: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: 0.0.1
|
98
|
+
type: :runtime
|
99
|
+
prerelease: false
|
100
|
+
version_requirements: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 0.0.1
|
77
105
|
- !ruby/object:Gem::Dependency
|
78
106
|
name: thor
|
79
107
|
requirement: !ruby/object:Gem::Requirement
|
@@ -441,6 +469,7 @@ files:
|
|
441
469
|
- lib/story_branch/commands/start.rb
|
442
470
|
- lib/story_branch/commands/unstart.rb
|
443
471
|
- lib/story_branch/config_manager.rb
|
472
|
+
- lib/story_branch/constants.rb
|
444
473
|
- lib/story_branch/git_utils.rb
|
445
474
|
- lib/story_branch/git_wrapper.rb
|
446
475
|
- lib/story_branch/github/issue.rb
|
@@ -448,9 +477,13 @@ files:
|
|
448
477
|
- lib/story_branch/github/milestone.rb
|
449
478
|
- lib/story_branch/github/project.rb
|
450
479
|
- lib/story_branch/github/tracker.rb
|
480
|
+
- lib/story_branch/issue_base.rb
|
451
481
|
- lib/story_branch/jira/issue.rb
|
452
482
|
- lib/story_branch/jira/project.rb
|
453
483
|
- lib/story_branch/jira/tracker.rb
|
484
|
+
- lib/story_branch/linear_app/issue.rb
|
485
|
+
- lib/story_branch/linear_app/team.rb
|
486
|
+
- lib/story_branch/linear_app/tracker.rb
|
454
487
|
- lib/story_branch/main.rb
|
455
488
|
- lib/story_branch/pivotal/project.rb
|
456
489
|
- lib/story_branch/pivotal/story.rb
|
@@ -466,6 +499,7 @@ files:
|
|
466
499
|
- lib/story_branch/templates/start/.gitkeep
|
467
500
|
- lib/story_branch/templates/unstart/.gitkeep
|
468
501
|
- lib/story_branch/tracker_base.rb
|
502
|
+
- lib/story_branch/tracker_initializer.rb
|
469
503
|
- lib/story_branch/url_opener.rb
|
470
504
|
- lib/story_branch/version.rb
|
471
505
|
- story_branch.gemspec
|