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
c3a427f2
Commit
c3a427f2
authored
Aug 04, 2021
by
mgandres
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove commit sha from rails injection
parent
b95daeff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
15 deletions
+0
-15
app/assets/javascripts/pipeline_editor/index.js
app/assets/javascripts/pipeline_editor/index.js
+0
-9
app/helpers/ci/pipeline_editor_helper.rb
app/helpers/ci/pipeline_editor_helper.rb
+0
-1
spec/helpers/ci/pipeline_editor_helper_spec.rb
spec/helpers/ci/pipeline_editor_helper_spec.rb
+0
-5
No files found.
app/assets/javascripts/pipeline_editor/index.js
View file @
c3a427f2
...
...
@@ -4,7 +4,6 @@ import VueApollo from 'vue-apollo';
import
createDefaultClient
from
'
~/lib/graphql
'
;
import
{
resetServiceWorkersPublicPath
}
from
'
../lib/utils/webpack
'
;
import
{
CODE_SNIPPET_SOURCE_SETTINGS
}
from
'
./components/code_snippet_alert/constants
'
;
import
getCommitSha
from
'
./graphql/queries/client/commit_sha.graphql
'
;
import
getCurrentBranch
from
'
./graphql/queries/client/current_branch.graphql
'
;
import
getLastCommitBranchQuery
from
'
./graphql/queries/client/last_commit_branch.query.graphql
'
;
import
getPipelineEtag
from
'
./graphql/queries/client/pipeline_etag.graphql
'
;
...
...
@@ -26,7 +25,6 @@ export const initPipelineEditor = (selector = '#js-pipeline-editor') => {
const
{
// Add to apollo cache as it can be updated by future queries
commitSha
,
initialBranchName
,
pipelineEtag
,
// Add to provide/inject API for static values
...
...
@@ -69,13 +67,6 @@ export const initPipelineEditor = (selector = '#js-pipeline-editor') => {
},
});
cache
.
writeQuery
({
query
:
getCommitSha
,
data
:
{
commitSha
,
},
});
cache
.
writeQuery
({
query
:
getPipelineEtag
,
data
:
{
...
...
app/helpers/ci/pipeline_editor_helper.rb
View file @
c3a427f2
...
...
@@ -16,7 +16,6 @@ module Ci
"ci-config-path"
:
project
.
ci_config_path_or_default
,
"ci-examples-help-page-path"
=>
help_page_path
(
'ci/examples/index'
),
"ci-help-page-path"
=>
help_page_path
(
'ci/index'
),
"commit-sha"
=>
commit_sha
,
"default-branch"
=>
project
.
default_branch_or_main
,
"empty-state-illustration-path"
=>
image_path
(
'illustrations/empty-state/empty-dag-md.svg'
),
"initial-branch-name"
=>
initial_branch
,
...
...
spec/helpers/ci/pipeline_editor_helper_spec.rb
View file @
c3a427f2
...
...
@@ -42,7 +42,6 @@ RSpec.describe Ci::PipelineEditorHelper do
"ci-config-path"
:
project
.
ci_config_path_or_default
,
"ci-examples-help-page-path"
=>
help_page_path
(
'ci/examples/index'
),
"ci-help-page-path"
=>
help_page_path
(
'ci/index'
),
"commit-sha"
=>
project
.
commit
.
sha
,
"default-branch"
=>
project
.
default_branch_or_main
,
"empty-state-illustration-path"
=>
'foo'
,
"initial-branch-name"
=>
nil
,
...
...
@@ -69,7 +68,6 @@ RSpec.describe Ci::PipelineEditorHelper do
"ci-config-path"
:
project
.
ci_config_path_or_default
,
"ci-examples-help-page-path"
=>
help_page_path
(
'ci/examples/index'
),
"ci-help-page-path"
=>
help_page_path
(
'ci/index'
),
"commit-sha"
=>
''
,
"default-branch"
=>
project
.
default_branch_or_main
,
"empty-state-illustration-path"
=>
'foo'
,
"initial-branch-name"
=>
nil
,
...
...
@@ -97,10 +95,7 @@ RSpec.describe Ci::PipelineEditorHelper do
end
it
'returns correct values'
do
latest_feature_sha
=
project
.
repository
.
commit
(
'feature'
).
sha
expect
(
pipeline_editor_data
[
'initial-branch-name'
]).
to
eq
(
'feature'
)
expect
(
pipeline_editor_data
[
'commit-sha'
]).
to
eq
(
latest_feature_sha
)
end
end
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