Skip to content

Commit

Permalink
Review WPT sync PRs automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
CYBAI committed Apr 5, 2019
1 parent 5defd51 commit 69da3ae
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions etc/ci/update-wpt-checkout
Expand Up @@ -112,10 +112,16 @@ function unsafe_open_pull_request() {
EOF

# Open a pull request using the new branch.
curl -H "Authorization: token ${WPT_SYNC_TOKEN}" \
-H "Content-Type: application/json" \
--data @prdata.json \
https://api.github.com/repos/servo/servo/pulls || return 5
OPEN_PR_RESPONSE=$(curl -H "Authorization: token ${WPT_SYNC_TOKEN}" \
-H "Content-Type: application/json" \
--data @prdata.json \
https://api.github.com/repos/servo/servo/pulls) || return 5

echo "${OPEN_PR_RESPONSE}" | \
jq '.review_comments_url' | \
sed 's/pulls/issues/' | \
xargs curl -H "Authorization: token ${WPT_SYNC_TOKEN}" \
--data "{\"body\":\"@bors-servo r+\"}" || return 6
}

function pull_from_upstream() {
Expand Down

0 comments on commit 69da3ae

Please sign in to comment.