File tree Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Original file line number Diff line number Diff line change @@ -5,23 +5,18 @@ import parseGithubURL from "parse-github-url"
5
5
6
6
export const getRepoSlug = ( ) => {
7
7
try {
8
- // Find .git/config in the current directory or parent directories
9
8
const gitConfigPath = path . join ( process . cwd ( ) , ".git" , "config" )
10
9
11
10
if ( ! fs . existsSync ( gitConfigPath ) ) {
12
11
return null
13
12
}
14
13
15
- // Read and parse the git config file
16
14
const configContent = fs . readFileSync ( gitConfigPath , "utf8" )
17
15
18
- // Parse the git config and transform to match parse-git-config's output format
19
16
const parsedConfig = ini . parse ( configContent )
20
17
21
- // Transform the ini output to match parse-git-config's structure
22
18
const config : Record < string , any > = { }
23
19
24
- // Handle the remotes section specifically
25
20
if ( parsedConfig . remote ) {
26
21
for ( const remoteName in parsedConfig . remote ) {
27
22
config [ `remote "${ remoteName } "` ] = parsedConfig . remote [ remoteName ]
You can’t perform that action at this time.
0 commit comments