Commit Graph

261 Commits

Author SHA1 Message Date
Phil Hughes 2bb468d6b9
Remove issue_suggestions feature flag
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55166
2018-12-13 09:43:36 +00:00
Cindy Pallares fe5f75930e
Merge branch 'security-fix-pat-web-access' into 'master'
[master] Resolve "Personal access token with only `read_user` scope can be used to authenticate any web request"

See merge request gitlab/gitlabhq!2583
2018-11-28 19:13:59 -05:00
Phil Hughes 50e21a89a0
Suggests issues when typing title
This suggests possibly related issues when the user types a title.

This uses GraphQL to allow the frontend to request the exact
data that is requires. We also get free caching through the Vue Apollo
plugin.

With this we can include the ability to import .graphql files in JS
and Vue files.
Also we now have the Vue test utils library to make testing
Vue components easier.

Closes #22071
2018-11-27 15:10:40 +00:00
Sean McGivern 02268a85be Extract EE-specific lines from issues controller 2018-10-24 10:13:58 +01:00
Felipe Artur 0ae48e0687 Move issue related_branches to service
Moves the related_branches method from Issue model
to RelatedBranchesService
2018-10-04 15:59:14 -03:00
gfyoung 12ee2753c1 Enable even more frozen string in app/controllers
Enables frozen string for some vestigial files as
well as the following:

* app/controllers/projects/**/*.rb
* app/controllers/sherlock/**/*.rb
* app/controllers/snippets/**/*.rb
* app/controllers/users/**/*.rb

Partially addresses #47424.
2018-09-25 22:43:49 -07:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Sean McGivern c73da6c1e7 Move Issue#{referenced,closed_by}_merge_requests to service
These methods don't really need to be on the Issue model. Issue#related_branches
can also be moved to a service, but we can do that in a separate commit.

This commit does not change any behaviour; it just moves code around, renames
the service, and refactors the specs.
2018-08-21 12:40:44 +01:00
Bob Van Landuyt f1d3ea63cf Show the status of a user in interactions
The status is shown for
- The author of a commit when viewing a commit
- Notes on a commit (regular/diff)
- The user that triggered a pipeline when viewing a pipeline
- The author of a merge request when viewing a merge request
- The author of notes on a merge request (regular/diff)
- The author of an issue when viewing an issue
- The author of notes on an issue
- The author of a snippet when viewing a snippet
- The author of notes on a snippet
- A user's profile page
- The list of members of a group/user
2018-07-30 15:01:26 +02:00
Imre Farkas 6954ebbe55
Render calendar feed inline when accessed from GitLab
With text/calendar as Content-Type, the browser always downloads the
content as a file (even ignoring the Content-Disposition header). We
want to display the content inline when accessed from GitLab, similarly
to the RSS feed.
2018-06-18 10:53:52 +02:00
Imre Farkas 20dfe25c15 Export assigned issues in iCalendar feed 2018-05-31 14:01:04 +00:00
Jacopo 5a29a304be Shows new branch/mr button even when branch exists 2018-04-19 13:56:36 +02:00
Bob Van Landuyt 71ccfde322 Correct permissions for creating merge requests from issues
This could only be possible for users that can create merge requests
within a project.

So they need to be a allowed to create a branch and create a merge request.
2018-04-11 10:51:17 +02:00
Bob Van Landuyt 8ad9c4e873 Rename `create_merge_request` permissions
So we can distinguish between the permissions on the source and the
target project.

- `create_merge_request_from` indicates a user can create a merge
  request with the project as a source_project
- `create_merge_request_in` indicates a user can create a merge
  request with the project as a target_project
2018-04-11 10:51:15 +02:00
Fatih Acet 059ab73b8e Render MR Notes with Vue with behind a cookie 2018-02-28 00:10:43 +00:00
Sean McGivern c2fc40668c Refactor IssuableFinder to extract model-specific logic
By extracting a new `filter_items` method, we can override that in the
IssuesFinder and MergeRequestsFinder separately, so we don't need checks that
the model is the correct one, because we can just use the class we're in to know
that.

We can do the same for the VALID_PARAMS constant, by making it a class method.
2018-02-21 10:31:29 +00:00
Sean McGivern 16908f9718 Merge branch '26466-natural-sort-mrs' into 'master'
Group MR numbers on issue show page by project and namespace

Closes #26466

See merge request gitlab-org/gitlab-ce!8494
2018-02-13 14:39:09 +00:00
Jeff Stubler 9abbe3cc86 Change issue show page to group MRs by projects and namespaces
Closes #26466.
2018-02-13 07:47:09 -06:00
Yorick Peterse cca61980d5
Track and act upon the number of executed queries
This ensures that we have more visibility in the number of SQL queries
that are executed in web requests. The current threshold is hardcoded to
100 as we will rarely (maybe once or twice) change it.

In production and development we use Sentry if enabled, in the test
environment we raise an error. This feature is also only enabled in
production/staging when running on GitLab.com as it's not very useful to
other users.
2018-02-01 17:00:46 +01:00
Christiaan Van den Poel 66ebb206b0 disables the shortcut to the issue boards when issues are disabled 2018-01-08 09:06:25 +00:00
Vitaliy @blackst0ne Klachkov 5bc32b65f1 Add an ability to use a custom branch name on creation from issues 2017-11-25 22:33:05 +11:00
Jacopo 181cd299f9 Adds Rubocop rule for line break after guard clause
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
2017-11-16 17:58:29 +01:00
Jarka Kadlecova ad6e650262 Refactor issuables index actions 2017-11-07 14:34:12 +01:00
Jarka Kadlecova 064c8949bd CE port of code changed for epics 2017-11-02 07:14:35 +01:00
Eric Eastwood 6dc9028fbb Load participants async 2017-10-31 16:15:03 +00:00
Sean McGivern 17b4367045 Revert "Merge branch '36670-remove-edit-form' into 'master'"
This reverts commit 915e35a299, reversing
changes made to 9533786f52.
2017-10-26 15:53:55 +01:00
Sean McGivern a68a39e341 Merge branch '18608-lock-issues-v2' into 'master'
Resolve "Lock issue and merge request"

Closes #18608

See merge request gitlab-org/gitlab-ce!14531
2017-10-06 16:47:27 +00:00
Jarka Kadlecova 7f69659a5d Remove edit action for issues 2017-10-03 11:26:12 +02:00
Luke "Jared" Bennett ff7b545c8e
Merge remote-tracking branch 'origin/master' into 18608-lock-issues 2017-09-20 15:23:00 +01:00
Stan Hu 3b9c45a317 Remove unnecessary loading of discussions in `IssuesController#show`
Discussions are now done asynchronously via the `IssuesController#discussions`
endpoint, so this should no longer be needed. This was taking 32% of the load
time for GitLab CE issue 1.

Closes #38034
2017-09-19 01:56:39 -07:00
Stan Hu 8690ca5c28 Eliminate N+1 queries in loading discussions.json endpoint
In #37955,we see that the profile had a number of N+1 queries from repeated
access to `cross_reference_not_visible_for?`. This was optimized in previous
versions of GitLab by rendering all notes at once, counting the number of
visible references, and then using that number to check whether a system note
should be fully redacted.

There was also another N+1 query calling `ProjectTeam#member?`, which did not
take advantage of an optimization in prepare_notes_for_rendering that would
preload the maximum access level per project.

Closes #37955
2017-09-18 06:53:33 -07:00
Jarka Kadlecova b928720852 Support discussion locking in the backend 2017-09-14 14:50:32 +02:00
Sean McGivern 5f6545f36c Move issues index variable setting to a method
This makes it easier to reuse in EE.
2017-09-07 11:46:52 -04:00
micael.bergeron 966b1128d8 WIP: refactor the first-contributor to Issuable
this will remove the need make N queries (per-note) at the
cost of having to mark notes with an attribute

this opens up the possibility for other special roles for notes
2017-09-06 09:00:57 -04:00
Yorick Peterse 42062a454a
Re-use issue/MR counts for the pagination system
This changes the issue and MR index pages so the pagination system
re-uses the output of the COUNT(*) query used to calculate the number of
rows per state (opened, closed, etc). This removes the need for an
additional COUNT(*) on both pages.
2017-09-05 11:53:45 +02:00
Eric Eastwood 90c60138db Move "Move to different project" to sidebar
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/34261
2017-09-03 22:03:17 -05:00
Douwe Maan b181d3124e Merge branch 'master' into issue-discussions-refactor
# Conflicts:
#	app/models/issue.rb
2017-08-30 10:14:56 +02:00
Maxim Rydkin 48d3e5fac6 replace `is_edited?` with `edited?` 2017-08-29 11:14:41 +03:00
Douwe Maan b7c1b05f30 No explicit `to_a` or instance variables needed. 2017-08-18 12:47:50 +02:00
Douwe Maan 09338e397c Remove cross-references user cannot see from issue discussions JSON 2017-08-17 19:18:20 +02:00
Douwe Maan 834f1b30d5 Merge branch 'master' into issue-discussions-refactor
# Conflicts:
#	package.json
#	spec/support/features/reportable_note_shared_examples.rb
2017-08-17 14:01:31 +02:00
Filipa Lacerda e93214bce6 Merge branch 'master' into issue-discussions-refactor
* master: (66 commits)
  fix confidential border issue as well as confidential styles leaking on new MR
  Migrate force push check to Gitaly
  Add option to disable project export on instance
  Better categorize test coverage results
  Add option to disable project export on instance - db changes
  Better caching and indexing of broadcast messages
  Include the `is_admin` field in the `GET /users/:id` API when current user is an admin
  Document rspec-retry and rspec-flaky
  Fix cop description
  Retrieve and sync flaky specs report from and to S3
  Use a new RspecFlakyListener to detect flaky specs
  Fix formatting of patch_versions.md [skip ci]
  Enable Timecop safe mode
  Show error message for API 500 error in tests, and
  Fix merge request diff deserialisation when too_large was absent
  Delete correct key from `session` after authenticating using U2F
  Bumps omniauth-ldap gem version to 2.0.4
  Pending delete projects no longer return 500 error in Admins projects view
  Do not run the `ee_compat_check` job for stableish branches
  Update gitlab.po: Missing 'r' in "Fouché" that comes from "Fourcher" verb.
  ...
2017-08-12 00:17:48 +01:00
Lin Jen-Shin e04c1ae7c7 Merge remote-tracking branch 'upstream/master' into 36089-handle-ref-failure-better
* upstream/master: (62 commits)
  Update gitlab.po: Missing 'r' in "Fouché" that comes from "Fourcher" verb.
  Docs: update user docs index
  Fix minor typos in views
  Fix Layout/SpaceBeforeBlockBraces violation in bin/changelog_spec
  Merge branch 'rs-alphanumeric-ssh-params' into 'security-9-4'
  Merge branch 'import-symlinks-9-3' into 'security-9-3'
  Fix wrong method call on prometheus histogram
  Document new all-in-one Helm chart - docs
  Fix 404 on link path
  Fix line numbers not matching up to code in code viewer.
  Hide overflow-x on collapsed sidebar
  removed global use of breakpoint checker
  Increase performance of the breakpoint size checker
  Filter sensitive query string parameters from NGINX access logs
  Added a template for database changes
  Render new issue link in failed job as a regular link instead of a UJS one
  Include RE2 in the upgrade docs
  Remove affix plugin from issuable sidebar with new navigation
  Fix linter error
  alternative route for download archive
  ...
2017-08-11 19:15:35 +08:00
Lin Jen-Shin 64e13d1958 Avoid ambiguity, which happened in a single test run 2017-08-10 22:19:55 +08:00
Mehdi Lahmam 0048fbed6f Remove unused `redirect_to_external_issue_tracker` method
Its usage has been removed at 2fa22a0729.
2017-08-10 09:27:27 +02:00
Douwe Maan 95f9d6d83b Merge branch 'master' into issue-discussions-refactor
# Conflicts:
#	app/controllers/concerns/notes_actions.rb
#	spec/features/task_lists_spec.rb
#	spec/support/features/issuable_slash_commands_shared_examples.rb
2017-07-31 10:23:50 +02:00
Jarka Kadlecova 7bee7b848a Support both internal and external issue trackers 2017-07-24 08:13:43 +02:00
Jarka Kadlecova 2fa22a0729 Associate Issues tab only with internal issues tracker 2017-07-24 08:10:14 +02:00
Douwe Maan ebf9155113 Add data required for note form 2017-07-21 22:35:25 +03:00
Douwe Maan 76c3d2d434 Add full JSON endpoints for issue notes and discussions 2017-07-21 22:35:24 +03:00