-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from TeoDev1611/main
Change the actions and the code owners, fix the doc generator and modularize the gen command and add support for viper
- Loading branch information
Showing
14 changed files
with
67 additions
and
46 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
* @TeoDev1611 | ||
*.go @Polibov | ||
*.go @SantiagoVA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,18 @@ | ||
# Comment that will be sent if an issue is judged to be closed. | ||
comment: "This issue is closed because it does not meet our issue template. Please read it." | ||
|
||
comment: "This issue is closed by the Bot check the issue template for the issue not close." | ||
issueConfigs: | ||
# There can be several configs for different kind of issues. | ||
- content: | ||
# Example 1: bug report | ||
- "Expected Behavior" | ||
- "Current Behavior" | ||
- "Steps to Reproduce" | ||
- "Detailed Description" | ||
# Template: bug report | ||
- "Describe the bug" | ||
- "To Reproduce" | ||
- "Desktop (please complete the following information):" | ||
- "Additional context" | ||
- content: | ||
# Example 2: feature request | ||
- "Motivation / Use Case" | ||
- "Expected Behavior" | ||
- "Other Information" | ||
# Optional configuration: | ||
# | ||
# whether the keywords are case-insensitive | ||
# default value is false, which means keywords are case-sensitive | ||
caseInsensitive: false | ||
# the label that will be added when the bot close an issue | ||
# The bot will only add a label if this property is set. | ||
# Template: feature request | ||
- "Is your feature request related to a problem? Please describe." | ||
- "Describe the solution you'd like" | ||
- "Describe alternatives you've considered" | ||
- Additional context | ||
caseInsensitive: true | ||
label: "closed by bot" | ||
# The bot will ignore any issues that are opened or reopened by the user names in exception | ||
exception: | ||
- "username1" | ||
- "username2" | ||
# The issue is judged to be legal if it includes all keywords from any of these two configs. | ||
# Or it will be closed by the app. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package docgenerator | ||
|
||
import ( | ||
"bytes" | ||
"os" | ||
|
||
"github.com/Moldy-Community/moldy/utils/functions" | ||
"github.com/spf13/cobra" | ||
"github.com/spf13/cobra/doc" | ||
) | ||
|
||
func moldyDocFolder() { | ||
_, err := os.Stat("moldyDoc") | ||
|
||
if os.IsNotExist(err) { | ||
errDir := os.MkdirAll("moldyDoc", 0755) | ||
functions.CheckErrors(errDir, "Code 2", "Error in create the moldyDoc folder", "Report the error on github or re run with sudo") | ||
} | ||
} | ||
|
||
func GenDocTree(cmd *cobra.Command) { | ||
moldyDocFolder() | ||
errDoc := doc.GenMarkdownTree(cmd, "./moldyDoc") | ||
functions.CheckErrors(errDoc, "Code 2", "Error in generate the documentation for moldy", "Report the error on github or re run with sudo") | ||
} | ||
|
||
func DocCommand(cmd *cobra.Command) { | ||
moldyDocFolder() | ||
out := new(bytes.Buffer) | ||
err := doc.GenMarkdown(cmd, out) | ||
functions.CheckErrors(err, "Code 2", "Error in print out the doc for the command", "Report the error on github or re run with sudo") | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters