Skip to content

Commit

Permalink
update cli name
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaxyi committed Nov 30, 2022
1 parent 701f86c commit c9c9b9f
Show file tree
Hide file tree
Showing 619 changed files with 16 additions and 316,394 deletions.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
2 changes: 1 addition & 1 deletion cli/keywordsList.go → cmd/keywordsList.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli
package cmd

import (
"github.com/spf13/cobra"
Expand Down
4 changes: 2 additions & 2 deletions cli/root.go → cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package cli
package cmd

import (
"github.com/spf13/cobra"
)

var RootCmd = &cobra.Command{
Use: "GetGHIssues",
Use: "Search-GithubIssues",
Short: "Used to search Gh issues",
}

Expand Down
11 changes: 6 additions & 5 deletions cli/commands.go → cmd/searchIssueCmd.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package cli
package cmd

import (
"Search-GithubIssues/helper/model"
"Search-GithubIssues/searches"
"context"
"ghIssueCLI/helper/model"
"github.com/google/go-github/v47/github"
"github.com/spf13/cobra"
"golang.org/x/oauth2"
Expand Down Expand Up @@ -38,7 +39,7 @@ var CmdGetIssueOnTimeRange = &cobra.Command{
// return fmt.Errorf("connection to Github repo error: %+v", err)
//}

if err := GetIssueOnCreationTimeRange(ctx, ghClient, searchConditionOnTimeOnly, csvFileLocation, appendOption); err != nil {
if err := searches.GetIssueOnCreationTimeRange(ctx, ghClient, searchConditionOnTimeOnly, csvFileLocation, appendOption); err != nil {
return err
}
return nil
Expand Down Expand Up @@ -66,7 +67,7 @@ var CmdGetIssueOnTimeRangeAndResourceProvider = &cobra.Command{
}
KeyWordsList := InitiatingResourceProvider(rpToSearch).SysKeyWordsList

if err := GetIssueBasedOnKeyWordListAndTimeRange(ctx, ghClient, searchConditionWithRp, KeyWordsList, csvFileLocation, appendOption); err != nil {
if err := searches.GetIssueBasedOnKeyWordListAndTimeRange(ctx, ghClient, searchConditionWithRp, KeyWordsList, csvFileLocation, appendOption); err != nil {
return err
}
return nil
Expand All @@ -93,7 +94,7 @@ var CmdGetIssueOnTimeRangeAndKeyWords = &cobra.Command{
CreatedTimeEnd: endDate,
}

if err := GetIssueBasedOnKeyWordListAndTimeRange(ctx, ghClient, searchConditionWithRp, keywordsList, csvFileLocation, appendOption); err != nil {
if err := searches.GetIssueBasedOnKeyWordListAndTimeRange(ctx, ghClient, searchConditionWithRp, keywordsList, csvFileLocation, appendOption); err != nil {
return err
}
return nil
Expand Down
18 changes: 1 addition & 17 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,36 +1,20 @@
module ghIssueCLI
module Search-GithubIssues

go 1.18

require (
github.com/google/go-github/v47 v47.1.0
github.com/spf13/cobra v1.6.1
github.com/spf13/viper v1.14.0
golang.org/x/oauth2 v0.2.0
)

require (
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
golang.org/x/net v0.2.0 // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/text v0.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
464 changes: 0 additions & 464 deletions go.sum

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package main

import (
"Search-GithubIssues/cmd"
"fmt"
"ghIssueCLI/cli"
"os"
)

func main() {
if err := cli.RootCmd.Execute(); err != nil {
if err := cmd.RootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli
package searches

import (
"context"
Expand All @@ -10,7 +10,7 @@ import (
"strconv"
"strings"

"ghIssueCLI/helper/model"
"Search-GithubIssues/helper/model"

"github.com/google/go-github/v47/github"
)
Expand Down
12 changes: 0 additions & 12 deletions vendor/github.com/fsnotify/fsnotify/.editorconfig

This file was deleted.

1 change: 0 additions & 1 deletion vendor/github.com/fsnotify/fsnotify/.gitattributes

This file was deleted.

6 changes: 0 additions & 6 deletions vendor/github.com/fsnotify/fsnotify/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions vendor/github.com/fsnotify/fsnotify/.mailmap

This file was deleted.

Loading

0 comments on commit c9c9b9f

Please sign in to comment.