Commit cd663882 authored by Ruben Davila's avatar Ruben Davila

Merge branch '8-12-stable-ee' into ce_upstream

Conflicts:
	db/schema.rb
	spec/lib/gitlab/import_export/all_models.yml
	spec/lib/gitlab/import_export/safe_model_attributes.yml
parents 66a1f4e1 373ad85a
...@@ -12,6 +12,7 @@ v 8.12.0 (unreleased) ...@@ -12,6 +12,7 @@ v 8.12.0 (unreleased)
- Prevent secrets to be pushed to the repository - Prevent secrets to be pushed to the repository
- Prepend blank line to `Closes` message on merge request linked to issue (lukehowell) - Prepend blank line to `Closes` message on merge request linked to issue (lukehowell)
- Fix issues/merge-request templates dropdown for forked projects - Fix issues/merge-request templates dropdown for forked projects
- Amends the packager.io configuration file to create a build for Ubuntu 16.04. !6247 (Jon "The Nice Guy" Spriggs)
- Filter tags by name !6121 - Filter tags by name !6121
- Update gitlab shell secret file also when it is empty. !3774 (glensc) - Update gitlab shell secret file also when it is empty. !3774 (glensc)
- Give project selection dropdowns responsive width, make non-wrapping. - Give project selection dropdowns responsive width, make non-wrapping.
...@@ -171,7 +172,6 @@ v 8.12.0 (unreleased) ...@@ -171,7 +172,6 @@ v 8.12.0 (unreleased)
- Add notification_settings API calls !5632 (mahcsig) - Add notification_settings API calls !5632 (mahcsig)
- Remove duplication between project builds and admin builds view !5680 (Katarzyna Kobierska Ula Budziszewska) - Remove duplication between project builds and admin builds view !5680 (Katarzyna Kobierska Ula Budziszewska)
- Fix URLs with anchors in wiki !6300 (houqp) - Fix URLs with anchors in wiki !6300 (houqp)
- Use a ConnectionPool for Rails.cache on Sidekiq servers
- Deleting source project with existing fork link will close all related merge requests !6177 (Katarzyna Kobierska Ula Budziszeska) - Deleting source project with existing fork link will close all related merge requests !6177 (Katarzyna Kobierska Ula Budziszeska)
- Return 204 instead of 404 for /ci/api/v1/builds/register.json if no builds are scheduled for a runner !6225 - Return 204 instead of 404 for /ci/api/v1/builds/register.json if no builds are scheduled for a runner !6225
- Fix Gitlab::Popen.popen thread-safety issue - Fix Gitlab::Popen.popen thread-safety issue
......
Please view this file on the master branch, on stable branches it's out of date. Please view this file on the master branch, on stable branches it's out of date.
v 8.12.0 (Unreleased) v 8.12.0 (Unreleased)
v 8.12.1 (unreleased)
v 8.12.0
- Include more data in EE usage ping - Include more data in EE usage ping
- Reduce UPDATE queries when moving between import states on projects - Reduce UPDATE queries when moving between import states on projects
- [ES] Instrument Elasticsearch::Git::Repository - [ES] Instrument Elasticsearch::Git::Repository
......
8.12.0-rc5-ee 8.12.0-rc7-ee
...@@ -119,10 +119,6 @@ module Gitlab ...@@ -119,10 +119,6 @@ module Gitlab
redis_config_hash = Gitlab::Redis.params redis_config_hash = Gitlab::Redis.params
redis_config_hash[:namespace] = Gitlab::Redis::CACHE_NAMESPACE redis_config_hash[:namespace] = Gitlab::Redis::CACHE_NAMESPACE
redis_config_hash[:expires_in] = 2.weeks # Cache should not grow forever redis_config_hash[:expires_in] = 2.weeks # Cache should not grow forever
if Sidekiq.server? # threaded context
redis_config_hash[:pool_size] = Sidekiq.options[:concurrency] + 5
redis_config_hash[:pool_timeout] = 1
end
config.cache_store = :redis_store, redis_config_hash config.cache_store = :redis_store, redis_config_hash
config.active_record.raise_in_transactional_callbacks = true config.active_record.raise_in_transactional_callbacks = true
......
...@@ -1350,6 +1350,9 @@ ActiveRecord::Schema.define(version: 20160915201649) do ...@@ -1350,6 +1350,9 @@ ActiveRecord::Schema.define(version: 20160915201649) do
add_foreign_key "issue_metrics", "issues", on_delete: :cascade add_foreign_key "issue_metrics", "issues", on_delete: :cascade
add_foreign_key "lists", "boards" add_foreign_key "lists", "boards"
add_foreign_key "lists", "labels" add_foreign_key "lists", "labels"
add_foreign_key "merge_request_metrics", "merge_requests", on_delete: :cascade
add_foreign_key "merge_requests_closing_issues", "issues", on_delete: :cascade
add_foreign_key "merge_requests_closing_issues", "merge_requests", on_delete: :cascade
add_foreign_key "path_locks", "projects" add_foreign_key "path_locks", "projects"
add_foreign_key "path_locks", "users" add_foreign_key "path_locks", "users"
add_foreign_key "merge_request_metrics", "merge_requests", on_delete: :cascade add_foreign_key "merge_request_metrics", "merge_requests", on_delete: :cascade
......
...@@ -39,9 +39,10 @@ ...@@ -39,9 +39,10 @@
- [Install](install/README.md) Requirements, directory structures and installation from source. - [Install](install/README.md) Requirements, directory structures and installation from source.
- [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, LDAP and Twitter. - [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, LDAP and Twitter.
- [Restart GitLab](administration/restart_gitlab.md) Learn how to restart GitLab and its components. - [Restart GitLab](administration/restart_gitlab.md) Learn how to restart GitLab and its components.
- [Issue closing](customization/issue_closing.md) Customize how to close an issue from commit messages. - [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, Twitter.
- [Issue closing pattern](administration/issue_closing_pattern.md) Customize how to close an issue from commit messages.
- [Koding](administration/integration/koding.md) Set up Koding to use with GitLab. - [Koding](administration/integration/koding.md) Set up Koding to use with GitLab.
- [Libravatar](customization/libravatar.md) Use Libravatar for user avatars. - [Libravatar](customization/libravatar.md) Use Libravatar instead of Gravatar for user avatars.
- [Log system](administration/logs.md) Log system. - [Log system](administration/logs.md) Log system.
- [Environment Variables](administration/environment_variables.md) to configure GitLab. - [Environment Variables](administration/environment_variables.md) to configure GitLab.
- [Operations](operations/README.md) Keeping GitLab up and running. - [Operations](operations/README.md) Keeping GitLab up and running.
......
# Issue closing pattern
>**Note:**
This is the administration documentation.
There is a separate [user documentation] on 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.
## Change the issue closing pattern
In order to change the pattern you need to have access to the server that GitLab
is installed on.
The default pattern can be located in [gitlab.yml.example] under the
"Automatic issue closing" section.
> **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` 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.
[gitlab.yml.example]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/gitlab.yml.example
[reconfigure]: restart_gitlab.md#omnibus-gitlab-reconfigure
[restart]: restart_gitlab.md#installations-from-source
[user documentation]: ../user/project/issues/automatic_issue_closing.md
# Issue closing pattern This document was split into:
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. - [administration/issue_closing_pattern.md](../administration/issue_closing_pattern.md).
- [user/project/issues/automatic_issue_closing](../user/project/issues/automatic_issue_closing.md).
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
# How to create an Issue in GitLab # How to create an Issue in GitLab
The Issue Tracker is a good place to add things that need to be improved or solved in a project. The Issue Tracker is a good place to add things that need to be improved or solved in a project.
To create an Issue, sign in to GitLab. To create an Issue, sign in to GitLab.
...@@ -24,4 +24,4 @@ You may assign the Issue to a user, add a milestone and add labels (they are all ...@@ -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) ![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](../user/project/issues/automatic_issue_closing.md).
...@@ -22,7 +22,7 @@ Create merge requests and review code. ...@@ -22,7 +22,7 @@ Create merge requests and review code.
- [Fork a project and contribute to it](../workflow/forking_workflow.md) - [Fork a project and contribute to it](../workflow/forking_workflow.md)
- [Create a new merge request](../gitlab-basics/add-merge-request.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](../user/project/issues/automatic_issue_closing.md)
- [Automatically merge when your builds succeed](../user/project/merge_requests/merge_when_build_succeeds.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) - [Revert any commit](../user/project/merge_requests/revert_changes.md)
- [Cherry-pick any commit](../user/project/merge_requests/cherry_pick_changes.md) - [Cherry-pick any commit](../user/project/merge_requests/cherry_pick_changes.md)
......
# Automatic issue closing
>**Note:**
This is the user docs. In order to change the default issue closing pattern,
follow the steps in the [administration docs].
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 multi-line commit messages as well
as one-liners when used with `git commit -m`.
[administration docs]: ../../../administration/issue_closing_pattern.md
...@@ -172,4 +172,4 @@ you commit the changes you will be taken to a new merge request form. ...@@ -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) ![New file button](basicsimages/file_button.png)
[ce-2808]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2808 [ce-2808]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2808
[issue closing pattern]: ../customization/issue_closing.md [issue closing pattern]: ../user/project/issues/automatic_issue_closing.md
# Workflow # Workflow
- [Automatic issue closing](../user/project/issues/automatic_issue_closing.md)
- [Change your time zone](timezone.md) - [Change your time zone](timezone.md)
- [Cycle Analytics](../user/project/cycle_analytics.md) - [Cycle Analytics](../user/project/cycle_analytics.md)
- [Description templates](../user/project/description_templates.md) - [Description templates](../user/project/description_templates.md)
......
...@@ -76,6 +76,8 @@ merge_requests: ...@@ -76,6 +76,8 @@ merge_requests:
- events - events
- merge_requests_closing_issues - merge_requests_closing_issues
- metrics - metrics
- approvals
- approvers
merge_request_diff: merge_request_diff:
- merge_request - merge_request
pipelines: pipelines:
...@@ -107,8 +109,10 @@ protected_branches: ...@@ -107,8 +109,10 @@ protected_branches:
- merge_access_levels - merge_access_levels
- push_access_levels - push_access_levels
merge_access_levels: merge_access_levels:
- user
- protected_branch - protected_branch
push_access_levels: push_access_levels:
- user
- protected_branch - protected_branch
project: project:
- taggings - taggings
...@@ -182,6 +186,16 @@ project: ...@@ -182,6 +186,16 @@ project:
- environments - environments
- deployments - deployments
- project_feature - project_feature
- mirror_user
- push_rule
- jenkins_service
- jenkins_deprecated_service
- index_status
- approvers
- pages_domains
- audit_events
- remote_mirrors
- path_locks
award_emoji: award_emoji:
- awardable - awardable
- user - user
\ No newline at end of file
...@@ -114,6 +114,8 @@ ProjectMember: ...@@ -114,6 +114,8 @@ ProjectMember:
- invite_accepted_at - invite_accepted_at
- requested_at - requested_at
- expires_at - expires_at
- ldap
- override
User: User:
- id - id
- username - username
...@@ -315,12 +317,14 @@ ProtectedBranch::MergeAccessLevel: ...@@ -315,12 +317,14 @@ ProtectedBranch::MergeAccessLevel:
- access_level - access_level
- created_at - created_at
- updated_at - updated_at
- user_id
ProtectedBranch::PushAccessLevel: ProtectedBranch::PushAccessLevel:
- id - id
- protected_branch_id - protected_branch_id
- access_level - access_level
- created_at - created_at
- updated_at - updated_at
- user_id
AwardEmoji: AwardEmoji:
- id - id
- user_id - user_id
......
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