[go: up one dir, main page]

Skip to content

Project commit search api - see only commits from master branch

Summary

Using project commits search api, I only get results from master branch. For example: https://gitlab.com/api/v4/projects/optmodprog%2Foptmodprog-server/search?scope=commits&search=fully Returns only commits from master branch

Steps to reproduce

  1. Create new branch on any project
  2. Make some test commit on new branch
  3. Try to search using API for that commit

Example Project

I have checked this on some public repository as well: https://gitlab.com/api/v4/projects/wise_desktop%2Fclient/search?scope=commits&search=Correct+concatenation+formatting

Does not return commit from branch feature/fd5990_division-sites-in-divisions https://gitlab.com/wise_desktop/client/commits/feature/fd5990_division-sites-in-divisions

Which has ID: 0b3880e8c51045db929e68b5a3de06c0b40a5c12

Result of this call:

[
	{
		"id":"321d197961133de04bf2cc9ed956f4b3804a545e",
		"short_id":"321d1979",
		"created_at":"2019-07-02T10:06:44.000Z",
		"parent_ids":[
			"43ee619e24786826011de694201e18b387f2ed02"
		],
		"title":"Correct concatenation formatting",
		"message":"Correct concatenation formatting\n",
		"author_name":"Colin Molony",
		"author_email":"cm@safetyservices.co.uk",
		"authored_date":"2019-07-02T10:06:44.000Z",
		"committer_name":"Colin Molony",
		"committer_email":"cm@safetyservices.co.uk",
		"committed_date":"2019-07-02T10:06:44.000Z",
		"status":null,
		"last_pipeline":null,
		"project_id":7933925
	},
	{
		"id":"25d4a467f45697e51fdcb335093c5059a92244d4",
		"short_id":"25d4a467",
		"created_at":"2019-07-02T10:00:04.000Z",
		"parent_ids":[
			"e16d70ea06c7f4088b5754fe876a06c5939e9cf8"
		],
		"title":"Correct concatenation formatting",
		"message":"Correct concatenation formatting\n",
		"author_name":"Colin Molony",
		"author_email":"cm@safetyservices.co.uk",
		"authored_date":"2019-07-02T10:00:04.000Z",
		"committer_name":"Colin Molony",
		"committer_email":"cm@safetyservices.co.uk",
		"committed_date":"2019-07-02T10:00:04.000Z",
		"status":null,
		"last_pipeline":null,
		"project_id":7933925
	},
	{
		"id":"1ca42b84938bc4fb8c05d3974d32728d4e71e8be",
		"short_id":"1ca42b84",
		"created_at":"2019-05-08T11:02:02.000Z",
		"parent_ids":[
			"d14d3f22079048fe8a3ee8134f71ed980b90666e"
		],
		"title":"Convert single quotes to double quotes",
		"message":"Convert single quotes to double quotes\n\n* Convert single quotes to double quotes in `update` function\n* Correct concatenation formatting\n",
		"author_name":"Colin Molony",
		"author_email":"cm@safetyservices.co.uk",
		"authored_date":"2019-05-08T11:02:02.000Z",
		"committer_name":"Colin Molony",
		"committer_email":"cm@safetyservices.co.uk",
		"committed_date":"2019-05-08T11:02:02.000Z",
		"status":null,
		"last_pipeline":null,
		"project_id":7933925
	},
	{
		"id":"d0bab80b2da2b9e99e95de3684668c44fc30c29a",
		"short_id":"d0bab80b",
		"created_at":"2019-05-01T12:32:24.000Z",
		"parent_ids":[
			"c1497fd5a594574f1b8ff38fd9506942c833accd"
		],
		"title":"Correct concatenation formatting",
		"message":"Correct concatenation formatting\n",
		"author_name":"Colin Molony",
		"author_email":"cm@safetyservices.co.uk",
		"authored_date":"2019-05-01T12:32:24.000Z",
		"committer_name":"Colin Molony",
		"committer_email":"cm@safetyservices.co.uk",
		"committed_date":"2019-05-01T12:32:24.000Z",
		"status":null,
		"last_pipeline":null,
		"project_id":7933925
	},
	{
		"id":"8e4b5f91ce1fd1a38a46ef77dac7c66bb1f53d80",
		"short_id":"8e4b5f91",
		"created_at":"2019-04-29T15:20:12.000Z",
		"parent_ids":[
			"e9d9ce177037923f2bf8770bc7355d99cce4d507"
		],
		"title":"Correct concatenation formatting",
		"message":"Correct concatenation formatting\n",
		"author_name":"Colin Molony",
		"author_email":"cm@safetyservices.co.uk",
		"authored_date":"2019-04-29T15:20:12.000Z",
		"committer_name":"Colin Molony",
		"committer_email":"cm@safetyservices.co.uk",
		"committed_date":"2019-04-29T15:20:12.000Z",
		"status":null,
		"last_pipeline":null,
		"project_id":7933925
	}
]

What is the current bug behavior?

Only see commits that are in master branch

What is the expected correct behavior?

See a list of commits from all branches.

Output of checks

This bug happens on GitLab.com