Skip to content

Commit

Permalink
Sync IDL files with wpt upon changes to the master branch (#21)
Browse files Browse the repository at this point in the history
Fixes #20.
  • Loading branch information
foolip authored Sep 10, 2018
1 parent 45a9dd5 commit 9b9744b
Show file tree
Hide file tree
Showing 6 changed files with 425 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
branches:
only:
- master
language: node_js
node_js:
- "8"
install:
- cd wpt-sync
- npm install
- git clone --single-branch https://github.com/web-platform-tests/wpt.git
- cd wpt
- git remote add fork https://autofoolip:[email protected]/autofoolip/wpt.git
- git fetch -q fork
- git push -q fork master
- git config user.email "[email protected]"
- git config user.name "Automat af Gränssnitt"
- cd ..
script:
- GH_USER=autofoolip node sync.js --wpt-dir wpt --build-url https://travis-ci.org/tidoust/reffy-reports/builds/$TRAVIS_BUILD_ID
2 changes: 2 additions & 0 deletions wpt-sync/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
wpt/
20 changes: 20 additions & 0 deletions wpt-sync/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
This code copies `*.idl` files from [whatwg/idl/](/whatwg/idl/) in this repo
into [interfaces/](https://github.com/web-platform-tests/wpt/tree/master/interfaces) in wpt.

Branches are maintained on a fork of [wpt](https://github.com/web-platform-tests/wpt),
and pull requests are automatically created based on those branches.

## Running locally

Required environment variables:
* `GH_USER` must be set to the name of a GitHub which has a fork of wpt.
* `GH_TOKEN` must be set to a
[personal access token](https://github.com/settings/tokens/new) with the
"Access public repositories" (public_repo) scope enabled.

A local checkout of wpt must exist with a remote named `fork` pointing to
`GH_USER`'s fork of wpt.

Then, run the script as `node sync.js --wpt-dir /path/to/wpt`.

Run `node sync.js --help` for all supported options.
123 changes: 123 additions & 0 deletions wpt-sync/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions wpt-sync/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dependencies": {
"@octokit/rest": "^15.9.6",
"flags": "^0.1.3"
}
}
Loading

0 comments on commit 9b9744b

Please sign in to comment.