example of getting issues mentioned in the issue itself (not follow up comments)
```javascript
fetch("https://git.benetou.fr/api/v1/repos/utopiah/text-code-xr-engine/issues")
.then( res => res.json() )
.then( res => {
console.log( res.filter( i => i.number == 48)
.map( i => i.body.split("http")
.filter( l => l.indexOf("://git.benetou.fr/utopiah/text-code-xr-engine/issues/")>0 )
.map( l => l.replace(/.*\issues\/(\d+)\D*/, (str,id) => id ) )
)
)
} )
```
example of showing all issues with links to other issues (again just in issue itself, not comments)
```javascript
fetch("https://git.benetou.fr/api/v1/repos/utopiah/text-code-xr-engine/issues")
.then( res => res.json() )
.then( res => {
console.log( res.filter( i => i.number )
.map( i => i.body.split("http")
.filter( l => l.indexOf("://git.benetou.fr/utopiah/text-code-xr-engine/issues/")>0 )
.map( l => { return { source : i.id, target: l.replace(/.*\issues\/(\d+)\D*/, (str,id) => id ) } } )
).filter( i => i.length > 0)
)
} )
```
Note that interesting these very comments were becoming edge cases.
example for all issues with all their comments
```javascript
fetch("https://git.benetou.fr/api/v1/repos/utopiah/text-code-xr-engine/issues")
.then( res => res.json() )
.then( res => {
var nodes = {}
res.map( i => {
if (body2ids(i.body).length > 0) nodes[i.id]=body2ids(i.body)
fetch("https://git.benetou.fr/api/v1/repos/utopiah/text-code-xr-engine/issues/"+i.id+"/comments")
.then( res => res.json() )
.then( c => {
if (c.length ) c.map( comm => {
if (body2ids( comm.body ).length>0)
if (nodes[i.id])
nodes[i.id] = [...new Set( nodes[i.id].concat( body2ids( comm.body )) )]
else
nodes[i.id] = body2ids( comm.body )
} )
})
} )
console.log(nodes)
} )
function body2ids(body){
return body.split("http")
.filter( l => l.match(/text-code-xr-engine\/issues\/\d+/) )
.map( l => l.replace(/.*\issues\/(\d+)\D*/, (str,id) => id ) ).filter( i => i.length > 0)
}
```
Note that interesting these very comments were becoming edge cases.
Consider also the more global perspective, e.g per branch
fetch("https://git.benetou.fr/api/v1/repos/utopiah/text-code-xr-engine/branches").then(r=>r.json()).then(r=>r.sort((a,b)=>a.commit.timestamp<b.commit.timestamp).map(i=>console.log(i.name,i.commit.timestamp,i.commit.message))// or addNewNote()
)
Consider also the more global perspective, e.g per branch
```javascript
fetch("https://git.benetou.fr/api/v1/repos/utopiah/text-code-xr-engine/branches")
.then( r => r.json() )
.then(r =>
r.sort( (a,b) => a.commit.timestamp < b.commit.timestamp)
.map( i => console.log(i.name, i.commit.timestamp, i.commit.message))
// or addNewNote()
)
```
example of getting issues mentioned in the issue itself (not follow up comments)
example of showing all issues with links to other issues (again just in issue itself, not comments)
example for all issues with all their comments
Note that interesting these very comments were becoming edge cases.
Consider also the more global perspective, e.g per branch
Consider the graph branch https://git.benetou.fr/utopiah/text-code-xr-engine/src/branch/graph in order to show the result.