Skip to content

Commit

Permalink
feat: 90 add support to read project PR template
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Martinez committed Jul 23, 2023
1 parent 55d9b13 commit 53a43f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/config/pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var PRConfigCmd = &cobra.Command{
Short: "configure the defaults for pull requests",
Run: func(cmd *cobra.Command, args []string) {
if !files.CheckExist(markdownRoute) {
fmt.Println(color.HiRedString("💀Error: ")+ "The file: " + color.HiYellowString(markdownRoute) +" does not exist.")
fmt.Println(color.HiRedString("💀Error: ") + "The file: " + color.HiYellowString(markdownRoute) + " does not exist.")
os.Exit(1)
}

Expand Down
6 changes: 6 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/Minnek-Digital-Studio/cominnek/cmd"
"github.com/Minnek-Digital-Studio/cominnek/config"
"github.com/Minnek-Digital-Studio/cominnek/controllers"
"github.com/Minnek-Digital-Studio/cominnek/controllers/files"
"github.com/Minnek-Digital-Studio/cominnek/controllers/loading"
"github.com/Minnek-Digital-Studio/cominnek/controllers/logger"
"github.com/Minnek-Digital-Studio/cominnek/helper"
Expand All @@ -17,6 +18,11 @@ import (
func init() {
events.Watcher()
config.AppData.Start = time.Now()

github_template := ".github/PULL_REQUEST_TEMPLATE.md"
if files.CheckExist(github_template) {
config.Public.PRBody = github_template
}
}

func main() {
Expand Down

0 comments on commit 53a43f4

Please sign in to comment.