Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3a2cce6d
Commit
3a2cce6d
authored
Jan 06, 2021
by
Pavel Shutsin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow users to use IssueDeployedToProduction VSA event
Can be used while creating custom VSA stages
parent
aaeddaa7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
7 deletions
+18
-7
changelogs/unreleased/250659-allow-users-to-use-production-stage-end-event.yml
.../250659-allow-users-to-use-production-stage-end-event.yml
+5
-0
lib/gitlab/analytics/cycle_analytics/stage_events.rb
lib/gitlab/analytics/cycle_analytics/stage_events.rb
+4
-5
lib/gitlab/analytics/cycle_analytics/stage_events/issue_deployed_to_production.rb
...le_analytics/stage_events/issue_deployed_to_production.rb
+2
-2
spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_deployed_to_production_spec.rb
...alytics/stage_events/issue_deployed_to_production_spec.rb
+7
-0
No files found.
changelogs/unreleased/250659-allow-users-to-use-production-stage-end-event.yml
0 → 100644
View file @
3a2cce6d
---
title
:
Allow users to use IssueDeployedToProduction VSA event
merge_request
:
51199
author
:
type
:
added
lib/gitlab/analytics/cycle_analytics/stage_events.rb
View file @
3a2cce6d
...
...
@@ -11,6 +11,7 @@ module Gitlab
ENUM_MAPPING
=
{
StageEvents
::
IssueCreated
=>
1
,
StageEvents
::
IssueFirstMentionedInCommit
=>
2
,
StageEvents
::
IssueDeployedToProduction
=>
3
,
StageEvents
::
MergeRequestCreated
=>
100
,
StageEvents
::
MergeRequestFirstDeployedToProduction
=>
101
,
StageEvents
::
MergeRequestLastBuildFinished
=>
102
,
...
...
@@ -18,8 +19,7 @@ module Gitlab
StageEvents
::
MergeRequestMerged
=>
104
,
StageEvents
::
CodeStageStart
=>
1_000
,
StageEvents
::
IssueStageEnd
=>
1_001
,
StageEvents
::
PlanStageStart
=>
1_002
,
StageEvents
::
ProductionStageEnd
=>
1_003
StageEvents
::
PlanStageStart
=>
1_002
}.
freeze
EVENTS
=
ENUM_MAPPING
.
keys
.
freeze
...
...
@@ -27,8 +27,7 @@ module Gitlab
INTERNAL_EVENTS
=
[
StageEvents
::
CodeStageStart
,
StageEvents
::
IssueStageEnd
,
StageEvents
::
PlanStageStart
,
StageEvents
::
ProductionStageEnd
StageEvents
::
PlanStageStart
].
freeze
# Defines which start_event and end_event pairs are allowed
...
...
@@ -41,7 +40,7 @@ module Gitlab
],
StageEvents
::
IssueCreated
=>
[
StageEvents
::
IssueStageEnd
,
StageEvents
::
ProductionStageEnd
StageEvents
::
IssueDeployedToProduction
],
StageEvents
::
MergeRequestCreated
=>
[
StageEvents
::
MergeRequestMerged
...
...
lib/gitlab/analytics/cycle_analytics/stage_events/
production_stage_end
.rb
→
lib/gitlab/analytics/cycle_analytics/stage_events/
issue_deployed_to_production
.rb
View file @
3a2cce6d
...
...
@@ -4,13 +4,13 @@ module Gitlab
module
Analytics
module
CycleAnalytics
module
StageEvents
class
ProductionStageEnd
<
StageEvent
class
IssueDeployedToProduction
<
StageEvent
def
self
.
name
_
(
"Issue first deployed to production"
)
end
def
self
.
identifier
:
production_stage_end
:
issue_deployed_to_production
end
def
object_type
...
...
spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_deployed_to_production_spec.rb
0 → 100644
View file @
3a2cce6d
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Analytics
::
CycleAnalytics
::
StageEvents
::
IssueDeployedToProduction
do
it_behaves_like
'value stream analytics event'
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment