Commit Graph

60 Commits

Author SHA1 Message Date
Tiago Botelho 442a6e8800 API method /projects/:id/repository/commits now works over every commit 2018-02-23 10:09:46 +00:00
Maxime Roussin-Belanger 0dafea8685 Add missing pagination on the commit diff endpoint 2018-02-19 20:09:03 -05:00
Robert Schilling a724f7e35f Refactor commits/refs API to use hash and add pagination headers 2018-02-14 10:16:34 +01:00
Robert Schilling 922d156a5e Separate branch and tag names 2018-02-09 17:46:41 +01:00
Robert Schilling 4cefb568d9 Incorporate feedback 2018-02-09 14:59:47 +01:00
Robert Schilling cea2a8f741 Basic ref fetching for commits 2018-02-09 13:25:02 +01:00
Francisco Javier López f6c1d38259 Add option to disable commit stats to commit API 2018-01-09 11:36:12 +00: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
Douwe Maan fec48c6e17 Use Commit#notes and Note.for_commit_id when possible to make sure we use all the indexes available to us 2017-11-08 12:22:11 +01:00
Douwe Maan 38ff8cd13d Merge branch 'sha-handling' into 'master'
Adds requirements that supports anything in sha params

Closes #26561 and #2709

See merge request gitlab-org/gitlab-ce!14462
2017-10-16 15:14:42 +00:00
Alejandro Rodríguez 9fdde3693b Move line code generation into Gitlab::Git
Having a distinct class just for that was a bit overkill
2017-10-12 22:13:05 -03:00
Alejandro Rodríguez faa9bd402d Create a Gitlab::Git submodule for conlict-related files
Rename classes to (hopefully) clearer names while we're doing that.
2017-10-12 22:03:15 -03:00
Alejandro Rodríguez f72598b659 Move Gitlab::Diff::LineCode to module Gitlab::Git 2017-10-12 21:45:16 -03:00
Guilherme Vieira 771b777ab5 Adds requirements that supports anything in sha params 2017-10-12 18:46:41 -03:00
Vitaliy @blackst0ne Klachkov c55a9ac4ae Remove 'Repo' prefix from API entites 2017-10-05 19:48:05 +11:00
micael.bergeron bca72f5906 wip: fake its a binary diff 2017-09-06 09:01:53 -04:00
Rémy Coutable 023a3f7a3b
Fix the /projects/:id/repository/commits endpoint to handle dots in the ref name when the project full path contains a `/`
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-08 12:54:07 +02:00
Douwe Maan 9c7602d104 Fix batch commit API 2017-08-04 19:25:35 +02:00
Douwe Maan d41479266d Add start_branch to files and commits APIs 2017-08-04 19:18:07 +02:00
Stan Hu 2a9c2fec4e Optimize creation of commit API by using Repository#commit instead of Repository#commits
Repository#commits is expensive because it has to use Rugged to walk the Git
tree as opposed to doing a direct ref lookup.

Improves performance in #34533
2017-07-03 15:48:13 -07:00
Douwe Maan 04cf618b6f Change no_limits to limits 2017-05-31 14:41:25 -05:00
Douwe Maan aed0387f97 Consistent diff and blob size limit names 2017-05-29 17:02:02 -05:00
Douwe Maan d170133bde Refactor changing files in web UI 2017-04-20 00:37:44 +00:00
Rémy Coutable 63360adeae
Add `requirements: { id: %r{[^/]+} }` for all projects and groups namespaced API routes
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-16 18:00:24 +01:00
Rémy Coutable c9abdadd7a
Ensure dots in project path is allowed in the commits API
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-14 18:08:50 +01:00
Oswaldo Ferreira d13451cd49 Returns correct header data for commits endpoint 2017-03-07 22:56:31 -03:00
George Andrinopoulos c46f933bb7 Fix pagination headers for repository commits api endpoint 2017-03-07 22:56:31 -03:00
Jordan Ryan Reuter 473cab818a Manually set total_count when paginating commits
`Kaminari.paginate_array` takes some options, most relevant of which is
a `total_count` parameter. Using the `commit_count` for `total_count`
lets us correctly treat the return of `Repository#commits` as a subset
of all the commits we may wish to list.

Addition of a new `Repository#commit_count_for_ref` method was
necessarry to allow the user to start from an arbitrary ref.

Ref #1381
2017-03-07 22:56:30 -03:00
Douwe Maan 6cc4cf1e15 Fix cherry-picking or reverting through an MR 2017-03-02 17:41:05 -06:00
Douwe Maan 0625af3bcb Consistently create, update, and delete files, taking CRLF settings into account 2017-02-24 09:55:01 -06:00
Douwe Maan 7d4b52b27d Enable Style/WordArray 2017-02-23 09:32:41 -06:00
Oswaldo Ferreira c79bbe26ab Change branch_name param to branch throughout V4 API 2017-02-21 16:33:14 -03:00
Robert Schilling 7d31cf8601 Fix some grammar in the API docs 2017-02-20 15:54:37 +01:00
Robert Schilling 612e61f4c4 Use grape validation for dates 2017-02-20 14:24:09 +01:00
Mark Fletcher 7a8d0aab61 Ensure only commit comments relevant to target project are returned 2017-02-15 18:56:57 +05:30
Lin Jen-Shin 4587c78afa Merge remote-tracking branch 'upstream/master' into fix-git-hooks-when-creating-file
* upstream/master: (1122 commits)
  Update CHANGELOG.md for 8.16.2
  Display project ID in project settings (!8572)
  fixed points from comments to improve code quality
  Update CHANGELOG.md for 8.14.8
  Statisfy eslint
  Add CHANGELOG entry
  Fix access to the wiki code via HTTP when repository feature disabled
  Display fullscreen button on small screens (!5302)
  Prevent removing fields from dropdowns on input elements
  fix for all themes
  Return struct instead of multiple values
  Fix race conditions for AuthorizedProjectsWorker
  Add User#nested_groups and User#nested_projects methods
  Fix spec failure due to timestamp ordering issue in mySQL
  Fixed error with filter keyboard tests
  `can?` already includes the `feature_available?` check
  Test there is no Merge Request button when MRs are disabled
  Ensure the correct Merge Request button is found
  Add 409 conflict tests
  Add CHANGELOG
  ...
2017-01-26 17:21:38 +08:00
Lin Jen-Shin a639454032 Fix renaming 2017-01-07 00:31:11 +08:00
Lin Jen-Shin a30f278bde Fix for initial commit and remove unneeded args 2017-01-06 04:18:51 +08:00
Mark Fletcher 63fcf13739 Fix Commits API to accept a Project path upon POST 2017-01-03 01:16:38 +00:00
Robert Schilling 1a81fcfbd8 API: Ability to cherry-pick a commit 2016-12-13 16:12:40 +01:00
Robert Schilling 9dfbfbb2d1 Don't convert data which already is the target type 2016-11-24 13:35:26 +01:00
Semyon Pupkov 77cf855bb9 Define common helper for describe pagination params in api 2016-11-22 09:19:26 +05:00
Robert Schilling 76bd09326f Use declared_params helper in API 2016-11-14 15:22:06 +01:00
Luis HGO f73d83db76 Added path parameter to Commits API
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-24 16:43:52 +02:00
Z.J. van de Weg 4de883bc81 Use GrapeDSL for commits 2016-10-18 08:21:43 +02:00
Marc Siegfriedt a1ee8cf5ad multi-file commit
add docs and tests - add additional validation
allow move without content
updated response
2016-10-05 17:42:52 +00:00
Paco Guzman c86c1905b5 switch from diff_file_collection to diffs
So we have raw_diffs too
2016-08-03 07:00:20 +02:00
Douwe Maan 99d3e21f19 Extract LegacyDiffNote out of Note 2016-05-13 17:31:43 -05: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
Jacob Vosmaer 1764e1b7cb Use Gitlab::Git::DiffCollections 2016-03-03 18:38:44 +01:00