From 08abee48daa48b4ab692c0409293eb43a7c4276c Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 20 Sep 2016 10:35:47 +0200 Subject: [PATCH 1/3] Move branded_login_page to new location and deprecate the welcome message --- doc/README.md | 2 +- doc/customization/branded_login_page.md | 20 +----------------- doc/customization/issue_closing.md | 13 ++++++++---- doc/customization/welcome_message.md | 13 +----------- doc/user/admin_area/appearance.md | 19 +++++++++++++++++ .../admin_area/img}/appearance.png | Bin .../admin_area/img}/custom_sign_in.png | Bin .../admin_area/img}/default_login_page.png | Bin 8 files changed, 31 insertions(+), 36 deletions(-) create mode 100644 doc/user/admin_area/appearance.md rename doc/{customization/branded_login_page => user/admin_area/img}/appearance.png (100%) rename doc/{customization/branded_login_page => user/admin_area/img}/custom_sign_in.png (100%) rename doc/{customization/branded_login_page => user/admin_area/img}/default_login_page.png (100%) diff --git a/doc/README.md b/doc/README.md index 254394eb63e7..f1f259ad773d 100644 --- a/doc/README.md +++ b/doc/README.md @@ -41,7 +41,7 @@ - [Security](security/README.md) Learn what you can do to further secure your GitLab instance. - [System hooks](system_hooks/system_hooks.md) Notifications when users, projects and keys are changed. - [Update](update/README.md) Update guides to upgrade your installation. -- [Welcome message](customization/welcome_message.md) Add a custom welcome message to the sign-in page. +- [Customize the sign-in page](user/admin_area/appearance.md) Change the logo and add custom text in the sign-in page. - [Reply by email](incoming_email/README.md) Allow users to comment on issues and merge requests by replying to notification emails. - [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE. - [Git LFS configuration](workflow/lfs/lfs_administration.md) diff --git a/doc/customization/branded_login_page.md b/doc/customization/branded_login_page.md index d4d9f5f7b5e7..737ef8eb930e 100644 --- a/doc/customization/branded_login_page.md +++ b/doc/customization/branded_login_page.md @@ -1,19 +1 @@ -# Changing the appearance of the login page - -GitLab Community Edition offers a way to put your company's identity on the login page of your GitLab server and make it a branded login page. - -By default, the page shows the GitLab logo and description. - -![default_login_page](branded_login_page/default_login_page.png) - -## Changing the appearance of the login page - -Navigate to the **Admin** area and go to the **Appearance** page. - -Fill in the required details like Title, Description and upload the company logo. - -![appearance](branded_login_page/appearance.png) - -After saving the page, your GitLab login page will have the details you filled in: - -![company_login_page](branded_login_page/custom_sign_in.png) +This document was moved to [user/admin_area/appearance](../user/admin_area/appearance.md). diff --git a/doc/customization/issue_closing.md b/doc/customization/issue_closing.md index 4620bb2dcde6..26853bad9215 100644 --- a/doc/customization/issue_closing.md +++ b/doc/customization/issue_closing.md @@ -1,11 +1,16 @@ # Issue closing pattern -When a commit or merge request resolves one or more issues, it is possible to automatically have these issues closed when the commit or merge request lands in the project's default branch. +When a commit or merge request resolves one or more issues, it is possible to +automatically have these issues closed when the commit or merge request lands +in the project's default branch. -If a commit message or merge request description contains a sentence matching the regular expression below, all issues referenced from -the matched text will be closed. This happens when the commit is pushed to a project's default branch, or when a commit or merge request is merged into there. +If a commit message or merge request description contains a sentence matching +the regular expression below, all issues referenced from the matched text will +be closed. This happens when the commit is pushed to a project's default branch, +or when a commit or merge request is merged into there. -When not specified, the default `issue_closing_pattern` as shown below will be used: +When not specified, the default `issue_closing_pattern` as shown below will be +used: ```bash ((?:[Cc]los(?:e[sd]?|ing)|[Ff]ix(?:e[sd]|ing)?|[Rr]esolv(?:e[sd]?|ing))(:?) +(?:(?:issues? +)?%{issue_ref}(?:(?:, *| +and +)?)|([A-Z][A-Z0-9_]+-\d+))+) diff --git a/doc/customization/welcome_message.md b/doc/customization/welcome_message.md index a0cb234bea03..329f555d050b 100644 --- a/doc/customization/welcome_message.md +++ b/doc/customization/welcome_message.md @@ -1,12 +1 @@ -# Customize the complete sign-in page - -Please see [Branded login page](branded_login_page.md) - -# Add a welcome message to the sign-in page (GitLab Community Edition) - -It is possible to add a markdown-formatted welcome message to your GitLab -sign-in page. Users of GitLab Enterprise Edition should use the [branded login -page feature](branded_login_page.md) instead. - -The welcome message (extra_sign_in_text) can now be set/changed in the Admin UI. -Admin area > Settings +This feature was deprecated in favor of [branded login page](branded_login_page.md). diff --git a/doc/user/admin_area/appearance.md b/doc/user/admin_area/appearance.md new file mode 100644 index 000000000000..dda732e0f508 --- /dev/null +++ b/doc/user/admin_area/appearance.md @@ -0,0 +1,19 @@ +# Changing the appearance of the login page + +GitLab Community Edition offers a way to put your company's identity on the login page of your GitLab server and make it a branded login page. + +By default, the page shows the GitLab logo and description. + +![default_login_page](img/default_login_page.png) + +## Changing the appearance of the login page + +Navigate to the **Admin** area and go to the **Appearance** page. + +Fill in the required details like Title, Description and upload the company logo. + +![appearance](img/appearance.png) + +After saving the page, your GitLab login page will have the details you filled in: + +![company_login_page](img/custom_sign_in.png) diff --git a/doc/customization/branded_login_page/appearance.png b/doc/user/admin_area/img/appearance.png similarity index 100% rename from doc/customization/branded_login_page/appearance.png rename to doc/user/admin_area/img/appearance.png diff --git a/doc/customization/branded_login_page/custom_sign_in.png b/doc/user/admin_area/img/custom_sign_in.png similarity index 100% rename from doc/customization/branded_login_page/custom_sign_in.png rename to doc/user/admin_area/img/custom_sign_in.png diff --git a/doc/customization/branded_login_page/default_login_page.png b/doc/user/admin_area/img/default_login_page.png similarity index 100% rename from doc/customization/branded_login_page/default_login_page.png rename to doc/user/admin_area/img/default_login_page.png -- GitLab From a4814acdce00ba882d037518072ea279aa062186 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Wed, 21 Sep 2016 13:01:48 +0200 Subject: [PATCH 2/3] Change location and refactor issue closing pattern documentation --- doc/README.md | 4 +- doc/administration/issue_closing.md | 87 +++++++++++++++++++++++ doc/customization/issue_closing.md | 45 +----------- doc/gitlab-basics/create-issue.md | 2 +- doc/intro/README.md | 2 +- doc/user/project/repository/web_editor.md | 2 +- 6 files changed, 93 insertions(+), 49 deletions(-) create mode 100644 doc/administration/issue_closing.md diff --git a/doc/README.md b/doc/README.md index f1f259ad773d..56d439e5b0c9 100644 --- a/doc/README.md +++ b/doc/README.md @@ -29,9 +29,9 @@ - [Install](install/README.md) Requirements, directory structures and installation from source. - [Restart GitLab](administration/restart_gitlab.md) Learn how to restart GitLab and its components. - [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, Twitter. -- [Issue closing](customization/issue_closing.md) Customize how to close an issue from commit messages. +- [Issue closing](administration/issue_closing.md) Customize how to close an issue from commit messages. - [Koding](administration/integration/koding.md) Set up Koding to use with GitLab. -- [Libravatar](customization/libravatar.md) Use Libravatar for user avatars. +- [Libravatar](administration/libravatar.md) Use Libravatar instead of Gravatar for user avatars. - [Log system](administration/logs.md) Log system. - [Environment Variables](administration/environment_variables.md) to configure GitLab. - [Operations](operations/README.md) Keeping GitLab up and running. diff --git a/doc/administration/issue_closing.md b/doc/administration/issue_closing.md new file mode 100644 index 000000000000..e1e31c93f6a7 --- /dev/null +++ b/doc/administration/issue_closing.md @@ -0,0 +1,87 @@ +# Issue closing pattern + +When a commit or merge request resolves one or more issues, it is possible to +automatically have these issues closed when the commit or merge request lands +in the project's default branch. + +If a commit message or merge request description contains a sentence matching +a certain regular expression, all issues referenced from the matched text will +be closed. This happens when the commit is pushed to a project's **default** +branch, or when a commit or merge request is merged into it. + +## Default closing pattern value + +When not specified, the default issue closing pattern as shown below will be +used: + +```bash +((?:[Cc]los(?:e[sd]?|ing)|[Ff]ix(?:e[sd]|ing)?|[Rr]esolv(?:e[sd]?|ing))(:?) +(?:(?:issues? +)?%{issue_ref}(?:(?:, *| +and +)?)|([A-Z][A-Z0-9_]+-\d+))+) +``` + +Note that `%{issue_ref}` is a complex regular expression defined inside GitLab's +source code that can match a reference to 1) a local issue (`#123`), +2) a cross-project issue (`group/project#123`) or 3) a link to an issue +(`https://gitlab.example.com/group/project/issues/123`). + +--- + +This translates to the following keywords: + +- Close, Closes, Closed, Closing, close, closes, closed, closing +- Fix, Fixes, Fixed, Fixing, fix, fixes, fixed, fixing +- Resolve, Resolves, Resolved, Resolving, resolve, resolves, resolved, resolving + +--- + +For example the following commit message: + +``` +Awesome commit message + +Fix #20, Fixes #21 and Closes group/otherproject#22. +This commit is also related to #17 and fixes #18, #19 +and https://gitlab.example.com/group/otherproject/issues/23. +``` + +will close `#18`, `#19`, `#20`, and `#21` in the project this commit is pushed +to, as well as `#22` and `#23` in group/otherproject. `#17` won't be closed as +it does not match the pattern. It works with multiline commit messages as well +as one-liners when used with `git commit -m`. + +## Change the issue closing pattern + +In order to change the pattern you need to have access to the server that GitLab +is installed on. + +> **Tip:** +You are advised to use http://rubular.com to test the issue closing pattern. +Because Rubular doesn't understand `%{issue_ref}`, you can replace this by +`#\d+` when testing your patterns, which matches only local issue references +like `#123`. + +**For Omnibus installations** + +1. Open `/etc/gitlab/gitlab.rb` with your editor. +1. Change the value of `gitlab_rails['issue_closing_pattern']` to a regular + expression of your liking: + + ```ruby + gitlab_rails['issue_closing_pattern'] = "((?:[Cc]los(?:e[sd]|ing)|[Ff]ix(?:e[sd]|ing)?) +(?:(?:issues? +)?%{issue_ref}(?:(?:, *| +and +)?))+)" + ``` +1. [Reconfigure] GitLab for the changes to take effect. + +**For installations from source** + +1. Open [gitlab.yml][0] with your editor. +1. Change the value of `issue_closing_pattern`: + + ```yaml + issue_closing_pattern: "((?:[Cc]los(?:e[sd]|ing)|[Ff]ix(?:e[sd]|ing)?) +(?:(?:issues? +)?%{issue_ref}(?:(?:, *| +and +)?))+)" + ``` + +1. [Restart] GitLab for the changes to take effect. + +[0]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/gitlab.yml.example +[1]: http://rubular.com/r/Xmbexed1OJ +[reconfigure]: restart_gitlab.md#omnibus-gitlab-reconfigure +[restart]: restart_gitlab.md#installations-from-source diff --git a/doc/customization/issue_closing.md b/doc/customization/issue_closing.md index 26853bad9215..b72f9ad2938f 100644 --- a/doc/customization/issue_closing.md +++ b/doc/customization/issue_closing.md @@ -1,44 +1 @@ -# Issue closing pattern - -When a commit or merge request resolves one or more issues, it is possible to -automatically have these issues closed when the commit or merge request lands -in the project's default branch. - -If a commit message or merge request description contains a sentence matching -the regular expression below, all issues referenced from the matched text will -be closed. This happens when the commit is pushed to a project's default branch, -or when a commit or merge request is merged into there. - -When not specified, the default `issue_closing_pattern` as shown below will be -used: - -```bash -((?:[Cc]los(?:e[sd]?|ing)|[Ff]ix(?:e[sd]|ing)?|[Rr]esolv(?:e[sd]?|ing))(:?) +(?:(?:issues? +)?%{issue_ref}(?:(?:, *| +and +)?)|([A-Z][A-Z0-9_]+-\d+))+) -``` - -Here, `%{issue_ref}` is a complex regular expression defined inside GitLab, that matches a reference to a local issue (`#123`), cross-project issue (`group/project#123`) or a link to an issue (`https://gitlab.example.com/group/project/issues/123`). - -For example: - -``` -git commit -m "Awesome commit message (Fix #20, Fixes #21 and Closes group/otherproject#22). This commit is also related to #17 and fixes #18, #19 and https://gitlab.example.com/group/otherproject/issues/23." -``` - -will close `#18`, `#19`, `#20`, and `#21` in the project this commit is pushed to, as well as `#22` and `#23` in group/otherproject. `#17` won't be closed as it does not match the pattern. It also works with multiline commit messages. - -Tip: you can test this closing pattern at [http://rubular.com][1]. Use this site -to test your own patterns. -Because Rubular doesn't understand `%{issue_ref}`, you can replace this by `#\d+` in testing, which matches only local issue references like `#123`. - -## Change the pattern - -For Omnibus installs you can change the default pattern in `/etc/gitlab/gitlab.rb`: - -``` -issue_closing_pattern: '((?:[Cc]los(?:e[sd]|ing)|[Ff]ix(?:e[sd]|ing)?) +(?:(?:issues? +)?%{issue_ref}(?:(?:, *| +and +)?))+)' -``` - -For manual installs you can customize the pattern in [gitlab.yml][0] using the `issue_closing_pattern` key. - -[0]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/gitlab.yml.example -[1]: http://rubular.com/r/Xmbexed1OJ +This document was moved in [administration/issue_closing.md](../administration/issue_closing.md). diff --git a/doc/gitlab-basics/create-issue.md b/doc/gitlab-basics/create-issue.md index 5221d85b6610..c823213d451b 100644 --- a/doc/gitlab-basics/create-issue.md +++ b/doc/gitlab-basics/create-issue.md @@ -24,4 +24,4 @@ You may assign the Issue to a user, add a milestone and add labels (they are all ![Submit new issue](basicsimages/submit_new_issue.png) -Your Issue will now be added to the Issue Tracker and will be ready to be reviewed. You can comment on it and mention the people involved. You can also link Issues to the Merge Requests where the Issues are solved. To do this, you can use an [Issue closing pattern](http://docs.gitlab.com/ce/customization/issue_closing.html). +Your Issue will now be added to the Issue Tracker and will be ready to be reviewed. You can comment on it and mention the people involved. You can also link Issues to the Merge Requests where the Issues are solved. To do this, you can use an [Issue closing pattern](../administration/issue_closing.md). diff --git a/doc/intro/README.md b/doc/intro/README.md index 71fef50ceb45..18a6a48e67e0 100644 --- a/doc/intro/README.md +++ b/doc/intro/README.md @@ -22,7 +22,7 @@ Create merge requests and review code. - [Fork a project and contribute to it](../workflow/forking_workflow.md) - [Create a new merge request](../gitlab-basics/add-merge-request.md) -- [Automatically close issues from merge requests](../customization/issue_closing.md) +- [Automatically close issues from merge requests](../administration/issue_closing.md) - [Automatically merge when your builds succeed](../user/project/merge_requests/merge_when_build_succeeds.md) - [Revert any commit](../user/project/merge_requests/revert_changes.md) - [Cherry-pick any commit](../user/project/merge_requests/cherry_pick_changes.md) diff --git a/doc/user/project/repository/web_editor.md b/doc/user/project/repository/web_editor.md index 7c041d019bb4..b84552683576 100644 --- a/doc/user/project/repository/web_editor.md +++ b/doc/user/project/repository/web_editor.md @@ -172,4 +172,4 @@ you commit the changes you will be taken to a new merge request form. ![New file button](basicsimages/file_button.png) [ce-2808]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2808 -[issue closing pattern]: ../customization/issue_closing.md +[issue closing pattern]: ../administration/issue_closing.md -- GitLab From 53f62f259a498960033f5e74df383ddd2c27e672 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Wed, 21 Sep 2016 13:05:16 +0200 Subject: [PATCH 3/3] Move libravatar.md to new location --- doc/administration/libravatar.md | 82 +++++++++++++++++++++++++++++++ doc/customization/libravatar.md | 83 +------------------------------- 2 files changed, 83 insertions(+), 82 deletions(-) create mode 100644 doc/administration/libravatar.md diff --git a/doc/administration/libravatar.md b/doc/administration/libravatar.md new file mode 100644 index 000000000000..c46ce2ee2036 --- /dev/null +++ b/doc/administration/libravatar.md @@ -0,0 +1,82 @@ +# Use Libravatar service with GitLab + +GitLab by default supports [Gravatar](https://gravatar.com) avatar service. +Libravatar is a service which delivers your avatar (profile picture) to other websites and their API is +[heavily based on gravatar](https://wiki.libravatar.org/api/). + +This means that it is not complicated to switch to Libravatar avatar service or even self hosted Libravatar server. + +# Configuration + +In [gitlab.yml gravatar section](https://gitlab.com/gitlab-org/gitlab-ce/blob/672bd3902d86b78d730cea809fce312ec49d39d7/config/gitlab.yml.example#L122) set +the configuration options as follows: + +## For HTTP + +```yml + gravatar: + enabled: true + # gravatar URLs: possible placeholders: %{hash} %{size} %{email} + plain_url: "http://cdn.libravatar.org/avatar/%{hash}?s=%{size}&d=identicon" +``` + +## For HTTPS + +```yml + gravatar: + enabled: true + # gravatar URLs: possible placeholders: %{hash} %{size} %{email} + ssl_url: "https://seccdn.libravatar.org/avatar/%{hash}?s=%{size}&d=identicon" +``` + +## Self-hosted + +If you are [running your own libravatar service](https://wiki.libravatar.org/running_your_own/) the URL will be different in the configuration +but the important part is to provide the same placeholders so GitLab can parse the URL correctly. + +For example, you host a service on `http://libravatar.example.com` the `plain_url` you need to supply in `gitlab.yml` is + +`http://libravatar.example.com/avatar/%{hash}?s=%{size}&d=identicon` + + +## Omnibus-gitlab example + +In `/etc/gitlab/gitlab.rb`: + +#### For http + +```ruby +gitlab_rails['gravatar_enabled'] = true +gitlab_rails['gravatar_plain_url'] = "http://cdn.libravatar.org/avatar/%{hash}?s=%{size}&d=identicon" +``` + +#### For https + +```ruby +gitlab_rails['gravatar_enabled'] = true +gitlab_rails['gravatar_ssl_url'] = "https://seccdn.libravatar.org/avatar/%{hash}?s=%{size}&d=identicon" +``` + + +Run `sudo gitlab-ctl reconfigure` for changes to take effect. + + +## Default URL for missing images + +[Libravatar supports different sets](https://wiki.libravatar.org/api/) of `missing images` for emails not found on the Libravatar service. + +In order to use a different set other than `identicon`, replace `&d=identicon` portion of the URL with another supported set. +For example, you can use `retro` set in which case the URL would look like: `plain_url: "http://cdn.libravatar.org/avatar/%{hash}?s=%{size}&d=retro"` + + +## Usage examples + +#### For Microsoft Office 365 + +If your users are Office 365-users, the "GetPersonaPhoto" service can be used. Note that this service requires login, so this use case is +most useful in a corporate installation, where all users have access to Office 365. + +```ruby +gitlab_rails['gravatar_plain_url'] = 'http://outlook.office365.com/owa/service.svc/s/GetPersonaPhoto?email=%{email}&size=HR120x120' +gitlab_rails['gravatar_ssl_url'] = 'https://outlook.office365.com/owa/service.svc/s/GetPersonaPhoto?email=%{email}&size=HR120x120' +``` diff --git a/doc/customization/libravatar.md b/doc/customization/libravatar.md index c46ce2ee2036..6b4ed09a5119 100644 --- a/doc/customization/libravatar.md +++ b/doc/customization/libravatar.md @@ -1,82 +1 @@ -# Use Libravatar service with GitLab - -GitLab by default supports [Gravatar](https://gravatar.com) avatar service. -Libravatar is a service which delivers your avatar (profile picture) to other websites and their API is -[heavily based on gravatar](https://wiki.libravatar.org/api/). - -This means that it is not complicated to switch to Libravatar avatar service or even self hosted Libravatar server. - -# Configuration - -In [gitlab.yml gravatar section](https://gitlab.com/gitlab-org/gitlab-ce/blob/672bd3902d86b78d730cea809fce312ec49d39d7/config/gitlab.yml.example#L122) set -the configuration options as follows: - -## For HTTP - -```yml - gravatar: - enabled: true - # gravatar URLs: possible placeholders: %{hash} %{size} %{email} - plain_url: "http://cdn.libravatar.org/avatar/%{hash}?s=%{size}&d=identicon" -``` - -## For HTTPS - -```yml - gravatar: - enabled: true - # gravatar URLs: possible placeholders: %{hash} %{size} %{email} - ssl_url: "https://seccdn.libravatar.org/avatar/%{hash}?s=%{size}&d=identicon" -``` - -## Self-hosted - -If you are [running your own libravatar service](https://wiki.libravatar.org/running_your_own/) the URL will be different in the configuration -but the important part is to provide the same placeholders so GitLab can parse the URL correctly. - -For example, you host a service on `http://libravatar.example.com` the `plain_url` you need to supply in `gitlab.yml` is - -`http://libravatar.example.com/avatar/%{hash}?s=%{size}&d=identicon` - - -## Omnibus-gitlab example - -In `/etc/gitlab/gitlab.rb`: - -#### For http - -```ruby -gitlab_rails['gravatar_enabled'] = true -gitlab_rails['gravatar_plain_url'] = "http://cdn.libravatar.org/avatar/%{hash}?s=%{size}&d=identicon" -``` - -#### For https - -```ruby -gitlab_rails['gravatar_enabled'] = true -gitlab_rails['gravatar_ssl_url'] = "https://seccdn.libravatar.org/avatar/%{hash}?s=%{size}&d=identicon" -``` - - -Run `sudo gitlab-ctl reconfigure` for changes to take effect. - - -## Default URL for missing images - -[Libravatar supports different sets](https://wiki.libravatar.org/api/) of `missing images` for emails not found on the Libravatar service. - -In order to use a different set other than `identicon`, replace `&d=identicon` portion of the URL with another supported set. -For example, you can use `retro` set in which case the URL would look like: `plain_url: "http://cdn.libravatar.org/avatar/%{hash}?s=%{size}&d=retro"` - - -## Usage examples - -#### For Microsoft Office 365 - -If your users are Office 365-users, the "GetPersonaPhoto" service can be used. Note that this service requires login, so this use case is -most useful in a corporate installation, where all users have access to Office 365. - -```ruby -gitlab_rails['gravatar_plain_url'] = 'http://outlook.office365.com/owa/service.svc/s/GetPersonaPhoto?email=%{email}&size=HR120x120' -gitlab_rails['gravatar_ssl_url'] = 'https://outlook.office365.com/owa/service.svc/s/GetPersonaPhoto?email=%{email}&size=HR120x120' -``` +This document was moved to [administration/libravatar](../administration/libravatar.md). -- GitLab