forked from Pluralith/pluralith-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add basic PR comment generation
- Loading branch information
1 parent
48d0a4d
commit 7031a39
Showing
4 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ import ( | |
"os" | ||
"path/filepath" | ||
"pluralith/pkg/ci" | ||
|
||
"runtime" | ||
"strings" | ||
) | ||
|
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,18 @@ | ||
package ci | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
func GeneratePRComment(urls map[string]string) (string, error) { | ||
var comment string = "" | ||
|
||
// Generate Head | ||
comment += "## 📝 Pluralith Diagram Generated \n\n" | ||
|
||
// Generate Body | ||
comment += fmt.Sprintf("![Pluralith Diagram](%s) \n", urls["PNG"]) | ||
comment += fmt.Sprintf("### View the [PDF](%s) \n", urls["PDF"]) | ||
|
||
return comment, nil | ||
} |
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