@@ -91,55 +91,6 @@ function unsafe_update_metadata() {
91
91
git commit -a --amend --no-edit || return 3
92
92
}
93
93
94
- # Push the branch to a remote branch, then open a PR for the branch
95
- # against servo/servo.
96
- function unsafe_open_pull_request() {
97
- WPT_SYNC_USER=servo-wpt-sync
98
-
99
- # If the branch doesn't exist, we'll silently exit. This deals with the
100
- # case where an earlier step either failed or discovered that syncing
101
- # is unnecessary.
102
- git checkout " ${BRANCH_NAME} " || return 0
103
-
104
- if [[ -z " ${WPT_SYNC_TOKEN+set} " ]]; then
105
- echo " Github auth token missing from WPT_SYNC_TOKEN."
106
- return 1
107
- fi
108
-
109
- # Push the changes to a remote branch owned by the bot.
110
- AUTH=" ${WPT_SYNC_USER} :${WPT_SYNC_TOKEN} "
111
- UPSTREAM=" https://${AUTH} @github.com/${WPT_SYNC_USER} /servo.git"
112
- git remote add " ${REMOTE_NAME} " " ${UPSTREAM} " || return 2
113
- git push -f " ${REMOTE_NAME} " " ${BRANCH_NAME} :${REMOTE_BRANCH_NAME} " & > /dev/null || return 3
114
-
115
- # Prepare the pull request metadata.
116
- BODY=" Automated downstream sync of changes from upstream as of "
117
- BODY+=" ${CURRENT_DATE} .\n"
118
- BODY+=" [no-wpt-sync]\n"
119
- BODY+=" r? @servo-wpt-sync\n"
120
- cat << EOF >prdata.json || return 4
121
- {
122
- "title": "Sync WPT with upstream (${CURRENT_DATE} )",
123
- "head": "${WPT_SYNC_USER} :${REMOTE_BRANCH_NAME} ",
124
- "base": "master",
125
- "body": "${BODY} ",
126
- "maintainer_can_modify": true
127
- }
128
- EOF
129
-
130
- # Open a pull request using the new branch.
131
- OPEN_PR_RESPONSE=$( curl -H " Authorization: token ${WPT_SYNC_TOKEN} " \
132
- -H " Content-Type: application/json" \
133
- --data @prdata.json \
134
- https://api.github.com/repos/servo/servo/pulls) || return 5
135
-
136
- echo " ${OPEN_PR_RESPONSE} " | \
137
- jq ' .review_comments_url' | \
138
- sed ' s/pulls/issues/' | \
139
- xargs curl -H " Authorization: token ${WPT_SYNC_TOKEN} " \
140
- --data " {\" body\" :\" @bors-servo r+\" }" || return 6
141
- }
142
-
143
94
function pull_from_upstream() {
144
95
unsafe_pull_from_upstream " ${1} " || { code=" ${?} " ; cleanup; return " ${code} " ; }
145
96
}
@@ -152,10 +103,6 @@ function update_metadata() {
152
103
unsafe_update_metadata " ${1} " " ${2} " " ${3} " || { code=" ${?} " ; cleanup; return " ${code} " ; }
153
104
}
154
105
155
- function open_pull_request() {
156
- unsafe_open_pull_request || { code=" ${?} " ; cleanup; return " ${code} " ; }
157
- }
158
-
159
106
SCRIPT_NAME=" ${0} "
160
107
161
108
function update_test_results() {
@@ -173,7 +120,6 @@ function usage() {
173
120
echo " - fetch-upstream-changes: create a branch with the latest changes from upstream"
174
121
echo " - update-test-results: run the tests, update the expected test results, and commit the changes"
175
122
echo " - fetch-and-update-expectations: combines fetch-upstream-changes and update-test-results"
176
- echo " - open-pr: open a pull request with the latest changes"
177
123
echo " - cleanup: cleanup all traces of an in-progress sync and checkout the master branch"
178
124
exit 1
179
125
}
@@ -197,9 +143,6 @@ function main() {
197
143
if [[ " ${1} " == " update-test-results" ]] || [[ " ${1} " == " fetch-and-update-expectations" ]]; then
198
144
update_test_results
199
145
200
- elif [[ " ${1} " == " open-pr" ]]; then
201
- open_pull_request
202
-
203
146
elif [[ " ${1} " == " cleanup" ]]; then
204
147
cleanup
205
148
0 commit comments