summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/stylesheets/components/avatar.scss9
-rw-r--r--app/assets/stylesheets/framework/mixins.scss11
-rw-r--r--app/assets/stylesheets/pages/diff.scss2
-rw-r--r--changelogs/unreleased/33064-add-labels-to-note-event-payload.yml5
-rw-r--r--doc/ci/README.md7
-rw-r--r--doc/ci/environments.md4
-rw-r--r--doc/topics/git/index.md2
-rw-r--r--doc/user/project/integrations/webhooks.md28
-rw-r--r--doc/user/project/operations/img/external_dashboard_link.pngbin0 -> 63282 bytes
-rw-r--r--doc/user/project/operations/img/external_dashboard_settings.pngbin0 -> 103474 bytes
-rw-r--r--doc/user/project/operations/index.md1
-rw-r--r--doc/user/project/operations/linking_to_an_external_dashboard.md19
-rw-r--r--lib/gitlab/data_builder/note.rb1
-rw-r--r--lib/gitlab/hook_data/issue_builder.rb3
-rw-r--r--spec/lib/gitlab/data_builder/note_spec.rb2
15 files changed, 81 insertions, 13 deletions
diff --git a/app/assets/stylesheets/components/avatar.scss b/app/assets/stylesheets/components/avatar.scss
index 1afa5ed90f4..8e9650cdf34 100644
--- a/app/assets/stylesheets/components/avatar.scss
+++ b/app/assets/stylesheets/components/avatar.scss
@@ -191,12 +191,5 @@ $identicon-backgrounds: $identicon-red, $identicon-purple, $identicon-indigo, $i
}
.avatar-counter {
- background-color: $gray-darkest;
- color: $white-light;
- border: 1px solid $gray-normal;
- border-radius: 1em;
- font-family: $regular-font;
- font-size: 9px;
- line-height: 16px;
- text-align: center;
+ @include avatar-counter();
}
diff --git a/app/assets/stylesheets/framework/mixins.scss b/app/assets/stylesheets/framework/mixins.scss
index e7278554e6e..ad5096761cd 100644
--- a/app/assets/stylesheets/framework/mixins.scss
+++ b/app/assets/stylesheets/framework/mixins.scss
@@ -396,3 +396,14 @@
width: $gl-font-size * $code-line-height * 0.9;
height: $gl-font-size * $code-line-height * 0.9;
}
+
+@mixin avatar-counter($border-radius: 1em) {
+ background-color: $gray-darkest;
+ color: $white-light;
+ border: 1px solid $gray-normal;
+ border-radius: $border-radius;
+ font-family: $regular-font;
+ font-size: 9px;
+ line-height: 16px;
+ text-align: center;
+}
diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss
index 3b0d740def3..4ebf1019456 100644
--- a/app/assets/stylesheets/pages/diff.scss
+++ b/app/assets/stylesheets/pages/diff.scss
@@ -676,7 +676,7 @@ table.code {
.diff-comments-more-count,
.diff-notes-collapse {
- @extend .avatar-counter;
+ @include avatar-counter(50%);
}
.diff-notes-collapse {
diff --git a/changelogs/unreleased/33064-add-labels-to-note-event-payload.yml b/changelogs/unreleased/33064-add-labels-to-note-event-payload.yml
new file mode 100644
index 00000000000..e0a6253e1ef
--- /dev/null
+++ b/changelogs/unreleased/33064-add-labels-to-note-event-payload.yml
@@ -0,0 +1,5 @@
+---
+title: Add labels to note event payload
+merge_request: 29384
+author: Sujay Patel
+type: added
diff --git a/doc/ci/README.md b/doc/ci/README.md
index 635cce13b4e..49d62faeccf 100644
--- a/doc/ci/README.md
+++ b/doc/ci/README.md
@@ -29,8 +29,11 @@ the development cycle, ensuring that all the code deployed to
production complies with the code standards you established for
your app.
-For a complete overview of these methodologies and GitLab CI/CD,
-read the [Introduction to CI/CD with GitLab](introduction/index.md).
+For a:
+
+- Complete overview of these methodologies and GitLab CI/CD,
+ read the [Introduction to CI/CD with GitLab](introduction/index.md).
+- Video demonstration of GitLab CI/CD, see [Demo: CI/CD with GitLab](https://www.youtube.com/watch?v=1iXFbchozdY).
## Getting started
diff --git a/doc/ci/environments.md b/doc/ci/environments.md
index f2661c4bafd..bd419965a9c 100644
--- a/doc/ci/environments.md
+++ b/doc/ci/environments.md
@@ -617,6 +617,10 @@ versions of the app, all without leaving GitLab.
![Monitoring dashboard](img/environments_monitoring.png)
+#### Linking to external dashboard
+
+Add a [button to the Monitoring dashboard](../user/project/operations/linking_to_an_external_dashboard.md) linking directly to your existing external dashboards.
+
### Web terminals
> Web terminals were added in GitLab 8.15 and are only available to project Maintainers and Owners.
diff --git a/doc/topics/git/index.md b/doc/topics/git/index.md
index 841746cc5de..cdcd8215b23 100644
--- a/doc/topics/git/index.md
+++ b/doc/topics/git/index.md
@@ -21,6 +21,8 @@ More information is also available on the [Git website](https://git-scm.com).
The following resources will help you get started with Git:
+- [Git-ing started with Git](https://www.youtube.com/watch?v=Ce5nz5n41z4),
+ a video introduction to Git.
- [Git Basics](https://git-scm.com/book/en/v2/Getting-Started-Git-Basics)
- [Git on the Server - GitLab](https://git-scm.com/book/en/v2/Git-on-the-Server-GitLab)
- [How to install Git](how_to_install_git/index.md)
diff --git a/doc/user/project/integrations/webhooks.md b/doc/user/project/integrations/webhooks.md
index a0f500a939f..d5f28ddabc1 100644
--- a/doc/user/project/integrations/webhooks.md
+++ b/doc/user/project/integrations/webhooks.md
@@ -653,7 +653,33 @@ X-Gitlab-Event: Note Hook
"description": "test",
"milestone_id": null,
"state": "closed",
- "iid": 17
+ "iid": 17,
+ "labels": [
+ {
+ "id": 25,
+ "title": "Afterpod",
+ "color": "#3e8068",
+ "project_id": null,
+ "created_at": "2019-06-05T14:32:20.211Z",
+ "updated_at": "2019-06-05T14:32:20.211Z",
+ "template": false,
+ "description": null,
+ "type": "GroupLabel",
+ "group_id": 4
+ },
+ {
+ "id": 86,
+ "title": "Element",
+ "color": "#231afe",
+ "project_id": 4,
+ "created_at": "2019-06-05T14:32:20.637Z",
+ "updated_at": "2019-06-05T14:32:20.637Z",
+ "template": false,
+ "description": null,
+ "type": "ProjectLabel",
+ "group_id": null
+ }
+ ],
}
}
```
diff --git a/doc/user/project/operations/img/external_dashboard_link.png b/doc/user/project/operations/img/external_dashboard_link.png
new file mode 100644
index 00000000000..4fb8bce7cd0
--- /dev/null
+++ b/doc/user/project/operations/img/external_dashboard_link.png
Binary files differ
diff --git a/doc/user/project/operations/img/external_dashboard_settings.png b/doc/user/project/operations/img/external_dashboard_settings.png
new file mode 100644
index 00000000000..8dc380f01e2
--- /dev/null
+++ b/doc/user/project/operations/img/external_dashboard_settings.png
Binary files differ
diff --git a/doc/user/project/operations/index.md b/doc/user/project/operations/index.md
index 0086c15c98a..84711d1146f 100644
--- a/doc/user/project/operations/index.md
+++ b/doc/user/project/operations/index.md
@@ -9,3 +9,4 @@ your applications:
- Discover and view errors generated by your applications with [Error Tracking](error_tracking.md).
- Create, toggle, and remove [Feature Flags](feature_flags.md). **[PREMIUM]**
- [Trace](tracing.md) the performance and health of a deployed application. **[ULTIMATE]**
+- Add a [button to the Monitoring dashboard](linking_to_an_external_dashboard.md) linking directly to your existing external dashboards.
diff --git a/doc/user/project/operations/linking_to_an_external_dashboard.md b/doc/user/project/operations/linking_to_an_external_dashboard.md
new file mode 100644
index 00000000000..0371a40a217
--- /dev/null
+++ b/doc/user/project/operations/linking_to_an_external_dashboard.md
@@ -0,0 +1,19 @@
+# Linking to an external dashboard
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/57171) in GitLab 12.0.
+
+You can add a button to the Monitoring dashboard linking directly to your existing external dashboards.
+
+## Enabling the external dashboard link
+
+1. Go to **Settings > Operations** and scroll to the section titled **External dashboard**.
+
+1. Fill in the URL to your external dashboard and click **Save changes**.
+
+ ![External Dashboard Settings](img/external_dashboard_settings.png)
+
+1. There should now be a button on your
+ [Monitoring dashboard](../../../ci/environments.md#monitoring-environments) which
+ will open the URL you entered in the above step.
+
+ ![External Dashboard Link](img/external_dashboard_link.png)
diff --git a/lib/gitlab/data_builder/note.rb b/lib/gitlab/data_builder/note.rb
index 65601dcdf31..16e62622ed4 100644
--- a/lib/gitlab/data_builder/note.rb
+++ b/lib/gitlab/data_builder/note.rb
@@ -44,6 +44,7 @@ module Gitlab
data[:commit] = build_data_for_commit(project, user, note)
elsif note.for_issue?
data[:issue] = note.noteable.hook_attrs
+ data[:issue][:labels] = note.noteable.labels(&:hook_attrs)
elsif note.for_merge_request?
data[:merge_request] = note.noteable.hook_attrs
elsif note.for_snippet?
diff --git a/lib/gitlab/hook_data/issue_builder.rb b/lib/gitlab/hook_data/issue_builder.rb
index d39ff8c21cc..cfc9ebe4f92 100644
--- a/lib/gitlab/hook_data/issue_builder.rb
+++ b/lib/gitlab/hook_data/issue_builder.rb
@@ -44,7 +44,8 @@ module Gitlab
human_total_time_spent: issue.human_total_time_spent,
human_time_estimate: issue.human_time_estimate,
assignee_ids: issue.assignee_ids,
- assignee_id: issue.assignee_ids.first # This key is deprecated
+ assignee_id: issue.assignee_ids.first, # This key is deprecated
+ labels: issue.labels
}
issue.attributes.with_indifferent_access.slice(*self.class.safe_hook_attributes)
diff --git a/spec/lib/gitlab/data_builder/note_spec.rb b/spec/lib/gitlab/data_builder/note_spec.rb
index b236c1a9c49..ed9a1e23529 100644
--- a/spec/lib/gitlab/data_builder/note_spec.rb
+++ b/spec/lib/gitlab/data_builder/note_spec.rb
@@ -53,6 +53,8 @@ describe Gitlab::DataBuilder::Note do
.to eq(issue.reload.hook_attrs.except('updated_at'))
expect(data[:issue]['updated_at'])
.to be >= issue.hook_attrs['updated_at']
+ expect(data[:issue]['labels'])
+ .to eq(issue.hook_attrs['labels'])
end
context 'with confidential issue' do