Ghost
New
flaxo
/
ghost
public
forked from
ghost/ghost
Source code of Ghost - On Ghost
Star
0
Fork
0
Code
Issues
0
Pull requests
0
78d856c
34
branches
Go to file
t
Code
ghost
apps
api
src
services
git
branches
branches.service.ts
create and delete branches from a branches page
5f59851
15 days ago
14 lines · 455 B
1
import
{
Injectable
}
from
'
@nestjs/common
'
;
2
import
{
runGit
}
3
4
@
Injectable
()
5
export
class
BranchesService
6
async
getGitBranches
(
gitDir
7
const
raw
=
8
//
`short` would print `heads/v1` for a branch that shares its name with a tag
9
args
:
[
'
for-each-ref
'
,
10
gitDir
,
11
}
)
;
12
return
raw
.
split
13
}
14
}
from
'
../../../lib/git/exec/run-git.js
'
;
{
:
string
)
{
await
runGit
(
{
'
--format=%(refname:strip=2)
'
,
'
refs/heads/
'
]
,
(
'
\n
'
)
.
filter
(
Boolean
)
;