feat(cmd/joj): conf with name #53
|
@ -22,6 +22,7 @@ type Conf struct {
|
||||||
SkipTeapot bool `default:"true"`
|
SkipTeapot bool `default:"true"`
|
||||||
ScoreboardPath string `default:"scoreboard.csv"`
|
ScoreboardPath string `default:"scoreboard.csv"`
|
||||||
FailedTablePath string `default:"failed-table.md"`
|
FailedTablePath string `default:"failed-table.md"`
|
||||||
|
Name string `default:"unknown"`
|
||||||
Stages []struct {
|
Stages []struct {
|
||||||
Name string
|
Name string
|
||||||
Group string
|
Group string
|
||||||
|
|
|
@ -31,7 +31,7 @@ func Run(conf conf.Conf) error {
|
||||||
re := regexp.MustCompile(`\x1b\[[0-9;]*[a-zA-Z]`)
|
re := regexp.MustCompile(`\x1b\[[0-9;]*[a-zA-Z]`)
|
||||||
cmd := exec.Command("joint-teapot", "joj3-scoreboard",
|
cmd := exec.Command("joint-teapot", "joj3-scoreboard",
|
||||||
envFilePath, conf.OutputPath, actor, conf.GradingRepoName, repoName,
|
envFilePath, conf.OutputPath, actor, conf.GradingRepoName, repoName,
|
||||||
runNumber, conf.ScoreboardPath) // #nosec G204
|
runNumber, conf.ScoreboardPath, conf.Name) // #nosec G204
|
||||||
outputBytes, err := cmd.CombinedOutput()
|
outputBytes, err := cmd.CombinedOutput()
|
||||||
output := re.ReplaceAllString(string(outputBytes), "")
|
output := re.ReplaceAllString(string(outputBytes), "")
|
||||||
for _, line := range strings.Split(output, "\n") {
|
for _, line := range strings.Split(output, "\n") {
|
||||||
|
@ -46,7 +46,7 @@ func Run(conf conf.Conf) error {
|
||||||
}
|
}
|
||||||
cmd = exec.Command("joint-teapot", "joj3-failed-table",
|
cmd = exec.Command("joint-teapot", "joj3-failed-table",
|
||||||
envFilePath, conf.OutputPath, actor, conf.GradingRepoName, repoName,
|
envFilePath, conf.OutputPath, actor, conf.GradingRepoName, repoName,
|
||||||
runNumber, conf.FailedTablePath) // #nosec G204
|
runNumber, conf.FailedTablePath, conf.Name) // #nosec G204
|
||||||
outputBytes, err = cmd.CombinedOutput()
|
outputBytes, err = cmd.CombinedOutput()
|
||||||
output = re.ReplaceAllString(string(outputBytes), "")
|
output = re.ReplaceAllString(string(outputBytes), "")
|
||||||
for _, line := range strings.Split(output, "\n") {
|
for _, line := range strings.Split(output, "\n") {
|
||||||
|
@ -60,7 +60,7 @@ func Run(conf conf.Conf) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
cmd = exec.Command("joint-teapot", "joj3-create-result-issue",
|
cmd = exec.Command("joint-teapot", "joj3-create-result-issue",
|
||||||
envFilePath, conf.OutputPath, repoName, runNumber) // #nosec G204
|
envFilePath, conf.OutputPath, repoName, runNumber, conf.Name) // #nosec G204
|
||||||
outputBytes, err = cmd.CombinedOutput()
|
outputBytes, err = cmd.CombinedOutput()
|
||||||
output = re.ReplaceAllString(string(outputBytes), "")
|
output = re.ReplaceAllString(string(outputBytes), "")
|
||||||
for _, line := range strings.Split(output, "\n") {
|
for _, line := range strings.Split(output, "\n") {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user