Commit Graph

350 Commits

Author SHA1 Message Date
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