Add input for draft pull requests

This commit is contained in:
Peter Evans 2020-04-04 09:47:11 +09:00
parent 3474dda921
commit abc19caa82
8 changed files with 70 additions and 21 deletions

View file

@ -192,7 +192,7 @@ result = coub.create_or_update_branch(repo, repo_url, commit_message, base, bran
if result["action"] in ["created", "updated"]:
# The branch was created or updated
print(f"Pushing pull request branch to '{repo.full_name}/{branch}'")
print(f"Pushing pull request branch to 'origin/{branch}'")
repo.git.push("--force", repo_url, f"HEAD:refs/heads/{branch}")
# Set the base. It would have been 'None' if not specified as an input
@ -224,5 +224,6 @@ if result["action"] in ["created", "updated"]:
os.environ.get("CPR_TEAM_REVIEWERS"),
os.environ.get("CPR_PROJECT_NAME"),
os.environ.get("CPR_PROJECT_COLUMN_NAME"),
os.environ.get("CPR_DRAFT"),
os.environ.get("CPR_REQUEST_TO_PARENT"),
)