Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit add49b1

Browse files
authored
Fix incorrect push target issue. (#511)
refs/heads/owt-bot:roll is incorrect, we need to push changes to refs/heads/roll and create PR from owt-bot:roll.
1 parent 7174252 commit add49b1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/roll_webrtc.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Regex expression to match commit hash of owt-deps-webrtc.
2424
REVISION_RE = re.compile(
2525
r"(?<=Var\('deps_webrtc_git'\) \+ '/owt-deps-webrtc' \+ '@' \+ ')[0-9a-f]{40}(?=',)")
26-
TARGET_BRANCH = 'owt-bot:roll'
26+
TARGET_BRANCH = 'roll'
2727

2828

2929
def webrtc_revision():
@@ -72,7 +72,8 @@ def pr(old_revision, new_revision, base_branch, token):
7272
'''Create a pull request. If a PR is already open for webrtc roller, do nothing.'''
7373
# Check if a pull request exists.
7474
# REST API ref: https://docs.github.com/en/rest/reference/pulls#list-pull-requests
75-
params = {'base': base_branch, 'head': TARGET_BRANCH, 'state': "open"}
75+
params = {'base': base_branch,
76+
'head': 'owt-bot:%s' % (TARGET_BRANCH), 'state': "open"}
7677
url = 'https://api.github.com/repos/open-webrtc-toolkit/owt-client-native/pulls'
7778
headers = {
7879
"Authorization": "token %s" % token,
@@ -104,7 +105,7 @@ def pr(old_revision, new_revision, base_branch, token):
104105
return 0
105106
# Create a new PR.
106107
create_params = {'title': commit_message(
107-
old_revision, new_revision), 'head': TARGET_BRANCH, 'base': base_branch}
108+
old_revision, new_revision), 'head': 'owt-bot:%s' % (TARGET_BRANCH), 'base': base_branch}
108109
create_response = requests.post(url, json=create_params, headers=headers)
109110
if create_response.status_code != 201:
110111
print('Failed to create pull request, REST response status code is %d.' % (

0 commit comments

Comments
 (0)