Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(internal/kokoro): add more debug info #1435

Merged
merged 1 commit into from Feb 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions internal/kokoro/discogen/main.go
Expand Up @@ -138,6 +138,7 @@ func hasChanges(dir string) (bool, error) {

// makePR commits local changes and makes a regen PR.
func makePR(ctx context.Context, accessToken, dir string) error {
log.Println("creating commit and pushing")
c := exec.Command("/bin/bash", "-c", `
set -ex

Expand All @@ -156,10 +157,13 @@ func makePR(ctx context.Context, accessToken, dir string) error {
fmt.Sprintf("BRANCH_NAME=%s", branchName),
}
c.Dir = dir
c.Stderr = os.Stderr
c.Stdout = os.Stdout
if err := c.Run(); err != nil {
return err
}

log.Println("creating pull request")
ts := oauth2.StaticTokenSource(
&oauth2.Token{AccessToken: accessToken},
)
Expand Down