fix(cmd/joj3): check actor for teapot env
All checks were successful
submodules sync / sync (push) Successful in 43s
build / build (push) Successful in 1m29s
build / trigger-build-image (push) Successful in 7s

This commit is contained in:
张泊明518370910136 2024-11-25 02:05:33 -05:00
parent b678654231
commit 9845518d9a
GPG Key ID: D47306D7062CDA9D
2 changed files with 2 additions and 2 deletions

View File

@ -31,4 +31,4 @@ test:
ci-test: ci-test:
./scripts/prepare_test_repos.sh $(TMP_DIR) ./scripts/prepare_test_repos.sh $(TMP_DIR)
./scripts/run_foreach_test_repos.sh $(TMP_DIR) "sed -i '2i \ \ \"sandboxExecServer\": \"172.17.0.1:5051\",' conf.json" ./scripts/run_foreach_test_repos.sh $(TMP_DIR) "sed -i '2i \ \ \"sandboxExecServer\": \"172.17.0.1:5051\",' conf.json"
GITHUB_TRIGGERING_ACTOR="" go test -coverprofile cover.out -v ./... GITHUB_ACTOR="" go test -coverprofile cover.out -v ./...

View File

@ -26,7 +26,7 @@ type TeapotResult struct {
func Run(conf *conf.Conf) (teapotResult TeapotResult, err error) { func Run(conf *conf.Conf) (teapotResult TeapotResult, err error) {
os.Setenv("LOG_FILE_PATH", conf.Teapot.LogPath) os.Setenv("LOG_FILE_PATH", conf.Teapot.LogPath)
os.Setenv("_TYPER_STANDARD_TRACEBACK", "1") os.Setenv("_TYPER_STANDARD_TRACEBACK", "1")
if env.Attr.TriggeringActor == "" || if env.Attr.Actor == "" ||
env.Attr.Repository == "" || env.Attr.Repository == "" ||
strings.Count(env.Attr.Repository, "/") != 1 || strings.Count(env.Attr.Repository, "/") != 1 ||
env.Attr.RunNumber == "" { env.Attr.RunNumber == "" {