Commit Graph
4045 Commits
Author SHA1 Message Date
Kamil Trzcinski baef6728fa Send trace to a browser incrementally when build is running
We send a state of ansi2html to client, client needs to send this state back.
The state describes the configuration of generator and position within trace.
2016-05-09 19:59:45 +03:00
Stan Hu 21d89d0286 Update SVG sanitizer to conform to SVG 1.1
Use a custom Loofah scrubber since sanitize 2.x transformers are inadequate
to handle case-sensitive SVG attributes. sanitize parses documents as HTML
instead of XML, which causes all SVG attribute names (e.g. viewBox) to be downcased.

* SVG element list: https://www.w3.org/TR/SVG/eltindex.html
* SVG attribute list: https://www.w3.org/TR/SVG/attindex.html

Closes #14555
2016-05-06 23:20:24 -07:00
Douwe Maan 45ef8d5eda Merge branch 'annotate-models' into 'master'
Update annotations on models



See merge request !3962
2016-05-06 11:15:04 +00:00
Zeger-Jan van de Weg 8278b763d9 Auto annotate models on migration
[ci skip]
2016-05-06 09:07:35 +02:00
Robert Speicher 00acdcf78f Merge branch 'cascade_drop' into 'master'
Rake drop tables with cascade

See merge request !4020
2016-05-06 01:54:13 +00:00
Robert Speicher 4fce876542 Merge branch 'fix/import-url-issues' into 'master'
Fix importer bug when throwing exceptions

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/15681

See merge request !3941
2016-05-05 22:27:40 +00:00
Yorick Peterse 003671207d Fix passing nil to protected_tag?
Previously this method would directly receive the output of tag_name().
This method could either return a String or nil. In the previous setup
this would somehow magically work but because Rugged::TagCollection#[]
doesn't accept nil values it started to fail.

To work around this the elsif in change_access_check() assigns the
result of tag_name() to a local and then _only_ calls protected_tag?()
if the tag name is not nil. The extra parenthesis are put in place to
ensure that things are parsed correctly, without these the code would be
parsed as follows:

    elsif tag_ref = (tag_name(ref) && protected_tag(tag_ref))

During runtime this would basically resolve to:

    elsif tag_ref = (tag_name(ref) && protected_tag(nil))

This is because when you refer to the variable you're assigning _in_ the
assignment Ruby returns nil instead of raising an error.
2016-05-05 19:46:26 +02:00
Yorick Peterse 93ce229665 Use tag_exists? in GitAccess#protected_tag?
This removes the need for retrieving the entire list of tags just to
check if a specific one exists.
2016-05-05 19:46:26 +02:00
Douglas Barbosa Alexandre 6fbf6b2936 Fix the line code when importing PR review comments from GitHub
Pull Request Review Comments are comments on a portion of the unified
diff.
2016-05-05 10:45:14 -03:00
Rémy Coutable 1a9d505972 Merge branch 'use-rugged-to-create-tag' into 'master'
Use Rugged's TagCollection#create instead of gitlab-shell's Repository#add_tag for better performance

This was originally opened at !1757 by @pcarranza but I changed it to use Rugged instead of gitlab_git, following @DouweM's request.

Once this is merged, https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/26 will be mergeable too.

See merge request !3745
2016-05-04 16:07:13 +00:00
Douwe Maan 6a8359f3d3 Merge branch 'pacoguzman/gitlab-ce-15001-since-and-until-operators-api-commits'
# Conflicts:
#	Gemfile.lock
2016-05-04 17:27:47 +02:00
Rémy Coutable 44f89eafc0 Use Rugged's TagCollection#create instead of gitlab-shell's Repository#add_tag for better performance
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-04 17:19:13 +02:00
Drew Blessing 50d18a1e1d Rake drop tables with cascade 2016-05-03 09:29:15 -05:00
Robert Speicher c9bc3d20ef Merge remote-tracking branch 'dev/master' into 'master' 2016-05-02 19:58:54 -04:00
Paco Guzman c4b9bd0413 API support for the 'since' and 'until' operators on commit requests
- Parameter validation as ISO8601 format
2016-04-29 09:26:52 +02:00
Zeger-Jan van de Weg ad99404d25 Properly handle bigger files 2016-04-28 21:28:39 +02:00
Achilleas Pipinellis c73bf28143 Replace gitlab-workhorse with GitLab Workhorse where appropriate 2016-04-28 17:36:50 +03:00
Rémy Coutable 5addff7e6c Merge branch 'use-remote-ip-for-akismet' into 'master'
Use ActionDispatch Remote IP for Akismet checking

Previously all remote IPs appeared at 127.0.0.1, which made Akismet
not very useful. Using the ActionDispatch Remote IP (http://api.rubyonrails.org/classes/ActionDispatch/RemoteIp.html)
should provide more reliable results.

Closes #16629

See merge request !3961
2016-04-28 13:09:44 +00:00
Stan Hu e99cf05875 Use ActionDispatch Remote IP for Akismet checking
Previously all remote IPs appeared at 127.0.0.1, which made Akismet
not very useful. Using the ActionDispatch Remote IP (http://api.rubyonrails.org/classes/ActionDispatch/RemoteIp.html)
should provide more reliable results.

Closes #16629
2016-04-27 22:12:55 -07:00
James Lopez ce9310d63f fix var error 2016-04-27 09:28:08 +02:00
Stan Hu eede032345 Backport GitHub Enterprise import support from EE
These changes were pulled from GitLab EE to support configuring
an alternative API URL than the default https://api.github.com.
In addition, the `verify_ssl` flag allows users to disable SSL cert
checking.

One modification: add a default `args` option if it does not exist
to avoid breaking existing configurations.
2016-04-26 21:00:55 -07:00
Marin Jankovski 2f5394f5d6 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2016-04-26 11:08:56 +02:00
Robert Speicher 29a23a4478 Merge branch '15579-filter-milestone-confidential-issues-api' into 'master'
Prevent information disclosure via milestone API

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15579

See merge request !1961
2016-04-26 00:37:01 +00:00
Robert Speicher 7e47f8762e Merge branch 'fix-private-snippet-api' into 'master'
Prevent information disclosure via snippet API

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15580

See merge request !1958
2016-04-25 20:30:11 +00:00
Jacob Schatz 8fc0eed357 Merge branch 'emoji-unicode-fix' into 'master'
Fixes issue with emoji comments not showing correct emoji image

Previously it would look for the unicode character inside the award menu. But this menu might not always be there.

Now, the unicode characters are loaded onto the page in an array which the award emoji that looks in to get the correct emoji unicode character

Fixes #15512

See merge request !3885
2016-04-25 20:04:35 +00:00
Jacob Schatz d809507e05 Merge branch 'issue_14904' into 'master'
Add new shortcuts

Closes #14904

- On a project: `i` To navigate to New Issue page.
- On a issuable: `l` To open Label dropdown on a issuable.
- Global: Typing `?` multiple times now toggles the modal.

See merge request !3686
2016-04-25 19:13:25 +00:00
Stan Hu d5267dfd0d Prevent private snippets in public/internal projects from being leaked via API
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15580
2016-04-25 12:02:06 -07:00
Dmitriy Zaporozhets b79c5c40e1 Merge branch 'rs-503-page' into 'master'
Add a branded 503 static error page

[ci skip]

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15398

See merge request !3894
2016-04-25 17:13:23 +00:00
Stan HuandRémy Coutable 03ae2cdbff Filter confidential issues from milestones API if user does not have access
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15579
2016-04-25 12:20:29 +02:00
Rémy Coutable 41aa7a89fb Merge branch 'fix-project-hook-delete-permissions' into 'master'
Prevent users from deleting Webhooks via API they do not own

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15576

See merge request !1959
2016-04-25 09:26:58 +00:00
Stan Hu 9413dd80f5 Prevent users from deleting Webhooks via API they do not own
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15576
2016-04-24 23:53:59 -07:00
Phil Hughes 13f7ba059e Removed usage of normilizeEmojiName method
Fixed some Ruby based on feedback
2016-04-22 21:53:26 +01:00
Robert Speicher d85f65ef4e Add a branded 503 static error page
[ci skip]

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15398
2016-04-22 16:26:42 -04:00
Tomasz Maczukin 9a1b174d5c Fix some typos 2016-04-22 22:08:38 +02:00
Tomasz Maczukin a2e2989637 Modify code formatting 2016-04-22 22:08:37 +02:00
Tomasz Maczukin 0ccf629525 Simplify the GitlabCiYamlProcessor#initial_parsing method 2016-04-22 22:08:36 +02:00
Tomasz Maczukin 8dd27b47ea Add posibility to define a hidden job without 'script' in .gitlab-ci.yml 2016-04-22 22:08:34 +02:00
Phil Hughes 319c936055 Fixes issue with emoji comments not showing correct emoji image
Previously it would look for the unicode character inside the award menu. But this menu might not always be there.

Now, the unicode characters are loaded onto the page in an array which the award emoji that looks in to get the correct emoji unicode character

Fixes #15512
2016-04-22 17:01:53 +01:00
Robert Speicher 1ea2408ba3 Merge branch 'dev_issue_15331' into 'master'
Fixes window.opener bug

Adds `noreferrer` value to rel attribute for external links

REF: https://gitlab.com/gitlab-org/gitlab-ce/issues/15331

See merge request !1953
2016-04-21 20:49:41 +00:00
Alfredo Sumaran 72debd840c Fix failing spec 2016-04-21 14:38:44 -05:00
Alfredo Sumaran 3b39214f29 Merge remote-tracking branch 'origin/master' into issue_14904 2016-04-21 12:47:32 -05:00
Jacob Vosmaer 103c405339 Use SIGTERM during Sidekiq memory shutdown
This makes the memory killer behave more like 'sidekiqctl stop'.
2016-04-21 14:49:15 +02:00
Jacob Schatz b3f4e8b218 Revert "Merge branch 'sentry-js' into 'master' "
This reverts commit 0f309794e7, reversing
changes made to 1e596fef1c.
2016-04-21 07:27:27 -04:00
Grzegorz Bizon 677718fd02 Merge branch 'fix/cross-project-labels-project-reference' into 'master'
Fix cross-project label ref used with invalid project

When cross-project label reference was used with invalid project reference, `nil` was assigned to project variable which later caused an exception.

Closes #15168

See merge request !3811
2016-04-21 08:13:12 +00:00
Kamil Trzciński d240666800 Merge branch 'ci-commit-as-pipeline' into 'master'
Ci::Commit becomes a Pipeline object

1. Ci::Commit receives context: ref, :tag.
1. One Ci::Commit describes a one Pipeline
1. Pipeline is created from `.gitlab-ci.yml`
1. Pipeline is a ordered group of builds
1. We test MR against Pipeline
1. Pipelines have a separate view (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3703)
1. Pipeline can be triggered from UI (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3703)
1. Later we change `Trigger -> TriggerRequest -> Build` to `Trigger -> Pipeline` (future)
1. We add a Pipeline Hook that will be triggered on Pipeline status change  (future)
1. We extend notifications to use `Pipeline Hook` to send summary on pipeline changes (future)

After merging that I'll prepare a separate MR that will unify naming, database columns, table names:
```
Ci::Commit -> Pipeline
Ci::Build -> Build
CommitStatus -> Job
GenericCommitStatus -> ExternalJob

ci_commits -> pipelines
ci_builds -> jobs
```

This MR implements first 5 points.

This is made to solve this issue https://gitlab.com/gitlab-org/gitlab-ce/issues/14149.

See merge request !3653
2016-04-21 08:10:37 +00:00
Grzegorz Bizon 35d8bc4485 Refactor banzai code that finds cross-project labels 2016-04-21 09:13:34 +02:00
Grzegorz Bizon f7348cd348 Fix cross-project label ref with invalid project
Closes #15168
2016-04-21 09:13:34 +02:00
Alfredo Sumaran dbe06ac790 Add noreferrer value to rel attribute for external links 2016-04-20 23:55:06 -05:00
Alfredo Sumaran 5c10b29700 Merge remote-tracking branch 'origin/master' into issue_14904
# Conflicts:
#	app/views/shared/issuable/_sidebar.html.haml
2016-04-20 17:26:47 -05:00
Robert Speicher 7e6d59067e Merge branch 'fix-grape-internal-allowed-action' into 'master'
Fix setting of "action" for Grape transactions

After wondering why we're not getting all the data in Grafana that I
wanted I realized I wasn't setting the "action" field properly here.

See merge request !3842
2016-04-20 21:27:43 +00:00