Skip to content

Commit

Permalink
Remove W3C API key requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
dontcallmedom committed Jul 31, 2023
1 parent 975234d commit bb1a099
Show file tree
Hide file tree
Showing 8 changed files with 1,922 additions and 1,218 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x
- name: Setup dependencies
run: npm ci
- name: Run lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x
- name: Setup dependencies
run: |
echo '{}' > config.json
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x
- name: Setup dependencies
run: |
echo '{"w3capikey":"${{ secrets.W3C_API_KEY }}","ghToken":"${{ secrets.W3C_GH_TOKEN }}"}' > config.json
echo '{"ghToken":"${{ secrets.W3C_GH_TOKEN }}"}' > config.json
npm ci --production
- name: Run validate.js
run: node validate.js > report.json
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ This project is licenced [under the terms of the MIT licence](LICENSE.md).
## Running locally

To run the tool locally, you will need [Node.js](https://nodejs.org/), a
[W3C API key](https://w3c.github.io/w3c-api/) and a
[GitHub token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line).
Then create a `config.json` with the following content:

```json
{
"w3capikey": "replace with W3C API key",
"ghToken": "replace with GitHub token"
}
```
Expand Down
3 changes: 0 additions & 3 deletions lib/w3cData.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
const fetch = require("node-fetch");
const w3c = require("node-w3capi");

const config = require("../config.json");
w3c.apiKey = config.w3capikey;

const orgToOwner = {
"WICG": 80485,
"webassembly": 78073,
Expand Down
3 changes: 0 additions & 3 deletions list-unconnected-contributors.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
/* eslint-env node */

const config = require("./config.json");
const github = require("./lib/github.js");
const w3c = require('node-w3capi');

// based on a downloaded a local copy from https://labs.w3.org/hatchery/repo-manager/api/users when logged in there, filtered to leave only list of ghID
const ashnazgusers = require('./ashnazg-users.json');

w3c.apiKey = config.w3capikey;

if (!process.argv[2] || process.argv[2].indexOf('/') === -1) {
console.error("Required: name of repo to check, e.g. w3c/webrtc-pc");
process.exit(2);
Expand Down
Loading

0 comments on commit bb1a099

Please sign in to comment.