Commit 28290459 authored by Stan Hu's avatar Stan Hu

Merge branch 'master' into sh-support-bitbucket-server-import

parents 11dd390c 2f16eab0
image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.4.4-golang-1.9-git-2.17-chrome-67.0-node-8.x-yarn-1.2-postgresql-9.6-graphicsmagick-1.3.29" image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.4.4-golang-1.9-git-2.18-chrome-67.0-node-8.x-yarn-1.2-postgresql-9.6-graphicsmagick-1.3.29"
.dedicated-runner: &dedicated-runner .dedicated-runner: &dedicated-runner
retry: 1 retry: 1
...@@ -86,7 +86,9 @@ stages: ...@@ -86,7 +86,9 @@ stages:
.rails5: &rails5 .rails5: &rails5
allow_failure: true allow_failure: true
only: only:
- /rails5/ variables:
- $CI_COMMIT_REF_NAME =~ /rails5/
- $RAILS5_ENABLED
variables: variables:
BUNDLE_GEMFILE: "Gemfile.rails5" BUNDLE_GEMFILE: "Gemfile.rails5"
RAILS5: "true" RAILS5: "true"
...@@ -327,7 +329,7 @@ cloud-native-image: ...@@ -327,7 +329,7 @@ cloud-native-image:
cache: {} cache: {}
script: script:
- gem install gitlab --no-ri --no-rdoc - gem install gitlab --no-ri --no-rdoc
- ./scripts/trigger-build cng - BUILD_TRIGGER_TOKEN=$CI_JOB_TOKEN scripts/trigger-build cng
only: only:
- tags@gitlab-org/gitlab-ce - tags@gitlab-org/gitlab-ce
- tags@gitlab-org/gitlab-ee - tags@gitlab-org/gitlab-ee
...@@ -348,24 +350,6 @@ retrieve-tests-metadata: ...@@ -348,24 +350,6 @@ retrieve-tests-metadata:
- wget -O $FLAKY_RSPEC_SUITE_REPORT_PATH http://${TESTS_METADATA_S3_BUCKET}.s3.amazonaws.com/$FLAKY_RSPEC_SUITE_REPORT_PATH || rm $FLAKY_RSPEC_SUITE_REPORT_PATH - wget -O $FLAKY_RSPEC_SUITE_REPORT_PATH http://${TESTS_METADATA_S3_BUCKET}.s3.amazonaws.com/$FLAKY_RSPEC_SUITE_REPORT_PATH || rm $FLAKY_RSPEC_SUITE_REPORT_PATH
- '[[ -f $FLAKY_RSPEC_SUITE_REPORT_PATH ]] || echo "{}" > ${FLAKY_RSPEC_SUITE_REPORT_PATH}' - '[[ -f $FLAKY_RSPEC_SUITE_REPORT_PATH ]] || echo "{}" > ${FLAKY_RSPEC_SUITE_REPORT_PATH}'
danger-review:
image: registry.gitlab.com/gitlab-org/gitaly/dangercontainer:latest
stage: prepare
before_script:
- source scripts/utils.sh
- retry gem install danger --no-ri --no-rdoc
cache: {}
only:
refs:
- branches@gitlab-org/gitlab-ce
- branches@gitlab-org/gitlab-ee
except:
variables:
- $CI_COMMIT_REF_NAME =~ /^ce-to-ee-.*/
script:
- git version
- danger --fail-on-errors=true
update-tests-metadata: update-tests-metadata:
<<: *tests-metadata-state <<: *tests-metadata-state
<<: *only-canonical-masters <<: *only-canonical-masters
...@@ -454,6 +438,27 @@ setup-test-env: ...@@ -454,6 +438,27 @@ setup-test-env:
- config/secrets.yml - config/secrets.yml
- vendor/gitaly-ruby - vendor/gitaly-ruby
danger-review:
image: registry.gitlab.com/gitlab-org/gitaly/dangercontainer:latest
stage: test
allow_failure: true
before_script:
- source scripts/utils.sh
- retry gem install danger --no-ri --no-rdoc
cache: {}
only:
refs:
- branches@gitlab-org/gitlab-ce
- branches@gitlab-org/gitlab-ee
except:
refs:
- master
variables:
- $CI_COMMIT_REF_NAME =~ /^ce-to-ee-.*/
script:
- git version
- danger --fail-on-errors=true
rspec-pg 0 30: *rspec-metadata-pg rspec-pg 0 30: *rspec-metadata-pg
rspec-pg 1 30: *rspec-metadata-pg rspec-pg 1 30: *rspec-metadata-pg
rspec-pg 2 30: *rspec-metadata-pg rspec-pg 2 30: *rspec-metadata-pg
......
...@@ -34,17 +34,17 @@ When removing columns, tables, indexes or other structures: ...@@ -34,17 +34,17 @@ When removing columns, tables, indexes or other structures:
## General checklist ## General checklist
- [ ] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary - [ ] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary
- [ ] [Documentation created/updated](https://docs.gitlab.com/ee/development/doc_styleguide.html) - [ ] [Documentation created/updated](https://docs.gitlab.com/ee/development/documentation/index.html#contributing-to-docs)
- [ ] API support added - [ ] [API support added](https://docs.gitlab.com/ee/development/api_styleguide.html)
- [ ] Tests added for this feature/bug - [ ] [Tests added for this feature/bug](https://docs.gitlab.com/ee/development/testing_guide/index.html)
- Conform by the [code review guidelines](https://docs.gitlab.com/ee/development/code_review.html) - Conforms to the [code review guidelines](https://docs.gitlab.com/ee/development/code_review.html)
- [ ] Has been reviewed by a Backend maintainer - [ ] Has been reviewed by a Backend [maintainer](https://about.gitlab.com/handbook/engineering/#maintainer)
- [ ] Has been reviewed by a Database specialist - [ ] Has been reviewed by a Database [specialist](https://about.gitlab.com/team/structure/#specialist)
- [ ] Conform by the [merge request performance guides](https://docs.gitlab.com/ee/development/merge_request_performance_guidelines.html) - [ ] Conforms to the [merge request performance guidelines](https://docs.gitlab.com/ee/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/CONTRIBUTING.md#style-guides) - [ ] Conforms to the [style guides](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/CONTRIBUTING.md#style-guides)
- [ ] If you have multiple commits, please combine them into a few logically organized commits by [squashing them](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) - [ ] If you have multiple commits, please combine them into a few logically organized commits by [squashing them](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
- [ ] Internationalization required/considered - [ ] [Internationalization required/considered](https://docs.gitlab.com/ee/development/i18n/index.html)
- [ ] If paid feature, have we considered GitLab.com plan and how it works for groups and is there a design for promoting it to users who aren't on the correct plan - [ ] For a paid feature, have we considered GitLab.com plans, how it works for groups, and is there a design for promoting it to users who aren't on the correct plan?
- [ ] End-to-end tests pass (`package-and-qa` manual pipeline job) - [ ] [End-to-end tests](https://docs.gitlab.com/ee/development/testing_guide/end_to_end_tests.html#testing-code-in-merge-requests) pass (`package-and-qa` manual pipeline job)
/label ~database /label ~database
<!--See the general Documentation guidelines https://docs.gitlab.com/ce/development/writing_documentation.html --> <!--See the general Documentation guidelines https://docs.gitlab.com/ee/development/documentation/index.html -->
## What does this MR do? ## What does this MR do?
...@@ -13,17 +13,17 @@ Closes ...@@ -13,17 +13,17 @@ Closes
## Moving docs to a new location? ## Moving docs to a new location?
Read the guidelines: Read the guidelines:
https://docs.gitlab.com/ce/development/writing_documentation.html#changing-document-location https://docs.gitlab.com/ee/development/documentation/#changing-document-location
- [ ] Make sure the old link is not removed and has its contents replaced with - [ ] Make sure the old link is not removed and has its contents replaced with
a link to the new location. a link to the new location.
- [ ] Make sure internal links pointing to the document in question are not broken. - [ ] Make sure internal links pointing to the document in question are not broken.
- [ ] Search and replace any links referring to old docs in GitLab Rails app, - [ ] Search and replace any links referring to the old docs in the GitLab Rails app,
specifically under the `app/views/` and `ee/app/views` (for GitLab EE) directories. specifically under the `app/views/` and `ee/app/views` (for GitLab EE) directories.
- [ ] Make sure to add [`redirect_from`](https://docs.gitlab.com/ce/development/writing_documentation.html#redirections-for-pages-with-disqus-comments) - [ ] Make sure to add [`redirect_from`](https://docs.gitlab.com/ee/development/documentation/index.html#redirections-for-pages-with-disqus-comments)
to the new document if there are any Disqus comments on the old document thread. to the new document if there are any Disqus comments on the old document thread.
- [ ] If working on CE and the `ee-compat-check` jobs fails, submit an MR to EE - [ ] If working on CE and the `ee-compat-check` jobs fails, [submit an MR to EE
with the changes as well (https://docs.gitlab.com/ce/development/writing_documentation.html#cherry-picking-from-ce-to-ee). with the changes](https://docs.gitlab.com/ee/development/documentation/index.html#cherry-picking-from-ce-to-ee) as well.
- [ ] Ping one of the technical writers for review. - [ ] Ping one of the technical writers for review.
/label ~Documentation /label ~Documentation
...@@ -85,6 +85,9 @@ export default { ...@@ -85,6 +85,9 @@ export default {
} }
return __('Show latest version'); return __('Show latest version');
}, },
canCurrentUserFork() {
return this.currentUser.canFork === true && this.currentUser.canCreateMergeRequest;
},
}, },
watch: { watch: {
diffViewType() { diffViewType() {
...@@ -192,7 +195,7 @@ export default { ...@@ -192,7 +195,7 @@ export default {
v-for="file in diffFiles" v-for="file in diffFiles"
:key="file.newPath" :key="file.newPath"
:file="file" :file="file"
:current-user="currentUser" :can-current-user-fork="canCurrentUserFork"
/> />
</div> </div>
<no-changes v-else /> <no-changes v-else />
......
...@@ -18,8 +18,8 @@ export default { ...@@ -18,8 +18,8 @@ export default {
type: Object, type: Object,
required: true, required: true,
}, },
currentUser: { canCurrentUserFork: {
type: Object, type: Boolean,
required: true, required: true,
}, },
}, },
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
class="diff-file file-holder" class="diff-file file-holder"
> >
<diff-file-header <diff-file-header
:current-user="currentUser" :can-current-user-fork="canCurrentUserFork"
:diff-file="file" :diff-file="file"
:collapsible="true" :collapsible="true"
:expanded="!isCollapsed" :expanded="!isCollapsed"
......
...@@ -39,8 +39,8 @@ export default { ...@@ -39,8 +39,8 @@ export default {
required: false, required: false,
default: true, default: true,
}, },
currentUser: { canCurrentUserFork: {
type: Object, type: Boolean,
required: true, required: true,
}, },
}, },
...@@ -228,7 +228,7 @@ export default { ...@@ -228,7 +228,7 @@ export default {
<edit-button <edit-button
v-if="!diffFile.deletedFile" v-if="!diffFile.deletedFile"
:current-user="currentUser" :can-current-user-fork="canCurrentUserFork"
:edit-path="diffFile.editPath" :edit-path="diffFile.editPath"
:can-modify-blob="diffFile.canModifyBlob" :can-modify-blob="diffFile.canModifyBlob"
@showForkMessage="showForkMessage" @showForkMessage="showForkMessage"
......
...@@ -13,12 +13,8 @@ export default { ...@@ -13,12 +13,8 @@ export default {
noteForm, noteForm,
}, },
props: { props: {
diffFile: { diffFileHash: {
type: Object, type: String,
required: true,
},
diffLines: {
type: Array,
required: true, required: true,
}, },
line: { line: {
...@@ -40,6 +36,7 @@ export default { ...@@ -40,6 +36,7 @@ export default {
noteableData: state => state.notes.noteableData, noteableData: state => state.notes.noteableData,
diffViewType: state => state.diffs.diffViewType, diffViewType: state => state.diffs.diffViewType,
}), }),
...mapGetters('diffs', ['getDiffFileByHash']),
...mapGetters(['isLoggedIn', 'noteableType', 'getNoteableData', 'getNotesDataByProp']), ...mapGetters(['isLoggedIn', 'noteableType', 'getNoteableData', 'getNotesDataByProp']),
}, },
mounted() { mounted() {
...@@ -68,13 +65,14 @@ export default { ...@@ -68,13 +65,14 @@ export default {
}); });
}, },
handleSaveNote(note) { handleSaveNote(note) {
const selectedDiffFile = this.getDiffFileByHash(this.diffFileHash);
const postData = getNoteFormData({ const postData = getNoteFormData({
note, note,
noteableData: this.noteableData, noteableData: this.noteableData,
noteableType: this.noteableType, noteableType: this.noteableType,
noteTargetLine: this.noteTargetLine, noteTargetLine: this.noteTargetLine,
diffViewType: this.diffViewType, diffViewType: this.diffViewType,
diffFile: this.diffFile, diffFile: selectedDiffFile,
linePosition: this.position, linePosition: this.position,
}); });
......
...@@ -24,8 +24,12 @@ export default { ...@@ -24,8 +24,12 @@ export default {
type: Object, type: Object,
required: true, required: true,
}, },
diffFile: { fileHash: {
type: Object, type: String,
required: true,
},
contextLinesPath: {
type: String,
required: true, required: true,
}, },
diffViewType: { diffViewType: {
...@@ -120,14 +124,14 @@ export default { ...@@ -120,14 +124,14 @@ export default {
:class="classNameMap" :class="classNameMap"
> >
<diff-line-gutter-content <diff-line-gutter-content
:file-hash="diffFile.fileHash" :file-hash="fileHash"
:context-lines-path="contextLinesPath"
:line-type="normalizedLine.type" :line-type="normalizedLine.type"
:line-code="normalizedLine.lineCode" :line-code="normalizedLine.lineCode"
:line-position="linePosition" :line-position="linePosition"
:line-number="lineNumber" :line-number="lineNumber"
:meta-data="normalizedLine.metaData" :meta-data="normalizedLine.metaData"
:show-comment-button="showCommentButton" :show-comment-button="showCommentButton"
:context-lines-path="diffFile.contextLinesPath"
:is-bottom="isBottom" :is-bottom="isBottom"
:is-match-line="isMatchLine" :is-match-line="isMatchLine"
:is-context-line="isContentLine" :is-context-line="isContentLine"
......
...@@ -5,8 +5,8 @@ export default { ...@@ -5,8 +5,8 @@ export default {
type: String, type: String,
required: true, required: true,
}, },
currentUser: { canCurrentUserFork: {
type: Object, type: Boolean,
required: true, required: true,
}, },
canModifyBlob: { canModifyBlob: {
...@@ -17,12 +17,12 @@ export default { ...@@ -17,12 +17,12 @@ export default {
}, },
methods: { methods: {
handleEditClick(evt) { handleEditClick(evt) {
if (!this.currentUser || this.canModifyBlob) { if (!this.canCurrentUserFork || this.canModifyBlob) {
// if we can Edit, do default Edit button behavior // if we can Edit, do default Edit button behavior
return; return;
} }
if (this.currentUser.canFork && this.currentUser.canCreateMergeRequest) { if (this.canCurrentUserFork) {
evt.preventDefault(); evt.preventDefault();
this.$emit('showForkMessage'); this.$emit('showForkMessage');
} }
......
...@@ -13,12 +13,8 @@ export default { ...@@ -13,12 +13,8 @@ export default {
type: Object, type: Object,
required: true, required: true,
}, },
diffFile: { diffFileHash: {
type: Object, type: String,
required: true,
},
diffLines: {
type: Array,
required: true, required: true,
}, },
lineIndex: { lineIndex: {
...@@ -58,10 +54,9 @@ export default { ...@@ -58,10 +54,9 @@ export default {
/> />
<diff-line-note-form <diff-line-note-form
v-if="diffLineCommentForms[line.lineCode]" v-if="diffLineCommentForms[line.lineCode]"
:diff-file="diffFile" :diff-file-hash="diffFileHash"
:diff-lines="diffLines"
:line="line" :line="line"
:note-target-line="diffLines[lineIndex]" :note-target-line="line"
/> />
</div> </div>
</td> </td>
......
...@@ -16,8 +16,12 @@ export default { ...@@ -16,8 +16,12 @@ export default {
DiffTableCell, DiffTableCell,
}, },
props: { props: {
diffFile: { fileHash: {
type: Object, type: String,
required: true,
},
contextLinesPath: {
type: String,
required: true, required: true,
}, },
line: { line: {
...@@ -50,7 +54,7 @@ export default { ...@@ -50,7 +54,7 @@ export default {
inlineRowId() { inlineRowId() {
const { lineCode, oldLine, newLine } = this.line; const { lineCode, oldLine, newLine } = this.line;
return lineCode || `${this.diffFile.fileHash}_${oldLine}_${newLine}`; return lineCode || `${this.fileHash}_${oldLine}_${newLine}`;
}, },
}, },
created() { created() {
...@@ -78,7 +82,8 @@ export default { ...@@ -78,7 +82,8 @@ export default {
@mouseout="handleMouseMove" @mouseout="handleMouseMove"
> >
<diff-table-cell <diff-table-cell
:diff-file="diffFile" :file-hash="fileHash"
:context-lines-path="contextLinesPath"
:line="line" :line="line"
:line-type="oldLineType" :line-type="oldLineType"
:is-bottom="isBottom" :is-bottom="isBottom"
...@@ -87,7 +92,8 @@ export default { ...@@ -87,7 +92,8 @@ export default {
class="diff-line-num old_line" class="diff-line-num old_line"
/> />
<diff-table-cell <diff-table-cell
:diff-file="diffFile" :file-hash="fileHash"
:context-lines-path="contextLinesPath"
:line="line" :line="line"
:line-type="newLineType" :line-type="newLineType"
:is-bottom="isBottom" :is-bottom="isBottom"
......
...@@ -60,15 +60,15 @@ export default { ...@@ -60,15 +60,15 @@ export default {
v-for="(line, index) in normalizedDiffLines" v-for="(line, index) in normalizedDiffLines"
> >
<inline-diff-table-row <inline-diff-table-row
:diff-file="diffFile" :file-hash="diffFile.fileHash"
:context-lines-path="diffFile.contextLinesPath"
:line="line" :line="line"
:is-bottom="index + 1 === diffLinesLength" :is-bottom="index + 1 === diffLinesLength"
:key="line.lineCode" :key="line.lineCode"
/> />
<inline-diff-comment-row <inline-diff-comment-row
v-if="shouldRenderCommentRow(line)" v-if="shouldRenderCommentRow(line)"
:diff-file="diffFile" :diff-file-hash="diffFile.fileHash"
:diff-lines="normalizedDiffLines"
:line="line" :line="line"
:line-index="index" :line-index="index"
:key="index" :key="index"
......
...@@ -13,12 +13,8 @@ export default { ...@@ -13,12 +13,8 @@ export default {
type: Object, type: Object,
required: true, required: true,
}, },
diffFile: { diffFileHash: {
type: Object, type: String,
required: true,
},
diffLines: {
type: Array,
required: true, required: true,
}, },
lineIndex: { lineIndex: {
...@@ -91,10 +87,9 @@ export default { ...@@ -91,10 +87,9 @@ export default {
<diff-line-note-form <diff-line-note-form
v-if="diffLineCommentForms[leftLineCode] && v-if="diffLineCommentForms[leftLineCode] &&
diffLineCommentForms[leftLineCode]" diffLineCommentForms[leftLineCode]"
:diff-file="diffFile" :diff-file-hash="diffFileHash"
:diff-lines="diffLines"
:line="line.left" :line="line.left"
:note-target-line="diffLines[lineIndex].left" :note-target-line="line.left"
position="left" position="left"
/> />
</td> </td>
...@@ -112,10 +107,9 @@ export default { ...@@ -112,10 +107,9 @@ export default {
<diff-line-note-form <diff-line-note-form
v-if="diffLineCommentForms[rightLineCode] && v-if="diffLineCommentForms[rightLineCode] &&
diffLineCommentForms[rightLineCode] && line.right.type" diffLineCommentForms[rightLineCode] && line.right.type"
:diff-file="diffFile" :diff-file-hash="diffFileHash"
:diff-lines="diffLines"
:line="line.right" :line="line.right"
:note-target-line="diffLines[lineIndex].right" :note-target-line="line.right"
position="right" position="right"
/> />
</td> </td>
......
...@@ -19,8 +19,12 @@ export default { ...@@ -19,8 +19,12 @@ export default {
DiffTableCell, DiffTableCell,
}, },
props: { props: {
diffFile: { fileHash: {
type: Object, type: String,
required: true,
},
contextLinesPath: {
type: String,
required: true, required: true,
}, },
line: { line: {
...@@ -103,7 +107,8 @@ export default { ...@@ -103,7 +107,8 @@ export default {
@mouseout="handleMouseMove" @mouseout="handleMouseMove"
> >
<diff-table-cell <diff-table-cell
:diff-file="diffFile" :file-hash="fileHash"
:context-lines-path="contextLinesPath"
:line="line" :line="line"
:line-type="oldLineType" :line-type="oldLineType"
:line-position="linePositionLeft" :line-position="linePositionLeft"
...@@ -123,7 +128,8 @@ export default { ...@@ -123,7 +128,8 @@ export default {
> >
</td> </td>
<diff-table-cell <diff-table-cell
:diff-file="diffFile" :file-hash="fileHash"
:context-lines-path="contextLinesPath"
:line="line" :line="line"
:line-type="newLineType" :line-type="newLineType"
:line-position="linePositionRight" :line-position="linePositionRight"
......
...@@ -93,17 +93,17 @@ export default { ...@@ -93,17 +93,17 @@ export default {
v-for="(line, index) in parallelDiffLines" v-for="(line, index) in parallelDiffLines"
> >
<parallel-diff-table-row <parallel-diff-table-row
:diff-file="diffFile" :file-hash="diffFile.fileHash"
:context-lines-path="diffFile.contextLinesPath"
:line="line" :line="line"
:is-bottom="index + 1 === diffLinesLength" :is-bottom="index + 1 === diffLinesLength"
:key="index" :key="index"
/> />
<parallel-diff-comment-row <parallel-diff-comment-row
v-if="shouldRenderCommentRow(line)" v-if="shouldRenderCommentRow(line)"
:key="line.left.lineCode || line.right.lineCode" :key="`dcr-${index}`"
:line="line" :line="line"
:diff-file="diffFile" :diff-file-hash="diffFile.fileHash"
:diff-lines="parallelDiffLines"
:line-index="index" :line-index="index"
/> />
</template> </template>
......
...@@ -57,4 +57,8 @@ export const getDiffFileDiscussions = (state, getters, rootState, rootGetters) = ...@@ -57,4 +57,8 @@ export const getDiffFileDiscussions = (state, getters, rootState, rootGetters) =
) || []; ) || [];
// prevent babel-plugin-rewire from generating an invalid default during karma∂ tests // prevent babel-plugin-rewire from generating an invalid default during karma∂ tests
export const getDiffFileByHash = state => fileHash =>
state.diffFiles.find(file => file.fileHash === fileHash);
// prevent babel-plugin-rewire from generating an invalid default during karma tests
export default () => {}; export default () => {};
...@@ -38,6 +38,7 @@ export default { ...@@ -38,6 +38,7 @@ export default {
<button <button
:aria-label="label" :aria-label="label"
type="button" type="button"
class="btn-blank"
@click.stop.prevent="clicked" @click.stop.prevent="clicked"
> >
<icon <icon
......
<script> <script>
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import imageDiffHelper from '~/image_diff/helpers/index'; import imageDiffHelper from '~/image_diff/helpers/index';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import DiffFileHeader from '~/diffs/components/diff_file_header.vue'; import DiffFileHeader from '~/diffs/components/diff_file_header.vue';
import SkeletonLoadingContainer from '~/vue_shared/components/skeleton_loading_container.vue'; import SkeletonLoadingContainer from '~/vue_shared/components/skeleton_loading_container.vue';
import { trimFirstCharOfLineContent } from '~/diffs/store/utils'; import { trimFirstCharOfLineContent } from '~/diffs/store/utils';
export default { export default {
components: { components: {
DiffFileHeader, DiffFileHeader,
SkeletonLoadingContainer, SkeletonLoadingContainer,
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
noteableData: state => state.notes.noteableData, noteableData: state => state.notes.noteableData,
}), }),
hasTruncatedDiffLines() { hasTruncatedDiffLines() {
return this.discussion.truncatedDiffLines && return this.discussion.truncatedDiffLines && this.discussion.truncatedDiffLines.length !== 0;
this.discussion.truncatedDiffLines.length !== 0;
}, },
isDiscussionsExpanded() { isDiscussionsExpanded() {
return true; // TODO: @fatihacet - Fix this. return true; // TODO: @fatihacet - Fix this.
...@@ -49,9 +48,6 @@ ...@@ -49,9 +48,6 @@
imageDiffHtml() { imageDiffHtml() {
return this.discussion.imageDiffHtml; return this.discussion.imageDiffHtml;
}, },
currentUser() {
return this.noteableData.current_user;
},
userColorScheme() { userColorScheme() {
return window.gon.user_color_scheme; return window.gon.user_color_scheme;
}, },
...@@ -88,7 +84,7 @@ ...@@ -88,7 +84,7 @@
}); });
}, },
}, },
}; };
</script> </script>
<template> <template>
...@@ -99,7 +95,7 @@ ...@@ -99,7 +95,7 @@
> >
<diff-file-header <diff-file-header
:diff-file="diffFile" :diff-file="diffFile"
:current-user="currentUser" :can-current-user-fork="false"
:discussions-expanded="isDiscussionsExpanded" :discussions-expanded="isDiscussionsExpanded"
:expanded="!isCollapsed" :expanded="!isCollapsed"
/> />
......
...@@ -175,6 +175,7 @@ export default { ...@@ -175,6 +175,7 @@ export default {
<span <span
:aria-label="stage.title" :aria-label="stage.title"
aria-hidden="true" aria-hidden="true"
class="no-pointer-events"
> >
<icon :name="borderlessIcon" /> <icon :name="borderlessIcon" />
</span> </span>
......
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
:cx="dotX" :cx="dotX"
:cy="dotY" :cy="dotY"
r="1.5" r="1.5"
tranform="translate(0 -1)" transform="translate(0 -1)"
/> />
</svg> </svg>
</div> </div>
......
...@@ -110,7 +110,7 @@ code { ...@@ -110,7 +110,7 @@ code {
padding: 2px 4px; padding: 2px 4px;
color: $red-600; color: $red-600;
background-color: $red-100; background-color: $red-100;
border-radius: 3px; border-radius: $border-radius-default;
.code > & { .code > & {
background-color: inherit; background-color: inherit;
...@@ -128,7 +128,8 @@ table { ...@@ -128,7 +128,8 @@ table {
border-spacing: 0; border-spacing: 0;
} }
.tooltip { .tooltip,
.no-pointer-events {
// Fix bootstrap4 bug whereby tooltips flicker when they are hovered over their borders // Fix bootstrap4 bug whereby tooltips flicker when they are hovered over their borders
pointer-events: none; pointer-events: none;
} }
......
...@@ -9,12 +9,8 @@ ...@@ -9,12 +9,8 @@
.gfm-project_member { .gfm-project_member {
padding: 0 2px; padding: 0 2px;
border-radius: #{$border-radius-default / 2}; background-color: $blue-100;
background-color: $user-mention-bg; border-radius: $border-radius-default;
&:hover {
background-color: $user-mention-bg-hover;
}
} }
.gfm-color_chip { .gfm-color_chip {
......
...@@ -551,6 +551,7 @@ ...@@ -551,6 +551,7 @@
@include media-breakpoint-up(lg) { @include media-breakpoint-up(lg) {
.branch-actions { .branch-actions {
align-self: center; align-self: center;
margin-left: $gl-padding;
} }
} }
} }
......
...@@ -116,7 +116,12 @@ class Projects::WikisController < Projects::ApplicationController ...@@ -116,7 +116,12 @@ class Projects::WikisController < Projects::ApplicationController
# Call #wiki to make sure the Wiki Repo is initialized # Call #wiki to make sure the Wiki Repo is initialized
@project_wiki.wiki @project_wiki.wiki
@sidebar_page = @project_wiki.find_sidebar(params[:version_id])
unless @sidebar_page # Fallback to default sidebar
@sidebar_wiki_entries = WikiPage.group_by_directory(@project_wiki.pages(limit: 15)) @sidebar_wiki_entries = WikiPage.group_by_directory(@project_wiki.pages(limit: 15))
end
rescue ProjectWiki::CouldNotCreateWikiError rescue ProjectWiki::CouldNotCreateWikiError
flash[:notice] = "Could not create Wiki Repository at this time. Please try again later." flash[:notice] = "Could not create Wiki Repository at this time. Please try again later."
redirect_to project_path(@project) redirect_to project_path(@project)
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
# personal: boolean # personal: boolean
# search: string # search: string
# non_archived: boolean # non_archived: boolean
# archived: 'only' or boolean
# #
class ProjectsFinder < UnionFinder class ProjectsFinder < UnionFinder
include CustomAttributesFilter include CustomAttributesFilter
...@@ -130,7 +131,7 @@ class ProjectsFinder < UnionFinder ...@@ -130,7 +131,7 @@ class ProjectsFinder < UnionFinder
def by_archived(projects) def by_archived(projects)
if params[:non_archived] if params[:non_archived]
projects.non_archived projects.non_archived
elsif params.key?(:archived) # Back-compatibility with the places where `params[:archived]` can be set explicitly to `false` elsif params.key?(:archived)
if params[:archived] == 'only' if params[:archived] == 'only'
projects.archived projects.archived
elsif Gitlab::Utils.to_boolean(params[:archived]) elsif Gitlab::Utils.to_boolean(params[:archived])
......
...@@ -413,20 +413,6 @@ module ProjectsHelper ...@@ -413,20 +413,6 @@ module ProjectsHelper
@ref || @repository.try(:root_ref) @ref || @repository.try(:root_ref)
end end
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1235
def sanitize_repo_path(project, message)
return '' unless message.present?
exports_path = File.join(Settings.shared['path'], 'tmp/project_exports')
filtered_message = message.strip.gsub(exports_path, "[REPO EXPORT PATH]")
disk_path = Gitlab::GitalyClient::StorageSettings.allow_disk_access do
Gitlab.config.repositories.storages[project.repository_storage].legacy_disk_path
end
filtered_message.gsub(disk_path.chomp('/'), "[REPOS PATH]")
end
def project_child_container_class(view_path) def project_child_container_class(view_path)
view_path == "projects/issues/issues" ? "prepend-top-default" : "project-show-#{view_path}" view_path == "projects/issues/issues" ? "prepend-top-default" : "project-show-#{view_path}"
end end
......
...@@ -8,7 +8,7 @@ module SubmoduleHelper ...@@ -8,7 +8,7 @@ module SubmoduleHelper
url = repository.submodule_url_for(ref, submodule_item.path) url = repository.submodule_url_for(ref, submodule_item.path)
if url == '.' || url == './' if url == '.' || url == './'
url = File.join(Gitlab.config.gitlab.url, @project.full_path) url = File.join(Gitlab.config.gitlab.url, repository.project.full_path)
end end
if url =~ %r{([^/:]+)/([^/]+(?:\.git)?)\Z} if url =~ %r{([^/:]+)/([^/]+(?:\.git)?)\Z}
...@@ -31,7 +31,7 @@ module SubmoduleHelper ...@@ -31,7 +31,7 @@ module SubmoduleHelper
[namespace_project_path(namespace, project), [namespace_project_path(namespace, project),
namespace_project_tree_path(namespace, project, submodule_item.id)] namespace_project_tree_path(namespace, project, submodule_item.id)]
elsif relative_self_url?(url) elsif relative_self_url?(url)
relative_self_links(url, submodule_item.id) relative_self_links(url, submodule_item.id, repository.project)
elsif github_dot_com_url?(url) elsif github_dot_com_url?(url)
standard_links('github.com', namespace, project, submodule_item.id) standard_links('github.com', namespace, project, submodule_item.id)
elsif gitlab_dot_com_url?(url) elsif gitlab_dot_com_url?(url)
...@@ -73,7 +73,7 @@ module SubmoduleHelper ...@@ -73,7 +73,7 @@ module SubmoduleHelper
[base, [base, '/tree/', commit].join('')] [base, [base, '/tree/', commit].join('')]
end end
def relative_self_links(url, commit) def relative_self_links(url, commit, project)
url.rstrip! url.rstrip!
# Map relative links to a namespace and project # Map relative links to a namespace and project
# For example: # For example:
...@@ -85,7 +85,7 @@ module SubmoduleHelper ...@@ -85,7 +85,7 @@ module SubmoduleHelper
namespace = components.pop.gsub(/^\.\.$/, '') namespace = components.pop.gsub(/^\.\.$/, '')
if namespace.empty? if namespace.empty?
namespace = @project.namespace.full_path namespace = project.namespace.full_path
end end
begin begin
......
...@@ -92,10 +92,6 @@ class Deployment < ActiveRecord::Base ...@@ -92,10 +92,6 @@ class Deployment < ActiveRecord::Base
@stop_action ||= manual_actions.find_by(name: on_stop) @stop_action ||= manual_actions.find_by(name: on_stop)
end end
def stop_action?
stop_action.present?
end
def formatted_deployment_time def formatted_deployment_time
created_at.to_time.in_time_zone.to_s(:medium) created_at.to_time.in_time_zone.to_s(:medium)
end end
......
...@@ -117,7 +117,7 @@ class Environment < ActiveRecord::Base ...@@ -117,7 +117,7 @@ class Environment < ActiveRecord::Base
external_url.gsub(%r{\A.*?://}, '') external_url.gsub(%r{\A.*?://}, '')
end end
def stop_action? def stop_action_available?
available? && stop_action.present? available? && stop_action.present?
end end
......
...@@ -202,7 +202,7 @@ class Note < ActiveRecord::Base ...@@ -202,7 +202,7 @@ class Note < ActiveRecord::Base
end end
def hook_attrs def hook_attrs
attributes Gitlab::HookData::NoteBuilder.new(self).build
end end
def for_commit? def for_commit?
......
...@@ -2173,12 +2173,15 @@ class Project < ActiveRecord::Base ...@@ -2173,12 +2173,15 @@ class Project < ActiveRecord::Base
merge_requests = source_of_merge_requests.opened merge_requests = source_of_merge_requests.opened
.where(allow_collaboration: true) .where(allow_collaboration: true)
# Issue for N+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/49322
Gitlab::GitalyClient.allow_n_plus_1_calls do
if branch_name if branch_name
merge_requests.find_by(source_branch: branch_name)&.can_be_merged_by?(user) merge_requests.find_by(source_branch: branch_name)&.can_be_merged_by?(user)
else else
merge_requests.any? { |merge_request| merge_request.can_be_merged_by?(user) } merge_requests.any? { |merge_request| merge_request.can_be_merged_by?(user) }
end end
end end
end
if RequestStore.active? if RequestStore.active?
RequestStore.fetch("project-#{id}:branch-#{branch_name}:user-#{user.id}:branch_allows_collaboration") do RequestStore.fetch("project-#{id}:branch-#{branch_name}:user-#{user.id}:branch_allows_collaboration") do
......
# frozen_string_literal: true
class ProjectWiki class ProjectWiki
include Gitlab::ShellAdapter include Gitlab::ShellAdapter
include Storage::LegacyProjectWiki include Storage::LegacyProjectWiki
...@@ -9,6 +11,7 @@ class ProjectWiki ...@@ -9,6 +11,7 @@ class ProjectWiki
}.freeze unless defined?(MARKUPS) }.freeze unless defined?(MARKUPS)
CouldNotCreateWikiError = Class.new(StandardError) CouldNotCreateWikiError = Class.new(StandardError)
SIDEBAR = '_sidebar'
# Returns a string describing what went wrong after # Returns a string describing what went wrong after
# an operation fails. # an operation fails.
...@@ -98,6 +101,10 @@ class ProjectWiki ...@@ -98,6 +101,10 @@ class ProjectWiki
end end
end end
def find_sidebar(version = nil)
find_page(SIDEBAR, version)
end
def find_file(name, version = nil) def find_file(name, version = nil)
wiki.file(name, version) wiki.file(name, version)
end end
......
...@@ -60,7 +60,7 @@ class WikiPage ...@@ -60,7 +60,7 @@ class WikiPage
attr_accessor :attributes attr_accessor :attributes
def hook_attrs def hook_attrs
attributes Gitlab::HookData::WikiPageBuilder.new(self).build
end end
def initialize(wiki, page = nil, persisted = false) def initialize(wiki, page = nil, persisted = false)
......
...@@ -2,11 +2,12 @@ class EnvironmentPolicy < BasePolicy ...@@ -2,11 +2,12 @@ class EnvironmentPolicy < BasePolicy
delegate { @subject.project } delegate { @subject.project }
condition(:stop_with_deployment_allowed) do condition(:stop_with_deployment_allowed) do
@subject.stop_action? && can?(:create_deployment) && can?(:update_build, @subject.stop_action) @subject.stop_action_available? &&
can?(:create_deployment) && can?(:update_build, @subject.stop_action)
end end
condition(:stop_with_update_allowed) do condition(:stop_with_update_allowed) do
!@subject.stop_action? && can?(:update_environment, @subject) !@subject.stop_action_available? && can?(:update_environment, @subject)
end end
rule { stop_with_deployment_allowed | stop_with_update_allowed }.enable :stop_environment rule { stop_with_deployment_allowed | stop_with_update_allowed }.enable :stop_environment
......
...@@ -7,7 +7,7 @@ class EnvironmentEntity < Grape::Entity ...@@ -7,7 +7,7 @@ class EnvironmentEntity < Grape::Entity
expose :external_url expose :external_url
expose :environment_type expose :environment_type
expose :last_deployment, using: DeploymentEntity expose :last_deployment, using: DeploymentEntity
expose :stop_action?, as: :has_stop_action expose :stop_action_available?, as: :has_stop_action
expose :metrics_path, if: -> (environment, _) { environment.has_metrics? } do |environment| expose :metrics_path, if: -> (environment, _) { environment.has_metrics? } do |environment|
metrics_project_environment_path(environment.project, environment) metrics_project_environment_path(environment.project, environment)
......
# frozen_string_literal: true
class AccessTokenValidationService class AccessTokenValidationService
# Results: # Results:
VALID = :valid VALID = :valid
......
# frozen_string_literal: true
## ##
# Branch can be deleted either by DeleteBranchService # Branch can be deleted either by DeleteBranchService
# or by GitPushService. # or by GitPushService.
......
# frozen_string_literal: true
class AkismetService class AkismetService
attr_accessor :owner, :text, :options attr_accessor :owner, :text, :options
......
# frozen_string_literal: true
module ApplicationSettings module ApplicationSettings
class BaseService < ::BaseService class BaseService < ::BaseService
def initialize(application_setting, user, params = {}) def initialize(application_setting, user, params = {})
......
# frozen_string_literal: true
module ApplicationSettings module ApplicationSettings
class UpdateService < ApplicationSettings::BaseService class UpdateService < ApplicationSettings::BaseService
attr_reader :params, :application_setting attr_reader :params, :application_setting
......
# frozen_string_literal: true
module Applications module Applications
class CreateService class CreateService
def initialize(current_user, params) def initialize(current_user, params)
......
# frozen_string_literal: true
class AuditEventService class AuditEventService
def initialize(author, entity, details = {}) def initialize(author, entity, details = {})
@author, @entity, @details = author, entity, details @author, @entity, @details = author, entity, details
......
# frozen_string_literal: true
module Auth module Auth
class ContainerRegistryAuthenticationService < BaseService class ContainerRegistryAuthenticationService < BaseService
AUDIENCE = 'container_registry'.freeze AUDIENCE = 'container_registry'.freeze
......
# frozen_string_literal: true
module Badges module Badges
class BaseService class BaseService
protected protected
......
# frozen_string_literal: true
module Badges module Badges
class BuildService < Badges::BaseService class BuildService < Badges::BaseService
# returns the created badge # returns the created badge
......
# frozen_string_literal: true
module Badges module Badges
class CreateService < Badges::BaseService class CreateService < Badges::BaseService
# returns the created badge # returns the created badge
......
# frozen_string_literal: true
module Badges module Badges
class UpdateService < Badges::BaseService class UpdateService < Badges::BaseService
# returns the updated badge # returns the updated badge
......
# frozen_string_literal: true
# Base class for services that count a single resource such as the number of # Base class for services that count a single resource such as the number of
# issues for a project. # issues for a project.
class BaseCountService class BaseCountService
......
# frozen_string_literal: true
class BaseRenderer class BaseRenderer
attr_reader :current_user attr_reader :current_user
......
# frozen_string_literal: true
class BaseService class BaseService
include Gitlab::Allowable include Gitlab::Allowable
......
# frozen_string_literal: true
module Boards module Boards
class BaseService < ::BaseService class BaseService < ::BaseService
# Parent can either a group or a project # Parent can either a group or a project
......
# frozen_string_literal: true
module Boards module Boards
class CreateService < Boards::BaseService class CreateService < Boards::BaseService
def execute def execute
......
# frozen_string_literal: true
module Boards module Boards
module Issues module Issues
class CreateService < Boards::BaseService class CreateService < Boards::BaseService
......
# frozen_string_literal: true
module Boards module Boards
module Issues module Issues
class ListService < Boards::BaseService class ListService < Boards::BaseService
......
# frozen_string_literal: true
module Boards module Boards
module Issues module Issues
class MoveService < Boards::BaseService class MoveService < Boards::BaseService
......
# frozen_string_literal: true
module Boards module Boards
class ListService < Boards::BaseService class ListService < Boards::BaseService
def execute def execute
......
# frozen_string_literal: true
module Boards module Boards
module Lists module Lists
class CreateService < Boards::BaseService class CreateService < Boards::BaseService
......
# frozen_string_literal: true
module Boards module Boards
module Lists module Lists
class DestroyService < Boards::BaseService class DestroyService < Boards::BaseService
......
# frozen_string_literal: true
module Boards module Boards
module Lists module Lists
class GenerateService < Boards::BaseService class GenerateService < Boards::BaseService
......
# frozen_string_literal: true
module Boards module Boards
module Lists module Lists
class ListService < Boards::BaseService class ListService < Boards::BaseService
......
# frozen_string_literal: true
module Boards module Boards
module Lists module Lists
class MoveService < Boards::BaseService class MoveService < Boards::BaseService
......
# frozen_string_literal: true
module ChatNames module ChatNames
class AuthorizeUserService class AuthorizeUserService
include Gitlab::Routing include Gitlab::Routing
......
# frozen_string_literal: true
module ChatNames module ChatNames
class FindUserService class FindUserService
def initialize(service, params) def initialize(service, params)
......
# frozen_string_literal: true
module Ci module Ci
class CreatePipelineScheduleService < BaseService class CreatePipelineScheduleService < BaseService
def execute def execute
......
# frozen_string_literal: true
module Ci module Ci
class CreatePipelineService < BaseService class CreatePipelineService < BaseService
attr_reader :pipeline attr_reader :pipeline
......
# frozen_string_literal: true
module Ci module Ci
## ##
# We call this service everytime we persist a CI/CD job. # We call this service everytime we persist a CI/CD job.
......
# frozen_string_literal: true
module Ci module Ci
class ExtractSectionsFromBuildTraceService < BaseService class ExtractSectionsFromBuildTraceService < BaseService
def execute(build) def execute(build)
......
# frozen_string_literal: true
## ##
# TODO: # TODO:
# Almost components in this class were copied from app/models/project_services/kubernetes_service.rb # Almost components in this class were copied from app/models/project_services/kubernetes_service.rb
......
# frozen_string_literal: true
module Ci module Ci
class PipelineTriggerService < BaseService class PipelineTriggerService < BaseService
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
......
# frozen_string_literal: true
module Ci module Ci
class PlayBuildService < ::BaseService class PlayBuildService < ::BaseService
def execute(build) def execute(build)
......
# frozen_string_literal: true
module Ci module Ci
class ProcessPipelineService < BaseService class ProcessPipelineService < BaseService
attr_reader :pipeline attr_reader :pipeline
......
# frozen_string_literal: true
module Ci module Ci
# This class responsible for assigning # This class responsible for assigning
# proper pending build to runner on runner API request # proper pending build to runner on runner API request
......
# frozen_string_literal: true
module Ci module Ci
class RetryBuildService < ::BaseService class RetryBuildService < ::BaseService
CLONE_ACCESSORS = %i[pipeline project ref tag options commands name CLONE_ACCESSORS = %i[pipeline project ref tag options commands name
......
# frozen_string_literal: true
module Ci module Ci
class RetryPipelineService < ::BaseService class RetryPipelineService < ::BaseService
include Gitlab::OptimisticLocking include Gitlab::OptimisticLocking
......
# frozen_string_literal: true
module Ci module Ci
class StopEnvironmentsService < BaseService class StopEnvironmentsService < BaseService
attr_reader :ref attr_reader :ref
...@@ -8,7 +10,7 @@ module Ci ...@@ -8,7 +10,7 @@ module Ci
return unless @ref.present? return unless @ref.present?
environments.each do |environment| environments.each do |environment|
next unless environment.stop_action? next unless environment.stop_action_available?
next unless can?(current_user, :stop_environment, environment) next unless can?(current_user, :stop_environment, environment)
environment.stop_with_action!(current_user) environment.stop_with_action!(current_user)
......
# frozen_string_literal: true
module Ci module Ci
class UpdateBuildQueueService class UpdateBuildQueueService
def execute(build) def execute(build)
......
# frozen_string_literal: true
module Ci module Ci
class UpdateRunnerService class UpdateRunnerService
attr_reader :runner attr_reader :runner
......
# frozen_string_literal: true
module Clusters module Clusters
module Applications module Applications
class BaseHelmService class BaseHelmService
......
# frozen_string_literal: true
module Clusters module Clusters
module Applications module Applications
class CheckIngressIpAddressService < BaseHelmService class CheckIngressIpAddressService < BaseHelmService
......
# frozen_string_literal: true
module Clusters module Clusters
module Applications module Applications
class CheckInstallationProgressService < BaseHelmService class CheckInstallationProgressService < BaseHelmService
......
# frozen_string_literal: true
module Clusters module Clusters
module Applications module Applications
class InstallService < BaseHelmService class InstallService < BaseHelmService
......
# frozen_string_literal: true
module Clusters module Clusters
module Applications module Applications
class ScheduleInstallationService < ::BaseService class ScheduleInstallationService < ::BaseService
......
# frozen_string_literal: true
module Clusters module Clusters
class CreateService < BaseService class CreateService < BaseService
attr_reader :access_token attr_reader :access_token
......
# frozen_string_literal: true
module Clusters module Clusters
module Gcp module Gcp
class FetchOperationService class FetchOperationService
......
# frozen_string_literal: true
module Clusters module Clusters
module Gcp module Gcp
class FinalizeCreationService class FinalizeCreationService
......
# frozen_string_literal: true
module Clusters module Clusters
module Gcp module Gcp
class ProvisionService class ProvisionService
......
# frozen_string_literal: true
module Clusters module Clusters
module Gcp module Gcp
class VerifyProvisionStatusService class VerifyProvisionStatusService
......
# frozen_string_literal: true
module Clusters module Clusters
class UpdateService < BaseService class UpdateService < BaseService
def execute(cluster) def execute(cluster)
......
# frozen_string_literal: true
class CohortsService class CohortsService
MONTHS_INCLUDED = 12 MONTHS_INCLUDED = 12
......
# frozen_string_literal: true
module Commits module Commits
class ChangeService < Commits::CreateService class ChangeService < Commits::CreateService
def initialize(*args) def initialize(*args)
......
# frozen_string_literal: true
module Commits module Commits
class CherryPickService < ChangeService class CherryPickService < ChangeService
def create_commit! def create_commit!
......
# frozen_string_literal: true
module Commits module Commits
class CreateService < ::BaseService class CreateService < ::BaseService
ValidationError = Class.new(StandardError) ValidationError = Class.new(StandardError)
......
# frozen_string_literal: true
module Commits module Commits
class RevertService < ChangeService class RevertService < ChangeService
def create_commit! def create_commit!
......
# frozen_string_literal: true
require 'securerandom' require 'securerandom'
# Compare 2 refs for one repo or between repositories # Compare 2 refs for one repo or between repositories
......
# frozen_string_literal: true
# #
# Concern that helps with getting an exclusive lease for running a block # Concern that helps with getting an exclusive lease for running a block
# of code. # of code.
......
# frozen_string_literal: true
module Issues module Issues
module ResolveDiscussions module ResolveDiscussions
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
......
# frozen_string_literal: true
module UpdateVisibilityLevel module UpdateVisibilityLevel
def valid_visibility_level_change?(target, new_visibility) def valid_visibility_level_change?(target, new_visibility)
# check that user is allowed to set specified visibility_level # check that user is allowed to set specified visibility_level
......
# frozen_string_literal: true
module Users module Users
module NewUserNotifier module NewUserNotifier
def notify_new_user(user, reset_token) def notify_new_user(user, reset_token)
......
# frozen_string_literal: true
module Users module Users
module ParticipableService module ParticipableService
extend ActiveSupport::Concern extend ActiveSupport::Concern
......
# frozen_string_literal: true
class CreateBranchService < BaseService class CreateBranchService < BaseService
def execute(branch_name, ref) def execute(branch_name, ref)
create_master_branch if project.empty_repo? create_master_branch if project.empty_repo?
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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