This commit is contained in:
6543 2020-02-02 23:18:49 +01:00
parent e33dc4fb7c
commit f1ad85693a
No known key found for this signature in database
GPG Key ID: A1CA74D27FD13271
2 changed files with 16 additions and 19 deletions

View File

@ -4,6 +4,10 @@
package cmd
import (
"os"
)
var (
MilestoneFlag string
ConfigPathFlag string
@ -11,3 +15,15 @@ var (
DetailsFlag bool
AfterFlag int64
)
func getDefaultConfigFile() string {
pwd, err := os.Getwd()
if err != nil {
return ""
}
info, err := os.Stat(pwd + "/.changelog.yml")
if err == nil && !info.IsDir() {
return pwd + "/.changelog.yml"
}
return ""
}

View File

@ -1,19 +0,0 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package cmd
import "os"
func getDefaultConfigFile() string {
pwd, err := os.Getwd()
if err != nil {
return ""
}
info, err := os.Stat(pwd + "/.changelog.yml")
if err == nil && !info.IsDir() {
return pwd + "/.changelog.yml"
}
return ""
}