tefoji 3.0.0 → 3.0.1
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 +4 -4
- data/lib/tefoji/jira_api.rb +6 -23
- data/lib/tefoji.rb +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 751842bf3544f557c135661e9d4b57531fadf07df24b7e3d4ff69784a415d948
|
4
|
+
data.tar.gz: c7c957bf732fe96d8719acdcd483ef8778b464aacd33de2ae9db589246cd7c89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bf8f8a192b87c00ffa4856c6c72f5e7d52a490f75eb2e54b6b95707a573cbca3d323540f841cad33b5a61f59c761d31d3170a40bba4f24b0e22b4354ef286f6
|
7
|
+
data.tar.gz: bbe6db199d6bafab455ce075f6c34cd63eeb91273a1d6469f3cbbd246ef918848f3d53fc070d8eda1cbf4c745c3cf77a2905880df6dc2ebaabd24d63a2e4c239
|
data/lib/tefoji/jira_api.rb
CHANGED
@@ -349,7 +349,7 @@ module Tefoji
|
|
349
349
|
scrum_teams = issue_data['scrum_teams'] || issue_data['teams']
|
350
350
|
|
351
351
|
if scrum_teams
|
352
|
-
field_name, field_value = scrum_teams_rules(issue_data,
|
352
|
+
field_name, field_value = scrum_teams_rules(issue_data, scrum_teams)
|
353
353
|
jira_fields[field_name] = field_value
|
354
354
|
end
|
355
355
|
|
@@ -361,23 +361,17 @@ module Tefoji
|
|
361
361
|
# and 'scrum_teams' field in different issues.
|
362
362
|
#
|
363
363
|
# For epics, put the scrum team in the 'components' field.
|
364
|
-
#
|
365
|
-
# For Puppet Agent (PA) and Puppet Server (SERVER) projects, put the scrum team in
|
366
|
-
# customfield_14200
|
364
|
+
# For ordinary issues, put the scrum team in customfield_10067
|
367
365
|
def scrum_team_rules(issue_data, scrum_team)
|
368
366
|
if epic?(issue_data)
|
369
367
|
return ['components', [{ FIELD_NAME => scrum_team }]]
|
370
368
|
end
|
371
369
|
|
372
|
-
|
373
|
-
if %w[PA SERVER].include?(issue_data['project'].value)
|
374
|
-
customfield = 'customfield_14200'
|
375
|
-
end
|
376
|
-
|
377
|
-
return [customfield, { FIELD_VALUE => scrum_team }]
|
370
|
+
return ['customfield_10067', { FIELD_VALUE => scrum_team }]
|
378
371
|
end
|
379
372
|
|
380
373
|
def scrum_teams_rules(issue_data, scrum_teams)
|
374
|
+
# For epics, we can have a list of teams.
|
381
375
|
processed_teams = scrum_teams.to_a.flatten.reject { |t| t =~ %r{^\s*$} }
|
382
376
|
if epic?(issue_data)
|
383
377
|
return ['components', processed_teams.map { |team| { FIELD_NAME => team } }]
|
@@ -403,20 +397,9 @@ module Tefoji
|
|
403
397
|
end
|
404
398
|
|
405
399
|
if issue_data['story_points']
|
406
|
-
jira_fields['
|
407
|
-
end
|
408
|
-
if issue_data['team']
|
409
|
-
jira_fields['customfield_10052'] = { FIELD_VALUE => issue_data['team'] }
|
410
|
-
end
|
411
|
-
if issue_data['teams']
|
412
|
-
teams = issue_data['teams'].to_a.flatten.reject { |t| t =~ %r{^\s*$} }
|
413
|
-
unless teams.empty?
|
414
|
-
jira_fields['customfield_10066'] = teams.map { |team| { FIELD_VALUE => team } }
|
415
|
-
end
|
416
|
-
end
|
417
|
-
if issue_data['subteam']
|
418
|
-
jira_fields['customfield_10045'] = [issue_data['subteam']]
|
400
|
+
jira_fields['customfield_10058'] = issue_data['story_points'].to_i
|
419
401
|
end
|
402
|
+
|
420
403
|
if issue_data['sprint']
|
421
404
|
jira_fields['customfield_10020'] = issue_data['sprint'].to_i
|
422
405
|
end
|
data/lib/tefoji.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tefoji
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet By Perforce
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debug
|