Commit 389e2997 authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-09-10

parents 10966544 c777f074
......@@ -205,7 +205,8 @@ export function prepareDiffData(diffData) {
if (file.highlightedDiffLines) {
const linesLength = file.highlightedDiffLines.length;
for (let u = 0; u < linesLength; u += 1) {
trimFirstCharOfLineContent(file.highlightedDiffLines[u]);
const line = file.highlightedDiffLines[u];
Object.assign(line, { ...trimFirstCharOfLineContent(line) });
}
showingLines += file.parallelDiffLines.length;
}
......
---
title: Fixes double +/- on inline diff view
merge_request: 21634
author:
type: fixed
---
title: 'API: Use find_branch! in all places'
merge_request: 21614
author: Robert Schilling
type: fixed
......@@ -9,14 +9,6 @@ module API
before { authorize! :download_code, user_project }
helpers do
def find_branch!(branch_name)
begin
user_project.repository.find_branch(branch_name) || not_found!('Branch')
rescue Gitlab::Git::CommandError
render_api_error!('The branch refname is invalid', 400)
end
end
params :filter_params do
optional :search, type: String, desc: 'Return list of branches matching the search criteria'
optional :sort, type: String, desc: 'Return list of branches sorted by the given field'
......
......@@ -164,8 +164,7 @@ module API
commit = user_project.commit(params[:sha])
not_found!('Commit') unless commit
branch = user_project.repository.find_branch(params[:branch])
not_found!('Branch') unless branch
find_branch!(params[:branch])
commit_params = {
commit: commit,
......@@ -176,7 +175,7 @@ module API
result = ::Commits::CherryPickService.new(user_project, current_user, commit_params).execute
if result[:status] == :success
branch = user_project.repository.find_branch(params[:branch])
branch = find_branch!(params[:branch])
present user_project.repository.commit(branch.dereferenced_target), with: Entities::Commit
else
render_api_error!(result[:message], 400)
......
......@@ -168,6 +168,12 @@ module API
end
end
def find_branch!(branch_name)
user_project.repository.find_branch(branch_name) || not_found!('Branch')
rescue Gitlab::Git::CommandError
render_api_error!('The branch refname is invalid', 400)
end
def find_project_label(id)
labels = available_labels_for(user_project)
label = labels.find_by_id(id) || labels.find_by_title(id)
......
......@@ -68,7 +68,7 @@ module QA
end
def ldap_tab?
page.has_button?('LDAP')
page.has_link?('LDAP')
end
def switch_to_sign_in_tab
......
......@@ -11,6 +11,7 @@ module QA
view 'app/views/projects/_new_project_fields.html.haml' do
element :project_namespace_select
element :project_namespace_field, 'namespaces_options'
element :project_name, 'text_field :name'
element :project_path, 'text_field :path'
element :project_description, 'text_area :description'
element :project_create_button, "submit 'Create project'"
......@@ -32,7 +33,7 @@ module QA
end
def choose_name(name)
fill_in 'project_path', with: name
fill_in 'project_name', with: name
end
def add_description(description)
......
......@@ -231,9 +231,18 @@ describe('DiffsStoreUtils', () => {
expect(firstParallelDiffLine.left).not.toHaveAttr('text');
expect(firstParallelDiffLine.right.discussions.length).toBe(0);
expect(firstParallelDiffLine.right).not.toHaveAttr('text');
expect(preparedDiff.diffFiles[0].highlightedDiffLines[0].discussions.length).toBe(0);
expect(preparedDiff.diffFiles[0].highlightedDiffLines[0]).not.toHaveAttr('text');
const firstParallelChar = firstParallelDiffLine.right.richText.charAt(0);
expect(firstParallelChar).not.toBe(' ');
expect(firstParallelChar).not.toBe('+');
expect(firstParallelChar).not.toBe('-');
const checkLine = preparedDiff.diffFiles[0].highlightedDiffLines[0];
expect(checkLine.discussions.length).toBe(0);
expect(checkLine).not.toHaveAttr('text');
const firstChar = checkLine.richText.charAt(0);
expect(firstChar).not.toBe(' ');
expect(firstChar).not.toBe('+');
expect(firstChar).not.toBe('-');
expect(preparedDiff.diffFiles[0].renderIt).toBeTruthy();
expect(preparedDiff.diffFiles[0].collapsed).toBeFalsy();
......
FROM node:8.11-alpine
FROM node:10.6-alpine
WORKDIR /usr/src/app
# Uncomment if use of `process.dlopen` is necessary
# apk add --no-cache libc6-compat
ENV PORT 8080
EXPOSE 8080 # replace this with your application's default port, if necessary
ARG NODE_ENV
ARG NODE_ENV=production
ENV NODE_ENV $NODE_ENV
COPY package.json /usr/src/app/
WORKDIR /usr/src/app
COPY package.json .
RUN npm install
COPY . .
COPY . /usr/src/app
# replace this with your application's default port
EXPOSE 8888
CMD [ "npm", "start" ]
FROM openjdk:9
FROM maven:3.5-jdk-11 as BUILD
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
COPY . /usr/src/app
RUN mvn --batch-mode -f /usr/src/app/pom.xml clean package
RUN javac Main.java
FROM openjdk:11-jdk
ENV PORT 4567
EXPOSE 4567
COPY --from=BUILD /usr/src/app/target /opt/target
WORKDIR /opt/target
CMD ["java", "Main"]
CMD ["/bin/bash", "-c", "find -type f -name '*-with-dependencies.jar' | xargs java -jar"]
......@@ -7,21 +7,21 @@ RUN apk --no-cache add nodejs postgresql-client tzdata
# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY Gemfile Gemfile.lock /usr/src/app/
COPY Gemfile Gemfile.lock .
# Install build dependencies - required for gems with native dependencies
RUN apk add --no-cache --virtual build-deps build-base postgresql-dev && \
bundle install && \
apk del build-deps
COPY . /usr/src/app
COPY . .
# For Sinatra
#EXPOSE 4567
#CMD ["ruby", "./config.rb"]
# For Rails
ENV PORT 3000
EXPOSE 3000
CMD ["bundle", "exec", "rails", "server"]
......@@ -8,6 +8,9 @@
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
......
......@@ -3,6 +3,9 @@
# Word temporary
~$*.doc*
# Word Auto Backup File
Backup of *.doc*
# Excel temporary
~$*.xls*
......
......@@ -9,7 +9,6 @@
*~
_autosave-*
*.tmp
*-cache.lib
*-rescue.lib
*-save.pro
*-save.kicad_pcb
......
.DS_Store
applet
application.linux-arm64
application.linux-armv6hf
application.linux32
application.linux64
application.windows32
......
......@@ -38,6 +38,7 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
......@@ -72,6 +73,10 @@ target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
......@@ -102,3 +107,5 @@ venv.bak/
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
......@@ -47,3 +47,15 @@ bower.json
# Ignore node_modules
node_modules/
# Ignore precompiled javascript packs
/public/packs
/public/packs-test
# Ignore yarn files
/yarn-error.log
yarn-debug.log*
.yarn-integrity
# Ignore uploaded files in development
/storage/*
!/storage/.keep
\ No newline at end of file
......@@ -69,3 +69,10 @@ fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output
# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode
iOSInjectionProject/
......@@ -15,6 +15,10 @@
!var/logs/.gitkeep
!var/sessions/.gitkeep
# Logs (Symfony4)
/var/log/*
!var/log/.gitkeep
# Parameters
/app/config/parameters.yml
/app/config/parameters.ini
......
......@@ -188,6 +188,9 @@ sympy-plots-for-*.tex/
*.pytxcode
pythontex-files-*/
# tcolorbox
*.listing
# thmtools
*.loe
......
......@@ -13,3 +13,14 @@ crash.log
# version control.
#
# example.tfvars
# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json
# Include override files you do wish to add to version control using negated pattern
#
# !example_override.tf
......@@ -51,6 +51,8 @@ variables:
KUBERNETES_VERSION: 1.8.6
HELM_VERSION: 2.6.1
DOCKER_DRIVER: overlay2
stages:
- build
- test
......@@ -67,8 +69,6 @@ build:
image: docker:stable-git
services:
- docker:stable-dind
variables:
DOCKER_DRIVER: overlay2
script:
- setup_docker
- build
......@@ -95,8 +95,6 @@ test:
code_quality:
stage: test
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
......@@ -114,8 +112,6 @@ code_quality:
license_management:
stage: test
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
......@@ -133,8 +129,6 @@ license_management:
performance:
stage: performance
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
......@@ -156,8 +150,6 @@ performance:
sast:
stage: test
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
......@@ -175,8 +167,6 @@ sast:
dependency_scanning:
stage: test
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
......@@ -194,8 +184,6 @@ dependency_scanning:
container_scanning:
stage: test
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
......
......@@ -17,7 +17,7 @@
variables:
# This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
# As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
# when running from the command line.
# `installAtEnd` and `deployAtEnd` are only effective with recent version of the corresponding plugins.
......
# Full project: https://gitlab.com/pages/middleman
image: ruby:2.4
variables:
LANG: "C.UTF-8"
image: ruby:2.3
cache:
paths:
- vendor
before_script:
test:
script:
- apt-get update -yqqq
- apt-get install -y nodejs
- bundle install --path vendor
test:
script:
- bundle exec middleman build
except:
- master
pages:
script:
- apt-get update -yqqq
- apt-get install -y nodejs
- bundle install --path vendor
- bundle exec middleman build
artifacts:
paths:
......
# Lifted from: https://about.gitlab.com/2016/03/10/setting-up-gitlab-ci-for-ios-projects/
# This file assumes an own GitLab CI runner, setup on an macOS system.
# This file assumes an own GitLab CI runner, setup on a macOS system.
stages:
- build
- archive
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment