Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: octokit/webhooks
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.3.1
Choose a base ref
...
head repository: octokit/webhooks
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.3.2
Choose a head ref

Commits on Sep 18, 2023

  1. build: use ESM for scripts (#845)

    As done in other Octokit repos, use ESM for scripts to unblock dependency upgrades
    wolfy1339 authored Sep 18, 2023
    Copy the full SHA
    4abce2f View commit details

Commits on Sep 19, 2023

  1. build(deps): lock file maintenance (#846)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Sep 19, 2023
    Copy the full SHA
    6e5d1a3 View commit details
  2. Copy the full SHA
    d4e18f7 View commit details

Commits on Sep 21, 2023

  1. ci(action): update peter-evans/create-or-update-comment digest to 46d…

    …a6c0
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Sep 21, 2023
    Copy the full SHA
    8e99858 View commit details

Commits on Sep 22, 2023

  1. ci(action): update actions/checkout digest to 8ade135 (#849)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Sep 22, 2023
    Copy the full SHA
    95e803b View commit details

Commits on Sep 26, 2023

  1. build(deps): lock file maintenance (#850)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Sep 26, 2023
    Copy the full SHA
    e0367a8 View commit details

Commits on Sep 27, 2023

  1. ci(action): update peter-evans/create-or-update-comment digest to ddf…

    …f993 (#851)
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Sep 27, 2023
    Copy the full SHA
    5abb0ce View commit details

Commits on Oct 3, 2023

  1. ci(action): Workflows have changed (#852)

    Updates for workflows
    octokitbot authored Oct 3, 2023
    Copy the full SHA
    5355239 View commit details
  2. ci(action): update actions/add-to-project action to v0.5.0 (#853)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 3, 2023
    Copy the full SHA
    726a0b4 View commit details

Commits on Oct 17, 2023

  1. build(deps): lock file maintenance (#854)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 17, 2023
    Copy the full SHA
    8b29aa4 View commit details

Commits on Oct 19, 2023

  1. ci(action): update actions/checkout digest to b4ffde6 (#855)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 19, 2023
    Copy the full SHA
    5ebf764 View commit details

Commits on Oct 23, 2023

  1. ci(action): update actions/setup-node action to v4 (#856)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 23, 2023
    Copy the full SHA
    8081fb4 View commit details

Commits on Oct 24, 2023

  1. chore(deps): update dependency @types/node to v20

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 24, 2023
    Copy the full SHA
    5f720e0 View commit details

Commits on Oct 25, 2023

  1. build(deps): lock file maintenance (#858)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 25, 2023
    Copy the full SHA
    f4921ab View commit details

Commits on Nov 1, 2023

  1. build(deps): lock file maintenance (#859)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 1, 2023
    Copy the full SHA
    2d680dc View commit details

Commits on Nov 7, 2023

  1. build(deps): lock file maintenance (#860)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 7, 2023
    Copy the full SHA
    4f143d3 View commit details

Commits on Nov 13, 2023

  1. chore(deps): update dependency prettier to v3.1.0

    * chore(deps): update dependency prettier to v3.1.0
    
    * style: prettier
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Create or Update Pull Request Action <create-or-update-pull-request@users.noreply.github.com>
    renovate[bot] and Create or Update Pull Request Action authored Nov 13, 2023
    Copy the full SHA
    f0bdffb View commit details
  2. build: fix scripts Node 20 compat (#863)

    This is an issue with how ts-node hooks into the import process due to a breaking change made in NodeJS 20
    See TypeStrong/ts-node#1997 for more details
    
    Fixes #862
    wolfy1339 authored Nov 13, 2023
    Copy the full SHA
    f990247 View commit details

Commits on Nov 15, 2023

  1. build(deps): lock file maintenance (#864)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 15, 2023
    Copy the full SHA
    e215d2b View commit details

Commits on Nov 21, 2023

  1. build(deps): lock file maintenance (#865)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 21, 2023
    Copy the full SHA
    c193468 View commit details

Commits on Nov 22, 2023

  1. Copy the full SHA
    0697516 View commit details

Commits on Nov 28, 2023

  1. build(deps): lock file maintenance (#867)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 28, 2023
    Copy the full SHA
    734ff42 View commit details

Commits on Nov 30, 2023

  1. chore(deps): update dependency got to v14 (#868)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 30, 2023
    Copy the full SHA
    5ff3376 View commit details

Commits on Dec 5, 2023

  1. build(deps): lock file maintenance (#869)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 5, 2023
    Copy the full SHA
    9d6495d View commit details

Commits on Dec 10, 2023

  1. Copy the full SHA
    f959206 View commit details

Commits on Dec 11, 2023

  1. chore(deps): update dependency prettier to v3.1.1 (#871)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 11, 2023
    Copy the full SHA
    d654c7d View commit details
  2. Workflows have changed (#872)

    Updates for workflows
    octokitbot authored Dec 11, 2023
    Copy the full SHA
    d7e4221 View commit details

Commits on Dec 13, 2023

  1. ci(action): update github/codeql-action action to v3

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 13, 2023
    Copy the full SHA
    c117722 View commit details
  2. build(deps): lock file maintenance (#873)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 13, 2023
    Copy the full SHA
    206307a View commit details

Commits on Dec 19, 2023

  1. build(deps): lock file maintenance (#875)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 19, 2023
    Copy the full SHA
    f256fc5 View commit details

Commits on Dec 26, 2023

  1. build(deps): lock file maintenance (#876)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 26, 2023
    Copy the full SHA
    753d668 View commit details

Commits on Jan 2, 2024

  1. build(deps): lock file maintenance (#877)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 2, 2024
    Copy the full SHA
    0de434b View commit details

Commits on Jan 9, 2024

  1. build(deps): lock file maintenance (#878)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 9, 2024
    Copy the full SHA
    7e61eaa View commit details

Commits on Jan 13, 2024

  1. chore(deps): update dependency semantic-release to v23

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 13, 2024
    Copy the full SHA
    9201d58 View commit details
  2. chore(deps): update dependency prettier to v3.2.0

    * chore(deps): update dependency prettier to v3.2.0
    
    * style: prettier
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Create or Update Pull Request Action <create-or-update-pull-request@users.noreply.github.com>
    renovate[bot] and Create or Update Pull Request Action authored Jan 13, 2024
    Copy the full SHA
    01fe455 View commit details
  3. chore(deps): update dependency prettier to v3.2.1

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 13, 2024
    Copy the full SHA
    47214a2 View commit details

Commits on Jan 14, 2024

  1. chore(deps): update dependency prettier to v3.2.2

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 14, 2024
    Copy the full SHA
    3892cce View commit details

Commits on Jan 16, 2024

  1. build(deps): lock file maintenance (#885)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 16, 2024
    Copy the full SHA
    c80e702 View commit details

Commits on Jan 18, 2024

  1. chore(deps): update dependency prettier to v3.2.3 (#886)

    * chore(deps): update dependency prettier to v3.2.3
    
    * style: prettier
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Create or Update Pull Request Action <create-or-update-pull-request@users.noreply.github.com>
    renovate[bot] and Create or Update Pull Request Action authored Jan 18, 2024
    Copy the full SHA
    197e991 View commit details
  2. chore(deps): update dependency prettier to v3.2.4

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 18, 2024
    Copy the full SHA
    4787658 View commit details

Commits on Jan 23, 2024

  1. build(deps): lock file maintenance (#888)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 23, 2024
    Copy the full SHA
    1cd0c96 View commit details

Commits on Jan 25, 2024

  1. ci(action): update peter-evans/create-or-update-comment action to v4

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 25, 2024
    Copy the full SHA
    a55dfc3 View commit details

Commits on Jan 30, 2024

  1. build(deps): lock file maintenance (#890)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 30, 2024
    Copy the full SHA
    285da11 View commit details

Commits on Feb 3, 2024

  1. Copy the full SHA
    6df0bc4 View commit details
Showing with 1,118 additions and 2,112 deletions.
  1. +4 −4 .github/workflows/codeql-analysis.yml
  2. +3 −3 .github/workflows/immediate-response.yml
  3. +3 −3 .github/workflows/prettier.yml
  4. +2 −2 .github/workflows/release.yml
  5. +8 −8 .github/workflows/test.yml
  6. +2 −2 .github/workflows/update-prettier.yml
  7. +3 −3 .github/workflows/update.yml
  8. +1 −1 README.md
  9. +2 −2 bin/{diff-interface-schemas.ts → diff-interface-schemas.mts}
  10. +5 −5 bin/docs/diff-interface-schemas.md
  11. +4 −4 bin/docs/extract-common-schema.md
  12. +3 −3 bin/docs/format-with-prettier.md
  13. +2 −2 bin/docs/octokit-schema.md
  14. +2 −2 bin/docs/octokit-types.md
  15. +2 −2 bin/docs/optimize-schemas.md
  16. +3 −3 bin/docs/ref-common-schemas.md
  17. +3 −3 bin/docs/validate-payload-examples.md
  18. +4 −2 bin/{extract-common-schema.ts → extract-common-schema.mts}
  19. +4 −2 bin/{format-with-prettier.ts → format-with-prettier.mts}
  20. +18 −9 bin/{octokit-schema.ts → octokit-schema.mts}
  21. +9 −3 bin/{octokit-types.ts → octokit-types.mts}
  22. +7 −5 bin/{octokit-webhooks.ts → octokit-webhooks.mts}
  23. +4 −2 bin/{optimize-schemas.ts → optimize-schemas.mts}
  24. +7 −8 bin/{ref-common-schemas.ts → ref-common-schemas.mts}
  25. +9 −9 bin/utils/{argv.ts → argv.mts}
  26. 0 bin/utils/{forEachJsonFile.ts → forEachJsonFile.mts}
  27. +1 −1 bin/utils/{getSchemaFromPath.ts → getSchemaFromPath.mts}
  28. +9 −0 bin/utils/index.mts
  29. +0 −9 bin/utils/index.ts
  30. +5 −1 bin/utils/{loadMapOfSchemas.ts → loadMapOfSchemas.mts}
  31. +1 −1 bin/utils/{misc.ts → misc.mts}
  32. +1 −1 bin/utils/{normalizeSchema.ts → normalizeSchema.mts}
  33. +11 −4 bin/{validate-payload-examples.ts → validate-payload-examples.mts}
  34. +7 −4 bin/{validate-schema.ts → validate-schema.mts}
  35. +2 −0 lib/{cache.ts → cache.mts}
  36. +11 −10 lib/{check-or-update-webhooks.ts → check-or-update-webhooks.mts}
  37. +7 −2 lib/{get-actions-and-examples-from-payloads.ts → get-actions-and-examples-from-payloads.mts}
  38. +1 −1 lib/{get-html.ts → get-html.mts}
  39. +1 −1 lib/{get-sections.ts → get-sections.mts}
  40. +8 −0 lib/index.mts
  41. +0 −8 lib/index.ts
  42. +1 −1 lib/{section-to-webhook.ts → section-to-webhook.mts}
  43. +1 −1 lib/{workarounds.ts → workarounds.mts}
  44. +896 −1,945 package-lock.json
  45. +16 −15 package.json
  46. +3 −3 payload-examples/package-lock.json
  47. +1 −1 payload-schemas/api.github.com/common/workflow-step-completed.schema.json
  48. +7 −4 payload-schemas/{index.ts → index.mts}
  49. +1 −1 payload-types/schema.d.ts
  50. +8 −2 test.ts → test.mts
  51. +5 −4 tsconfig.json
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -38,11 +38,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2 # tag=v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +56,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2 # tag=v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -69,4 +69,4 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2 # tag=v2
uses: github/codeql-action/analyze@v3
6 changes: 3 additions & 3 deletions .github/workflows/immediate-response.yml
Original file line number Diff line number Diff line change
@@ -6,20 +6,20 @@ on:
issues:
types:
- opened
pull_request:
pull_request_target:
types:
- opened
jobs:
respond-to-issue:
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' }}
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' && github.actor != 'githubactions[bot]' && github.actor != 'octokitbot' }}
runs-on: ubuntu-latest
steps:
- name: Determine issue or PR number
id: extract
run: echo "NUMBER=${{ github.event.issue.number || github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"

- name: Respond to issue or PR
uses: peter-evans/create-or-update-comment@1f6c51492b7d8e91122ece56e2eb7ed38df14079
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ steps.extract.outputs.NUMBER }}
body: >
6 changes: 3 additions & 3 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -7,16 +7,16 @@ jobs:
lint_repo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
token: ${{ secrets.OCTOKITBOT_PAT }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- run: npm ci
- run: echo "./node_modules/.bin" >> $GITHUB_PATH
- run: ./bin/format-with-prettier.ts
- run: ./bin/format-with-prettier.mts
- run: git diff-index --quiet HEAD
- if: failure()
run: |
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ jobs:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-node@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
16 changes: 8 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -13,8 +13,8 @@ jobs:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-node@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
@@ -24,8 +24,8 @@ jobs:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-node@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
@@ -36,8 +36,8 @@ jobs:
name: Do types need to be regenerated?
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-node@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
@@ -52,8 +52,8 @@ jobs:
name: Do examples need to be regenerated?
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-node@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
4 changes: 2 additions & 2 deletions .github/workflows/update-prettier.yml
Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@ jobs:
update_prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-node@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
6 changes: 3 additions & 3 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"on":
schedule:
- cron: 0 * * * *
- cron: 0 */12 * * *
repository_dispatch:
types:
- github-webhooks-update
@@ -9,8 +9,8 @@ jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-node@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -307,7 +307,7 @@ const handleIssuesOpenedEvent = (event: IssuesOpenedEvent) => {

This package updates itself using a daily cronjob running on GitHub Actions. The
[`index.json`](index.json) file is generated by
[`bin/octokit-webhooks.ts`](bin/octokit-webhooks.ts). Run
[`bin/octokit-webhooks.mts`](bin/octokit-webhooks.mts). Run
`npm run octokit-webhooks -- --usage` for instructions. After the update is
complete, run `npm run build:webhooks` and `npm run build:schema` to update
`index.json` and `schema.json` files.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env ts-node-transpile-only
#!/usr/bin/env -S ts-node-transpile-only --esm

import { diffString } from "json-diff";
import { JSONSchema7 } from "json-schema";
@@ -7,7 +7,7 @@ import {
loadMapOfSchemas,
normalizeSchema,
parseArgv,
} from "./utils";
} from "./utils/index.mjs";

const [
[interfacePropertyPath1, interfacePropertyPath2],
10 changes: 5 additions & 5 deletions bin/docs/diff-interface-schemas.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bin/diff-interface-schemas.ts
# bin/diff-interface-schemas.mts

Shows the difference between the json schemas for the given interface
properties.
@@ -13,8 +13,8 @@ You can see the full diff for two schemas by passing the `--full` flag.

## Usage

bin/diff-interface-schemas.ts <interface property path> <interface property path> [--full]
bin/diff-interface-schemas.ts PullRequestOpenEvent.pull_request PullRequestCloseEvent.pull_request
bin/diff-interface-schemas.mts <interface property path> <interface property path> [--full]
bin/diff-interface-schemas.mts PullRequestOpenEvent.pull_request PullRequestCloseEvent.pull_request

## Details

@@ -49,7 +49,7 @@ interface PullRequestCloseEvent {
You could compare the schemas of the "pull_request" property on each interface
like so:

bin/diff-interface-schema.ts PullRequestOpenEvent.pull_request PullRequestCloseEvent.pull_request
bin/diff-interface-schema.mts PullRequestOpenEvent.pull_request PullRequestCloseEvent.pull_request

Note that you can also provide just the name of an interface, i.e.

@@ -72,4 +72,4 @@ interface PullRequestCloseEvent {
}
```

bin/diff-interface-schema.ts PullRequest PullRequestCloseEvent.pull_request
bin/diff-interface-schema.mts PullRequest PullRequestCloseEvent.pull_request
8 changes: 4 additions & 4 deletions bin/docs/extract-common-schema.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bin/extract-common-schema.ts
# bin/extract-common-schema.mts

Extracts a schema from within another into a new "common" schema which are
placed in `schemas/common/`.
@@ -8,8 +8,8 @@ generated name. You can pass the `--overwrite` flag to change this behaviour.

## Usage

bin/extract-common-schema.ts <interface property path> <interface name> [--overwrite]
bin/extract-common-schema.ts PullRequestOpenEvent.pull_request PullRequest
bin/extract-common-schema.mts <interface property path> <interface name> [--overwrite]
bin/extract-common-schema.mts PullRequestOpenEvent.pull_request PullRequest

## Details

@@ -45,7 +45,7 @@ You could extract the schema for the type of `pull_request` property on one of
the interfaces into its own common schema that would generate an interface named
`PullRequest` with the following:

bin/extract-common-schema.ts PullRequestOpenEvent.pull_request PullRequest
bin/extract-common-schema.mts PullRequestOpenEvent.pull_request PullRequest

This would create a new schema located at
`payload-schemas/schemas/common/pull-request.schema.json` which would generate
6 changes: 3 additions & 3 deletions bin/docs/format-with-prettier.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bin/format-with-prettier.ts
# bin/format-with-prettier.mts

Formats all the json payloads and schemas within this repo using `prettier`
consistently by stripping them of all whitespace and newlines first.
@@ -11,5 +11,5 @@ without writing the formatted contents back to disk.

## Usage

bin/format-with-prettier.ts [--check]
bin/format-with-prettier.ts
bin/format-with-prettier.mts [--check]
bin/format-with-prettier.mts
4 changes: 2 additions & 2 deletions bin/docs/octokit-schema.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# bin/octokit-schema.ts
# bin/octokit-schema.mts

Generates the singular `schema.json` made up of all the schemas found within
`payload-schemas/schemas`, and which is included in the [@octokit/webhooks-schemas package](https://www.npmjs.com/package/@octokit/webhooks-schemas) published from
this repo.

## Usage

bin/octokit-schema.ts
bin/octokit-schema.mts
4 changes: 2 additions & 2 deletions bin/docs/octokit-types.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bin/octokit-types.ts
# bin/octokit-types.mts

Generates the singular `schema.d.ts` that provide strict typings for TypeScript
users, based off the `schema.json` generated by `bin/octokit-schema `, and which
@@ -10,4 +10,4 @@ before running this script for changes to show up.

## Usage

bin/octokit-types.ts
bin/octokit-types.mts
4 changes: 2 additions & 2 deletions bin/docs/optimize-schemas.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bin/optimize-schemas.ts
# bin/optimize-schemas.mts

Applies a handful of "optimizations" to all the schemas in
`payload-schemas/schemas`.
@@ -18,4 +18,4 @@ These optimizations include:

## Usage

bin/optimize-schemas.ts
bin/optimize-schemas.mts
6 changes: 3 additions & 3 deletions bin/docs/ref-common-schemas.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bin/ref-common-schemas.ts
# bin/ref-common-schemas.mts

Compares the contents of every schema within `payload-schemas/schemas` _except
the common schemas_ against the common schemas, replacing any matches with a
@@ -13,5 +13,5 @@ how much difference there is between two schemas at time of validation.

## Usage

bin/ref-common-schemas.ts <interface property path> <interface property path> [--full]
bin/ref-common-schemas.ts PullRequestOpenEvent.pull_request PullRequestCloseEvent.pull_request
bin/ref-common-schemas.mts <interface property path> <interface property path> [--full]
bin/ref-common-schemas.mts PullRequestOpenEvent.pull_request PullRequestCloseEvent.pull_request
6 changes: 3 additions & 3 deletions bin/docs/validate-payload-examples.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bin/validate-payload-examples.ts
# bin/validate-payload-examples.mts

Validates all the payload examples in `payload-examples` against the appropriate
schemas in `payload-schemas`.
@@ -9,5 +9,5 @@ validation will stop. You can change this behaviour by passing the

## Usage

bin/validate-payload-examples.ts [--continue-on-error]
bin/validate-payload-examples.ts
bin/validate-payload-examples.mts [--continue-on-error]
bin/validate-payload-examples.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env ts-node-transpile-only
#!/usr/bin/env -S ts-node-transpile-only --esm

import { strict as assert } from "assert";
import fs from "fs";
@@ -9,8 +9,10 @@ import {
loadMapOfSchemas,
parseArgv,
pathToSchemas,
} from "./utils";
} from "./utils/index.mjs";
import { fileURLToPath } from "url";

const __filename = fileURLToPath(import.meta.url);
const [
[interfacePropertyPath, interfaceName],
{ overwrite: overwriteIfExists },
6 changes: 4 additions & 2 deletions bin/format-with-prettier.ts → bin/format-with-prettier.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env ts-node-transpile-only
#!/usr/bin/env -S ts-node-transpile-only --esm

import fs from "fs";
import { JSONSchema7 } from "json-schema";
@@ -8,8 +8,10 @@ import {
parseArgv,
pathToPayloads,
pathToSchemas,
} from "./utils";
} from "./utils/index.mjs";
import { fileURLToPath } from "url";

const __filename = fileURLToPath(import.meta.url);
const [, { check: checkOnly }] = parseArgv(__filename, [], ["check"]);

const formatJsonInDirectory = (pathToJsons: string) => {
Loading