Commit a5a87db6 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 23d60ad9 4860b2b9
......@@ -313,6 +313,14 @@ class Note < ActiveRecord::Base
!system?
end
# Since we're using `updated_at` as `last_edited_at`, it could be touched by transforming / resolving a note.
# This makes sure it is only marked as edited when the note body is updated.
def edited?
return false if updated_by.blank?
super
end
def cross_reference_not_visible_for?(user)
cross_reference? && !all_referenced_mentionables_allowed?(user)
end
......
---
title: Fix notes being marked as edited after resolving
merge_request: 26143
author:
type: fixed
......@@ -66,7 +66,7 @@ GET /namespaces?search=foobar
```
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| --------- | ------ | -------- | ----------- |
| `search` | string | no | Returns a list of namespaces the user is authorized to see based on the search criteria |
Example request:
......@@ -100,8 +100,8 @@ GET /namespaces/:id
```
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | ID or path of the namespace |
| --------- | -------------- | -------- | ----------- |
| `id` | integer/string | yes | ID or [URL-encoded path of the namespace](README.md#namespaced-path-encoding) |
Example request:
......
......@@ -1703,6 +1703,11 @@ of using YAML anchors, you can use the [`extends` keyword](#extends).
See [usage examples](#include-examples).
NOTE: **Note:**
`.gitlab-ci.yml` configuration included by all methods is evaluated at pipeline creation.
The configuration is a snapshot in time and persisted in the database. Any changes to
referenced `.gitlab-ci.yml` configuration will not be reflected in GitLab until the next pipeline is created.
#### `include:local`
`include:local` includes a file from the same repository as `.gitlab-ci.yml`.
......@@ -1793,14 +1798,6 @@ include:
All nested includes will be executed without context as public user, so only another remote,
or public project, or template is allowed.
NOTE: **Note:**
Changes to remote includes will not have effect on already created pipelines,
because the include is being evaluated at the time of pipeline creation.
This is when full definition of CI yaml is being expanded in order to create
pipeline with stages with jobs. You always retry job that is already created,
thus created after pipeline creation. To re-include all (thus re-evaluate the
configuration), you have to re-create pipeline.
#### Nested includes
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/56836) in GitLab 11.9.
......
......@@ -219,6 +219,9 @@ We support the current and the previous major release of:
- Microsoft Edge
- Internet Explorer 11
The browser vendors release regular minor version updates with important bug fixes and security updates.
Support is only provided for the current minor version of the major version you are running.
Each time a new browser version is released, we begin supporting that version and stop supporting the third most recent version.
Note: We do not support running GitLab with JavaScript disabled in the browser and have no plans of supporting that
......
......@@ -208,6 +208,24 @@ describe Note do
end
end
describe "edited?" do
let(:note) { build(:note, updated_by_id: nil, created_at: Time.now, updated_at: Time.now + 5.hours) }
context "with updated_by" do
it "returns true" do
note.updated_by = build(:user)
expect(note.edited?).to be_truthy
end
end
context "without updated_by" do
it "returns false" do
expect(note.edited?).to be_falsy
end
end
end
describe "confidential?" do
it "delegates to noteable" do
issue_note = build(:note, :on_issue)
......
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