changelog/cmd/cmd.go
jaqra e532c4d5cd Add generate from issues argument (#44)
Fix posible nil problem

Process only merged PRs

Rename variable

Fix github query for issues

Fix typo

Split function & fix lint

Rename variable name

Fix lint error

Add generate from issues argument

Co-authored-by: jaqra <jaqra@hotmail.com>
Reviewed-on: https://gitea.com/gitea/changelog/pulls/44
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: John Olheiser <john.olheiser@gmail.com>
2020-08-04 13:30:19 +00:00

33 lines
590 B
Go

// 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"
"path/filepath"
)
var (
MilestoneFlag string
ConfigPathFlag string
TokenFlag string
DetailsFlag bool
AfterFlag int64
IssuesFlag bool
)
func getDefaultConfigFile() string {
pwd, err := os.Getwd()
if err != nil {
return ""
}
config := filepath.Join(pwd, ".changelog.yml")
info, err := os.Stat(config)
if err == nil && !info.IsDir() {
return config
}
return ""
}