Skip to content

Commit

Permalink
chore: Fix generate-updates tool when not opening a PR (googleapis#8364)
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma authored Feb 11, 2022
1 parent 5ef6df5 commit c207aab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .toys/generate-updates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
end
flag :approval_token, "--approval-token" do
default ENV["APPROVAL_GITHUB_TOKEN"]
desc "GitHub token for adding labels and approving pull requests"
end
flag :all do
desc "Generate all APIs"
Expand Down Expand Up @@ -77,7 +78,8 @@ def pr_single_gem api, version, index, total
return
end
approval_message = "Rubber-stamped client auto-generation!"
result = yoshi_pr_generator.capture remote: git_remote,
result = yoshi_pr_generator.capture enabled: !git_remote.nil?,
remote: git_remote,
branch_name: branch_name,
commit_message: commit_message,
labels: ["automerge"],
Expand All @@ -103,7 +105,8 @@ def pr_clean_old_gems
return
end
approval_message = "Rubber-stamped cleanup of obsolete gems!"
result = yoshi_pr_generator.capture remote: git_remote,
result = yoshi_pr_generator.capture enabled: !git_remote.nil?,
remote: git_remote,
branch_name: branch_name,
commit_message: commit_message,
labels: ["automerge"],
Expand Down

0 comments on commit c207aab

Please sign in to comment.