Fix the WPT export script

- Have the WPT exporter script use the WPT_SYNC_TOKEN for checking out
  wpt.
- Make sure the local WPT repository is unshallow when pushing.
- When searching for existing PRs use the main GitHub search API,
  as the pull request search does not seem to properly process
  the "head" parameter.
- When deleting branches in the downstream WPT repository, use
  the full URL to avoid trying to modify the upstream repository.
This commit is contained in:
Martin Robinson 2023-04-07 11:57:39 +02:00
parent aad3ad9102
commit f4b5b9f85f
4 changed files with 58 additions and 14 deletions

View file

@ -25,7 +25,12 @@ jobs:
with:
path: wpt
repository: 'web-platform-tests/wpt'
token: ${{ secrets.GITHUB_TOKEN }}
# The token here must be the token that we will use to push to the
# WPT repository and not the token used for GitHub actions, because
# the checkout action sets up an `extraheader` authorization override
# using the token specified here.
# See https://github.com/actions/checkout/issues/162.
token: ${{ secrets.WPT_SYNC_TOKEN }}
- name: Install requirements
run: pip install -r servo/etc/ci/upstream-wpt-changes/requirements.txt
- name: Process pull request