Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ground Controller Lvl 1
Message 1 of 1

Getting the line content for git blame

How can I get the line content when runing "git blame"? Like if I use git blame on CLI I get the results in the format:

 

 

IdAuthorTimestampLine NumberLine Content
89feb84dAlbert So2018-03-01 00:54:03 +00003This repository is an example of a project with multiple contributors making commits.

 

I'd like to know what to add to the bellow "blame" query?

 

query blame {
repository(name: "my_git-hammer", owner: "dimiterbak") {
ref(qualifiedName: "master") {
target {
... on Commit {
blame(path: "azbg_digital_health_id-config.json") {
ranges {
commit {
oid
author {
name
}
commitResourcePath
}
startingLine
endingLine
age
}
}
}
}
}
}
}

 

When I run it I get the bellow response:

 

{
"data": {
"repository": {
"ref": {
"target": {
"blame": {
"ranges": [
{
"commit": {
"oid": "41f32d92ad849ac7e177c4001ea61055f1238d4c",
"author": {
"name": "Dimitar"
},
"commitResourcePath": "/dimiterbak/my_git-hammer/commit/41f32d92ad849ac7e177c4001ea61055f1238d4c"
},
"startingLine": 1,
"endingLine": 26,
"age": 2
}
]
}
}
}
}
}
}