Commit Graph

424 Commits

Author SHA1 Message Date
Ashley Dumaine a3f76b76a4 change collapse to resolve and comments to discussions 2017-09-06 10:07:47 +01:00
Ashley Dumaine ef4b3a39bc Add functionality to collapse outdated diff comments regardless of discussion resolution 2017-09-06 10:07:46 +01:00
Rubén Dávila b9b0b37b36 Add check for access to Namespace 2017-08-30 12:24:49 -05:00
Rubén Dávila 6f03ddcdc3 Address some suggestions from first code review 2017-08-29 00:53:35 -05:00
Rubén Dávila b63c08b263 Build Project in context of Namespace if available 2017-08-26 03:31:14 -05:00
Robin Bobbitt 649d042dbc Add option to disable project export on instance 2017-08-11 12:22:37 -04:00
Yorick Peterse aac1de46c9
Use a specialized class for querying events
This changes various controllers to use the new EventCollection class
for retrieving events. This class uses a JOIN LATERAL query on
PostgreSQL to retrieve queries in a more efficient way, while falling
back to a simpler / less efficient query for MySQL.

The EventCollection class also includes a limit on the number of events
to display to prevent malicious users from cycling through all events,
as doing so could put a lot of pressure on the database.

JOIN LATERAL is only supported on PostgreSQL starting with version 9.3.0
and as such this optimisation is only used when using PostgreSQL 9.3 or
newer.
2017-08-10 17:45:49 +02:00
Mike Greiling 0994bbf9dd Merge branch 'master' into ide
* master: (86 commits)
  Show all labels
  33874 confidential issue redesign
  Exclude merge_jid on Import/Export attribute configuration
  Resolve "User dropdown in filtered search does not load avatar on `master`"
  Re-add column locked_at on migration rollback
  Group-level new issue & MR using previously selected project
  [EE Backport] Update log audit event in omniauth_callbacks_controller.rb
  more eagerly bail when the state is prevented
  Move locked_at removal to post-deployment migration
  Add class to other sidebars
  Improve mobile sidebar
  reduce iterations by keeping a count of remaining enablers
  Store & use ConvDev percentages returned by Version app
  Store MergeWorker JID on merge request, and clean up stuck merges
  Backport changes in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2551 to CE
  DRY up caching in AbstractReferenceFilter
  Update CHANGELOG
  Add CHANGELOG entry
  Fix html structure Removes test for removed behavior
  Port form back to use form_tag
  ...
2017-08-07 22:44:47 -05:00
Z.J. van de Weg db65499e26
Fix last feature test for project templates 2017-08-07 15:32:43 +02:00
Z.J. van de Weg 2e6aa4f25e
After merge cleanup 2017-08-07 15:09:14 +02:00
Filipa Lacerda 3b9012871d Merge branch 'master' into zj-project-templates
* master: (623 commits)
  Fix issues with pdf-js dependencies
  fix missing changelog entries for security release on 2017-01-23
  Update top bar issues icon
  Fix pipeline icon in contextual nav for projects
  Since mysql is not a priority anymore, test it less
  Fix order of CI lint ace editor loading
  Add container registry and spam logs icons
  Fix different Markdown styles
  Backport to CE for:
  Make new dropdown dividers full width
  Fix spec
  Fix spec
  Fix spec
  Bump GITLAB_SHELL_VERSION and GITALY_VERSION to support unhiding refs
  Add changelog
  Install yarn via apt in update guides
  Use long curl options
  fix
  Add a spec for concurrent process
  Remove monkey-patched Array.prototype.first() and last() methods
  ...
2017-08-07 11:09:50 +01:00
Douwe Maan ef6ce7a9ec More backend cleanup 2017-08-03 15:23:43 +02:00
Luke "Jared" Bennett 3b431cc08c
Fix UselessAssignment offense in projects_controller 2017-08-01 15:41:18 +01:00
Luke "Jared" Bennett 4c53ef321e
Fix rubocop 2017-08-01 14:52:01 +01:00
Z.J. van de Weg 3baf3dc955
Rename GitLabProjectImporterService and misc fixes
First round of review, main changes:
- templates.title is human readable, #name will be passed around
- GitLabProjectImporterService has been renamed
2017-08-01 14:36:42 +02:00
Jacob Schatz a3fe09e0c6 Merge branch 'ide' of gitlab.com:gitlab-org/gitlab-ce into ide 2017-07-28 15:47:54 -04:00
Jacob Schatz 3909c6c06c Adds new ruby help for dropdowns for branches 2017-07-28 13:36:07 -04:00
Z.J. van de Weg 1d3815f89b
Allow projects to be started from a template
Started implementation for the first iteration of
gitlab-org/gitlab-ce#32420. This will allow users to select a template
to start with, instead of an empty repository in the project just
created.

Internally this is basically a small extension of the ImportExport
GitLab projects we already support. We just import a certain import
tar archive. This commits includes the first one: Ruby on Rails. In the
future more will be added.
2017-07-28 11:32:46 +02:00
Nick Thomas e4391c7190 Backport changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2328 2017-07-21 18:45:12 +01:00
Grzegorz Bizon 613208c360 Recover from renaming project that has container images 2017-07-13 15:34:36 +02:00
Douwe Maan fe13f11041 Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
Tiago Botelho 8e8eb97861 Removes pending delete from filter scopes 2017-06-28 11:29:59 +01:00
Tieu-Philippe KHIM 3c1700cde6 Refactor atom builder by using xml.atom layout 2017-06-12 19:21:13 +02:00
Bob Van Landuyt bdebe849b8 Translate project & repository pages 2017-06-07 20:13:44 +00:00
blackst0ne a544e46bb0 Add a rubocop rule to check if a method 'redirect_to' is used without explicitly set 'status' in 'destroy' actions of controllers 2017-06-07 09:45:16 +11:00
Valery Sizov 2158beddee Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into 17489-hide-code-from-guests 2017-05-23 14:10:16 +03:00
Michael Kozono 49697bc8df Refactor to more robust implementation
In order to avoid string manipulation or modify route params (to make them unambiguous for `url_for`), we are accepting a behavior change:

When being redirected to the canonical path for a group, if you requested a group show path starting with `/groups/…` then you’ll now be redirected to the group at root `/…`.
2017-05-19 09:13:27 -07:00
Rémy Coutable d40e1f547e Enable the Style/TrailingCommaInLiteral cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
James Clark c0632f1463 Hide clone panel and file list when user is only a guest
Fixes gitlab-org/gitlab-ce#17489

Fix test finding two of the same element

Capybara will raise an exception because it finds two elements that
match .nav-links. This means this test would fail, even if the page
meets the conditions for passing the test.

Add more tests for guest access
2017-05-07 11:26:52 -04:00
Rares Sfirlogea 45e4c66565 Display slash commands outcome when previewing Markdown
Remove slash commands from Markdown preview and display their outcome next to
the text field.
Introduce new "explanation" block to our slash commands DSL.
Introduce optional "parse_params" block to slash commands DSL that allows to
process a parameter before it is passed to "explanation" or "command" blocks.
Pass path for previewing Markdown as "data" attribute instead of setting
a variable on "window".
2017-05-04 17:02:25 +02:00
Jarka Kadlecova 87327c5845 Support preview_markdown action for personal_snippets 2017-04-26 12:51:06 +02:00
Dmitriy Zaporozhets e585b77730 Change project view default for existing users and anonymous visitors to files+readme
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-04-10 21:28:41 +03:00
Alex Sanford 68e3fa0e58 Add ability to disable Merge Request URL on push 2017-03-17 12:35:39 +00:00
Rémy Coutable 5069255681 Merge branch 'fix-project-without-repo-and-wiki' into 'master'
Fix projects without repo and wiki

Closes #29542

See merge request !9956
2017-03-16 08:51:49 +00:00
Lin Jen-Shin 668a5b9fe1 Fix projects without repo and wiki
When repo and wiki are disabled for a project,
we're showing issues so we'll need to set @issuable_meta_data
otherwise it would be giving nil errors. See:

https://sentry.gitlap.com/gitlab/staginggitlabcom/issues/23106/
2017-03-15 14:42:02 +08:00
Mark Fletcher 3a6c7a2df3 Display full project name with namespace upon deletion
* Removes ambiguity when two projects exist with the same name
2017-03-15 09:37:57 +05:30
James Lopez a0101ebf84 Update occurrences of MWBS to MWPS
Rename column in the database
 Rename fields related to import/export feature
 Rename API endpoints
 Rename documentation links
 Rename the rest of occurrences in the code
 Replace the images that contain the words "build succeeds" and docs referencing to them
 Make sure pipeline is green and nothing is missing.

updated doc images

renamed only_allow_merge_if_build_succeeds in projects and fixed references

more updates

fix some spec failures

fix rubocop offences

fix v3 api spec

fix MR  specs

fixed issues with partials

fix MR spec

fix alignment

add missing v3 to v4 doc

wip - refactor v3 endpoints

fix specs

fix a few typos

fix project specs

copy entities fully to V3

fix  entity error

more fixes

fix failing specs

fixed missing entities in V3 API

remove comment

updated code based on feedback

typo

fix spec
2017-03-01 12:02:02 +01:00
Jacob Schatz 806b038a44 Merge branch 'ref-switcher-perf' into 'master'
Improved ref switcher dropdown performance

Closes #18202

See merge request !7239
2017-02-03 15:03:57 +00:00
Rémy Coutable 7485cec94e
Add a spec and actually display the flash notice
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-16 10:57:15 -05:00
sandish chen 81f7a7ab62 Fix to display notice when project settings updated.
Change validity checking for UpdateService.

Add return value for project update service.

Return 302(redirect_to) when successfully updated.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-15 01:31:25 -05:00
Luke Bennett 1356e40f22
Changed autocomplete_sources into an action that returns a single 'at' type of sources at a time
Finished up autocomplete_sources action and added frontend to fetch data only when its needed

Added wait_for_ajax to specs

Fixed builds and improved the setup/destroy lifecycle

Changed global namespace and DRYed up loading logic

Added safety for accidentally loading data twice

Removed destroy as its not necessary and is messing with click events from a blur race condition

Created AutocompleteSourcesController and updated routes

Fixed @undefined from tabbing before load ends

Disable tabSelectsMatch until we have loaded data

Review changes
2016-12-15 15:20:33 +00:00
Phil Hughes f9750b4912 Changed how the data is returned - we only care about the branch/tag name 2016-11-21 21:01:45 -05:00
Phil Hughes ba2089e017 Uses take rather than Kaminari 2016-11-21 21:01:45 -05:00
Phil Hughes 1a21fa26f6 Improved ref switcher dropdown performance
Closes #18202
2016-11-21 21:01:45 -05:00
Douwe Maan 6b35c4ad65 Revert "Merge branch '22680-unlabel-limit-autocomplete-to-selected-items' into 'master'"
This reverts merge request !6796
2016-11-17 09:39:23 +00:00
Akram FARES d54b88260c Limit autocomplete to currently selected items 2016-11-15 21:41:40 +00:00
Rémy Coutable f00a08c35b Merge branch 'rs-project_params' into 'master'
Apply `*_params_ce` pattern to ProjectsController

See merge request !7338
2016-11-08 17:51:47 +00:00
Douwe Maan 9c3f3e9e35 Merge branch 'use-separate-token-for-incoming-email' into 'master'
Use separate email-friendly token for incoming email

See merge request !5914
2016-11-08 10:47:45 +00:00
Robert Speicher d59956afc0 Apply `*_params_ce` pattern to ProjectsController 2016-11-07 17:55:20 +00:00
tiagonbotelho 011e561bfa implements reset incoming email token on issues modal and account page,
reactivates all tests and writes more tests for it
2016-11-07 15:56:18 +00:00
Dmitriy Zaporozhets 314ef63014
Fix project index
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-11-07 16:13:31 +02:00
Rémy Coutable 3f02914460 Complete and improve specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-04 14:58:40 +01:00
Rodolfo Santos 1db9f826c1 Add setting to only allow merge requests to be merged when all discussions are resolved
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-04 14:58:40 +01:00
Adam Niedzielski f6cff8f7bc Fix relative links in Markdown wiki when displayed in "Project" tab
Refers to #23806.
2016-11-01 10:18:49 +01:00
Phil Hughes 07e4ffd708 Fixed boards store spec 2016-10-28 13:54:36 +01:00
Phil Hughes a2e9bc3584 Delete issue board welcome cookie when project is new 2016-10-28 13:54:36 +01:00
Felipe Artur da07c2e4d3 Add visibility level to project repository 2016-10-17 18:12:18 -02:00
Rémy Coutable 56259155d5 Small improvements thanks to Robert's feedback
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-30 12:02:54 +02:00
James Lopez 29141ed3ea fix broken repo 500 errors in UI and added relevant specs 2016-09-29 16:58:14 +02:00
Felipe Artur 892dea6771 Project tools visibility level 2016-09-01 11:47:59 -03:00
Patricio Cano cf37d623e1 Renamed `enable_lfs` to `lfs_enabled` for the Project field, and related fixes. 2016-08-30 17:17:45 -05:00
Patricio Cano 9d8fbcc038 Added project specific enable/disable setting for LFS 2016-08-30 16:17:41 -05:00
winniehell ddbdf4e609 Restore get_id in ExtractsPath 2016-08-24 12:54:16 +02:00
Sean McGivern 1a7c293c2d Fix file links on project page Files view 2016-08-23 11:01:20 +01:00
Douwe Maan 8b8a4626c6 Fix specs and implement fixes based on failing specs 2016-08-17 17:54:24 -05:00
Douwe Maan 5a07b760df Refactor slash command definition 2016-08-12 20:17:18 -05:00
Rémy Coutable f393f2dde0
Simplify the slash commands DSL to store action blocks instead of creating methods
Other improvements:
- Ensure slash commands autocomplete doesn't break when noteable_type is not given
- Slash commands: improve autocomplete behavior and /due command
- We don't display slash commands for note edit forms.
- Add tests for reply by email with slash commands
- Be sure to execute slash commands after the note creation in Notes::CreateService

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:36:47 +02:00
Rémy Coutable 65349c2212 Make slash commands contextual
- Return only slash commands that make sense for the current noteable
- Allow slash commands decription to be dynamic

Other improvements:

- Add permission checks in slash commands definition
- Use IssuesFinder and MergeRequestsFinder
- Use next if instead of a unless block, and use splat operator instead of flatten

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:06:12 +02:00
Rémy Coutable 0eea8c8857 Support slash commands in noteable description and notes
Some important things to note:

- commands are removed from noteable.description / note.note
- commands are translated to params so that they are treated as normal
  params in noteable Creation services
- the logic is not in the models but in the Creation services, which is
  the right place for advanced logic that has nothing to do with what
  models should be responsible of!
- UI/JS needs to be updated to handle notes which consist of commands
  only
- the `/merge` command is not handled yet

Other improvements:

- Don't process commands in commit notes and display a flash is note is only commands
- Add autocomplete for slash commands
- Add description and params to slash command DSL methods
- Ensure replying by email with a commands-only note works
- Use :subscription_event instead of calling noteable.subscribe
- Support :todo_event in IssuableBaseService

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:05:57 +02:00
Christopher Bartz ecb3f1eb6c Rename `markdown_preview` routes to `preview_markdown` 2016-08-11 15:54:18 +02:00
Stan Hu 4955a47cb1 Clean up project destruction
Instead of redirecting from the project service to the service and back to the model,
put all destruction code in the service. Also removes a possible source of failure
where run_after_commit may not destroy the project.
2016-08-10 09:28:21 -07:00
Stan Hu 9eb100241e Clarify which project is deleted to avoid alarm
Closes #13654
2016-07-29 16:23:13 -07:00
Felipe Artur 4d69cb9d94 Allow to disable user request access to groups/projects 2016-07-20 14:38:21 +02:00
Sean McGivern 87035c2945 Don't blow up in tree view on empty repo 2016-07-18 14:06:21 +01:00
Grzegorz Bizon c6f9a1c273 Enable Style/IdenticalConditionalBranches Rubocop cop 2016-07-08 11:04:04 +02:00
Paco Guzman 0601ce1871 Avoid instantiation of a Git::Tree
Only needed when the project view is ‘Files view’
2016-06-29 17:56:15 +02:00
Paco Guzman 79c521f5df Provide default branch/file path for ProjectsController#show 2016-06-20 21:44:22 +02:00
Phil Hughes f112e2a1da Fixed issue with returning ref in commits JSON
Added tests to project controller
2016-06-20 11:37:27 +01:00
Phil Hughes c240cad59a Fixed Ruby to use exclude 2016-06-18 21:49:20 +01:00
Phil Hughes 68c9981013 Correctly adds commit ID into dropdown
Removes un-used method
Fixes other Ruby issues
2016-06-18 21:49:20 +01:00
Phil Hughes 3c8c912965 Pulls back tags if any exist 2016-06-18 21:49:20 +01:00
Phil Hughes d2362e2edf Tests fix for ref switcher 2016-06-18 21:49:20 +01:00
Phil Hughes deca5ef200 Refs dropdown is now loaded async 2016-06-18 21:49:20 +01:00
Douwe Maan 9b7fd74805 Merge branch 'feature/project-export' into 'master'
Export project functionality

This is a MR for the export functionality of https://gitlab.com/gitlab-org/gitlab-ce/issues/3050, which adds the ability to export single projects.

- [x] members
- DB data
  - [x] issues
  - [x] issue comments
  - [x] merge requests
  - [x] merge request diff
  - [x] merge request comments
  - [x] labels
  - [x] milestones
  - [x] snippets
  - [x] releases
  - [x] events
  - [x] commit statuses
  - [x] CI builds
- File system data
  - [x] Git repository
  - [x] wiki
  - [x] uploads
  - [ ] ~~CI build traces~~
  - [ ] ~~CI build artifacts~~
  - [ ] ~~LFS objects~~
- DB configuration
  - [x] services
  - [x] web hooks
  - [x] protected branches
  - [x] deploy keys
  - [x] CI variables
  - [x] CI triggers

See merge request !3114
2016-06-17 15:35:27 +00:00
James Lopez 2d4556c5d2 a few changes based on MR feedback 2016-06-17 15:47:00 +02:00
James Lopez 4bde59341f lots of refactoring again based on feedback. Changed the UI slightly and also fixed a small bug 2016-06-15 17:31:00 +02:00
James Lopez 36ccaca35a project export archiver 2016-06-14 22:11:21 +02:00
James Lopez 9ecebaaea1 adding notifications stuff and more refactoring for exporting projects 2016-06-14 16:31:03 +02:00
James Lopez 3f7ed55011 lots of refactoring to reuse import service 2016-06-14 12:47:07 +02:00
Fatih Acet 046b5735bc Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into add_autocomplete_for_labels
# Conflicts:
#	app/assets/javascripts/gfm_auto_complete.js.coffee
2016-06-14 00:56:59 +03:00
James Lopez e83fc684a5 Merge branches 'feature/project-export-ui-experimental' and 'feature/project-import' of gitlab.com:gitlab-org/gitlab-ce into feature/project-export-ui-experimental
# Conflicts:
#	Gemfile.lock
#	app/helpers/todos_helper.rb
#	app/models/todo.rb
#	app/views/projects/edit.html.haml
#	lib/gitlab/import_export/import_service.rb
2016-06-13 14:00:19 +02:00
Rui Anderson 07dbd6b388 Allow or not merge MR with failed build
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-10 14:36:54 +02:00
Z.J. van de Weg 9d491712cf Merge branch 'master' into awardables 2016-06-03 15:20:11 +02:00
Yorick Peterse 86166d2802
Split Markdown rendering & reference gathering
This splits the Markdown rendering and reference extraction phases into
two distinct code bases. The reference extraction phase no longer relies
on the html-pipeline Gem (and any related code) and allows for
extracting of references from multiple HTML nodes in a single pass. This
means that if you want to extract user references from 200 comments you
no longer need to run 200 times N number of queries, instead only a
handful of queries may be needed.
2016-05-26 17:14:00 +02:00
ZJ van de Weg 7ae536002a Merge branch 'master' into awardables 2016-05-25 14:41:25 +02:00
Douwe Maan ba5b47c2e3 Merge branch 'eReGeBe/gitlab-ce-feature/milestone-md' into 'master'
Implement special GitLab markdown reference for milestones

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3453 by @eReGeBe, with two additions:

- Move changelog item to 8.8
- Fix cross-project milestone ref with invalid project, like f7348cd348 did for labels

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

See merge request !3897
2016-05-20 21:08:57 +00:00
Rémy Coutable f29d8b64e4
Merge remote-tracking branch 'origin/master' into eReGeBe/gitlab-ce-feature/milestone-md
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-18 23:40:33 -05:00
Fatih Acet bb883387f9 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into awardables
# Conflicts:
#	app/controllers/projects/merge_requests_controller.rb
#	app/models/note.rb
#	db/schema.rb
#	spec/models/note_spec.rb
2016-05-18 13:05:53 -05:00
Felipe Artur c2c7014e01 Improve documentation and add changelog 2016-05-17 21:53:04 -05:00
Felipe Artur 07ff874f57 Let users set notification levels in projects which they are not members 2016-05-17 21:53:03 -05:00