Skip to content

fix: gitlab remote api fix#4411

Merged
likyh merged 1 commit into
apache:mainfrom
merico-ai:gitlab-remote-fix
Feb 14, 2023
Merged

fix: gitlab remote api fix#4411
likyh merged 1 commit into
apache:mainfrom
merico-ai:gitlab-remote-fix

Conversation

@mappjzc
Copy link
Copy Markdown
Contributor

@mappjzc mappjzc commented Feb 14, 2023

Summary

Add name for child
fix project id error

curl --location --request GET 'devlake:8080/plugins/gitlab/connections/6/remote-scopes?groupId=4064756&pageToken='

{
	"children": [{
		"type": "scope",
		"parentId": "4064756",
		"id": "16773509",
		"name": "Persper Licenses",
		"data": {
			"connectionId": 0,
			"gitlabId": 16773509,
			"name": "Persper Licenses",
			"description": "Persper Foundation Licenses",
			"defaultBranch": "master",
			"pathWithNamespace": "persper/licenses",
			"webUrl": "https://gitlab.com/persper/licenses",
			"creatorId": 0,
			"visibility": "public",
			"openIssuesCount": 0,
			"starCount": 0,
			"forkedFromProjectId": 0,
			"forkedFromProjectWebUrl": "",
			"httpUrlToRepo": "https://gitlab.com/persper/licenses.git",
			"createdDate": "2020-02-08T09:08:43.397Z",
			"updatedDate": "2020-02-09T11:44:14.913Z"
		}
	}, {
		"type": "scope",
		"parentId": "4064756",
		"id": "11441826",
		"name": "Open Data End",
		"data": {
			"connectionId": 0,
			"gitlabId": 11441826,
			"name": "Open Data End",
			"description": "The Open Data End (ODE) is a new system structure to power the next generation of the Web, where user data and social networks are uder users' control and made independent of product providers.",
			"defaultBranch": "master",
			"pathWithNamespace": "persper/open-data-end",
			"webUrl": "https://gitlab.com/persper/open-data-end",
			"creatorId": 0,
			"visibility": "public",
			"openIssuesCount": 0,
			"starCount": 0,
			"forkedFromProjectId": 0,
			"forkedFromProjectWebUrl": "",
			"httpUrlToRepo": "https://gitlab.com/persper/open-data-end.git",
			"createdDate": "2019-03-22T05:36:23.311Z",
			"updatedDate": "2019-03-22T05:36:23.311Z"
		}
	}, {
		"type": "scope",
		"parentId": "4064756",
		"id": "11196910",
		"name": "Survey System",
		"data": {
			"connectionId": 0,
			"gitlabId": 11196910,
			"name": "Survey System",
			"description": "Survey system for comparing commit pairs",
			"defaultBranch": "master",
			"pathWithNamespace": "persper/survey-system",
			"webUrl": "https://gitlab.com/persper/survey-system",
			"creatorId": 0,
			"visibility": "public",
			"openIssuesCount": 0,
			"starCount": 0,
			"forkedFromProjectId": 0,
			"forkedFromProjectWebUrl": "",
			"httpUrlToRepo": "https://gitlab.com/persper/survey-system.git",
			"createdDate": "2019-03-07T09:04:05.775Z",
			"updatedDate": "2019-03-07T09:04:05.775Z"
		}
	}, {
		"type": "scope",
		"parentId": "4064756",
		"id": "11196596",
		"name": "Apartment",
		"data": {
			"connectionId": 0,
			"gitlabId": 11196596,
			"name": "Apartment",
			"description": "",
			"defaultBranch": "development",
			"pathWithNamespace": "persper/apartment",
			"webUrl": "https://gitlab.com/persper/apartment",
			"creatorId": 0,
			"visibility": "public",
			"openIssuesCount": 0,
			"starCount": 0,
			"forkedFromProjectId": 0,
			"forkedFromProjectWebUrl": "",
			"httpUrlToRepo": "https://gitlab.com/persper/apartment.git",
			"createdDate": "2019-03-07T08:53:39.227Z",
			"updatedDate": "2019-04-11T11:44:25.234Z"
		}
	}, {
		"type": "scope",
		"parentId": "4064756",
		"id": "10008723",
		"name": "Code Analytics",
		"data": {
			"connectionId": 0,
			"gitlabId": 10008723,
			"name": "Code Analytics",
			"description": "Persper's code contribution analytics framework",
			"defaultBranch": "develop",
			"pathWithNamespace": "persper/code-analytics",
			"webUrl": "https://gitlab.com/persper/code-analytics",
			"creatorId": 0,
			"visibility": "private",
			"openIssuesCount": 15,
			"starCount": 5,
			"forkedFromProjectId": 0,
			"forkedFromProjectWebUrl": "",
			"httpUrlToRepo": "https://gitlab.com/persper/code-analytics.git",
			"createdDate": "2018-12-19T22:27:47.687Z",
			"updatedDate": "2020-06-10T15:30:33.068Z"
		}
	}, {
		"type": "scope",
		"parentId": "4064756",
		"id": "9650021",
		"name": "Drepo GitLab Development Kit",
		"data": {
			"connectionId": 0,
			"gitlabId": 9650021,
			"name": "Drepo GitLab Development Kit",
			"description": "Get started with GitLab Rails development",
			"defaultBranch": "master",
			"pathWithNamespace": "persper/drepo-gitlab-development-kit",
			"webUrl": "https://gitlab.com/persper/drepo-gitlab-development-kit",
			"creatorId": 0,
			"visibility": "public",
			"openIssuesCount": 0,
			"starCount": 0,
			"forkedFromProjectId": 74823,
			"forkedFromProjectWebUrl": "https://gitlab.com/gitlab-org/gitlab-development-kit",
			"httpUrlToRepo": "https://gitlab.com/persper/drepo-gitlab-development-kit.git",
			"createdDate": "2018-11-28T02:20:27.554Z",
			"updatedDate": "2018-11-28T07:30:53.401Z"
		}
	}, {
		"type": "scope",
		"parentId": "4064756",
		"id": "9482209",
		"name": "Decentralized GitLab",
		"data": {
			"connectionId": 0,
			"gitlabId": 9482209,
			"name": "Decentralized GitLab",
			"description": "Website: https://drepo.io\r\nIntroduction: https://medium.com/p/80edd708b80b",
			"defaultBranch": "master",
			"pathWithNamespace": "persper/gitlab-ce",
			"webUrl": "https://gitlab.com/persper/gitlab-ce",
			"creatorId": 0,
			"visibility": "public",
			"openIssuesCount": 0,
			"starCount": 0,
			"forkedFromProjectId": 13083,
			"forkedFromProjectWebUrl": "https://gitlab.com/gitlab-org/gitlab-foss",
			"httpUrlToRepo": "https://gitlab.com/persper/gitlab-ce.git",
			"createdDate": "2018-11-19T03:55:02.194Z",
			"updatedDate": "2019-07-14T12:28:07.896Z"
		}
	}],
	"nextPageToken": ""
}

curl --location --request GET 'devlake:8080/plugins/gitlab/connections/6/search-remote-scopes?search=test3&page=1&pageSize=100'

{
	"children": [{
		"type": "scope",
		"parentId": null,
		"id": "26809223",
		"name": "test3",
		"data": {
			"connectionId": 0,
			"gitlabId": 26809223,
			"name": "test3",
			"description": "Onboarding best-practices designed to help accelerate your time-to-value with GitLab",
			"defaultBranch": "master",
			"pathWithNamespace": "gl-demo-ultimate-bgadberry/test3",
			"webUrl": "https://gitlab.com/gl-demo-ultimate-bgadberry/test3",
			"creatorId": 0,
			"visibility": "",
			"openIssuesCount": 0,
			"starCount": 0,
			"forkedFromProjectId": 0,
			"forkedFromProjectWebUrl": "",
			"httpUrlToRepo": "https://gitlab.com/gl-demo-ultimate-bgadberry/test3.git",
			"createdDate": "2021-05-20T22:33:58.881Z",
			"updatedDate": "2021-05-20T22:33:58.881Z"
		}
	}, {
		"type": "scope",
		"parentId": null,
		"id": "34564910",
		"name": "test3",
		"data": {
			"connectionId": 0,
			"gitlabId": 34564910,
			"name": "test3",
			"description": "",
			"defaultBranch": "main",
			"pathWithNamespace": "wisoftlabs/member/sangmin/test3",
			"webUrl": "https://gitlab.com/wisoftlabs/member/sangmin/test3",
			"creatorId": 0,
			"visibility": "",
			"openIssuesCount": 0,
			"starCount": 0,
			"forkedFromProjectId": 0,
			"forkedFromProjectWebUrl": "",
			"httpUrlToRepo": "https://gitlab.com/wisoftlabs/member/sangmin/test3.git",
			"createdDate": "2022-03-17T08:18:36.813Z",
			"updatedDate": "2022-03-17T08:18:36.813Z"
		}
	}, {
		"type": "scope",
		"parentId": null,
		"id": "19258311",
		"name": "nfs-file52-test3",
		"data": {
			"connectionId": 0,
			"gitlabId": 19258311,
			"name": "nfs-file52-test3",
			"description": "nfs-file52-test3",
			"defaultBranch": "master",
			"pathWithNamespace": "nnelson/nfs-file52-test3",
			"webUrl": "https://gitlab.com/nnelson/nfs-file52-test3",
			"creatorId": 0,
			"visibility": "",
			"openIssuesCount": 0,
			"starCount": 0,
			"forkedFromProjectId": 0,
			"forkedFromProjectWebUrl": "",
			"httpUrlToRepo": "https://gitlab.com/nnelson/nfs-file52-test3.git",
			"createdDate": "2020-06-08T14:05:50.649Z",
			"updatedDate": "2020-06-08T14:05:50.649Z"
		}
	}, {
		"type": "scope",
		"parentId": null,
		"id": "40453756",
		"name": "BuyCoin",
		"data": {
			"connectionId": 0,
			"gitlabId": 40453756,
			"name": "BuyCoin",
			"description": "",
			"defaultBranch": "main",
			"pathWithNamespace": "11913/t2/test3",
			"webUrl": "https://gitlab.com/11913/t2/test3",
			"creatorId": 0,
			"visibility": "",
			"openIssuesCount": 0,
			"starCount": 0,
			"forkedFromProjectId": 0,
			"forkedFromProjectWebUrl": "",
			"httpUrlToRepo": "https://gitlab.com/11913/t2/test3.git",
			"createdDate": "2022-10-23T15:07:06.155Z",
			"updatedDate": "2022-10-25T04:53:55.079Z"
		}
	}, {
		"type": "scope",
		"parentId": null,
		"id": "26809191",
		"name": "test34",
		"data": {
			"connectionId": 0,
			"gitlabId": 26809191,
			"name": "test34",
			"description": "Onboarding best-practices designed to help accelerate your time-to-value with GitLab",
			"defaultBranch": "master",
			"pathWithNamespace": "gl-demo-ultimate-bgadberry/test34",
			"webUrl": "https://gitlab.com/gl-demo-ultimate-bgadberry/test34",
			"creatorId": 0,
			"visibility": "",
			"openIssuesCount": 0,
			"starCount": 0,
			"forkedFromProjectId": 0,
			"forkedFromProjectWebUrl": "",
			"httpUrlToRepo": "https://gitlab.com/gl-demo-ultimate-bgadberry/test34.git",
			"createdDate": "2021-05-20T22:29:35.862Z",
			"updatedDate": "2021-11-24T21:10:30.859Z"
		}
	}, {
		"type": "scope",
		"parentId": null,
		"id": "21534804",
		"name": "openml-42695",
		"data": {
			"connectionId": 0,
			"gitlabId": 21534804,
			"name": "openml-42695",
			"description": "OpenML dataset: test3 https://www.openml.org/d/42695",
			"defaultBranch": "master",
			"pathWithNamespace": "data/d/openml/42695",
			"webUrl": "https://gitlab.com/data/d/openml/42695",
			"creatorId": 0,
			"visibility": "",
			"openIssuesCount": 0,
			"starCount": 0,
			"forkedFromProjectId": 0,
			"forkedFromProjectWebUrl": "",
			"httpUrlToRepo": "https://gitlab.com/data/d/openml/42695.git",
			"createdDate": "2020-10-03T04:31:58.71Z",
			"updatedDate": "2022-06-24T05:00:26.281Z"
		}
	}],
	"page": 1,
	"pageSize": 100
}

Screenshots

image
image
image

@mappjzc mappjzc force-pushed the gitlab-remote-fix branch 2 times, most recently from d52b12c to 9ff9461 Compare February 14, 2023 11:59
Add name for child
fix project id error

Nddtfjiang <zhicheng.jiang@merico.dev>
@likyh likyh merged commit 3285a5a into apache:main Feb 14, 2023
@likyh likyh deleted the gitlab-remote-fix branch February 14, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants