We use Gitlab in the company intranet to build a Git server, in the actual use, need to get some warehouse data, but I do not understand the web, so I intend to directly on the server to do the warehouse processing, extraction information, and now intend to first from the extraction colleagues to do the comment , that is, the comments submitted to do, how to do?
Or Gitlab has a thread interface that can be used.
Effective reply
Use curl to access those interfaces directly, and then parse JSON.
Do not curl, quickly write a jquery, $.ajax () your Gitlab URL plus the API address.
Like you want to see commits
$.ajax ({
URL: "http://your gitlab url/api/v3/projects/:id/repository/commits",///connection reference upstairs Gitlab API doc
Method: ' Get '
})
. Done (function (data) {
var commithistory = data;
Then just play with the data object, such as drawing your commit message on the page, and so on.
});
The data here should grow this type.
[
{
"id": "ed899a2f4b50b4370feeea94676502b42383c746",
"short_id": "Ed899a2f4b5",
"title": "Replace sanitize with Escape once",
"Author_name": "Dmitriy Zaporozhets",
"Author_email": "dzaporozhets@sphereconsultinginc.com";
"Created_at": "2012-09-20t11:50:22+03:00",
' Message ': ' Replace sanitize with escape once '
},
{
"id": "6104942438c14ec7bd21c6cd5bd995272b3faff6",
"short_id": "6104942438c",
"title": "Sanitize for network graph",
"Author_name": "Randx",
"Author_email": "dmitriy.zaporozhets@gmail.com";
"Created_at": "2012-09-20t09:06:12+03:00",
' Message ': ' Sanitize for network graph '
}
]