Skip to content

Commit

Permalink
feat(typescript): set types for parameters and results/responses auto…
Browse files Browse the repository at this point in the history
…magically (#32)
  • Loading branch information
gr2m committed Apr 24, 2020
1 parent 34c1fdb commit 2491cdf
Show file tree
Hide file tree
Showing 13 changed files with 11,290 additions and 226 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/routes-update.yml
@@ -0,0 +1,39 @@
name: octokit/routes update
on:
repository_dispatch:
types: [octokit-routes-release]

jobs:
update_routes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: "12.x"
# try checking out routes-update branch. Ignore error if it does not exist
- run: git checkout routes-update || true
- run: npm ci
- run: npm run update-endpoints
env:
VERSION: ${{ github.event.client_payload.version }}
- name: Create Pull Request
uses: gr2m/create-or-update-pull-request-action@v1.x
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: "🚧 GitHub REST Endpoints changed"
body: |
See what changed at https://github.com/octokit/routes/releases/latest.
Make sure to update the commits so that the merge results in helpful release notes, see [Merging the Pull Request & releasing a new version](https://github.com/octokit/rest.js/blob/master/CONTRIBUTING.md#merging-the-pull-request--releasing-a-new-version).
In general
- Avoid breaking changes at all costs
- If there are no typescript or code changes, use a `docs` prefix
- If there are typescript changes but no code changes, use `fix(typescript)` prefix
- If there are code changes, use `fix` if a problem was resolved, `feat` if new endpoints / parameters were added, and `feat(deprecation)` if a method was deprecated.
branch: "routes-update"
commit-message: "WIP octokit/routes updated"
author: "Octokit Bot <33075676+octokitbot@users.noreply.github.com>"
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Expand Up @@ -20,7 +20,6 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Install
run: npm ci
- name: Test
run: npm test
- run: npm ci
- run: npm test
- run: npm run test:ts
136 changes: 68 additions & 68 deletions package-lock.json

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

9 changes: 7 additions & 2 deletions package.json
Expand Up @@ -10,7 +10,11 @@
"lint": "prettier --check '{src,test}/**/*' README.md package.json",
"lint:fix": "prettier --write '{src,test}/**/*' README.md package.json",
"pretest": "npm run -s lint",
"test": "jest --coverage"
"test": "jest --coverage",
"test:ts": "npx tsc --noEmit --declaration --noUnusedLocals test/validate-typescript.ts",
"update-endpoints": "npm-run-all update-endpoints:*",
"update-endpoints:fetch-json": "node scripts/update-endpoints/fetch-json",
"update-endpoints:typescript": "node scripts/update-endpoints/typescript"
},
"repository": "https://github.com/octokit/plugin-paginate-rest.js",
"keywords": [
Expand All @@ -21,10 +25,11 @@
],
"license": "MIT",
"dependencies": {
"@octokit/types": "^2.9.0"
"@octokit/types": "^2.12.1"
},
"devDependencies": {
"@octokit/core": "^2.0.0",
"@octokit/plugin-rest-endpoint-methods": "^3.7.1",
"@pika/pack": "^0.5.0",
"@pika/plugin-build-node": "^0.9.0",
"@pika/plugin-build-web": "^0.9.0",
Expand Down

0 comments on commit 2491cdf

Please sign in to comment.