story_branch 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53a5f42efde29c37e024d47aa0d0542d3645499eaf8ae518a7b1fbc03eb2d50f
4
- data.tar.gz: 7ffdcf865cbd091cff86dc516ac4bc3daa8fc29f55cbbea3f4b9f707b41d9990
3
+ metadata.gz: e7a8e6bc148fecde83a3f76f088507313660e6ab1cd4fb059d61285b380c583d
4
+ data.tar.gz: c5a1c714d28331dd096ff89858af114055adf528ac63a33326b5ee6893c0cb4c
5
5
  SHA512:
6
- metadata.gz: 911475a7844a3efe57ffa0fe0f2aab02abf42b8c90ad4083ecefd1b0d03dc987d5987bde4a512902cf76048ee3132521f98f4d36db1b2be1453a363de6831578
7
- data.tar.gz: 270037755290c76896cd4c288d1741bb70a34c0dbd60e702e21b9fa59b95a1284efb4dbbf7a260ef780afdfd620c40fcdec8546771a7236c6ba05246d18a8f26
6
+ metadata.gz: f4f7c388a01ad1a9c164c0e21997422fe020416927afd164bfc68042fa958fb95f102909ffda013c26ab38f8d963e0de3d9894fa063413cd3469b3cdbccf76d5
7
+ data.tar.gz: 164713630f809f65b4c703bd90cfba6007586837b903a869553c9f95d16ff3169f9b56821036674aca4bd6cac7e1617acf3e28c2425f53088aba60cbb238f7e1
@@ -8,12 +8,10 @@ jobs:
8
8
  runs-on: ubuntu-latest
9
9
 
10
10
  steps:
11
- - uses: actions/checkout@v1
12
- - name: Set up Ruby 2.6
13
- uses: actions/setup-ruby@v1
14
- with:
15
- ruby-version: 2.6.x
11
+ - uses: actions/checkout@v3
12
+ - name: Set up Ruby 2.7
13
+ uses: ruby/setup-ruby@v1
16
14
  - name: Rubocop Linter
17
- uses: andrewmcodes/rubocop-linter-action@v0.1.2
15
+ uses: andrewmcodes/rubocop-linter-action@v3.3.0
18
16
  env:
19
17
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
data/.story_branch.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- finish_tag: 'Resolves'
3
- tracker: 'github'
2
+ finish_tag: Resolves
3
+ tracker: github
4
4
  project_id:
5
5
  - story-branch/story_branch
data/Changelog.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 2.1.0
2
+ Wed Jul 20 18:30:00 2022 +0800
3
+
4
+ - Add configuration support to prepend branch name with a user prefix (#122)
5
+
1
6
  # 0.3.3
2
7
  Tue Jun 26 15:18:37 2018 +0800
3
8
 
@@ -34,6 +34,10 @@ module StoryBranch
34
34
  @issue_placement ||= @config.fetch(:issue_placement, default: 'End')
35
35
  end
36
36
 
37
+ def branch_username
38
+ @branch_username ||= @config.fetch(project_key, :branch_username)
39
+ end
40
+
37
41
  def finish_tag
38
42
  @finish_tag ||= @config.fetch(project_key,
39
43
  :finish_tag, default: 'Finishes')
@@ -196,11 +196,14 @@ module StoryBranch
196
196
  # rubocop:enable Metrics/MethodLength
197
197
 
198
198
  def build_branch_name(branch_name, story_id)
199
- if @config.issue_placement.casecmp('beginning').zero?
200
- "#{story_id}-#{branch_name}"
201
- else
202
- "#{branch_name}-#{story_id}"
203
- end
199
+ branch_name = if @config.issue_placement.casecmp('beginning').zero?
200
+ "#{story_id}-#{branch_name}"
201
+ else
202
+ "#{branch_name}-#{story_id}"
203
+ end
204
+ return branch_name unless @config.branch_username
205
+
206
+ "#{@config.branch_username}/#{branch_name}"
204
207
  end
205
208
 
206
209
  def current_branch
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StoryBranch
4
- VERSION = '2.0.1'
4
+ VERSION = '2.1.0'
5
5
  end
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.0.1
4
+ version: 2.1.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: 2021-10-30 00:00:00.000000000 Z
15
+ date: 2022-07-20 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: blanket_wrapper
@@ -496,7 +496,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
496
496
  - !ruby/object:Gem::Version
497
497
  version: '0'
498
498
  requirements: []
499
- rubygems_version: 3.2.22
499
+ rubygems_version: 3.2.32
500
500
  signing_key:
501
501
  specification_version: 4
502
502
  summary: Create git branches based on your preferred tracker tickets